SHA-3 vs the world
David Wong
SHA-3 vs the world David Wong Snefru MD4 Snefru MD4 Snefru MD4 - - PowerPoint PPT Presentation
SHA-3 vs the world David Wong Snefru MD4 Snefru MD4 Snefru MD4 MD5 MerkleDamgrd SHA-1 SHA-2 Snefru MD4 MD5 MerkleDamgrd SHA-1 SHA-2 Snefru MD4 MD5 MerkleDamgrd SHA-1 SHA-2 Snefru MD4 MD5 MerkleDamgrd
SHA-3 vs the world
David Wong
Snefru MD4
Snefru MD4
Snefru MD4 MD5 SHA-1 SHA-2
Merkle–Damgård
Snefru MD4 MD5 SHA-1 SHA-2
Merkle–Damgård
Snefru MD5 SHA-1 SHA-2
Merkle–Damgård
MD4
Snefru MD5 SHA-1 SHA-2
Merkle–Damgård
MD4
BLAKE, Grøstl, JH, Skein
Outline
1.SHA-3 2.derived functions 3.derived protocols
f
permutation-based cryptography
AES
AES is a permutation input
AES
AES is a permutation input
key
f
Sponge Construction
f
Sponge Construction
1 1 1 1
f
Sponge Construction r c
1 1 1 1
f
Sponge Construction
AES
key r c r c
1 1 1 1
f
message ⊕ Sponge Construction
1 1 1 1
f
message
⊕ ⊕
Sponge Construction
f
message
⊕ ⊕
f
Sponge Construction
f
message
⊕ ⊕
f
⊕
Sponge Construction
f
message
⊕ ⊕
f
⊕
f
Sponge Construction
f
message
⊕ ⊕
f
⊕
f
absorbing
Sponge Construction
absorbing
f
message
⊕ ⊕
f
⊕
f
Sponge Construction
absorbing
f
message
⊕ ⊕
f
⊕
f
f
Sponge Construction
absorbing
f
message
⊕ ⊕
f
⊕
f
f
Sponge Construction
absorbing
f
message
⊕ ⊕
f
⊕
f
f f
Sponge Construction
f
message
⊕ ⊕
f
⊕
f
f f
squeezing
Sponge Construction
absorbing
Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche
SHA-3 competition 2012 2007
SHA-3 competition 2012 2007 SHA-3 standard (FIPS 202) 2015
Where is SHA-3 being used?
Outline
1.SHA-3 2.derived functions 3.derived protocols
SHA-3 competition 2012 2007 SHA-3 standard (FIPS 202) 2015 SP 800-185 2016
KMAC TupleHash ParallelHash
KMAC TupleHash ParallelHash message || SHA-256(message)
KMAC TupleHash ParallelHash message || SHA-256(key||message)
KMAC TupleHash ParallelHash message || more || SHA-256(key||message||more)
KMAC TupleHash ParallelHash message || SHAKE(key || message)
KMAC TupleHash ParallelHash message || SHAKE(key || message) my RSA public key = (e, N)
KMAC TupleHash ParallelHash message || SHAKE(key || message) my RSA public key = (e, N) fingerprint = SHA-256(e || N)
KMAC TupleHash ParallelHash message || SHAKE(key || message) fingerprint1 = SHA-256(1010110000000010001…) e N
KMAC TupleHash ParallelHash message || SHAKE(key || message) fingerprint1 = SHA-256(1010110000000010001…) e N fingerprint2 = SHA-256(1010110000000010001…) e N
KMAC TupleHash ParallelHash message || SHAKE(key || message) SHAKE(len(e) || e || len(N) || N)
squeezing absorbing
f
message
⊕ ⊕
f
⊕
f
f f
Sponge Construction
squeezing absorbing
f
message
⊕ ⊕
f
⊕
f
f f
Sponge Construction
squeezing absorbing
f
message
⊕ ⊕
f
⊕
f
f f
Sponge Construction
squeezing absorbing
f
message
⊕ ⊕
f
⊕
f
f f
Sponge Construction
KMAC TupleHash ParallelHash message || SHAKE(key || message) SHAKE(len(e) || e || len(N) || N) SHAKE(SHAKE(b1) || SHAKE(b2) || SHAKE(b3) || …)
SHA-3 competition 2012 2007 SHA-3 / SHAKE 2015 TupleHash / ParallelHash / KMAC 2016
Keyak and Ketje
SHA-3 competition 2012 2007 SHA-3 / SHAKE 2015 TupleHash / ParallelHash / KMAC 2016 KangarooTwelve & MarsupilamiFourteen
SHA-3 competition 2012 2007 SHA-3 / SHAKE 2015 TupleHash / ParallelHash / KMAC 2016 KangarooTwelve & MarsupilamiFourteen
github.com/gvanas/KeccakCodePackage
Outline
1.SHA-3 2.derived functions 3.derived protocols
f
message
⊕ ⊕
f
⊕
f
f f
Sponge Construction
squeezing absorbing
f
input
⊕
init
duplexing
Duplex Construction
f
input
⊕
duplexing
f
input
duplexing
⊕
Keyed-mode
f
key
⊕
init duplexing
Keyed-mode
f
key
⊕
init duplexing
secret part leak
f
key
⊕
init duplexing
Encryption?
f
key
⊕
init duplexing
ciphertext1 plaintext1
⊕
Encryption
f
key
⊕
init duplexing
ciphertext1 plaintext1
⊕
f
⊕
tag1
duplexing
Authenticated Encryption
f
key
⊕
init duplexing
ciphertext1 plaintext1
⊕
f
⊕
tag1
duplexing
f
ciphertext2
duplexing
f
⊕
tag2
duplexing
plaintext2
⊕
Sessions
myProtocol = Strobe_init(“myWebsite.com”) myProtocol.KEY(sharedSecret) buffer += myProtocol.send_ENC(“GET /”) buffer += myProtocol.send_MAC(len=16) // send the buffer // receive a ciphertext message = myProtocol.recv_ENC(ciphertext[:-16])
if !ok { // reset the connection } Strobe
myHash = Strobe_init(“hash”) myHash.AD(“something to be hashed”) hash = myHash.PRF(outputLen=16) Hash Function
KDF = Strobe_init(“deriving keys”) KDF.KEY(keyExchangeOutput) keys = KDF.PRF(outputLen=32) key1 = keys[:16] key2 = keys[16:] Key Derivation Function
data = 010100…
⊕
⊕
data = 010100…
f
⊕ ⊕
⊕
len = 16 tag
init
f
⊕
data = 010100…
init
f
⊕
data = 010100…
f
⊕
data = hello
⊕
ciphertext
init
f
⊕
data = 010100…
f f
⊕
data = hello
⊕
ciphertext
len = 16 tag
⊕
strobe.sourceforge.io
Outline
1.SHA-3 2.derived functions 3.derived protocols 4.Disco?
www.discocrypto.com
Noise + Strobe = Disco
I write about crypto at www.cryptologie.net I tweet my mind on twitter.com/lyon01_david
and I work here