Broslavsky Oleg
SiBears
Attacker is assumed to have:
ο‚§Zero visibility on code during
execution
ο‚§External information, such as plaintext
or ciphertext
ο‚§Considered secure as long as the
cipher has no cryptographic
weaknesses
Attacker is assumed to have:
ο‚§Partial physical access to the
cryptographic key as a result of the
cipher leaking side-channel
information
ο‚§ Electromagnetic radiation analysis
ο‚§ Current/power consumption analysis
ο‚§ Operation timing analysis
Attacker is assumed to have:
ο‚§Full visibility β€” inputs, outputs,
memory (using debuggers), and
intermediate calculations
ο‚§Access to the algorithms while
watching how they are carried out
Traditional cryptography is not secure
when running in a white-box model
Digital Rights Management Systems
ο‚§ The end-user is then able to purchase some
type of premium content (e.g., new GoT
season)
ο‚§ The content arrives at the user’s device
encrypted, and is decrypted by the software
as it is viewed
ο‚§ A malicious end-user may attempt to extract
cryptographic keys from the software and
then use them to redistribute content outside
the DRM system
Client-side web application.
ο‚§ Web application forms some client-side
queries to the backend
ο‚§ A malicious user may attempt to form
malicious queries and exploit some backend
vulnerabilities
Common case W/ white-box crypto in JS
ο‚§Generate for every key a fixed
implementation, that will contain
hard-coded key
ο‚§Hide hardcoded key so,
that encrypt and decrypt
operations maintain sensitive
data without revealing any
portions of the key
ο‚§Make the key extraction difficult
or even impracticable
The Advanced Encryption Standard (AES) is a specification for the encryptionof
electronic data established by the U.S. National Institute of Standards and
Technology (NIST)
ο‚§Each byte in
the state matrix is replaced
with a SubByte using an 8-
bit substitution box
ο‚§This operation provides the
non-linearity in the cipher.
ο‚§The S-box used is derived
from the multiplicative
inverse over GF(28)
ο‚§Known to have good non-
linearity properties
ο‚§Cyclically shifts the bytes in each row by a
certain offset
ο‚§The importance of this step is to avoid the
columns being linearly independent
ο‚§Together with ShiftRows,
MixColumns provides diffusion in
the cipher
ο‚§Each column is treated as a
polynomial over GF(28) and is
then multiplied modulo x4+1 with
a fixed polynomial
c(x) = 3x3 + x2 + x + 2
ο‚§For each round, a round
key is derived from the
main key using Rijndael's
key schedule
ο‚§The subkey is added by
combining each byte of the
state with the
corresponding byte of the
subkey using bitwise XOR
Move 0 round
key into the loop
Swap SubBytes and
ShiftRows operations
(order of bytes affects
only the order of
substitutions not the
result at all)
Combine
AddShiftedRoudKey and
SubBytes into Nr
substitution tables (one
for each round).
Name such tables T-
tables and will calculate
them as following:
Since the MixColumns is
a linear transformation,
it can also be
implemented using
couple of tables
MixColumns step can be decomposed into an exclusive-or of
four 32-bit values
4 x TyTables each with 256
entries (one for every
possible byte value)
XOR operation also could
easily be implemented
using substitution tables
More information can be found in Β§4
of A Tutorial on White-box AES by
James Muir
For more security Chow
suggest to apply to the
state in every round
invertible mixing
bijections and external
encodings
Comics styled AES
http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html
Website with aggregated information about white-box
cryptography
http://www.whiteboxcrypto.com/
A Tutorial on White-box AES by James Muir
https://ccsl.carleton.ca/~jamuir/papers/wb-aes-tutorial.pdf
Some example implementations of White-box AES and attacks
on it
https://github.com/openwhitebox
Oleg Broslavsky
ovbroslavsky@gmail.com
@yalegko

White box cryptography

  • 1.
  • 2.
    Attacker is assumedto have: ο‚§Zero visibility on code during execution ο‚§External information, such as plaintext or ciphertext ο‚§Considered secure as long as the cipher has no cryptographic weaknesses
  • 3.
    Attacker is assumedto have: ο‚§Partial physical access to the cryptographic key as a result of the cipher leaking side-channel information ο‚§ Electromagnetic radiation analysis ο‚§ Current/power consumption analysis ο‚§ Operation timing analysis
  • 4.
    Attacker is assumedto have: ο‚§Full visibility β€” inputs, outputs, memory (using debuggers), and intermediate calculations ο‚§Access to the algorithms while watching how they are carried out Traditional cryptography is not secure when running in a white-box model
  • 5.
    Digital Rights ManagementSystems ο‚§ The end-user is then able to purchase some type of premium content (e.g., new GoT season) ο‚§ The content arrives at the user’s device encrypted, and is decrypted by the software as it is viewed ο‚§ A malicious end-user may attempt to extract cryptographic keys from the software and then use them to redistribute content outside the DRM system
  • 6.
    Client-side web application. ο‚§Web application forms some client-side queries to the backend ο‚§ A malicious user may attempt to form malicious queries and exploit some backend vulnerabilities Common case W/ white-box crypto in JS
  • 7.
    ο‚§Generate for everykey a fixed implementation, that will contain hard-coded key ο‚§Hide hardcoded key so, that encrypt and decrypt operations maintain sensitive data without revealing any portions of the key ο‚§Make the key extraction difficult or even impracticable
  • 8.
    The Advanced EncryptionStandard (AES) is a specification for the encryptionof electronic data established by the U.S. National Institute of Standards and Technology (NIST)
  • 10.
    ο‚§Each byte in thestate matrix is replaced with a SubByte using an 8- bit substitution box ο‚§This operation provides the non-linearity in the cipher. ο‚§The S-box used is derived from the multiplicative inverse over GF(28) ο‚§Known to have good non- linearity properties
  • 11.
    ο‚§Cyclically shifts thebytes in each row by a certain offset ο‚§The importance of this step is to avoid the columns being linearly independent
  • 12.
    ο‚§Together with ShiftRows, MixColumnsprovides diffusion in the cipher ο‚§Each column is treated as a polynomial over GF(28) and is then multiplied modulo x4+1 with a fixed polynomial c(x) = 3x3 + x2 + x + 2
  • 13.
    ο‚§For each round,a round key is derived from the main key using Rijndael's key schedule ο‚§The subkey is added by combining each byte of the state with the corresponding byte of the subkey using bitwise XOR
  • 14.
    Move 0 round keyinto the loop Swap SubBytes and ShiftRows operations (order of bytes affects only the order of substitutions not the result at all)
  • 15.
    Combine AddShiftedRoudKey and SubBytes intoNr substitution tables (one for each round). Name such tables T- tables and will calculate them as following:
  • 16.
    Since the MixColumnsis a linear transformation, it can also be implemented using couple of tables
  • 17.
    MixColumns step canbe decomposed into an exclusive-or of four 32-bit values 4 x TyTables each with 256 entries (one for every possible byte value) XOR operation also could easily be implemented using substitution tables
  • 18.
    More information canbe found in Β§4 of A Tutorial on White-box AES by James Muir For more security Chow suggest to apply to the state in every round invertible mixing bijections and external encodings
  • 19.
    Comics styled AES http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html Websitewith aggregated information about white-box cryptography http://www.whiteboxcrypto.com/ A Tutorial on White-box AES by James Muir https://ccsl.carleton.ca/~jamuir/papers/wb-aes-tutorial.pdf Some example implementations of White-box AES and attacks on it https://github.com/openwhitebox
  • 20.