Hash-based signatures
Tanja Lange (with some slides by Daniel J. Bernstein)
Eindhoven University of Technology
Hash-based signatures Tanja Lange (with some slides by Daniel J. - - PowerPoint PPT Presentation
Hash-based signatures Tanja Lange (with some slides by Daniel J. Bernstein) Eindhoven University of Technology 20 July 2020 Benefits of hash-based signatures Old idea: 1979 Lamport one-time signatures. 1979 Merkle extends to more
Eindhoven University of Technology
◮ Old idea: 1979 Lamport one-time signatures. ◮ 1979 Merkle extends to more signatures;
◮ Security thoroughly analyzed. ◮ Only one prerequisite: a good hash function, e.g. SHA3-512, . . .
◮ Cryptographic hash functions are computationally
◮ preimage resistant: function is one way; ◮ second preimage resistant:
◮ collision resistant: cannot find x′ = x with H(x′) = H(x).
Tanja Lange Hash-based signatures 2
Tanja Lange Hash-based signatures 3
Tanja Lange Hash-based signatures 3
Tanja Lange Hash-based signatures 3
Tanja Lange Hash-based signatures 4
Tanja Lange Hash-based signatures 4
Tanja Lange Hash-based signatures 5
Tanja Lange Hash-based signatures 5
Tanja Lange Hash-based signatures 6
Tanja Lange Hash-based signatures 6
Tanja Lange Hash-based signatures 7
Tanja Lange Hash-based signatures 8
Tanja Lange Hash-based signatures 9
Tanja Lange Hash-based signatures 10
◮ Lamport’s signatures have 2 × 256 hash outputs (each 32 bytes) as
◮ Define
◮ Pick random sk, compute pk= H16(sk). ◮ For message m reveal s = Hm(sk) as signature. ◮ To verify check that pk= H16−m(s).
◮ Lamport’s signatures have 2 × 256 hash outputs (each 32 bytes) as
◮ Define
◮ Pick random sk, compute pk= H16(sk). ◮ For message m reveal s = Hm(sk) as signature. ◮ To verify check that pk= H16−m(s). ◮ This works – but is insecure!
◮ Lamport’s signatures have 2 × 256 hash outputs (each 32 bytes) as
◮ Define
◮ Pick random sk, compute pk= H16(sk). ◮ For message m reveal s = Hm(sk) as signature. ◮ To verify check that pk= H16−m(s). ◮ This works – but is insecure!
◮ Lamport’s signatures have 2 × 256 hash outputs (each 32 bytes) as
◮ Define
◮ Pick random sk, compute pk= H16(sk). ◮ For message m reveal s = Hm(sk) as signature. ◮ To verify check that pk= H16−m(s). ◮ This works – but is insecure!
◮ Fix by doubling the key-sizes again, running one chain forward, one
Tanja Lange Hash-based signatures 14
◮ Define parameter w. Each chain will run for 2w steps. ◮ For signing a 256-bit hash this needs t1 = ⌈256/w⌉ chains.
◮ Put
t1−1
◮ The checksum c gets larger if mi is smaller. ◮ Write c in base 2w. This takes t2 = 1 + ⌈⌊(log2 t1⌋ + 1)/w⌉
◮ Publish t1 + t2 public keys, sign with chains of lengths
Tanja Lange Hash-based signatures 15
◮ Define parameter w = 8. Each chain will run for 28 = 256 steps. ◮ For signing a 256-bit hash this needs t1 = ⌈256/8⌉ = 32 chains.
◮ Put
31
◮ The checksum c gets larger if mi is smaller. ◮ Write c in base 28. This takes t2 = 1 + ⌈(5 + 1)/8⌉ = 2
◮ Publish t1 + t2 = 34 public keys, sign with chains of lengths
Tanja Lange Hash-based signatures 16
Tanja Lange Hash-based signatures 17
Hash-based signatures 18
9 = H(P1, P2),
13 = H(P′ 9, P10), and comparing H(P′ 13, P14) with P15.
13, P14) = P15 of if the signature verification failed.
Tanja Lange Hash-based signatures 18
◮ Each key is good only for fixed number of messages, typically 2n. ◮ The public key is very short: just one hash output.
◮ Computing the public key requires computing and storing 2n
Tanja Lange Hash-based signatures 19
◮ Each key is good only for fixed number of messages, typically 2n. ◮ The public key is very short: just one hash output.
◮ Computing the public key requires computing and storing 2n
◮ Can trade time for space by computing the secret keys Si
Tanja Lange Hash-based signatures 19
◮ Each key is good only for fixed number of messages, typically 2n. ◮ The public key is very short: just one hash output.
◮ Computing the public key requires computing and storing 2n
◮ Can trade time for space by computing the secret keys Si
◮ Can build trees of trees where each leaf of the top tree signs the root
Tanja Lange Hash-based signatures 19
◮ Only one prerequisite: a good hash function, e.g. SHA3-512.
◮ Old idea: 1979 Lamport one-time signatures. ◮ 1979 Merkle extends to more signatures.
◮ Post quantum ◮ Only need secure hash
◮ Security well understood ◮ Fast
◮ Biggish signature
◮ Stateful, i.e., ever reusing a
Tanja Lange Hash-based signatures 20
◮ Only one prerequisite: a good hash function, e.g. SHA3-512.
◮ Old idea: 1979 Lamport one-time signatures. ◮ 1979 Merkle extends to more signatures.
◮ Post quantum ◮ Only need secure hash
◮ Security well understood ◮ Fast ◮ We can count: OS update,
◮ Biggish signature
◮ Stateful, i.e., ever reusing a
Tanja Lange Hash-based signatures 20
◮ CFRG has published 2 RFCs: RFC 8391 and RFC 8554
Tanja Lange Hash-based signatures 21
◮ CFRG has published 2 RFCs: RFC 8391 and RFC 8554 ◮ NIST has gone through two rounds of requests for public input,
Tanja Lange Hash-based signatures 21
◮ CFRG has published 2 RFCs: RFC 8391 and RFC 8554 ◮ NIST has gone through two rounds of requests for public input,
◮ ISO SC27 JTC1 WG2 has started a study period on stateful
Tanja Lange Hash-based signatures 21
◮ Idea from 1987 Goldreich:
◮ Signer builds huge tree of certificate authorities. ◮ Signature includes certificate chain. ◮ Each CA is a hash of master secret and tree position.
◮ Random bottom-level CA signs message.
Tanja Lange Hash-based signatures 22
◮ Idea from 1987 Goldreich:
◮ Signer builds huge tree of certificate authorities. ◮ Signature includes certificate chain. ◮ Each CA is a hash of master secret and tree position.
◮ Random bottom-level CA signs message.
◮ 0.6 MB: Goldreich’s signature with
◮ 1.2 MB: average Debian package size. ◮ 1.8 MB: average web page in Alexa Top 1000000.
Tanja Lange Hash-based signatures 22
◮ Idea from 1987 Goldreich:
◮ Signer builds huge tree of certificate authorities. ◮ Signature includes certificate chain. ◮ Each CA is a hash of master secret and tree position.
◮ Random bottom-level CA signs message.
◮ 0.6 MB: Goldreich’s signature with
◮ 1.2 MB: average Debian package size. ◮ 1.8 MB: average web page in Alexa Top 1000000. ◮ 0.041 MB: SPHINCS signature, new optimization of Goldreich.
Tanja Lange Hash-based signatures 22
◮ Signature based on hash functions. ◮ Requires only a secure hash function, no further assumptions. ◮ Based on ideas of Lamport (1979) and Merkle (1979). ◮ Developed starting from SPHINCS with
◮ improve multi-signature, ◮ smaller keys, ◮ Option for shorter signatures (30kB instead of 41kB) if “only” 250
◮ Three versions (using different hash functions)
◮ SPHINCS+-SHA3 (with SHAKE256), ◮ SPHINCS+-SHA2 (with SHA-256), ◮ SPHINCS+-Haraka (with Haraka, a hash function for short inputs).
Tanja Lange Hash-based signatures 23
Tanja Lange Hash-based signatures 24
◮ Symmetric encryption Thoroughly analyzed, 256-bit keys:
◮ AES-256 ◮ Salsa20 with a 256-bit key
◮ Symmetric authentication Information-theoretic MACs:
◮ GCM using a 96-bit nonce and a 128-bit authenticator ◮ Poly1305
◮ Public-key encryption McEliece with binary Goppa codes:
◮ length n = 6960, dimension k = 5413, t = 119 errors
◮ Public-key signatures Hash-based (minimal assumptions):
◮ XMSS with any of the parameters specified in CFRG draft ◮ SPHINCS-256
Tanja Lange Hash-based signatures 25