Merkle signature scheme: Difference between revisions

From testwiki
Jump to navigation Jump to search
imported>Rich Farmbrough
Copyedit. Date formats.
 
(No difference)

Latest revision as of 21:07, 21 February 2025

In hash-based cryptography, the Merkle signature scheme is a digital signature scheme based on Merkle trees (also called hash trees) and one-time signatures such as the Lamport signature scheme. It was developed by Ralph Merkle in the late 1970s[1] and is an alternative to traditional digital signatures such as the Digital Signature Algorithm or RSA. NIST has approved specific variants of the Merkle signature scheme in 2020.[2]

An advantage of the Merkle signature scheme is that it is believed to be resistant against attacks by quantum computers. The traditional public key algorithms, such as RSA and ElGamal would become insecure if an effective quantum computer could be built (due to Shor's algorithm). The Merkle signature scheme, however, only depends on the existence of secure hash functions. This makes the Merkle signature scheme very adjustable and resistant to quantum computer-based attacks. The Merkle signature is a one time signature with finite signing potential. The work of Moni Naor and Moti Yung on signature based one-way permutations and functions (and the invention of universal one-way hash functions) gives a way to extend a Merkle-like signature to a complete signature scheme.[3]

Key generation

The Merkle signature scheme can be used to sign a limited number of messages with one public key pub. The number of possible messages must be a power of two, so we denote the possible number of messages as N=2n.

The first step of generating the public key pub is to generate N private/public key pairs (Xi,Yi) of some one-time signature scheme (such as the Lamport signature scheme). For each 1i2n, a hash value of the public key hi=H(Yi) is computed.

Merkle Tree with 8 leaves

With these hash values hi a hash tree is built, by placing these 2n hash values as leaves and recursively hashing to form a binary tree. Let ai,j denote the node in the tree with height i and left-right position j. Then, the hash values hi=a0,i are the leaves. The value for each inner node of the tree is the hash of the concatenation of its two children. For example, a1,0=H(a0,0||a0,1) and a2,0=H(a1,0||a1,1). In this way, a tree with 2n leaves and 2n+11 nodes is built.

The private key of the Merkle signature scheme is the entire set of (Xi,Yi) pairs. A shortcoming with the scheme is that the size of the private key scales linearly with the number of messages to be sent.

The public key pub is the root of the tree, an,0. The individual public keys Yi can be made public without breaking security. However, they are not needed in the public key, so they can be kept secret to minimize the size of the public key.

Signature generation

To sign a message M with the Merkle signature scheme, the signer picks a key pair (Xi,Yi), signs the message using the one-time signature scheme, and then adds additional information to prove that the key pair used was one of the original key pairs (rather than one newly generated by a forger).

Merkle tree with path A and authentication path for i = 2, n = 3

First, the signer chooses a (Xi,Yi) pair which had not previously been used to sign any other message, and uses the one-time signature scheme to sign the message, resulting in a signature sig and corresponding public key Yi. To prove to the message verifier that (Xi,Yi) was in fact one of the original key pairs, the signer simply includes intermediate nodes of the Merkle tree so that the verifier can verify hi=a0,i was used to compute the public key an,0 at the root of the tree. The path in the hash tree from a0,i to the root is n+1 nodes long. Call the nodes A0,,An, with A0=a0,i=H(Yi) being a leaf and An=an,0=pub being the root.

Ai is a child of Ai+1. To let the verifier calculate the next node Ai+1 given the previous, they need to know the other child of Ai+1, the sibling node of Ai. We call this node authi, so that Ai+1=H(Ai||authi). Hence, n nodes auth0,,authn1 are needed, to reconstruct An=an,0=pub from A0=a0,i. An example of an authentication path is illustrated in the figure on the right.

Together, the nodes auth0,,authn1, the Yi, and the one-time signature sig constitute a signature of M using the Merkle signature scheme: sig=(sig||Yi||auth0||auth1||||authn1).

Note that when using the Lamport signature scheme as the one-time signature scheme, sig contains a part of the private key Xi.

Signature verification

The receiver knows the public key pub, the message M, and the signature sig=(sig||Yi||auth0||auth1||||authn1). First, the receiver verifies the one-time signature sig of the message M using the one-time signature public key Yi. If sig is a valid signature of M, the receiver computes A0=H(Yi) by hashing the public key of the one-time signature. For j=1,,n1, the nodes of Aj of the path are computed with Aj=H(Aj1||authj1). If An equals the public key pub of the Merkle signature scheme, the signature is valid.

References

Template:Reflist

  • E. Dahmen, M. Dring, E. Klintsevich, J. Buchmann, L.C. Coronado Garca. "CMSS - an improved merkle signature scheme". Progress in Cryptology – Indocrypt 2006, 2006.
  • E. Klintsevich, K. Okeya, C.Vuillaume, J. Buchmann, E.Dahmen. "Merkle signatures with virtually unlimited signature capacity". 5th International Conference on Applied Cryptography and Network Security - ACNS07, 2007.
  • S. Micali, M. Jakobsson, T. Leighton, M. Szydlo. "Fractal merkle tree representation and traversal". RSA-CT 03, 2003

Template:Cryptography navbox Template:Authority control Template:Use dmy dates