hash based signatures
play

Hash-based signatures Peter Schwabe Radboud University, Nijmegen, - PowerPoint PPT Presentation

Hash-based signatures Peter Schwabe Radboud University, Nijmegen, The Netherlands June 28, 2018 PQCRYPTO Mini-School 2018, Taipei, Taiwan Just one talk on hash-based signatures . . . ? Post-quantum crypto so far 1. Take some hard problem,


  1. Hash-based signatures Peter Schwabe Radboud University, Nijmegen, The Netherlands June 28, 2018 PQCRYPTO Mini-School 2018, Taipei, Taiwan

  2. Just one talk on hash-based signatures . . . ? Post-quantum crypto so far 1. Take some hard problem, e.g., ◮ solving multivariate systems of equations; ◮ computing high-degree isogenies between elliptic curves; ◮ learning with errors (LWE), approx-SVP, . . . ; ◮ decoding problem. 2. Combine with hash function, KDF, PRG/PRF, . . . 3. Obtain public-key encryption (or key encapsulation) and signatures 2

  3. Just one talk on hash-based signatures . . . ? Post-quantum crypto so far 1. Take some hard problem, e.g., ◮ solving multivariate systems of equations; ◮ computing high-degree isogenies between elliptic curves; ◮ learning with errors (LWE), approx-SVP, . . . ; ◮ decoding problem. 2. Combine with hash function, KDF, PRG/PRF, . . . 3. Obtain public-key encryption (or key encapsulation) and signatures The plan in this talk 1. Take nothing 2. Combine with hash function, KDF, PRG/PRF, . . . 3. Obtain signatures 2

  4. Hash-based signatures ◮ Only one prerequisite: a good hash function, e.g. SHA3-256 ◮ Hash functions map long strings to fixed-length strings ◮ Standard properties required from a cryptographic hash function: ◮ Collision resistance: Hard two find two inputs that produce the same output ◮ Preimage resistance: Given the output, it’s hard to find the input ◮ 2nd preimage resistance: Given input and output, it’s hard to find a second input, producing the same output 3

  5. Hash-based signatures ◮ Only one prerequisite: a good hash function, e.g. SHA3-256 ◮ Hash functions map long strings to fixed-length strings ◮ Standard properties required from a cryptographic hash function: ◮ Collision resistance: Hard two find two inputs that produce the same output ◮ Preimage resistance: Given the output, it’s hard to find the input ◮ 2nd preimage resistance: Given input and output, it’s hard to find a second input, producing the same output ◮ Collision resistance is stronger assumption than (2nd) preimage resistance ◮ Ideally, don’t want to rely on collision resistance 3

  6. Signatures for 0 -bit messages Key generation ◮ Generate 256 -bit random value r (secret key) ◮ Compute p = h ( r ) (public key) 4

  7. Signatures for 0 -bit messages Key generation ◮ Generate 256 -bit random value r (secret key) ◮ Compute p = h ( r ) (public key) Signing ◮ Send σ = r 4

  8. Signatures for 0 -bit messages Key generation ◮ Generate 256 -bit random value r (secret key) ◮ Compute p = h ( r ) (public key) Signing ◮ Send σ = r Verification ◮ Check that h ( r ) = p 4

  9. Security of this scheme ◮ Clearly an attacker who can invert h can break the scheme ◮ Can we reduce from preimage-resistance to unforgeability? 5

  10. Security of this scheme ◮ Clearly an attacker who can invert h can break the scheme ◮ Can we reduce from preimage-resistance to unforgeability? ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use oracle to compute x , s.t., h ( x ) = y ◮ Idea: use public-key pk = y , oracle will compute forgery x 5

  11. Security of this scheme ◮ Clearly an attacker who can invert h can break the scheme ◮ Can we reduce from preimage-resistance to unforgeability? ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use oracle to compute x , s.t., h ( x ) = y ◮ Idea: use public-key pk = y , oracle will compute forgery x ◮ . . . or will it? 5

  12. Security of this scheme ◮ Clearly an attacker who can invert h can break the scheme ◮ Can we reduce from preimage-resistance to unforgeability? ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use oracle to compute x , s.t., h ( x ) = y ◮ Idea: use public-key pk = y , oracle will compute forgery x ◮ . . . or will it? ◮ Problem: y is not an output of h ◮ What if A can distinguish legit pk from random? ◮ Need additional property of h : undetectability ◮ From now on assume that all our hash functions are undetectable 5

  13. Signatures for 1 -bit messages Key generation ◮ Generate 256 -bit random values ( r 0 , r 1 ) = s (secret key) ◮ Compute ( h ( r 0 ) , h ( r 1 )) = ( p 0 , p 1 ) = p (public key) 6

  14. Signatures for 1 -bit messages Key generation ◮ Generate 256 -bit random values ( r 0 , r 1 ) = s (secret key) ◮ Compute ( h ( r 0 ) , h ( r 1 )) = ( p 0 , p 1 ) = p (public key) Signing ◮ Signature for message b = 0 : σ = r 0 ◮ Signature for message b = 1 : σ = r 1 6

  15. Signatures for 1 -bit messages Key generation ◮ Generate 256 -bit random values ( r 0 , r 1 ) = s (secret key) ◮ Compute ( h ( r 0 ) , h ( r 1 )) = ( p 0 , p 1 ) = p (public key) Signing ◮ Signature for message b = 0 : σ = r 0 ◮ Signature for message b = 1 : σ = r 1 Verification Check that h ( σ ) = p b 6

  16. Security of this scheme ◮ Same idea as for 0 -bit messages: reduce from preimage resistance 7

  17. Security of this scheme ◮ Same idea as for 0 -bit messages: reduce from preimage resistance ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use “public key” ( h ( r 0 ) , y ) or ( y, h ( r 1 )) 7

  18. Security of this scheme ◮ Same idea as for 0 -bit messages: reduce from preimage resistance ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use “public key” ( h ( r 0 ) , y ) or ( y, h ( r 1 )) ◮ A asks for signature on either 0 or 1 ◮ If you can, answer with preimage, otherwise fail (abort) 7

  19. Security of this scheme ◮ Same idea as for 0 -bit messages: reduce from preimage resistance ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use “public key” ( h ( r 0 ) , y ) or ( y, h ( r 1 )) ◮ A asks for signature on either 0 or 1 ◮ If you can, answer with preimage, otherwise fail (abort) ◮ Now A returns preimage, i.e., preimage of y 7

  20. Security of this scheme ◮ Same idea as for 0 -bit messages: reduce from preimage resistance ◮ Proof game: ◮ Assume oracle A that computes forgery, given public key pk ◮ Get input y , use “public key” ( h ( r 0 ) , y ) or ( y, h ( r 1 )) ◮ A asks for signature on either 0 or 1 ◮ If you can, answer with preimage, otherwise fail (abort) ◮ Now A returns preimage, i.e., preimage of y ◮ Reduction only works with 1 / 2 probability ◮ We get a tightness loss of 1 / 2 7

  21. One-time signatures for 256 -bit messages The Lamport OTS Key generation ◮ Generate 256 -bit random values s = ( r 0 , 0 , r 0 , 1 . . . , r 255 , 0 , r 255 , 1 ) ◮ Compute p = ( h ( r 0 , 0 ) , h ( r 0 , 1 ) , . . . , h ( r 255 , 0 ) , h ( r 255 , 1 )) = ( p 0 , 0 , p 0 , 1 , . . . , p 255 , 0 , p 255 , 1 ) 8

  22. One-time signatures for 256 -bit messages The Lamport OTS Key generation ◮ Generate 256 -bit random values s = ( r 0 , 0 , r 0 , 1 . . . , r 255 , 0 , r 255 , 1 ) ◮ Compute p = ( h ( r 0 , 0 ) , h ( r 0 , 1 ) , . . . , h ( r 255 , 0 ) , h ( r 255 , 1 )) = ( p 0 , 0 , p 0 , 1 , . . . , p 255 , 0 , p 255 , 1 ) Signing ◮ Signature for message ( b 0 , . . . , b 255 ) : σ = ( σ 0 , . . . , σ 255 ) = ( r 0 ,b 0 , . . . , r 255 ,b 255 ) 8

  23. One-time signatures for 256 -bit messages The Lamport OTS Key generation ◮ Generate 256 -bit random values s = ( r 0 , 0 , r 0 , 1 . . . , r 255 , 0 , r 255 , 1 ) ◮ Compute p = ( h ( r 0 , 0 ) , h ( r 0 , 1 ) , . . . , h ( r 255 , 0 ) , h ( r 255 , 1 )) = ( p 0 , 0 , p 0 , 1 , . . . , p 255 , 0 , p 255 , 1 ) Signing ◮ Signature for message ( b 0 , . . . , b 255 ) : σ = ( σ 0 , . . . , σ 255 ) = ( r 0 ,b 0 , . . . , r 255 ,b 255 ) Verification ◮ Check that h ( σ 0 ) = p 0 ,b 0 ◮ . . . ◮ Check that h ( σ 255 ) = p 255 ,b 255 8

  24. Security of this scheme ◮ Same idea as before, replace one p j,b in the public key by challenge y ◮ Fail if signing needs the preimage of y ◮ In forgery, attacker has to flip at least one bit in m ◮ Chance of 1 / 256 that attacker flips the bit with the challenge ◮ Overall tightness loss of 1 / 512 9

  25. Winternitz OTS (basic idea) ◮ Lamport signatures are rather large ( 16 KB) ◮ Can we tradeoff speed for size? ◮ Idea: use h w ( r ) intead of h ( r ) (“hash chains”) 10

  26. Winternitz OTS (basic idea) ◮ Lamport signatures are rather large ( 16 KB) ◮ Can we tradeoff speed for size? ◮ Idea: use h w ( r ) intead of h ( r ) (“hash chains”) Key generation ◮ Generate 256-bit random values r 0 , . . . , r 63 (secret key) ◮ Compute ( p 0 , . . . , p 63 ) = ( h 16 ( r 0 ) , . . . , h 16 ( r 63 ) (public key) 10

  27. Winternitz OTS (basic idea) ◮ Lamport signatures are rather large ( 16 KB) ◮ Can we tradeoff speed for size? ◮ Idea: use h w ( r ) intead of h ( r ) (“hash chains”) Key generation ◮ Generate 256-bit random values r 0 , . . . , r 63 (secret key) ◮ Compute ( p 0 , . . . , p 63 ) = ( h 16 ( r 0 ) , . . . , h 16 ( r 63 ) (public key) Signing ◮ Chop 256 bit message into 64 chunks of 4 bits m = ( m 0 , . . . , m 63 ) ◮ Compute σ = ( σ 0 , . . . , σ 63 ) = ( h m 0 ( r 0 ) , . . . , h m 63 ( r 63 )) 10

Recommend


More recommend