Key commitment and commitment opening method, block chain, product and device

By defining the private key as a function of the identity ID in the public key cryptography system, and using the commitment and opening commitment scheme of square residual nature, combined with non-circuit type zero-knowledge proof, the dependence of the existing system on the trusted center and DLP is solved. The complexity problem of type key proof enables decentralized and efficient key management.

CN118921167AActive Publication Date: 2024-11-08BEIJING RED & BLUE TREE TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411024868.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-08
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

The existing public key cryptography system relies on a trusted authentication center. The entire key system is unsafe when the central organization cheats or is hijacked, and it is difficult to achieve simple and efficient zero-knowledge proof of DLP-type keys.

Method used

By defining the private key as a function of the identity ID in the key generation stage, a 1-bit commitment and opening commitment scheme based on the square residual properties is adopted, and the non-circuit type zero-knowledge proof technology is used to prove the association of the ID and the key, avoiding the circuit type zero-knowledge The complexity of proof.

Benefits of technology

Decentralized key management and self-management effects are realized, the security and efficiency of the key system are improved, and the complexity and efficiency of the circuit-type zero-knowledge proof are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921167A_ABST
    Figure CN118921167A_ABST
Patent Text Reader

Abstract

Constructing a certain commitment primitive to realize association / binding of the ID and the key, wherein the ID corresponds to an entity identity ID; in the commitment stage, the secret ID is associated to the private key in a manner of sk = gID A + unpublic secret.B, A * B is equal to G group order-1, and g is preferably the minimum primitive root. In the verification stage, the ID is removed to obtain pkcharler = (g-ID.A) * pk, and then the zero knowledge proof technology is used to prove that the secret k satisfies the equation pkcharler = (gB) k * G. Two non-circuit type zero knowledge proof are disclosed. The commitment / opening commitment for the SM2 algorithm and the secp256k1 algorithm is disclosed; components related to the committer P, the prover P and the verifier V are disclosed. Applications include commercial password-based products, digital certificate products, block chain systems, devices and programs. The method has the advantages of binding property, hiding property, decentration property and compatibility / transparency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the key generation and application field of public key cryptography, wherein the public key is based on discrete logarithm difficulty, and more specifically to a key commitment and open commitment method, a blockchain system, a national secret commercial cryptographic product, a digital certificate product, a device, a medium and a program, wherein the commitment object is an ID.

[0002] Background

[0003] 1. Discrete Logarithm Problem (DLP) is one of the most basic cryptographic primitives. Based on the discrete logarithm problem, cryptographic primitives such as digital signature, key exchange, public key encryption, and commitment are constructed; industrial standards include ECDSA elliptic curve series, Curve25519 curve, SM2 algorithm, Schnorr signature algorithm, ElGamal algorithm, Pedersen commitment, DH key exchange, CA certificate, PKI system, etc. Generally, sk represents a secret key or a one-time key, and pk represents a public key.

[0004] 2. The key and identity ID association technology is a rigid demand in the industry. CA system, PKI system, SM9 algorithm, CPK system can solve the public key and identity ID association problem. There is also a similar identification public key system. In 1984, Shamir proposed the identity-based public key cryptography system (IBC), which realized that the identity is the public key, greatly simplified the distribution and management of public keys, and the use of the identity public key system has become the development direction of public key cryptography. The identity public key system; At present, there are several types of identity public key systems, such as SM9, CPK, CFL and CLA.

[0005] 3. Commitment is an important cryptographic primitive. The first stage is the Commit stage, where the committer P selects a sensitive data ID, calculates the corresponding commitment c, and makes c public; the second stage is the Open-Verify stage, where the prover P presents the ID and proves that the ID is associated with c. The verifier V, i.e. the challenger, receives c, ID, and the content associated with the proof, and proves that the ID is associated with c through calculation. The Open-Verify stage involves two participants, the prover P and the verifier V. A well-designed cryptographic commitment has the following characteristics:

[0006] 1) Hidding: Before opening the commitment, the verifier does not know the sensitive data ID selected by the promisor P, and even if he knows it, he cannot prove it.

[0007] 2) Binding: It is difficult for the promiser to interpret the promised sensitive data as another ID'. Famous examples include Pedersen commitment and hash commitment.

[0008] 4. According to the Chinese standard guidelines, commercial cryptographic products based on the SM2 algorithm include at least USB smart cryptographic keys, digital certificate servers, signature verification servers, financial cryptographic machines, server cryptographic machines, cloud server cryptographic machines, timestamp servers, secure electronic signature systems, digital certificate authentication systems, IPSecVPN gateways, and SSLVPN gateways.

[0009] 5. The smart password key (usbkey) is a commercial password product that is inexpensive and can complete SM2 key generation, SM2 signature and signature verification functions. The relevant technical standards are GMT0016-2012 "Smart Password Key Password Application Interface Specification", GMT0017-2012 "Smart Password Key Password Application Interface Data Format Specification", GMT0027-2014

[0010] "Technical Specifications for Intelligent Password Keys".

[0011] 6. There are two commonly used technologies in the field of zero-knowledge proof: 1. Fiat-Shamir transformation, 2. Circuit-based zero-knowledge proof technology. Fiat-Shamir transformation is a technology that converts interactive zero-knowledge proof into non-interactive zero-knowledge proof method; the main feature is to replace the challenge value of the random oracle with a cryptographically secure hash output, and the hash input is one or more groups of commitment stage data. Circuit-based zero-knowledge proof technology can prove the existence of a secret x that satisfies f(x) equal to the specified value; related technologies include zk-snark algorithm, zcash's Groth16 algorithm, etc. Summary of the invention

[0012] The inventors found that the CA system, PKI system, SM9 algorithm, and CPK key system all require the support of a trusted authentication center; if the central agency cheats or the center is hijacked, the entire key system and application will be unsafe and untrustworthy. The same conclusion applies to the identification public key system.

[0013] ☆☆1 In order to overcome the above shortcomings, the inventor proposed a new technology. The main idea of ​​the new technology is to construct a certain commitment primitive to realize the association / binding of ID and key. More specifically, in the key generation stage, the private key is defined as a function of ID, and the commitment stage is opened to prove that ID is indeed associated with the key. The commitment primitive realizes the function of associating identity ID with key. This association / binding inherently has the effect of decentralization and key self-management. The typical application is that for sovereign declaration digital signatures, no CA certificate is required to prove the identity, and for commitment obligation digital signatures, the key can be generated first and then filed with the CA organization or blockchain system.

[0014] The inventors have also found through research that it is a technical problem to construct what type of commitment primitive to associate / bind with a key. The following is the research result.

[0015] The public achievements based on hash signatures include LMS, HSS, XMSS and XMSSMT digital signature schemes. It is easy to design a commitment scheme for associated IDs based on hash signatures. For example, the identity ID is associated with the hash commitment method at a specified location (such as the first leaf of the Merkel tree). When needed, the hash original image is presented to open the ID commitment.

[0016] For DLP-type keys, after research, the inventors found that in order to use simple and efficient zero-knowledge proofs, it is not recommended to use circuit-type zero-knowledge proofs in the open commitment stage. For example, the 1-bit commitment method is that ID is equal to the lowest bit of sk. For the construction of the method for opening the commitment, the inventors have not yet found a non-circuit zero-knowledge proof. Therefore, it is a technical challenge to construct a non-circuit zero-knowledge proof for the commitment of DLP-type keys. Referring to the background technology, the following view is further stated: the disadvantage of circuit-type zero-knowledge proofs is that they are not simple and efficient, and industrial applications must introduce more complex theoretical knowledge and runtime library functions than DLP.

[0017] In order to make the open commitment phase able to prove the ID-associated key without leaking other non-secret information, a 1-bit commitment / open commitment scheme is designed on the elliptic curve group based on the square remainder property. The commitment scheme is then generalized to be sk=g ID*A+不公开秘密*B Obviously, the range of ID values ​​is the range modulo B, A*B=N-1, g is the preferred minimum primitive root, and N is the group order of the discrete logarithm G. Here, the 1-bit commitment based on the square remainder property is equivalent to the special case of B being 2.

[0018] In summary, ☆☆2 The technical problem of the present invention is to construct a certain commitment primitive to achieve ID and key association / binding, and the key is a DLP type key. The technical problem of the present invention is also the purpose of the invention. Because the present invention does not require a trusted central agency of the background technology, the technical problem / purpose of the invention is creative.

[0019] ☆☆3 The content of the invention is briefly described as follows:

[0020] Commitment stage: sk = g ID*A+不公开秘密*B Where g is preferably the smallest primitive root of N-1, where N is the order of the discrete logarithm group G, and A = (N-1) / B;

[0021] Open commitment stage: After removing the ID factor, use zero-knowledge proof technology to prove that there is a "secret" that satisfies g -A·ID *PK=g 不公开秘密·B *G, where the public key PK = sk*G; non-circuit type zero-knowledge proof is preferred.

[0022] For ease of understanding, the commitment stage is regarded as a function transformation for generating a private key, with input {ID, B} and output {sk, non-disclosed secret}. The function transformation contains a pure random number generation module. The meaning of sk is self-evident. The committer P transmits the "non-disclosed secret" to the prover P for use in opening the commitment stage.

[0023] Reading guide: The descriptions with ☆☆ prefixes are the highest level summary, and the ☆ prefix and serial number guide the content of the invention.

[0024] First, we will explain the 1-bit commitment and open commitment scheme based on the square residue property, and then generalize it to the case of A = (N-1) / B. As a preparatory knowledge, we will review the knowledge related to elementary number theory and square residues. 1) The product and inverse of square residues are both square residues, the product of two non-square residues is a square residue, and the square residue multiplied by a non-square residue is a non-square residue. 2) The necessary and sufficient condition for the square residue of an element a (n-1) / 2 =1modN (Euler's theorem), where N is the group order of the elliptic curve.

[0025] Commitment phase: if ID is 0, the committer P randomly selects a square remainder as sk; if ID is 1, the committer P randomly selects a non-square remainder as sk; public key pk=sk*G, G is implemented by SM2 algorithm or secp256k1 algorithm elliptic curve generator. Open commitment is divided into 4 phases: commitment, challenge, response, and verification; the basic idea is to remove ID information from PK to obtain pk_charller. In order to prove that pk_charller is equal to a square remainder*G, a square remainder element is randomly selected in the commitment phase and a temp is generated from it. The challenger has two paths to calculate temp, one from G to temp and one from pk_charller to temp; therefore, in each round, the challenger has a 1 / 2 probability of discovering that the prover cheated in the commitment phase.

[0026] 1bit Commitment and Open Commitment Scheme:

[0027] Preparatory work, declare the ID, so the method to remove the ID is,

[0028] pk_charlle = 1 given non-square residue ID *pk;

[0029] Commitment phase: (Prover P)

[0030] Randomly select a square remainder element Xr, calculate temp and send it to the verifier V, where temp = Xr*pk_charller;

[0031] Challenge Phase: (Verifier V)

[0032] Randomly select 0 or 1 as the challenge value;

[0033] Response phase: (Prover P)

[0034] Challenge 0, reveal Xr;

[0035] Challenge 1, reveal (Xr·sk·1 given non-square residue ID );

[0036] Verification phase: (Verifier V)

[0037] If 0, verify that temp = Xr*pk_charller and xr is a square residue;

[0038] If 1, verify temp = (Xr sk 1 given non-square residual ID )*G and (Xr·sk·1 given non-square residue ID ) is the square remainder.

[0039] The ID can be associated with more factors of N-1 decomposition. The above-mentioned solution based on the squared residual 1 bit is just a special case of B equal to 2. Furthermore, the coprime factors of B decomposition are {B1, B2, ..., Bx}, and the corresponding ID is divided into segments {ID1, ID2, ..., IDx}, where the value range of IDi is modulo Bi, i from 0 to x. In the explanation of terms in the specific implementation part, the inventor will demonstrate that {B1, B2, ..., Bx} is a generalization of B, and the basic principle is exactly the same.

[0040] sk=g ID1·A1+ID2·A2…+IDx·Ax+不公开秘密·B ,

[0041] in

[0042] B=B1·B2·…·Bx, {B1,B2,……,Bx} are relatively prime.

[0043] ☆1 Publicly disclose a method for committing to a key, applicable to the public key pk=sk*G, where sk is the key and G is the discrete logarithm generator; the ID association method is set in the following way

[0044] sk=g ID·A+不公开秘密·B

[0045] Or use the following method to set the association mode of {ID1, ID2, ..., IDx}

[0046] sk=g ID1·A1+ID2·A2…+IDx·Ax+不公开秘密·B

[0047] Where B is a factor of N-1, A = (N-1) / B, N is the group order of G, and g is the smallest primitive root or radix on N.

[0048] Specify a primitive root before;

[0049] ID / {…IDi…} is the content to be committed, the most typical content is identity information;

[0050] {B1, B2, ..., Bx} is a decomposition of B and are relatively prime to each other, and each Ai satisfies Ai = (N-1) / Bi.

[0051] Opinion statement on the preference for A and B to be relatively prime. A and B are relatively prime and equivalent. There is no correlation between the ID and the "undisclosed secret", which is equivalent to opening a commitment statement that the ID will not leak the "undisclosed secret" information. When A and B have a common factor, the inventor believes that some information of the "undisclosed secret" may be leaked; the inventor cannot prove or disprove this issue at present. In short, it is best to choose A and B to be relatively prime, or the common factor of A and B is as small as possible.

[0052] The reason why g is preferably the smallest primitive root on N can be found in the terminology explanation in the specific implementation section; specifying a primitive root in advance requires a pre-operation, so it is not preferred.

[0053] To supplement, the valid information of the ID is in the sense of modulus B. If B is too large, the security of the public key will be reduced.

[0054] ☆2 For the SM2 algorithm commitment method, the discrete logarithm generator G is a generator based on the SM2 algorithm. The secret to be committed is ID, sk = 3 ID·A+不公开秘密·B , where B = 924875007631011282; statement 3 is the smallest primitive root.

[0055] ☆3 Commitment method for SM2 algorithm, the discrete logarithm generator G is a generator based on SM2 algorithm, and the committed secret is {ID1, ID2, ID3, ID4}, characterized in that sk = 3 ID1·A1+ID2·A2+ID3·A3+ID4·A4+不公开秘密·B , where {B1, B2, B3, B4} = {14057, 7759, 3, 140571413296869}.

[0056] The 18-digit ID number 370202200511141820 is divided into {3702,2005,0,1114_1820__02} according to the 4-digit place of origin, year of birth, gender, and other codes. Therefore, ID = 370202200511141820, {ID1, ID2, ID3, ID4} = {3702,2005,0,1114182002}. In Example 1 and Example 2, test vectors and test vectors for opening commitments will be provided.

[0057] ☆4 For the commitment method of secp256k1 algorithm, the discrete logarithm generator G is a generator based on the secp256k1 algorithm, and the secret to be committed is ID, sk=7 ID·A+不公开秘密·B , statement 7 is the smallest primitive root.

[0058] ☆5 The protocol for opening the commitment ID or {…IDi…} is as follows:

[0059] Step 1: Verifier P declares ID or {…IDi…};

[0060] Step 2: Calculate pk_ charller , where pk_ charller =(g -A·ID )*PK or pk_ charller =

[0061] (…·(g -A1·IDi )·)*PK, pk_ charller The essence is to remove the ID or {…IDi…} information;

[0062] Step 3: Verifier P uses an interactive zero-knowledge proof or a non-interactive zero-knowledge proof to prove to the verifier V / the public that there exists a secret k that satisfies the equation pk_ charller =(g B ) k *G.

[0063] The connection between the above interactive and non-interactive zero-knowledge proofs is the Fiat-Shamir transformation. The Fiat-Shamir transformation is a commonly used technique. The consensus in scientific literature or textbooks is that the zero-knowledge proof protocol only needs to give an interactive protocol, and the non-interactive zero-knowledge proof is obtained naturally by the Fiat-Shamir transformation by default.

[0064] ☆☆4 In summary, the idea of ​​the present invention is to construct a commitment primitive to implement the key of the ID association / binding discrete logarithm problem, specifically sk=g ID·A+不公开秘密·B , where ID needs to be associated / bound to information, A = (N-1) / B, and g is preferably the smallest primitive root; in the commitment phase, the prover P uses zero-knowledge proof technology to prove to the verifier V / the public that there is a "undisclosed secret" that satisfies g -A·ID *PK=g 不公开秘密·B *G.

[0065] The following is a preferred non-circuit type open commitment scheme. The prover P discloses (g B ) (r+不公开秘密) *G, the verifier V randomly selects one of the computation paths r or (r+undisclosed secret); the equivalence principle of the two paths is that (g B ) r *(g -A·ID*PK)=(g B ) (r+不公开秘密) *G.

[0066] The main effect of the preferred open commitment method is that the circuit-type zero-knowledge proof that does not belong to the background technology only implements the discrete logarithm library function and the large integer library function. Specifically, an OpenSSL library is sufficient to support the large integer operation and PK=sk*G operation required by the present invention.

[0067] In particular, for sk = g ID1·A1+ID2·A2…+IDx·Ax+不公开秘密·B For type of commitment, you can disclose all or selectively in the opening commitment stage. For example, in the above example 2, the commitment {3702,2005,0,1114_1820__02} only discloses the year of birth and gender, and the following operations are performed in the commitment stage:

[0068] sk=3 2005·A2+0·A3+不公开秘密2·(B2·B3) , here B = B2·B3, that is 7759·3.

[0069] Based on the above analysis, ID and {…, IDx} commitments corresponding to the opening commitment phase are all used with pk_ charller =(g B ) k *G, as stated in the explanation of terms in the detailed description.

[0070] ☆6 The first type of non-circuit zero-knowledge proof (hereinafter referred to as temp type zero-knowledge proof) is recommended:

[0071] Commitment phase: (Prover P) randomly selects r, calculates temp and sends it to the verifier V,

[0072] Where temp=(g B ) (不公开秘密+r) *G;

[0073] Challenge phase: (Verifier V) randomly selects 0 or 1 as the challenge value and sends it to the prover;

[0074] Response phase: (Prover P)

[0075] If the challenge value is 0, reveal rmodA;

[0076] If the challenge value is 1, reveal (unrevealed secret + r) mod A;

[0077] Verification phase: (Verifier V)

[0078] If the challenge value is 0, verify temp=(g B ) r *pk_charller;

[0079] If the challenge value is 1, verify temp=(g B ) (不公开秘密+r) *G.

[0080] ☆8 I would like to recommend a similar second non-circuit type zero-knowledge proof:

[0081] Commitment phase: (Prover P) randomly selects w0, calculates w1 = private secret - w0modA, calculates Y0 and Y1 and sends them to the verifier V; where Y0 = (g B ) w0 *G,Y1=(g B ) w1 *G;

[0082] Challenge phase: (Verifier V) randomly selects 0 or 1 as the challenge value and sends it to the prover P;

[0083] Response phase: (Prover P)

[0084] If the challenge value is 0, reveal w0;

[0085] If the challenge value is 1, reveal w1;

[0086] Verification phase: (Verifier V)

[0087] If the challenge value is 0, verify (g B ) w0 *Y1=pk_charller and satisfy Y0=(g B ) w0 *G;

[0088] If the challenge value is 1, verify (g B ) w1 *Y0=pk_charller and satisfy Y1=(g B ) w1 *G.

[0089] The above two zero-knowledge proofs have the same principles and effects. Because they are both 2-choice-1 challenges, the probability of the verifier cheating in each round is 1 / 2. Based on background knowledge, industrial applications require multiple rounds of operations.

[0090] Because the temp type has a smaller amount of data than the {Y0, Y1} type in the commitment phase, the inventors recommend the temp type zero-knowledge proof. The running results of the SM2 algorithm are given in the specific implementation. The non-interactive zero-knowledge proof method for the commitment phase is publicly opened. The input includes ID and PK, selects 1 cryptographically secure hash, and groups the data into x groups.

[0091] ☆7 Perform Fiat-Shamir transformation on the temp type zero-knowledge proof protocol, thus obtaining a non-commutative zero-knowledge proof protocol; the specific steps include:

[0092] The input includes ID and PK, select a cryptographically secure hash, and group the data into x groups. It should be noted that the reference industrial standards for cryptographically secure hashes include sha2, sm3, sha3, etc.

[0093] Prover P: Input "undisclosed secret", construct and output: {X,Y};

[0094] Step P001: where z is the number of elements, i ranges from 0 to z-1;

[0095] X={…,(g B ) (不公开秘密+ri) ,…},ri is a pure random number;

[0096] Step P002: hash(X) guides to choose 1 from 2;

[0097] Y = {…, hash(x)[i] = = 0? ri: (undisclosed secret + ri), …};

[0098] Step P003: Output: {X, Y};

[0099] Verifier V: Input: {X, Y}, Output: pass / fail;

[0100] Step V002: Calculate hash(X);

[0101] Step V003: i ranges from 0 to z-1, and each i verifies the following relationship:

[0102] X[i] is (g B ) (不公开秘密+ri) Is Hash(X)[i]==0? B ) ri *pk_charller:(g B ) (ri+不公开秘密)

[0103] *G;

[0104] Output pass / fail; where the pass criterion is that the equation is true for each i.

[0105] ☆☆5Because the association / binding of ID and key is based on the commitment primitive, binding and concealment are natural attributes; and because the content of the commitment is only the public key pk itself, it is easy to deduce the decentralized nature and compatibility / transparency with the original key system. Another explanation for the unique binding is that {sk, pk} is classified by ID, which is equivalent to the key space being decomposed into ID classes, so no centralized organization or endorsement is required. The summary of the invention effect is as follows.

[0106] 1. Hidding: Even if the challenger obtains the ID, the challenger cannot prove that {sk, pk} is associated with the ID;

[0107] 2. Binding: ID is uniquely bound to {sk, pk}, which will be proved by contradiction later;

[0108] 3. Decentralized nature: Compared with the SM9, CPK and other standards in the background technology, no central agency endorsement is required; Example 6 has a detailed statement about decentralization and weak centralization to prove the above point. This property can be derived from binding. It is a natural attribute of pk to be classified by ID, so there is no need for a central agency to endorse the association / binding of ID and key.

[0109] 4. Transparency / compatibility to the public key system: Transparency / compatibility means that after upgrading the commitment / opening the commitment function of the present invention, the digital certificate format and the original application scenario are not changed.

[0110] There are two main reasons for achieving this effect: 1. The output information of the commitment stage is only equal to the public key PK itself; 2. In terms of engineering implementation, there is no correlation between opening the commitment and key application, that is, opening the commitment can prove the ID association / binding key, but does not affect the original purpose of the key and related modules. Embodiment 5 of the present invention. The smart password key upgraded by the committed component and the open commitment component can prove transparency / compatibility.

[0111] The commitment primitives of 5, ☆6 and ☆7 can prove that there exists a non-circuit zero-knowledge proof scheme.

[0112] Prove unique binding using the inverse method:

[0113] If there exists a different ID' and a private secret' that also satisfies sk = g ID’·A+不公开秘密’·B .

[0114] Then ID'·A+private secret'·B=ID·A+private secret·BmodA·B holds,

[0115] So A*(ID'-ID)-B(private secret'-private secret)=0modA·B, which means there exists t that satisfies the following equation

[0116] A·(ID′-ID)+B·t=0.

[0117] Known theorem: The necessary and sufficient condition for A and B to be coprime is that there exist u and v that satisfy A·u+B·v=1.

[0118] It contradicts the known theorem; therefore, the assumption is wrong and the proposition is proved.

[0119] The commitment and open commitment protocols of the present invention involve two stages and three roles, wherein the three roles are respectively the committer P, the prover P, and the verifier V. In order to support the three roles to complete their cryptographic functions, three corresponding components are defined. According to the previous description, the commitment component corresponding to the committer P must be integrated with the key generation unit module, and the (corresponding to the prover P) open commitment component and the (corresponding to the verifier V) verify commitment component respectively implement the cryptographic functions of the prover P and the verifier V. There are two points to note: 1. The open commitment component and the verify commitment component are only used at the moment of disclosure required, and 2. Considering the "non-disclosure secret" factor, the commitment component and the open commitment component must work in a trusted execution environment (TEE), while the verify commitment component can work in a development environment (open). The following is a demonstration of the two components.

[0120] ☆81 Open commitment component for temp type commitment,

[0121] Input "undisclosed secret" and z; Output {X, Y};

[0122] Where X={…,(g B ) (不公开秘密+ri) , ...}, i ranges from 0 to z-1,

[0123] Y={…, hash(X)[i]==0? ri:(undisclosed secret+ri), …}, where i ranges from 0 to z-1.

[0124] ☆91 Verification component for temp type commitment,

[0125] Input {X, Y}; Output pass / fail;

[0126] Is X[i] equal to Hash(X)[i] == 0? (g B ) ri *pk_charller:(g B ) (ri+不公开秘密) *G;

[0127] The passing criterion is that the equation holds for each i.

[0128] It should be noted that when the verification component works in the interactive zero-knowledge proof state, Hash(X)[i] is regarded as the i-th round challenge value given by the verifier V.

[0129] ☆9 discloses a blockchain system, which uses a digital signature protocol or a Pedersen commitment protocol. Specifically, the key of the digital signature or the Pedersen commitment is generated by the key commitment method described in any one of ☆1-☆4, wherein the key holder is a miner or user of the blockchain system.

[0130] Effect of the technical solution: In the blockchain system, the digital signature primitive or the Pedersen commitment primitive is widely used by miners and / or users; according to the aforementioned statement of the invention effect, the association / binding of the ID and the key can be achieved through the commitment primitive of the present invention, so the key and its application are decentralized. More statements are given in Example 8. "Research on decentralized and weakly centralized application scenarios". When necessary, the miner or user uses the open commitment primitive to prove the key binding / association ID or {…IDi…}. To further explain the new effect of the blockchain system, the national regulatory authority requires the miner or user to show evidence of the association between the key and the ID when necessary; so the blockchain system has the ability to be decentralized and regulated by the state at the same time.

[0131] ☆11 discloses a smart cryptographic key that complies with the SM2 algorithm standard. In addition to the key generation module, it also includes a commitment primitive module and an open commitment primitive module, wherein the commitment primitive module corresponds to the role of the committer P in ☆2-☆3, and the open commitment primitive module corresponds to the role of the prover P in ☆5-☆8; the calling relationship of the commitment primitive module is that the key generation module calls the commitment primitive module.

[0132] The detailed design and implementation of the smart password key are described in the drawings and specific embodiments of the specification; it should be noted that the smart password key is a private key / public key generation module by default, and the typical industrial standard interfaces are GenECCKeyPair and ECCExportSessionKey; the commitment and open commitment methods and role corresponding components of the present invention are also applicable to the processing of one-time keys, and typical one-time key examples are DH algorithms and random numbers for digital signatures. There are many commercial cryptographic products and applications that comply with the SM2 algorithm. According to the use of the SM2 algorithm as the standard, there are many SM2-related commercial cryptographic products and commercial cryptographic services based on the smart password key, which are extended to a wider range of commercial cryptographic products below.

[0133] ☆10 discloses a commercial cryptographic product that complies with the SM2 algorithm standard, the product includes a smart cryptographic key, a digital certificate server, a signature verification server, a financial cryptographic machine, a server cryptographic machine, a cloud server cryptographic machine, a timestamp server, a secure electronic signature system, a digital certificate authentication system, an IPSecVPN gateway, an SSLVPN gateway, a blockchain writing device or a blockchain verification device; the product includes at least one component that can realize the role function of the cryptographic protocol,

[0134] The cryptographic protocol roles include: a committer P who uses the key commitment method described in ☆2-☆3 to make a commitment, or a prover P or a verifier V who uses any of the verification commitment methods described in ☆5-☆8 to verify.

[0135] The following is the background technology: Digital certificates are the most important products / services of CA organizations and PKI systems. Taking the X509 certificate as an example to explain the principle of digital certificates, the CA organization uses a digital signature to endorse the TBSCertificate structure (the part of the certificate to be signed, To Be Signed Certificate). The core function is to confirm the association between the "subject Name" and "subject Public Key (subjectPublicKeyInfo)" of the TBSCertificate structure. In addition, the CA structure must confirm the entity identity of the "subject name" before digital signature.

[0136] If the user ID is associated with subjectPublicKeyInfo through the commitment primitive, the following two effects will occur, where ID = "subject Name". 1) Because subjectPublicKeyInfo is the function output of ID, the ID can first construct and use the key, and then file the subjectPublicKeyInfo with the CA organization; of course, the CA organization needs to confirm the entity identity of the ID and the binding between the ID and subjectPublicKeyInfo. 2) The subjectPublicKeyInfo of the TBSCertificate structure does not necessarily record the ID, and in theory it can be NULL. Because open commitment (Open-Verify) can prove that the ID is associated / bound to the subjectPublicKeyInfo. Example 7. "X509 certificate based on commitment primitive" and the accompanying drawings are described in more detail.

[0137] In summary, ☆12 discloses a digital certificate product, the public key type is PK=sk*G, G is the discrete logarithm generator, sk is generated by the method of ☆1-☆4; the entity identity corresponding to ID / {…IDi…} is equal to or related to the "subject Name" information.

[0138] ☆13 discloses a device, including an input unit, an output unit, and a processing unit, wherein the processing unit includes at least one component that can realize the function of a cryptographic protocol role, and the role is one of the following: the committer P corresponding to ☆1-☆4, the prover P or the verifier V corresponding to ☆5-☆8.

[0139] ☆14 discloses a medium on which data is stored, and the information after the encoding is removed includes one of the following two types of data; 1) a private key sk or a public key PK, where sk is generated by the method of ☆1-☆4; 2) interactive data for opening the zero-knowledge proof in the commitment stage, and the interactive data is generated and used by the prover P or verifier V corresponding to ☆5-☆8.

[0140] The device forms of the media include electronic media, paper media, and cloud evidence media. There are also many demonstrations of eliminated codes. Please see the specific implementation method section for more details.

[0141] ☆15 A computer program product, comprising a computer program / instruction, characterized in that when the program / instruction is executed, the execution steps corresponding to the cryptographic protocol role of the present invention are implemented, and the cryptographic protocol role is one of the following situations: ☆1-☆4 corresponds to the committer P, ☆5-☆8 corresponds to the prover P or the verifier V. BRIEF DESCRIPTION OF THE DRAWINGS

[0142] The embodiments and drawings are used to explain the present invention and do not constitute improper limitations of the present invention. In the drawings:

[0143] Figure 1 This is the commitment / open commitment principle diagram of Example 1;

[0144] Figure 2 are three components of the present invention and associated schematic diagrams;

[0145] Figure 3 Hardware structure diagram of the smart password key that enables the commitment component and the opening commitment component;

[0146] Figure 4 Algorithm standards and industrial ecology associated with the present invention;

[0147] Figure 5 For example X509 certificate DETAILED DESCRIPTION

[0148] In order to guide readers to read the specific implementation methods faster and better, the index of key contents is organized as follows.

[0149] Example 1. Commitment and opening commitment for SM2 algorithm ID card number;

[0150] Example 2. Commitment and opening commitment for SM2 algorithm {native place, year of birth, gender, other codes};

[0151] Example 3. Commitment scheme for secp256k1 algorithm digital signature;

[0152] Example 4. Commitment and open commitment design of module p domain;

[0153] Embodiment 5. A committed component and a smart password key for opening an upgrade of the committed component;

[0154] Implementation method 6. Figure 4 About commercial secret products and industrial ecology;

[0155] Example 7. X509 certificate based on commitment primitive;

[0156] Example 8. Research on decentralized and weakly centralized application scenarios.

[0157] In order to describe the inventive concept and technical solution, two terms are first defined.

[0158] ID or {ID1, ID2, ..., IDx}

[0159] Necessary technical features of the commitment stage / opening the commitment stage, ID in a narrow sense refers to identity ID, and ID in a broad sense refers to the committed content, i.e. the bound information, and the broad sense of ID includes identity card number, IMSI number, telephone number, vehicle license plate, business registration number / enterprise unified social credit code, etc. More broadly, in Example 3, the 125.14-bit information is stored in the form of commitment on the bitcoin through the secp256k1 signature algorithm combined with the commitment method of the present invention; therefore, depending on the scenario, the interpretation of ID should not be limited to identity ID.

[0160] Because ID1·A1+ID2·A2…+IDx·Ax+Secret 2'·B2'=ID·A+Secret ·BmodN-1, {ID1, ID2,…,IDx} can be considered as the generalization and equivalent of ID-type commitment. The above equation is extracted from the definition of commitment. Using the similar technique of Sun Tzu's theorem, it is possible to input (ID·A+Secret ·B) and B to obtain ID and Secret 2. Therefore, the following two conclusions are obtained.

[0161] When B2=B, the relational derivation formula of {ID1, ID2,……,IDx} equals ID is,

[0162] ID=A modB -1 modA·(ID1·A1+ID2·A2…+IDx·Ax)modB,

[0163] in A modB -1 is the multiplicative inverse of A over the ring modular B.

[0164] When {ID1, ID2, ..., IDx} are selectively disclosed, the undisclosed secret 2' can be inferred from B2'. B2 is the product of Bi corresponding to the selective disclosure. For example, if only ID1 and ID2 are disclosed, then B2' = B1*B2;

[0165]

[0166] Among them B2 -1 It is a model Multiplicative inverse of B2 over the ring;

[0167] If all ID1, ..., IDx are disclosed, then B2'=B1*B2...*Bx=B; the above formula degenerates to;

[0168]

[0169] The above two sets of expressions are mainly used for the conversion of commitment components, and there are examples and applications in Embodiment 2 and Embodiment 5. It can be considered that {ID1, ID2, ..., IDx} is a generalization and equivalent method of ID commitment.

[0170] Minimum primitive root g

[0171] Necessary technical features in the commitment stage refer to sk=g ID·A+不公开秘密·B , g is the smallest primitive root on the domain modulo N. State the reasons for the preference. The essence of the invention promised: the entropy space of sk ranges from 1 to N-1, s t It is just one-to-one mapping with the entropy space of sk, where S is the primitive root on the modulo N field; according to the coprime A and B, it is decomposed into the remainder system (ID, a secret that is not disclosed), so (s A ) ID ·(s B ) 不公开的秘密 1 to 1 mappings t A more general one-to-one mapping is that sk corresponds to the ID power of a specified B-order element multiplied by the undisclosed secret power of a specified A-order element. A is a B-order element, g B For an A-order element, g will omit the specified step if the smallest primitive root is preferred. Therefore, the smallest primitive root is the recommended preferred solution.

[0172] In addition, the execution of zero-knowledge proof must involve multiple rounds of interaction in the commitment phase, challenge phase, response phase, and verification phase. B ) is modulo A, which saves recording space compared to directly recording an A-order element. From the perspective of space saving, the exponential representation is recommended.

[0173] Example 1. Commitment and opening commitment for SM2 algorithm ID card number

[0174] For a better understanding of the principles and key steps of this embodiment, please refer to the attached Figure 1 and attached Figure 2 The attached Figure 1 Describe the commitment phase of the SM2 algorithm and the steps involved in opening the commitment phase. Figure 2 Describe the specific details of the three components that implement the promiser P, the prover P, and the verifier V.

[0175] 0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123 is the group order N of the SM2 elliptic curve. All prime factors of N-1 are 2, 3, 7759, 14057, 1413296869, 125197554539772723432468576818475380947471091418362477724521.

[0176] Considering the 18 digits of the Chinese ID number, we take B = 924875007631011282 (2 3 7759 14057 1413296869), A = (N-1) / B;

[0177] Use a large integer calculator to determine that 3 is the smallest primitive root on the modulo N field;

[0178] The method of binding the ID number to the SM2 public key is as follows:

[0179] sk=3 身份证号ID·A+不公开秘密·B modN.

[0180] Test vector:

[0181] The ID number is 370202200511141820 (the ending x is equivalent to 0),

[0182] The "undisclosed secret" is 12; bring it into the openssl big integer library and elliptic curve library to get:

[0183] sk=0x6E7428A952D906CACA345C9FCDF12BD899058E486A0B6C06D4DE55FDFDD5D451pk=sk*G={Gx,GY}=

[0184] 0x6A60CC77A4CAB8B1DE67DF68C86A81DFF71883DF8C488A160C3417E3B1615BDA

[0185] 0x26FB3A3A66863F4C6AC09C69636E2F0BDA9F54ADC9B97A7F65AAC331F01134AC.

[0186] Open the preparatory stage of commitment: remove (g -A ) ID *PK gets pk_charller as follows:

[0187] 0x90A345619CDD942ED18F2D268593A15A1BFF236AD3DCA4696F5C0B0FD6B2E1B8

[0188] 0x4FE2FCC6A3EF4E706DEC99FBCCAE68D11473C53A6D6EBB27A9B4DE523F1625E6

[0189] in (g -A ) ID for 65039367220346850763326696703480445449321897656048293178767360130174932601406

[0191] (g B ) (r+不公开秘密) Operational steps and test vectors for the Open-Commit phase:

[0192] Verification phase: Prover p: selects a random number r,

[0193] Here, we take r = 76MODA, then (r + undisclosed secret) = 88MODA;

[0194] Calculate and publish temp, where temp = (3 B ) (r+不公开秘密) *G Temp = {Gx, Gy} =

[0195] {0xA87EEB15577ADD3222E246E37ED5B3C3BD740C2E85B5E4BD6F1E9789455949B6

[0196] 0xF4C4E5672D95238CFA5DCB93975E4C2828E5443361744C163ED3E5B868FED727}

[0197] Challenge phase: Verifier V: selects a challenge value of 0 or 1 and sends it to prover p;

[0198] Response phase: Prover p:

[0199] Challenge value 0 reveals 76

[0200] Challenge value 1 reveals 88

[0201] Verification phase: Verifier V:

[0202] Challenge value 0 verification (3 B ) r *pk_charller?=Temp

[0203] Challenge value 1 verification (3 B ) r *G? =Temp

[0204] Intermediate results of test vectors: (3 B ) 76 and (3 B ) 88 They are,

[0205] 39690810969377621653679713924826377779630123217826521254791976836989239444417 and

[0206] 91017565000410237174138909841537965593049911956824357868921504966555989310476.

[0207] Example 2. Commitment and opening commitment for SM2 algorithm {native place, year of birth, gender, other codes}

[0208] The way to define commitment is, sk=3 ID1·A1+ID2·A2+ID3·A3+ID4·A4+不公开秘密·B ,

[0209] where {B1, B2, B3, B4} = {14057, 7759, 3, 1413296869},

[0210] Here B is B1·B2·B3·B4, that is, 462437503815505641.

[0211] The 18-digit ID number 370202200511141820 (the ending x is treated as 0) corresponds to the code {3702,2005,0,1114_1820__02};

[0212] The "not secret" test vector is 12;

[0213] Substituting into the formula we get:

[0214] sk=3 3702·A1+2005·A2+0·A3+1114182002·A4+12·462437503815505641

[0215] =3 35909742114646898062611115081933716055166385948449039631443914438078484108928

[0216] According to the term interpretation, input B to find the equivalent ID and we get:

[0217] Equivalence ID = 143412314428390458;

[0218] Reference result Sk=3 143412314428390458*A+12*B .

[0219] Open Commitment 1: Selective Disclosure {*,2005,0,*}; where 2005 is associated with 7759, 0 is associated with 3, what is the equivalent equation?

[0220] B2=7759·3, so the equivalent equation is:

[0221] sk=s 6015·A2+257247753062340172322707857704629916232089679233711874743147690446573394·B2 , where B2=23277.

[0222] Open Commitment 2: Selective Disclosure {3702, 2005, 0, *}; 2005 is associated with 7759, 0 is associated with 3, and 3702 is associated with 14057. What is the equivalent equation?

[0223] B2=14057·7759·3, so the equivalent equation is:

[0224] sk=s 170724309·A2+278985723925256323237960301443399381063531994947272249985591384104512·B2 , where B2=327204789.

[0225] Open Commitment 3: Full disclosure {3702, 2005, 0, 1114_1820__02}; among them, 2005 is associated with 7759, 0 is associated with 3, 3702 is associated with 14057, and 1114_1820__02 is associated with 1413296869. What is the equivalent equation?

[0226] So the equivalent equation is: sk=s 143412314428390458·A2+12·B2, where B2=462437503815505641.

[0227] Example 3. Commitment scheme for secp256k1 algorithm digital signature

[0228] 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD03641 is the 256k1 curve group. Decomposing the factors of N-1 yields 2, 2, 2, 2, 2, 2, 3, 149, 631, 107361793816595537, 174723607534414371449, 34*…*189. In order to cover the 18-digit ID card, it is recommended to choose B.

[0229] B=107361793816595537·64=2 62.57 ; After testing, 7 is the smallest primitive root.

[0230] Commitment method, private key sk or one-time key r equals 7 ID*A+不公开秘密*B modN.

[0231] If both the key and the one-time key used for digital signature choose B, then the key and digital signature can commit a total of 125.14 bits of information. A practical application is that on Bitcoin, the key sk commits 62.57 bits, and the random number r used for digital signature during the transfer commits 62.57 bits. Each key can store 125.14 bits of information in a committed manner during its life cycle.

[0232] In the present invention, if B is too large, the security of the original discrete logarithm will be reduced. Therefore, it is recommended that A should not be less than 2 for elliptic curve cryptography. 192 .

[0233] Example 4. Commitment and open commitment design of module p domain

[0234] Discrete logarithms over the modulo p field are widely used in industry, such as the 768-bit and 1024-bit prime numbers in the rfc2409 document, and the 1536-bit, 2048-bit, 3072-bit, 4096-bit, 6144-bit, and 8192-bit prime numbers in the rfc3526 document.

[0235] The method for committing to discrete logarithms over a modulo p field is to commit to the q-order group of the largest prime factor of p-1. The specific method is that the (p-1) / q-th power of PK is exactly a q-order group. Just like the binding of IDs, the impact caused by the (p-1) / q-th power needs to be agreed upon.

[0236] p is 2^1024-2^960-1+2^64*{[2^894pi]+129093}, which is the 1024-bit prime number in the rfc2409 document. Use the public large number decomposition software yafu.exe to decompose p-1 to get 2*q, and then continue to decompose q-1 to get some prime factors, 2, 101119, 16184417, 688868423471.

[0237] To cover the 18-digit ID number, select B=16184417*688868423471=11148933823587251407;

[0238] By elimination, the smallest primitive root of the q-domain is 3.

[0239] The one-time key PK of the DH algorithm, let PK = 2 sk1*2+sk2*q modp, here to 2 is the provisions of rfc2409; the method of associating sk1 with ID on the modulo q-order group is: sk1 = 3 ID*A+不公开秘密*B modq.

[0240] According to the congruence remainder system, the secret is divided into two parts of information, modulo 2 and modulo q. The above agreement 2 is the same as the terminology interpretation agreement g is the smallest primitive root in the present invention. There must be an equivalent method here with the same effect. In essence, they are all associated with a factor of q-1 through a mathematical mapping ID.

[0241] Embodiment 5. Committed component and smart password key for opening committed component upgrade

[0242] The smart password electronic key (USBKEY) of the background technology is a widely used and low-cost TEE (Trusted Execution Environment) device. This embodiment will guide manufacturers or R&D personnel to embed the commitment component of the present invention and the verification component of the commitment phase into the smart password key of the SM2 algorithm to complete the functions of the promiser P and the prover P. Figure 3 The black solid line frame inside the USBKEY block diagram is the background technology. Its main function is to realize the private key and public key generation function through GenECCKeyPair (generate ECC signature key pair) and ECCExportSessionKey (ECC generates and exports session keys). The main principle is that the random number module generates a pure random number to sk, and generates PK through the sk*G module. PK can be exported and called by the SM2 signature verification module. In theory, the private key sk cannot be exported from USBKEY and can only be called internally by the SM2 signature module, which is the nature of TEE. The specific standard is GM / T0017-2012 "Intelligent Password Key Password Application Interface Data Format Specification".

[0243] Attached Figure 3The red dotted line part and the purple dotted line part are the commitment component and the open commitment component respectively. The entity implementation is equivalent to adding several registers and 4 function modules. Figure 2 The three-component diagram shows the basic principles of the three components and the cooperative relationship between the three components. Figure 3 It does not contain a verification component. For the implementation of the verification component, the recommended form is an executable program plus a computer. Because the verification component does not contain "private secrets" and other information, it does not require a TEE environment, and external execution is more economical and more reliable.

[0244] Refer to the attached Figure 3 Describe the added registers and function modules in detail. The commitment component corresponds to the call1 function call. The open commitment group corresponds to the call2, call3, and call4 function calls. The function input parameters are:

[0245] Function to set {_B,_ID,_not disclosed secret}: Call1(_B,_ID)

[0246] Input parameter description: _B and _ID are 64-bit integers, _ID is smaller than _B,

[0247] And _B can only be the factor product of 2·3·7759·14057·1413296869;

[0248] Functional description: Check if _B meets the conditions. If it fails, the _B register is -1. If it passes, set the register {_B, _ID, _private secret}, where the value of _private secret is generated and filled by the random number module.

[0249] It should be noted that after calling call1, the private key sk generated by calling GenECCKeyPair or ECCExportSessionKey function may be equal to the calculation component sk=g _ID·A+_不公开秘密 Get, the _B register is not -1.

[0250] Set the function of {_B2,_undisclosed secret 2}: ​​Call2(_B2);

[0251] Input parameters: _B2 is a 64-bit integer, _B2 is _B or a factor of _B;

[0252] Functional Description:

[0253] 1) Input _B2 is equal to _B register, copy {_B, _undisclosed secret} of commitment register to open commitment register;

[0254] 2) Input _B2 is not a factor of _B, and the call fails. In theory, call3 and call4 cannot be called correctly.

[0255] 3) Input _B2 is a factor of _B. First, use the three values ​​of the commitment register group {_B, _ID, _undisclosed secret} to find sk=3 等价结果 , Equivalent result = ID·A+undisclosed secret·B, update the result to {_B2,_undisclosed secret2'}.

[0256] Open the output temp function of the promise component: Call3(x, output buffer)

[0257] Input parameters: x is 1 to 256 (can be larger),

[0258] Functional description: Step 1) The register group of rx is filled with x random numbers modulo N / _B2;

[0259] Step 2) x g _B2···(ri+_不公开秘密2) Output to the output buffer.

[0260] Open the output of the commitment component to reveal the data function: Call4(x, x challenge value pointer, output buffer)

[0261] Input parameters: x is 1 to 256 (can be larger), a guide for x challenge values;

[0262] Functional description: Step 1) Output according to the guidance of x challenge values, and choose 1 from 2 to output ri or (ri+ _不公开秘密2 );

[0263] Step 2) Clear the output x to zero.

[0264] Compatible with the operation of uskkey, if call1 is not called, the uskkey compatibility principle is followed. Therefore, the components of the present invention have a compatible effect.

[0265] Function calling method and test vector for Example 1:

[0266] Calling during the promise phase:

[0267] First execute Call1(B, ID), where B = 924875007631011282, ID = 370202200511141820;

[0268] Then call GenECCKeyPair or ECCExportSessionKey, and the generated private key conforms to

[0269] Private key sk = 3 370202200511141820*A+不公开秘密*924875007631011282 , where A = N / B;

[0270] Open the call demo of the promise stage:

[0271] Step 1) Execute Call1(924875007631011282);

[0272] Step 2) Continue from step 1), Call 2 (256, 256 output buffer 1)

[0273] Step 3) is a continuation of step 2), where challenge value = hash(256 output buffers), where hash is cryptographically secure.

[0274] Step 4) continues from step 3), Call3(256, 256 output buffers 2).

[0275] Step 5) Finally, 256 output buffers 1 and 256 output buffers 2 are output.

[0276] The above demonstrates the production of non-interactive zero-knowledge proof data, that is, the commitment phase and response phase of the prover P are linked through a cryptographically secure hash. If it is interactive, call2 and call3 correspond to the commitment phase and response phase of the prover P respectively, and the output quantity can be as low as 1 at this time.

[0277] Function calling method and test vector for Example 2:

[0278] Directly refer to the equivalent equation given in Example 2 to set the call parameters of call1 and call2. In order to achieve the production of non-interactive or interactive zero-knowledge proof data, the mobilization and effect of call3 and call4 after call2 are completely equivalent to the stated results of the function call in Example 1 above.

[0279] Sk=3 143412314428390458*A+12*B .

[0280] Open Commitment 1: The equivalent equation for selective disclosure of {*,2005,0,*} is,

[0281] sk=s 6015·A2+257247753062340172322707857704629916232089679233711874743147690446573394·B2 , where B2 = 23277;

[0282] Therefore, after call2(23277), the updated content of {_B2,_Non-disclosed secret 2'} is equal to the parameters of the above equation.

[0283] Open Commitment 2: The equivalent equation for selective disclosure of {3702, 2005, 0, *} is,

[0284] sk=s 170724309·A2+278985723925256323237960301443399381063531994947272249985591384104512·B2 , where B2=327204789.

[0285] Therefore, after call2(327204789), {_B2,_Non-disclosed secret 2'} is updated with the parameters of the above equation.

[0286] open commit3: disclose all{3702,2005,0,1114_1820__02};

[0287] So the equivalent equation is: sk=s 143412314428390458·A2+12·B2 , where B2=462437503815505641.

[0288] Therefore, after call2(462437503815505641), the updated content of {_B2,_Non-disclosed secret 2'} is equal to the parameters of the above equation.

[0289] The statements in Example 5 can prove that it is feasible to integrate the commitment component and the opening commitment into the original smart password key. It can also prove that in engineering implementation, the {…, IDx} type commitment and the ID commitment can be combined into a set of hardware processing.

[0290] This embodiment 5 is only the implementation of the ID associated key sk. The above two components can also support the one-time key related to the SM2 algorithm. The specific documents and locations of the one-time key related to the SM2 algorithm are in the three appendices of "SM2 Elliptic Curve Public Key Cryptography Algorithm-Part 5 Parameter Definition" (GM / TO003.5-2012).

[0291] 1) Appendix A "Digital Signature and Verification Example", generate random numbers: calculate the elliptic curve point (x1, yl);

[0292] 2) Appendix B "Key Exchange and Verification Example", generate random number rA: calculate elliptic curve point RA, generate random number rB: calculate elliptic curve point RB;

[0293] 3) Appendix C message encryption and decryption examples, generate random number k, and calculate elliptic curve point Cl.

[0294] This specification declares that GenECCKeyPair (generate ECC signature key pair) and ECCExportSessionKey (ECC generates and exports session key) are the function call names given in the GM / T 0017-2012 standard; the smart key may use other function prototypes to implement the functions of private key and public key generation, and the specific implementation call shall prevail.

[0295] This embodiment 5 can prove that the commitment and open commitment functions of the present invention can be realized by upgrading the components, and this upgrade has compatibility with devices, standards and applications. A more specific statement of compatibility is that the commitment component is equivalent to the pre-call of generating sk, while the open commitment component and the input of the open commitment component and the verification component and the verification function module are only associated with "non-disclosed secrets" and are not associated with the original device, original standard and original application. Therefore, the implementation of the present invention has compatibility.

[0296] In summary, Example 5 and its implementation can guide more commercial cryptographic products to implement component upgrades. These products and systems include but are not limited to cryptographic machines based on the SM2 algorithm, signature verification servers, timestamp servers, and CA authentication certificate servers.

[0297] Implementation method 6. Figure 4 About commercial secret products and industrial ecology

[0298] There are many commercial cryptographic products and systems based on the SM2 algorithm. According to the inventor's investigation, the cryptographic product standards and service standards related to the SM2 algorithm include at least GM / T0003.1 to 5-2012, GM / T0009-2012, GM / T0010-2012, GM / T0015-2012, GM / T0016-2012, GM / T0017-2012, GM / T0022-2014, GM / T0023-2014, GM / T0024-2014, GM / T0026-2014, GM / T0027-2014, GM / T0028-2014, GM / T0029-2015, GM / T0030-2015, GM / T0031-2015, GM / T0032-2015, GM / T0033-2015, GM / T0034-2015, GM / T0035-2015, GM / T0036-2015, GM / T0037-2015, GM / T0038-2015, GM / T0039-2016, GM / T0040-2016, GM / T0041-2016, GM / T0042-2016, GM / T0043-2016, GM / T0044-2016, GM / T0045-2016, GM / T0046-2016, GM / T0047-2016, GM / T0048-2016, GM / T0049-2017, 025-2014、GM / T0027-2014、GM / T0028-2014、GM / T0029-2014、GM / T0034-2014、GM / T0043-2015、GM / T0045-2016、GM / T0059-2018、GM / T0060-2018、GMY5001-2017、GMY5002-2018、GM / T0104、GM / T0111. In addition to the above statements, you can also refer to the product certification catalog and certification service guide materials of the National Cryptography Administration.

[0299] It should be noted that on December 23, 2023, the National Cryptography Administration issued Announcement (No. 45) on 25 cryptographic industry standards, including "GM / T0009-2012SM2 Cryptographic Algorithm Usage Specifications" and "GM / T0014-2012 Digital Certificate Authentication System Cryptographic Protocol Specifications", which will be implemented from June 1, 2024; 18 standards involving VPN, SM2 algorithm, digital certificate, cryptographic equipment, etc. are the abolition of the original standards. The replacement of the above 18 standards is only an upgrade or redescription of the interface standard of the SM2 algorithm, which does not affect the connection between the SM2 algorithm and the invention content of the present invention. In short, the invention content of the present invention can connect and enable the above-mentioned commercial cryptographic products or commercial cryptographic systems that include the application of the SM2 algorithm.

[0300] Not limited to the above-stated SM2 algorithm related applications, based on Figure 4 Guidelines, based on the public key of discrete logarithm difficulty, the green-labeled industrial standards are derived, and commercial cryptographic products, VPN equipment, commercial cryptographic systems, and blockchain systems are derived from the green-labeled industrial standards; so the attached Figure 4 It is equivalent to providing references for related devices, products, and application systems. In addition to the SM2 algorithm standard, the industrial standards include at least the ECDSA elliptic curve series, Curve25519 curve, SM2 algorithm, Schnorr signature algorithm, ElGamal algorithm, Pedersen commitment, etc.

[0301] It should be noted that given a discrete logarithm standard, the method for analyzing and extracting parameters A and B is to factorize N-1 using yafu.exe (a public program). For example, for the ECDSA-384r1 elliptic curve, factor(N-1) yields the following parameters: 2, 3, 3, 7, 7, 13, 1124679999981664229965379347, 30...71.

[0302] Example 7. X509 certificate based on commitment primitive

[0303] Attached Figure 5 The X509 certificate has four entities: an X509 certificate, evidence data that opens the commitment primitive, evidence that can prove the entity's identity as ID, and an entity with identity as ID.

[0304] The X509 certificate mainly consists of subjectPublicKeyInfo and CA signature value, wherein the most important information of subjectPublicKeyInfo is {subjectName, SubjectPublicKeyinfo}.

[0305] The PK of SubjectPublicKeyinfo is generated by the commitment primitive of the present invention. Subjectname is not limited to ID or ID-related identifiers, and can be NULL here. The open commitment primitive can prove that the PK is associated / bound to the ID. So subjectName can be NULL. The key holder can disclose it using the open commitment primitive when needed.

[0306] PK is the output of a function with ID as input, so PK is classified by ID, and different keys must be different for different IDs.

[0307] 1. X509 certificate that is used first and then filed

[0308] Alice can first make the X509 certificate by herself, where the ID is _Alice, and then sign a commitment contract with Bob. The contract can state that it will be filed with the CA or notary office within 3 days. The content of the filing and endorsement is that PK is associated with _Alice, and the entity identity of the holder of {PK, sk} is Alice. For Bob and the CA, ID is uniquely bound to {sk, pk}, and other IDs cannot correspond to PK. This is why CA dares to endorse {PK, ID}.

[0309] The implementation steps are as follows:

[0310] 1) Alice: Make your own attachment first Figure 5 X509 certificate, where sk=g A·__Alice+不公开秘密·B , at this time, the public key of the CA signature value is the PK corresponding to sk;

[0311] 2) Alice: Shows Bob the open commitment proof, proving that PK is associated / bound to Alice;

[0312] 3) Alice: signs the contract using the PK of the X509 certificate, where the contract states that it will be filed with the CA within 3 days;

[0313] 4) Alice: Register the X509 certificate with the CA. The CA registration method is to sign the subjectPublicKeyInfo part. The CA signature value is generated by the CA. Obviously, the registration requires the submission of identity proof and registration application.

[0314] 5) Alice sends the registration receipt to Bob. The registration receipt is the digital signature of the CA. Figure 5 Purple part.

[0315] The above effect is to first make your own usage key and then file it within the specified time.

[0316] 2. Make your own X509 certificate for sovereignty declaration

[0317] If Alice's PK is only used to sign sovereignty declaration content, Alice's key does not need to be endorsed by a CA organization, and she can maintain the key herself. Sovereignty declaration content includes digital currency keys, various innovative content or sources. The PK holder only discloses the association between ID and PK when necessary.

[0318] 1) Fully compatible with standard X509 certificates and blockchain formats;

[0319] 2) Open commitment disclosure only when disclosure is required;

[0320] 3) If necessary, it can be filed into a certificate.

[0321] In summary, for the attached Figure 5 Digital certificates, CA organizations and PK users have new business forms.

[0322] Not limited to x509 certificates, certificate standards also include PKCS12, SPKI (the simple public Key Infrastructure), PGP, etc., but the main idea is that the CA structure (centralized organization) endorses the association between the user's public key and the user name (subject name).

[0323] Example 8. Research on decentralized and weakly centralized application scenarios

[0324] The ID is uniquely bound to {sk, pk}, so the entity of the ID inherently has the ability to assert sovereignty over the key and its signature content.

[0325] A decentralized application scenario that requires CA participation:

[0326] The entity with ID digitally signs the content it invented or the audiovisual content it created, and the content and its digital signature are stored together on the official website or blockchain, where the key of the digital signature is constructed by the commitment primitive of the present invention. The effect achieved is that the entity with ID provides the following three sets of evidence at any time, especially when defending rights, to prove the sovereignty of ID over the content + digital signature.

[0327] Evidence 1. The official website or blockchain evidence "content + digital signature",

[0328] Prove that the content + digital signature actually existed at the time of storage.

[0329] Evidence 2. Open the promised data, prove that the ID is uniquely associated / bound to the key of the digital signature.

[0330] Evidence 3. The entity with the identity ID is associated with the ID (such as the identity number and ID card, the phone number and the owner's information).

[0331] Proof that the ID number is associated / bound to the entity ID.

[0332] The combination of the three sets of evidence can prove that at the time of evidence storage, the entity with identity ID stored the content to confirm ownership.

[0333] A weakly centralized scenario of enabling first and then filing:

[0334] The content of the invention shows the commitment-obligation digital signature scenario of Alice and Bob. This scenario proves that it is feasible to enable the use first and then file the record, but the later record does not necessarily have to be filed with the CA agency. The record can be achieved by making a statement in a newspaper, notarizing at a notary office, or storing evidence on a blockchain. Alice can send the statement or notarization information to Bob. The effect is that 1. Bob forms a signature, 2. records, and 3. opens a commitment to form an evidence chain. More importantly, the above statement and notarization information may not include the zero-knowledge proof information in the opening commitment stage.

[0335] Based on the above analysis and the two scenario descriptions, the application based on the present invention has the ability of decentralization or weak centralization.

[0336] From the perspective of the encoded content, the medium involved in the present invention is one of the two cases, PK and / or sk, zero-knowledge proof related data in the opening commitment stage. PK and sk may be data encapsulated by the X509 and pks standards. The zero-knowledge proof data for opening the commitment is most likely non-interactive zero-knowledge proof data, and interactive zero-knowledge data is also included.

[0337] From the perspective of hardware entities, the media involved in the present invention include at least the following situations: electronic media, paper media, and cloud evidence storage services. Electronic media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media, which can be used to store information that can be accessed by a computing device. The following examples illustrate possible media forms: 1) a USB disk or cloud storage of an executable program of a component function, which can be executed in a Windows or Linux environment; 2) printed paper materials of a digital certificate related to the present invention; 3) a USB disk or cloud storage, on which the non-interactive zero-knowledge proof data related to the present invention is stored.

[0338] A related explanation of the program / instructions in a computer program product. The functions need to refer to the functional definitions corresponding to the three cryptographic protocol roles. The corresponding embodiments of the cryptographic protocol roles are attached. Figure 2 ; Types of programs / instructions include binary executable codes and directly / indirectly executed scripting languages, where indirect means compiled and executed by a general compiler, such as go language code; computers here include but are not limited to general-purpose CPUs, single-chip microcomputers, and FPGA-type programmable hardware; compilable codes include but are not limited to source codes such as C language and Go language; scripting languages ​​include but are not limited to java, shell, etc.

[0339] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept of the present application. For example, the above features are replaced with the technical features with similar functions disclosed in the present application (but not limited to) to form a technical solution.

Claims

1. A method for committing a key, applicable to a public key pk=sk*G, where sk is the key, G is the discrete logarithm generator; it is characterized in that based on the public key pk=sk*G, the ID association method is set in the following way sk=g ID·A+不公开秘密·B Or use the following method to set the association mode of {ID1, ID2, ..., IDx} sk=g ID1·A1+ID2·A2…+IDx·Ax+不公开秘密·B Where B is a factor of N-1, A = (N-1) / B, N is the group order of G, g is the smallest primitive root on N or a primitive root is specified in advance; ID / {…IDi…} is the content to be committed; {B1, B2, ..., Bx} is a decomposition of B and are relatively prime to each other, and each Ai satisfies Ai = (N-1) / Bi.

2. The method according to claim 1, characterized in that The discrete logarithm generator G is a generator based on the SM2 algorithm, then sk=3 ID·A+不公开秘密·B Among them, B=924875007631011282.

3. The method according to claim 1, characterized in that The discrete logarithm generator G is a generator based on the SM2 algorithm, then, sk=3 ID1·A1+ID2 · A2+ID3 · A3+ID4·A4+不公开秘密·B Among them, {B1, B2, B3, B4} = {14057, 7759, 3, 140571413296869}.

4. The method according to claim 1, characterized in that: The discrete logarithm generator G is a generator based on the secp256k1 algorithm, then sk=7 ID·A+不公开秘密·B 。 5. A verification commitment method corresponding to the key commitment method according to any one of claims 1 to 4, characterized in that: declare ID or {…IDi…}; Eliminate the ID or {…IDi…} information and calculate pk_ in the following way charller , pk_ charller =(g -A·ID )·PK or pk_ charller =(…·(g -A1·IDi )·)*PK; Adopting interactive zero-knowledge proof protocol Or a non-interactive zero-knowledge proof protocol to prove that there is a secret k that satisfies the equation pk_ charller =(g B ) k *G.

6. The method according to claim 5, characterized in that The specific steps of the first interactive zero-knowledge proof protocol include: Commitment phase: For the prover P, randomly select r, calculate temp in the following way and send it to the verifier V, temp=(g B ) (不公开秘密+r) *G Challenge phase: For the verifier V, 0 or 1 is randomly selected as the challenge value; Response phase: For the prover P, If the challenge value is 0, then r mod A is revealed; If the challenge value is 1, then reveal the undisclosed secret + r mod A; Verification phase: For the verifier V, If the challenge value is 0, then verify temp = (g B ) r *pk_charller; If the challenge value is 1, then verify temp = (g B ) (不公开秘密+r) *G.

7. The method according to claim 6, characterized in that The first interactive zero-knowledge proof protocol is transformed into Non-interactive zero-knowledge proof protocol; The specific steps of the non-interactive zero-knowledge proof protocol include: Prover P: Input "undisclosed secret", construct and output: {X,Y}; Step P001: X={…,(g B ) (不公开秘密+ri) , ...} Among them, i is the number of elements, ri is a pure random number; Step P002: Calculate hash(X) based on X, and use hash(X) as the challenge value. The selection method is as follows; Y = {…, hash(x)[i] = = 0? ri: (undisclosed secret + ri), …}; Step P003: Output: {X, Y}; Verifier V: Input: {X, Y}, Output: pass / fail; Step V002: Calculate hash(X); Step V003: Verify each i in the following way: X[i] is (g B ) (不公开秘密+ri) Is Hash(X)[i]==0? B ) ri *pk_charller:(g B ) (ri+不公开秘密) *G; Output pass / fail; The passing criterion is that the equation holds for each i.

8. The method according to claim 5, characterized in that The specific steps of the interactive zero-knowledge proof protocol include: Commitment phase: For the prover P, first randomly select w0, calculate w1 = private secret - w0 mod A, calculate Y0 and Y1 in the following way and send them to the verifier V; Y0=(g B ) w0 *G Y1=(g B ) w1 *G Challenge phase: For the verifier V, 0 or 1 is randomly selected as the challenge value; Response phase: For the prover P If the challenge value is 0, then w0 is revealed; If the challenge value is 1, w1 is revealed; Verification phase: For the verifier V If the challenge value is 0, then verify (g B ) w0 *Y1=pk_charller and satisfy Y0=(g B ) w0 *G; If the challenge value is 01, then verify (g B ) w1 *Y0=pk_charller and satisfy Y1=(g B ) w1 *G.

9. A blockchain system, wherein the blockchain system uses a digital signature protocol or a Pedersen commitment protocol, characterized in that: The digital signature or the key of the Pedersen commitment is generated by any commitment method of claims 1 to 4.

10. A commercial cryptographic product that complies with the SM2 algorithm standard, characterized in that: The products include smart password keys, digital certificate servers, signature verification servers, financial cryptographic machines, server cryptographic machines, cloud server cryptographic machines, timestamp servers, secure electronic signature systems, digital certificate authentication systems, IPSecVPN gateways, SSLVPN gateways, blockchain block writing devices or blockchain block verification devices; The product includes at least one component capable of implementing the cryptographic protocol role function, The cryptographic protocol roles include: a committer P who uses the key commitment method described in claim 2 or 3 to make a commitment, or a prover P or a verifier V who uses the verification commitment method described in any one of claims 6 to 8 to perform verification.

11. The commercial cryptographic product according to claim 10, which complies with the SM2 algorithm standard, is characterized in that: When the product type is a smart password key, the smart password key includes a key generation module, a commitment primitive component and an open commitment primitive component; Wherein, the commitment primitive component is the committer P; The open commitment primitive component is the prover P; The commitment primitive component is called by the key generation module.

12. A digital certificate product, the public key type is PK = sk * G, G is a discrete logarithm generator, characterized in that: The key sk is generated using the key commitment method described in any one of claims 1 to 4.

13. A device comprising an input unit, an output unit and a processing unit, characterized in that: The processing unit includes at least one component that can realize the function of a cryptographic protocol role, and the role includes at least one of the following roles: a committer P who uses the key commitment method described in any one of claims 1 to 4 to make a commitment, or a prover P or a verifier V who uses the verification commitment method described in any one of claims 5 to 8 to make a verification.

14. A medium storing data, characterized in that: The stored data after being de-encoded includes one of the following two types of data; 1) a secret key sk or a public key PK, wherein sk is generated by the secret key commitment method described in any one of claims 1 to 4; 2) interactive data of the zero-knowledge proof protocol, wherein the interactive data is generated and used by the prover P or verifier V corresponding to the verification commitment method described in any one of claims 5 to 8.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed, the execution steps corresponding to the cryptographic protocol role are implemented, and the cryptographic protocol role is one of the following situations: the committer P corresponding to the key commitment method described in any one of claims 1 to 4, the prover P or the verifier V corresponding to the verification commitment method described in any one of claims 5 to 8.

Citation Information

Patent Citations

  • SM2 signature method suitable for power wireless sensor network

    CN109245882A

  • Encryption method and device based on elliptic curve signature, terminal and medium

    CN117749382A

  • User revocable certificateless signature method based on RSA accumulator

    CN118101219A

  • Method for key producing and certificate issuing for open key cipher and its system

    JP1997006236A

  • Id key issuing apparatus, id verification apparatus, id certificating apparatus, id key issuing method, id verification method, and id certificating method

    JP2005167385A