State digital signature algorithm suitable for cluster environment

By splitting and allocating the HSS private key to the cluster node, the problem that the HSS algorithm cannot be used in the cluster environment is solved, and effective digital signature generation and verification in the cluster is realized.

CN119449325APending Publication Date: 2025-02-14KOAL SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411641697.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing HSS digital signature algorithm cannot be used effectively in the cluster environment because the q value in the private key is calculated or modified, resulting in the same HSS private key not working properly in the cluster environment.

Method used

A new private key generation method and signature method are proposed. By splitting the HSS private key into multiple private keys and allocating these divided private keys to nodes in the cluster, the HSS private key is completed in a cluster environment. Digital signature. The specific steps include generating a CHSS key pair, assigning it to the cluster node, and calculating the signature value of the message on the node.

Benefits of technology

It realizes the effective use of HSS private keys in the cluster environment, ensures that digital signatures can be generated and verified normally in the cluster, and solves the problem that HSS algorithm cannot be used in the cluster environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449325A_ABST
    Figure CN119449325A_ABST
Patent Text Reader

Abstract

The invention discloses a stateful digital signature algorithm suitable for a cluster environment, which belongs to the technical field of digital signatures, and comprises the following steps: step 1, generating a CHSS key pair, and distributing the CHSS key pair to nodes in a cluster; 2, generating a digital signature in the cluster environment; step 3, calculating the signature value of the message M: node [i]. Sig [L-1] = lmssign (M, node [i]. Prv [L-1]); step 4, obtaining a digital signature value S = L <-1 > node [i]. Sig [0] node [i]. Pub [1]... node [i]. Sig [L-2] node [i]. Pub [L-1] node [i]. Sig [L-1]; and step 5, outputting S. The step 1 comprises the following sub-steps: step 1, generating an HSS key pair (K, P) by using an existing HSS key generation algorithm; step one and two, planning the number N of nodes in the cluster; according to the stated digital signature algorithm suitable for the cluster environment, a new algorithm CHSS supporting the cluster is realized based on the HSS, the new algorithm CHSS supports combined use with the SHA256 and the SM3, the quantum resistance characteristic of the HSS algorithm is inherited, and the algorithm is suitable for the cluster environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of digital signatures, and in particular relates to a stateful digital signature algorithm suitable for a cluster environment. Background Art

[0002] In 1979, scientist Winternitz proposed a digital signature scheme based on hash functions, and Merkle proposed the Merkle tree in 1979 for efficient verification and information sharing. In 1995, scientists Leighton and Micali adapted the technologies provided by Winternitz and Merkle to obtain a one-time signature scheme and a universal signature scheme. RFC8554 "Leighton-Micali Hash-Based Signatures" proposed the HSS digital signature algorithm based on the Leighton and Micali schemes.

[0003] HSS key pair generation algorithm:

[0004] Input: algorithm parameters W, height H, number of layers L.

[0005] Output: (K, P).

[0006] (1) Generate an LMS key pair for each layer. The key pair generation of each layer depends on the key used by the previous layer (except the first layer)

[0007] (2) Store the public and private keys of the i-th layer LMS in pub[i] and prv[i] respectively, 0≤i<L

[0008] (3) i from 1 to L-1, repeat:

[0009] a) sig[i-1] = lms_signature(pub[i], prv[i-1]) / / Use the previous layer LMS private key to sign the current layer LMS public key

[0010] (4) Private key K = (prv, pub, sig)

[0011] (5) Public key P = (L, pub[0])

[0012] (6) Output (K, P)

[0013] HSS signature algorithm:

[0014] Input: private key K, signature original text M.

[0015] Output: Signature value S.

[0016] 1. Load the private key K and obtain prv, pub, sig

[0017] 2. Check the number of layers from the lowest layer to the first layer where the key has been exhausted. Set d = L, i from L-1 to 0, and repeat:

[0018] a) Get the q value of prv[d]

[0019] b) If 2 H ≠q, jump to step 3 / / If 2 H =q indicates that the current layer key has been exhausted

[0020] c) d = d - 1

[0021] d) i = i - 1

[0022] 3. If d=0, signature fails

[0023] 4. If d<L, i changes from d to L-1, and repeats:

[0024] a) Generate an LMS key pair, then execute step b to re-sign the newly generated public key using the previous layer private key

[0025] b) sig[i-1] = lms_signature(pub[i], prv[i-1]) / / Use the previous layer LMS private key to sign the current layer LMS public key

[0026] 5. Calculate the signature value of message M:

[0027] sig[L-1]=lms_signature(M,prv[L-1])

[0028] 6. S=L-1|sig[0]|pub[1]|...|sig[L-2]|pub[L-1]|sig[L-1]

[0029] 7. Output S.

[0030] There is an obvious flaw in using the above signing method. In steps 3, 5, and 6, q in the private key is calculated or modified, which makes the signature algorithm unusable in a cluster environment for the same HSS private key.

[0031] Therefore, this patent proposes a new private key generation method and a new signature method to meet the generation of digital signatures in a cluster environment. Summary of the invention

[0032] Due to the limitations of the HSS algorithm, it cannot be used in a cluster environment. In order to overcome this limitation and meet the needs of the cluster, the present invention improves the HSS algorithm and proposes a CHSS algorithm that can run in a cluster environment. This scheme is based on the HSS algorithm and implements a new algorithm named CHSS (Cluster Hierarchical Signature System). The CHSS algorithm splits the HSS private key into multiple private keys, and then distributes the split private keys to the nodes in the cluster. At this time, the nodes in the cluster use the split private keys for digital signatures, which is equivalent to using the HSS private key to complete the digital signature in the cluster environment, and the digital signature verification algorithm continues to use the HSS digital signature verification algorithm. The following describes in detail how to split the HSS private key and how to use the split private key to complete the digital signature.

[0033] To achieve the above object, the present invention provides the following technical solution: a stateful digital signature algorithm suitable for a cluster environment, comprising the following steps:

[0034] Step 1: Generate a CHSS key pair and assign the CHSS key pair to nodes in the cluster;

[0035] Step 2: Generate a digital signature in a cluster environment;

[0036] Step 3: Calculate the signature value of message M:

[0037] node[i].sig[L-1]=lms_signature(M, node[[i].prv[L-1]);

[0038] Step 4: Digital signature value:

[0039] S=L-1|node[i].sig[0]|node[i].pub[1]|...|node[i].sig[L-2]|node[i].pub[L-1]|node[i].sig[L-1];

[0040] Step 5: Output S.

[0041] As a preferred embodiment, step one includes the following sub-steps:

[0042] Step 11: Generate an HSS key pair (K, P) using an existing HSS key generation algorithm;

[0043] Step 1 and 2: Plan the number of nodes N in the cluster:

[0044] N = {2 n |0≤n≤h,h∈{5,10,15,20,25}},

[0045] node[i] represents the i+1th node in the cluster, 0≤i<N,

[0046] node[i].prv[j] represents the j+1th layer LMS private key of the i+1th node in the cluster, 0≤i<N, 0≤j<L,

[0047] node[i].prv[j][q] represents the q+1th LM-OTS private key in the j+1th layer LMS private key of the i+1th node in the cluster;

[0048] Step 13: Split the private key:

[0049] a) Store the LM-OTS key in the first layer of LMS private key of HSS private key K in OTS,

[0050] b) When calculating the CHSS private key of each node, the first layer can divide the number of LM-OTS private keys;

[0051] Step 14: Divide the private key. Repeat for i from 0 to N-1:

[0052] a) For q from 0 to k-1, repeatedly execute:

[0053] node[i].prv[0][q]=OTS[(i-1)×k+q].prv

[0054] node[i].pub[0][q]=OTS[(i-1)×k+q].pub;

[0055] b) For q from k to 2 H -1, repeat:

[0056] node[i].prv[0][q] = null

[0057] node[i].pub[0][q] = null;

[0058] Step 15: Calculate and generate the private key for each node. Repeat for i from 0 to N-1:

[0059] a) Generate L-1 LMS key pairs LMS[j], 1≤j<L;

[0060] b) Store the key generated in the previous step to node[i], and repeat for j from 1 to L-1

[0061] node[i].pub[j]=LMS[j].pub

[0062] node[i].prv[j]=LMS[j].prv;

[0063] c) Use the previous layer LMS private key to sign the current layer LMS public key, and repeat for j from 1 to L-1.

[0064] node[i].sig[j-1]=lms_signature(node[i].pub[j], node[i].prv[j-1]);

[0065] d) The CHSS private key of the i-th node is

[0066] node[i].K=(node[i].prv, node[i].pub, node[i].sig);

[0067] Step 16. Public key of each node:

[0068] node[i].P = P;

[0069] Step 17: Return the CHSS key pair node[i].key=(node[i].K, node[i].P).

[0070] As a preferred embodiment, step 2 includes the following sub-steps:

[0071] Step 21. Generate a digital signature using the private key node[i].K of the i-th node, 0≤i<N;

[0072] Step 22: Load the private key node[i].K to obtain node[i].prv, node[i].pub, node[i].sig;

[0073] Step 23: Check the number of layers where the key has been exhausted from the lowest layer to the first layer, set d = L, j from L-1 to 0, and repeat:

[0074] a) Get the q value of node[i].prv[d];

[0075] b) If j=0 and q<k, jump to step 2.4 / / q<k indicates that there are still available OTS private keys in the first layer of LMS private keys;

[0076] c) If j>0 and q≠2 H , jump to step 2.4 / / If 2 H ≠q indicates that there are still available OTS private keys in the LMS private keys of the current layer;

[0077] d) d = d - 1;

[0078] e) j = j - 1;

[0079] Step 24: If d=0, the signature fails and the process ends.

[0080] As a preferred implementation, if d<L, j is from d to L-1, and the following is repeated:

[0081] a) Generate an LMS key pair LMS and store the generated key in node[i]

[0082] node[i].pub[j] = LMS.pub

[0083] node[i].prv[j] = LMS.prv

[0084] node[i].sig[j-1]=lms_signature(node[i].pub[j], node[i].prv[j-1]).

[0085] As a preferred implementation, after the partition, the private key of each node in the cluster can sign k*2 H*(L-1) times, all nodes can sign 2 in total H*L Second-rate.

[0086] Compared with the prior art, the technical effects and advantages of the present invention are as follows:

[0087] This stateful digital signature algorithm suitable for cluster environments implements a new cluster-supporting algorithm CHSS based on HSS;

[0088] This stateful digital signature algorithm is suitable for cluster environments. The new algorithm CHSS can be used in combination with SHA256 and SM3.

[0089] This stateful digital signature algorithm, which is suitable for cluster environments, inherits the quantum-resistant properties of the HSS algorithm.

[0090] This stateful digital signature algorithm suitable for cluster environments is applicable to cluster environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 A flow chart of CHSS key generation of the present invention;

[0092] Figure 2 It is a flow chart of the CHSS digital signature algorithm of the present invention;

[0093] Figure 3 A flow chart of HSS key pair generation in the prior art of the present invention;

[0094] Figure 4 It is a flow chart of the HSS signature algorithm in the prior art of the present invention;

[0095] Figure 5 This is an example diagram of the use of the LM-OTS key in the signing process of an HSS private key with H=3 and L=3 in the prior art of the present invention. DETAILED DESCRIPTION

[0096] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features well known in the art are not described.

[0097] See also Figures 1 to 5 , a stateful digital signature algorithm suitable for a cluster environment, this embodiment includes the following steps:

[0098] Step 1: Generate a CHSS key pair and assign the CHSS key pair to nodes in the cluster;

[0099] Step 2: Generate a digital signature in a cluster environment;

[0100] Step 3: Calculate the signature value of message M:

[0101] node[i].sig[L-1]=lms_signature(M, node[i].prv[L-1]);

[0102] Step 4: Digital signature value:

[0103] S=L-1|node[i].sig[0]|node[i].pub[1]|...|node[i].sig[L-2]|node[i].pub[L-1]|node[i].sig[L-1];

[0104] Step 5: Output S.

[0105] Step 1 includes the following sub-steps:

[0106] Step 11: Generate an HSS key pair (K, P) using an existing HSS key generation algorithm;

[0107] Step 1 and 2: Plan the number of nodes N in the cluster:

[0108] N = {2 n |0≤n≤h,h∈{5,10,15,20,25}},

[0109] node[i] represents the i+1th node in the cluster, 0≤i<N,

[0110] node[i].prv[j] represents the j+1th layer LMS private key of the i+1th node in the cluster, 0≤i<N, 0≤j<L,

[0111] node[i].prv[j][q] represents the q+1th LM-OTS private key in the j+1th layer LMS private key of the i+1th node in the cluster;

[0112] Step 13: Split the private key:

[0113] a) Store the LM-OTS key in the first layer of LMS private key of HSS private key K in OTS,

[0114] b) When calculating the CHSS private key of each node, the first layer can divide the number of LM-OTS private keys;

[0115] After this division, the private key of each node in the cluster can sign k*2 H*(L-1) times, all nodes can sign 2 in total H*L Second-rate;

[0116] Step 14: Divide the private key. Repeat for i from 0 to N-1:

[0117] c) For q from 0 to k-1, repeat:

[0118] node[i].prv[0][q]=OTS[(i-1)×k+q].prv

[0119] node[i].pub[0][q]=OTS[(i-1)×k+q].pub;

[0120] d) For q from k to 2 H -1, repeat:

[0121] node[i].prv[0][q] = null

[0122] node[i].pub[0][q] = null;

[0123] Step 15: Calculate and generate the private key for each node. Repeat for i from 0 to N-1:

[0124] e) Generate L-1 LMS key pairs LMS[j], 1≤j<L;

[0125] f) Store the key generated in the previous step to node[i], and repeat for j from 1 to L-1.

[0126] node[i].pub[j]=LMS[j].pub

[0127] node[i].prv[j]=LMS[j].prv;

[0128] g) Use the previous layer LMS private key to sign the current layer LMS public key, and repeat for j from 1 to L-1.

[0129] node[i].sig[j-1]=lms_signature(node[i].pub[j], node[i].prv[j-1]);

[0130] h) The CHSS private key of the i-th node is

[0131] node[i].K=(node[i].prv, node[i].pub, node[i].sig);

[0132] Step 16. Public key of each node:

[0133] node[i].P=P

[0134] Step 17: Return the CHSS key pair node[i].key=(node[i].K, node[i].P).

[0135] Step 2 includes the following sub-steps:

[0136] Step 21. Generate a digital signature using the private key node[i].K of the i-th node, 0≤i<N;

[0137] Step 22: Load the private key node[i].K to obtain node[i].prv, node[i].pub, node[i].sig;

[0138] Step 23: Check the number of layers where the key has been exhausted from the lowest layer to the first layer, set d = L, j from L-1 to 0, and repeat:

[0139] e) Get the q value of node[i].prv[d];

[0140] f) If j=0 and q<k, jump to step 2.4 / / q<k indicates that there are still available OTS private keys in the first layer of LMS private keys;

[0141] g) If j>0 and q≠2 H , jump to step 2.4 / / If 2 H ≠q indicates that there are still available OTS private keys in the LMS private keys of the current layer;

[0142] h) d = d - 1;

[0143] e) j = j - 1;

[0144] Step 24: If d=0, the signature fails and the process ends.

[0145] If d<L, j changes from d to L-1, and repeats:

[0146] b) Generate an LMS key pair LMS and store the generated key in node[i]

[0147] node[i].pub[j] = LMS.pub

[0148] node[i].prv[j] = LMS.prv

[0149] node[i].sig[j-1]=lms_signature(node[i].pub[j], node[i].prv[j-1]).

[0150] It should be noted that, in this document, relational terms such as one and two are merely used to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0151] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A stateful digital signature algorithm suitable for a cluster environment, characterized in that: The following steps are involved: Step 1: Generate a CHSS key pair and assign the CHSS key pair to nodes in the cluster; Step 2: Generate a digital signature in a cluster environment; Step 3: Calculate the signature value of message M: node[i].sig[L-1]=lms_signature(M, node[i].prv[L-1]); Step 4: Digital signature value: S=L-1|node[i].sig[0]|node[i].pub[1]|...|node[i].sig[L-2]|node[i].pub[L-1]|node[i].sig[L-1]; Step 5: Output S.

2. According to claim 1, a stateful digital signature algorithm suitable for a cluster environment is characterized in that: The step 1 comprises the following sub-steps: Step 11: Generate an HSS key pair (K, P) using the existing HSS key generation algorithm; Step 1 and 2: Plan the number of nodes N in the cluster: N={2 n |0≤n≤h,h∈{5,10,15,20,25}}, node[i] represents the i+1th node in the cluster, 0≤i<N, node[i].prv[j] represents the j+1th layer LMS private key of the i+1th node in the cluster, 0≤i<N, 0≤j<L, node[i].prv[j][q] represents the q+1th LM-OTS private key in the j+1th layer LMS private key of the i+1th node in the cluster; Step 13: Split the private key: a) Store the LM-OTS key in the first layer of the LMS private key of the HSS private key K in the OTS, b) When calculating the CHSS private key of each node, the first layer can divide the number of LM-OTS private keys; Step 14: Divide the private key. Repeat for i from 0 to N-1: a) For q from 0 to k-1, repeatedly execute: node[i].prv[0][q]=OTS[(i-1)×k+q].prv node[i].pub[0][q]=OTS[(i-1)×k+q].pub; b) For q from k to 2 H -1, repeat: node[i].prv[0][q] = null node[i].pub[0][q] = null; Step 15: Calculate and generate the private key for each node, and repeat for i from 0 to N-1: a) Generate L-1 LMS key pairs LMS[j], 1≤j<1; b) Store the key generated in the previous step to node[i], and repeat for j from 1 to L-1 node[i].pub[j]=LMS[j].pub node[i].prv[j]=LMS[j].prv; c) Use the previous layer LMS private key to sign the current layer LMS public key, and repeat for j from 1 to L-1. node[i].sig[j-1]=lms_signature(node[i].pub[j], node[i].prv[j-1]); d) The CHSS private key of the i-th node is node[i].K=(node[i].prv, node[i].pub, node[i].sig); Step 16. Public key of each node: node[i].P = P; Step 17: Return the CHSS key pair node[i].key=(node[i].K, node[i].P).

3. The stateful digital signature algorithm suitable for a cluster environment according to claim 1, characterized in that: The step 2 comprises the following sub-steps: Step 21: Generate a digital signature using the private key node[i].K of the i-th node, 0≤i <N; Step 22: Load the private key node[i].K to obtain node[i].prv, node[i].pub, node[i].sig; Step 23: Check the number of layers where the key has been exhausted from the lowest layer to the first layer, set d = L, j from L-1 to 0, and repeat: a) Get the q value of node[i].prv[d]; b) If j=0 and q<k, jump to step 2.4 / / q<k indicates that there are still available OTS private keys in the first layer of LMS private keys; c) If j>0 and q≠2 H , jump to step 2.4 / / If 2 H ≠q indicates that there are still available OTS private keys in the LMS private keys of the current layer; d) d = d - 1; e) j = j - 1; Step 24: If d=0, the signature fails and the process ends.

4. The stateful digital signature algorithm suitable for a cluster environment according to claim 3, characterized in that: If d<L, j changes from d to L-1, and repeats: a) Generate an LMS key pair LMS and store the generated key in node[i] node[i].pub[j] = LMS.pub node[i].prv[j] = LMS.prv node[i].sig[j-1]=lms_signature(node[i].pub[j], node[i].prv[j-1]).

5. The stateful digital signature algorithm suitable for a cluster environment according to claim 2, characterized in that: After this division, the private key of each node in the cluster can sign k*2 H*(L-1) times, all nodes can sign 2 in total H*L Second-rate.