Merkle signature scheme

From HandWiki - Reading time: 6 min

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 [math]\displaystyle{ \text{pub} }[/math]. The number of possible messages must be a power of two, so we denote the possible number of messages as [math]\displaystyle{ N = 2^n }[/math].

The first step of generating the public key [math]\displaystyle{ \text{pub} }[/math] is to generate [math]\displaystyle{ N }[/math] private/public key pairs [math]\displaystyle{ (X_i, Y_i) }[/math] of some one-time signature scheme (such as the Lamport signature scheme). For each [math]\displaystyle{ 1 \leq i \leq 2^n }[/math], a hash value of the public key [math]\displaystyle{ h_i = H(Y_i) }[/math] is computed.

Merkle Tree with 8 leaves

With these hash values [math]\displaystyle{ h_i }[/math] a hash tree is built, by placing these [math]\displaystyle{ 2^n }[/math] hash values as leaves and recursively hashing to form a binary tree. Let [math]\displaystyle{ a_{i,j} }[/math] denote the node in the tree with height [math]\displaystyle{ i }[/math] and left-right position [math]\displaystyle{ j }[/math]. Then, the hash values [math]\displaystyle{ h_i = a_{0,i} }[/math] are the leaves. The value for each inner node of the tree is the hash of the concatenation of its two children. For example, [math]\displaystyle{ a_{1,0} = H(a_{0,0} || a_{0,1}) }[/math] and [math]\displaystyle{ a_{2,0} = H(a_{1,0} || a_{1,1}) }[/math]. In this way, a tree with [math]\displaystyle{ 2^n }[/math] leaves and [math]\displaystyle{ 2^{n+1} - 1 }[/math] nodes is built.

The private key of the Merkle signature scheme is the entire set of [math]\displaystyle{ (X_i, Y_i) }[/math] 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 [math]\displaystyle{ \text{pub} }[/math] is the root of the tree, [math]\displaystyle{ a_{n,0} }[/math]. The individual public keys [math]\displaystyle{ Y_i }[/math] 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 [math]\displaystyle{ M }[/math] with the Merkle signature scheme, the signer picks a key pair [math]\displaystyle{ (X_i, Y_i) }[/math], 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 [math]\displaystyle{ (X_i, Y_i) }[/math] 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 [math]\displaystyle{ \text{sig}' }[/math] and corresponding public key [math]\displaystyle{ Y_i }[/math]. To prove to the message verifier that [math]\displaystyle{ (X_i, Y_i) }[/math] 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 [math]\displaystyle{ h_i = a_{0,i} }[/math] was used to compute the public key [math]\displaystyle{ a_{n,0} }[/math] at the root of the tree. The path in the hash tree from [math]\displaystyle{ a_{0,i} }[/math] to the root is [math]\displaystyle{ n + 1 }[/math] nodes long. Call the nodes [math]\displaystyle{ A_0, \ldots, A_n }[/math], with [math]\displaystyle{ A_0 = a_{0,i} = H(Y_i) }[/math] being a leaf and [math]\displaystyle{ A_n = a_{n,0} = \text{pub} }[/math] being the root.

[math]\displaystyle{ A_i }[/math] is a child of [math]\displaystyle{ A_{i+1} }[/math]. To let the verifier calculate the next node [math]\displaystyle{ A_{i+1} }[/math] given the previous, they need to know the other child of [math]\displaystyle{ A_{i+1} }[/math], the sibling node of [math]\displaystyle{ A_i }[/math]. We call this node [math]\displaystyle{ \text{auth}_i }[/math], so that [math]\displaystyle{ A_{i+1} = H(A_i || \text{auth}_i) }[/math]. Hence, [math]\displaystyle{ n }[/math] nodes [math]\displaystyle{ \text{auth}_0, \ldots, \text{auth}_{n-1} }[/math] are needed, to reconstruct [math]\displaystyle{ A_n = a_{n,0} = \text{pub} }[/math] from [math]\displaystyle{ A_0 = a_{0,i} }[/math]. An example of an authentication path is illustrated in the figure on the right.

Together, the nodes [math]\displaystyle{ \text{auth}_{0}, \ldots, \text{auth}_{n-1} }[/math], the [math]\displaystyle{ Y_i }[/math], and the one-time signature [math]\displaystyle{ \text{sig}' }[/math] constitute a signature of [math]\displaystyle{ M }[/math] using the Merkle signature scheme: [math]\displaystyle{ \text{sig} = (\text{sig}' || Y_i || \text{auth}_0 || \text{auth}_1 || \ldots || \text{auth}_{n-1}) }[/math].

Note that when using the Lamport signature scheme as the one-time signature scheme, [math]\displaystyle{ \text{sig}' }[/math] contains a part of the private key [math]\displaystyle{ X_i }[/math].

Signature verification

The receiver knows the public key [math]\displaystyle{ \text{pub} }[/math], the message [math]\displaystyle{ M }[/math], and the signature [math]\displaystyle{ \text{sig} = (\text{sig}' || Y_i || \text{auth}_0 || \text{auth}_1 || \ldots || \text{auth}_{n-1}) }[/math]. First, the receiver verifies the one-time signature [math]\displaystyle{ \text{sig}' }[/math] of the message [math]\displaystyle{ M }[/math] using the one-time signature public key [math]\displaystyle{ Y_i }[/math]. If [math]\displaystyle{ \text{sig}' }[/math] is a valid signature of [math]\displaystyle{ M }[/math], the receiver computes [math]\displaystyle{ A_0 = H(Y_i) }[/math] by hashing the public key of the one-time signature. For [math]\displaystyle{ j = 1, \ldots, n - 1 }[/math], the nodes of [math]\displaystyle{ A_j }[/math] of the path are computed with [math]\displaystyle{ A_j = H(A_{j-1} || \text{auth}_{j-1}) }[/math]. If [math]\displaystyle{ A_n }[/math] equals the public key [math]\displaystyle{ \text{pub} }[/math] of the Merkle signature scheme, the signature is valid.

References

  • 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

External links




Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Merkle_signature_scheme
6 views | Status: cached on October 05 2024 11:14:03
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF