Professional Documents
Culture Documents
WG2 Isobe
WG2 Isobe
November 6, 2016
Plaintext Ciphertext
Ciphertext Plaintext
key
adversary
Crypto is Everywhere
The black-box model fails to reflect the reality
Beyond Blackbox
Cold boot attacks
Read the remaining memory contents in the seconds to
minutes after power-off
Software attacks
Binary analysis, reverse engineering
• Ex. Overwrite binary (e.g., S-box) to get the key
Internal states in memory often leaks in the real world
Our Questions
leakage
P
Key AES-
128
C
Two Leakage Models
• Fixed Location • Random Location
-Location of leaked bit is fix in each exe. -Location of leaked bit is random in each exe.
=> timing/space randomization
(software protection)
1 round 1 round
2 round 2 round
3 round 3 round
4 round 4 round
5 round 5 round
6 round 6 round
7 round 7 round
8 round 8 round
9 round 9 round
10 round 10 round
C C
Two Leakage Models
• Fixed Location • Random Location
-Location of leaked bit is fix in each exe. -Location of leaked bit is random in each exe.
=> timing/space randomization
(software protection)
1 round 1 round
2 round 2 round
3 round 3 round
4 round 4 round
5 round 5 round
6 round 6 round
7 round 7 round
8 round 8 round
9 round 9 round
10 round 10 round
C C
Two Leakage Models
• Fixed Location • Random Location
-Location of leaked bit is fix in each exe. -Location of leaked bit is random in each exe.
=> timing/space randomization
(software protection)
1 round 1 round
2 round 2 round
3 round 3 round
4 round 4 round
5 round 5 round
6 round 6 round
7 round 7 round
8 round 8 round
9 round 9 round
10 round 10 round
C C
Differential Bias Attack
Regard leaked bits as a bit-stream
Borrow techniques from the stream cipher domain
Correct Key
P = #0 #1 #2 #3 #4 #5 #6 #7
A A A A A A A A A A A A A A A A A A A A
A A A A A A A A A A A A A A A A
A A A A A A A A A A A A A A A A
A A A A A A A A A A A A A A A A
Wrong Key
A A A A ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
A A A A ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
A A A A ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
A A A A ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Even if in weakest leakage assumption (1 bit leakage at
random unknown location), a practical attack is possible!
Extensions
Noisy leakage Setting
Possible but noise make it time consuming work
Known plaintext Attack
Possible for differential bias attack
Bytewise Leakage
Somewhat improves attack complexity
Other granularities
Not only state after round function, but also states after SubBytes,
MixColumns, etc. can be used to mount differential bias attacks
AES-192/256 and some other ciphers
Same attacks are directly applicable
See the paper
Question from Real World
Adversary
key
Software
Whitebox Model
Adversary has full access to the crypto algorithm
and full control over its execution environment
Internal value : fully accessible (read/write)
key
adversary
Applications
DRM
Protected contents (e.g. movie and music) are decrypted in user
(adversary) device
• Adversary may control over the platform on which the media player
application is executed, and aims to extract a content key
credential
Payment Processor
NFC whitebox crypto
Reader
Application
Memory Leakage
Software attacks (Binary analysis)
Trojans, malware
Software vulnerability (e.g. heartbleed, buffer
overflow)
Unauthorized access to server
History of Whitebox Cryptography
Academic Level
In 2002, Cloakware (Irdeto) published a paper presenting the
first scheme of whitebox AES
However, all published whitebox AES were practically broken
by “BGE attack”
Industrial Level
WBC is widely deployed in many applications
• Details are kept secret
• Protected with additional countermeasures
Industrial Level
WBC is widely deployed in many applications
• Details are kept secret
• Protected with additional countermeasures
Industrial Level
WBC is widely deployed in many applications
• Details are kept secret
• Protected with additional countermeasures
High Performance
• Much faster than whitebox AES
– Whitebox AES (published by Cloakware): 0.4 MB/s
– SPACE: 10-100 MB/s
Others
• Not AES functionality but the interfaces are the same as AES
• SPACE can be considered a mode of operation for AES
SPACE Block Cipher
Target-Heavy Feistel Construction
128-bit plaintext is divided into na-bit x words, p0, p1,…px-1
F function: na bits to (128- na)
In the white box, F function becomes a table
p0 p1 px-1
plaintext
na
F0
Table
F1
ciphertext
F-function (Whitebox Table)
Table is created by AES-128
constrains the plaintext: 128 bit to na bits
truncates the ciphertext : 128 bit to 128- na bits
x x
Table Constant na
n - na na
K AES F function
k (Table)
n - na na
disregard
r
y y
Security in WhiteBox
WB attacker has access to input/output of the
table
Full Access
WB adversary
Confidential
Security in WhiteBox
WB attacker has access to input/output of the
table
What WB adversary can do is same as what BB
adversary can do for AES
x Table x
na C
n - nin nin
WB adversary
F function AES
(Table)
K k
n - nin nin
= BB adversary
disregard
y ry
Security in WhiteBox
WB attacker has access to input/output of the
table
What WB adversary can do is same as what BB
adversary can do for AES
128 bit
large key
Computationally infeasible
Space hardness
Difficult to find any compact representation
(incompressibility)
• Table decomposition is as hard as AES key recovery
Whitebox Cryptography
Mitigate Code Lifting Attack
Requires a large space to be isolated from execution environments
to copy functionality
• time-consuming work if network is narrow
• Easy to detect copying by monitoring traffic
Discourages the adversary from illegally distributing the code due to
its large size
hard to distribute
execution environment
T/4
ex. SPACE-16,
T/4 = 230 MB
Summary
Space-hard block cipher: SPACE
Security against key extraction/table decomposition
• White-box security is based on black-box security
• AES key-recovery problem in the blackbox model
Security against code lifting: space hardness
• Infeasible to find a compact implementation
High Performance
• Much faster than whitebox AES
– Whitebox AES (published by Cloakware): 0.4 MB/s
– SPACE: 10-100 MB/s