Block chain user transaction signature verification method
Through the improved SM9 signature algorithm and IBC system, the complexity of user public and private key management in the blockchain is solved, efficient user transaction signatures and verifications are achieved, suitable for massive user scenarios, simplifying key management and resisting attack.
Patent Information
- Application Number
- CN202410896179.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-08-30
AI Technical Summary
User public and private key management using the ECDSA algorithm in existing blockchains suffers from complex certificate issuance and management systems, high operating costs, low efficiency, and single points of failure, making it difficult to adapt to massive user usage scenarios.
It adopts the improved SM9 signature algorithm, which is based on the IBC system and does not require a digital certificate. It realizes user transaction signature and verification through the operation of multiplicative cyclic group and elliptic curve group, and combines the challenge/response mode CHAP authentication protocol to simplify key management and identity. Certification.
It reduces certificate management costs, improves efficiency, is suitable for use by a large number of users, simplifies key management, resists attacks, and achieves efficient signature and verification of user transactions.
Smart Images

Figure CN118569872A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signature verification, and specifically relates to a blockchain user transaction signature verification method. Background Art
[0002] The development of blockchain technology and related industries should vigorously promote the construction of a modern industrial system and accelerate the development of new quality productivity. To promote the development of new quality productivity, we should give full play to the multiplier effect of data elements, such as data elements × technological innovation, and its typical representatives include big data, blockchain, cloud computing, artificial intelligence and other digital technologies.
[0003] However, cryptography is the core underlying technology of blockchain, and its importance is self-evident. In the existing blockchain, the user public key and user private key generated by the ECDSA algorithm are used to generate the user wallet address and manage the user's own assets, and to sign and verify the transaction. The public and private key pairs in ECDSA have nothing to do with the identity of the user in real life, and the algorithm is based on the PKI system. The system uses certificates to manage public keys, and through a third-party trusted institution, the CA certification center, the user's public key and other identification information are bundled together to verify their identity on the Internet. However, the PKI system has the following problems: 1) The certificate issuance and management system is complex and difficult to deploy. 2) The operation and maintenance costs are high, the efficiency is low, and it is difficult to adapt to the scenario of massive user use. 3) There is a single point of failure problem: once the core CA is attacked, the digital certificates it manages will be unsafe, which will directly endanger the security of user data information. 4) The problem of multi-CA mutual trust: user certificates can only be verified by the root certificate of the CA to which they belong, and different CAs cannot verify each other.
[0004] However, it does not solve the problem that the user public key and private key generated by the ECDSA algorithm in the existing blockchain are used to generate the user wallet address and manage the user's own assets, and to sign and verify the transaction. The public and private key pairs in ECDSA have nothing to do with the identity of the user in real life, and the algorithm is based on the PKI system. The PKI system has prominent problems such as complex certificate issuance and management system, difficult deployment, high operation and maintenance costs, and low efficiency. For this reason, we propose a blockchain user transaction signature verification method. Summary of the invention
[0005] The purpose of the present invention is to provide a blockchain user transaction signature verification method to solve the problems raised in the above background technology.
[0006] To achieve the above purpose, the present invention provides the following technical solution: a blockchain user transaction signature verification method, comprising the following steps: S1. The user signs the message using the improved SM9 signature algorithm: Assume that the message to be signed is a bit string M. In order to obtain the digital signature (h, S) of the message M, the signing process of user A is as follows: S101. Calculate the multiplication cyclic group G T The element g=e(P S , P2); S102, select a random number r∈[1, N-1]; S103, calculate the multiplication cyclic group G T The element w=g r , and convert the data type of w to a bit string; S104. Calculate the integer h=H2(M||w,N); S105, calculate the integer L = (rh) mod N; if L = 0, reselect a random number; S106. Calculate the element S = [L]·S in the multiplication cyclic group G2 A , and convert the data types of h and S into bit strings, then the signature of message M is (h, S); S2. Verification process: In order to verify the message M' and its digital signature (h', S'), user B's signature verification process is as follows: S201, convert the data type of h' into an integer, and verify whether h'∈[1, N-1] holds. If not, the verification fails; S202, convert the data type of S' into a point on the elliptic curve, and check whether S'∈G2 holds. If not, the verification fails; S203, calculate the multiplication cyclic group G T The element g=e(P S , P2); S204, calculate the multiplication cyclic group G T The element t=g h' ; S205, calculate the integer h1=H1(ID A ||hid, N); S206, calculate the element P=[h1]P1+P in the additive cyclic group G1 S ; S207, calculate the multiplication cyclic group G T The element u=e(P,S'); S208, calculate the multiplication cyclic group G T The element w'=u·t in , and convert the data type of w' into a bit string; S209. Calculate the integer h2=H2(M'||w', N) and check whether h2=h' holds. If so, the signature verification passes, otherwise it fails.
[0007] Preferably, the improved SM9 signature algorithm in S1 is as follows: The improved SM9 signature algorithm uses the R-Ate pair with good security performance and high computing speed. The bilinear pairing of the R-Ate pair is calculated as follows: That is, (G1, +) and (G2, +) are two additive cyclic groups on the elliptic curve group E(K), where K is a finite field, (G T , ·) is a subgroup of the multiplicative cyclic group, whose orders are all prime numbers N, G T is a multiplicative group of order N, and P1 and P2 are generators of G1 and G2 respectively. There exists a homomorphic mapping f from G2 to G1 such that f(P2)=P1, and the bilinear pairing e is G1×G2→G T 's mapping.
[0008] Preferably, the R-Ate pair satisfies bilinearity, non-degeneracy and computability: The bilinearity is that for any P∈G1, Q∈G2, a, b∈Z N , we have e([a]P,[b]Q)=e(P,Q) ab ; The non-degenerate property is that e(P1, P2)≠1, that is, G T The unit element of The computability is that for any P∈G1, Q∈G2, there exists an efficient algorithm to compute e(P, Q) And if G1=G2, then e is called a symmetric bilinear pairing, if G1 G2, then e is called an asymmetric bilinear pairing.
[0009] Preferably, the system parameters of the improved SM9 signature algorithm are generated as follows: KGC firstly N Calculate t1=H1(ID A ||hid,N)+S S If t1=0, it is necessary to regenerate the master private key, calculate and publish the master public key, and update the private key of the existing user; otherwise, calculate t2=S S t1 -1 , then calculate S A =t2·P2, S A As user A's private key, calculate Q A =H1(ID A ||hid,N)P1+P S , put Q A As the public key of user A, the public key is made public.
[0010] Preferably, the user encryption process of the improved SM9 signature algorithm is as follows: Assume that user A is the encryptor and wants to send the encrypted plaintext M to user B. The implementation process is as follows: A1. Select a random number r∈[1, N-1]; B1. Calculate the element C1=[r]Q in group G2 A , convert the data type of C1 into a bit string; C1. Computation group G T The element g=e(P S , P2); D1. Computation group G T The element w=g r , and then convert the data type of w into a bit string; E1. Calculation is performed based on the method of encrypting plain text: divided into two cases: a serial cipher based on a key derivation function and a block cipher algorithm combined with a key derivation function; F1. Calculate C3 = MAC (K2, C2); G1. Output ciphertext C=C1||C2||C3.
[0011] Preferably, the user decryption process of the improved SM9 signature algorithm is as follows: User B acts as the decryptor and the process of decrypting document C is as follows: A2. Take the bit string C1 from C, convert the data type of C1 to a point on the elliptic curve, and verify whether C1∈G2 holds. If not, report an error and exit. B2. Calculation group G T The element w'=e(C1,S A ), and convert the data type of w' into a bit string; C2. Classification and calculation according to the method of encrypting plain text: divided into two cases: the serial cipher based on the key derivation function and the block cipher algorithm combined with the key derivation function; D2. Calculate u=MAC(K2',C2), extract the bit string C3 from C, if u≠C3, report an error and exit; E2. Output plaintext M'.
[0012] Preferably, the method for encrypting the plaintext in E1 is a sequence cipher based on a key derivation function, and the integer klen=mlen+K is calculated. 2_len , then calculate K=KDF(C1||w||ID A , klen); let K1 be the mlen bits on the left of K, and the rest K 2_len The length of the bit is K2. If K1 is a string of all 0 bits, return B1; otherwise, calculate C2=M⊕K1; The method of encrypting the plaintext in E1 is a block cipher algorithm combined with a key derivation function, and the integer klen=K is calculated. 1_len +K 2_len , then calculate K=KDF(C1||w||ID A , klen), let K1 be the leftmost K 1_len bits, k2 is the remaining K 2_len If K1 is a string of all 0 bits, return B1, otherwise calculate C2=Enc(K1,M).
[0013] Preferably, the method for encrypting the plaintext in C2 is a sequence encryption algorithm based on a key derivation function, and the integer klen=mlen+K is calculated. 2_len , then calculate K'=KDF(C1||w'||ID A , klen); let K 1' The leftmost mlen bits of K' and the rest of K 2_len The length is K bits. 2' , if K 1’ If it is a string of all 0 bits, an error is reported and the program exits. Otherwise, the program calculates M'=C2⊕K 1' ; The method of encrypting the plaintext in C2 is a block cipher algorithm combined with a key derivation function, and the integer klen=K is calculated. 1_len +K 2_len , then calculate K'=KDF(C1||w'||ID A , klen), let K 1' The leftmost K 1_len Bit, k 2' For the remaining K 2_len Bit, if K 1' If it is a string of all 0 bits, an error is reported and the system exits. Otherwise, M'=Dec(K 1' , C2).
[0014] Preferably, the process of proving the correctness of the signature during the verification process is as follows: To test Established, only need to prove Established, .
[0015] Preferably, the KGC selects and publishes a private key generation function identifier hid represented by one byte; assuming that the identity of user A is ID A ; The ID of the user A A The calculation formula is as follows: .
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention adopts the SM9 algorithm based on the IBC system and applies it to the blockchain. In the IBC system, since there is no need to apply for a digital certificate, the complicated certificate verification and management links are naturally omitted, the cost is low, the efficiency is high, and it is particularly suitable for situations where a large number of users use it, such as the field of the Internet of Things; the original SM9 algorithm is improved so that a pair of system public and private keys generated by KGC is combined with a user identity to generate a pair of user public and private keys. The user only uses a pair of public and private keys to implement the signature and verification of transactions and encrypted communication in the blockchain; The SM9 algorithm is based on the IBC system. It does not require the application of digital certificates, thus avoiding the complex certificate management problems in the PKI system, making key management simple, convenient and easy to deploy. In addition, the SM9 algorithm identity authentication process mainly uses the CHAP authentication protocol in the challenge / response mode, which can resist attacks such as Trojans and password dictionaries. The improved SM9 algorithm combines the two pairs of system and user public and private keys generated by the original SM9 algorithm into one pair of system and user public and private keys. It is mainly used for the generation of user wallet addresses in the blockchain, the management of users' own assets, the signing and verification of user transactions, and encrypted communications between users. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a schematic diagram of a scenario in which the improved SM9 signature algorithm of the present invention is applied to a blockchain; Figure 2 This is a schematic diagram of the transaction signature process between users in the blockchain of the present invention; Figure 3 This is a schematic diagram of the signature verification process for transactions between users in the blockchain of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] See also Figure 1-Figure 3 The present invention provides a technical solution: a blockchain user transaction signature verification method, comprising the following steps: S1. The user signs the message using the improved SM9 signature algorithm: Assume that the message to be signed is a bit string M. In order to obtain the digital signature (h, S) of the message M, the signing process of user A is as follows: S101. Calculate the multiplication cyclic group G T The element g=e(P S , P2); S102, select a random number r∈[1, N-1]; S103, calculate the multiplication cyclic group G T The element w=g r , and convert the data type of w to a bit string; S104. Calculate the integer h=H2(M||w,N); S105, calculate the integer L = (rh) mod N; if L = 0, reselect a random number; S106. Calculate the element S = [L]·S in the multiplication cyclic group G2 A , and convert the data types of h and S into bit strings, then the signature of message M is (h, S); S2. Verification process: In order to verify the message M' and its digital signature (h', S'), user B's signature verification process is as follows: S201, convert the data type of h' into an integer, and verify whether h'∈[1, N-1] holds. If not, the verification fails; S202, convert the data type of S' into a point on the elliptic curve, and check whether S'∈G2 holds. If not, the verification fails; S203, calculate the multiplication cyclic group G T The element g=e(P S , P2); S204, calculate the multiplication cyclic group G T The element t=g h' ; S205, calculate the integer h1=H1(ID A ||hid, N); S206, calculate the element P=[h1]P1+P in the additive cyclic group G1 S ; S207, calculate the multiplication cyclic group G T The element u=e(P,S'); S208, calculate the multiplication cyclic group G T The element w'=u·t in , and convert the data type of w' into a bit string; S209. Calculate the integer h2=H2(M'||w', N) and check whether h2=h' holds. If so, the signature verification passes, otherwise it fails.
[0020] In order to improve the calculation processing of the SM9 algorithm, in this embodiment, preferably, the improved SM9 signature algorithm in S1 is as follows: The improved SM9 signature algorithm uses the R-Ate pair with good security performance and high computing speed. The bilinear pairing of the R-Ate pair is calculated as follows: That is, (G1, +) and (G2, +) are two additive cyclic groups on the elliptic curve group E(K), where K is a finite field, (G T , ·) is a subgroup of the multiplicative cyclic group, whose orders are all prime numbers N, G T is a multiplicative group of order N, and P1 and P2 are generators of G1 and G2 respectively. There exists a homomorphic mapping f from G2 to G1 such that f(P2)=P1, and the bilinear pairing e is G1×G2→G T 's mapping.
[0021] In order to implement conditional restrictions on the improved SM9 algorithm, in this embodiment, preferably, the R-Ate pair satisfies bilinearity, non-degeneracy and computability: The bilinearity is that for any P∈G1, Q∈G2, a, b∈Z N , we have e([a]P,[b]Q)=e(P,Q) ab ; The non-degenerate property is that e(P1, P2)≠1, that is, G T The unit element of The computability is that for any P∈G1, Q∈G2, there exists an efficient algorithm to compute e(P, Q) And if G1=G2, then e is called a symmetric bilinear pairing, if G1 G2, then e is called an asymmetric bilinear pairing.
[0022] In order to realize the system parameter generation of the improved SM9 signature algorithm, in this embodiment, preferably, the system parameter generation of the improved SM9 signature algorithm is as follows: KGC firstly N Calculate t1=H1(ID A ||hid,N)+S S If t1=0, it is necessary to regenerate the master private key, calculate and publish the master public key, and update the private key of the existing user; otherwise, calculate t2=S S t1 -1 , then calculate S A =t2·P2, S A As user A's private key, calculate Q A =H1(ID A ||hid,N)P1+P S, put Q A As the public key of user A, the public key is made public.
[0023] In order to realize encryption calculation processing of the user's plain text, in this embodiment, preferably, the user encryption process of the improved SM9 signature algorithm is as follows: Assume that user A is the encryptor and wants to send the encrypted plaintext M to user B. The implementation process is as follows: A1. Select a random number r∈[1, N-1]; B1. Calculate the element C1=[r]Q in group G2 A , convert the data type of C1 into a bit string; C1. Computation group G T The element g=e(P S , P2); D1. Computation group G T The element w=g r , and then convert the data type of w into a bit string; E1. Calculation is performed based on the method of encrypting plain text: divided into two cases: a serial cipher based on a key derivation function and a block cipher algorithm combined with a key derivation function; F1. Calculate C3 = MAC (K2, C2); G1. Output ciphertext C=C1||C2||C3.
[0024] In order to decrypt the received ciphertext, in this embodiment, preferably, the user decryption process of the improved SM9 signature algorithm is as follows: User B acts as the decryptor and the process of decrypting document C is as follows: A2. Take the bit string C1 from C, convert the data type of C1 to a point on the elliptic curve, and verify whether C1∈G2 holds. If not, report an error and exit. B2. Calculation group G T The element w'=e(C1,S A ), and convert the data type of w' into a bit string; C2. Classification and calculation according to the method of encrypting plain text: divided into two cases: the serial cipher based on the key derivation function and the block cipher algorithm combined with the key derivation function; D2. Calculate u=MAC(K2',C2), extract the bit string C3 from C, if u≠C3, report an error and exit; E2. Output plaintext M'.
[0025] In order to realize the encryption of plain text and perform calculation according to different calculation methods, in this embodiment, preferably, the method for encrypting the plain text in E1 is a sequence cipher based on a key derivation function, then the integer klen=mlen+K is calculated. 2_len , then calculate K=KDF(C1||w||ID A , klen); let K1 be the mlen bits on the left of K, and the rest K 2_len The length of the bit is K2. If K1 is a string of all 0 bits, return B1; otherwise, calculate C2=M⊕K1; The method of encrypting the plaintext in E1 is a block cipher algorithm combined with a key derivation function, and the integer klen=K is calculated. 1_len +K 2_len , then calculate K=KDF(C1||w||ID A , klen), let K1 be the leftmost K 1_len bits, k2 is the remaining K 2_len If K1 is a string of all 0 bits, return B1, otherwise calculate C2=Enc(K1,M).
[0026] In order to decrypt the received ciphertext and perform calculations according to different calculation methods, in this embodiment, preferably, the method for encrypting the plaintext in C2 is a sequence cipher algorithm based on a key derivation function, and the integer klen=mlen+K is calculated. 2_len , then calculate K'=KDF(C1||w'||ID A , klen); let K 1' The leftmost mlen bits of K' and the rest of K 2_len The length is K bits. 2' , if K 1’ If it is a string of all 0 bits, an error is reported and the program exits. Otherwise, the program calculates M'=C2⊕K 1' ; The method of encrypting the plaintext in C2 is a block cipher algorithm combined with a key derivation function, and the integer klen=K is calculated. 1_len +K 2_len , then calculate K'=KDF(C1||w'||ID A , klen), let K 1' The leftmost K 1_len Bit, k 2' For the remaining K 2_len Bit, if K 1' If it is a string of all 0 bits, an error is reported and the system exits. Otherwise, M'=Dec(K 1' , C2).
[0027] In order to verify the correctness of the signature, in this embodiment, preferably, the process of proving the correctness of the signature in the verification process is as follows: To test Established, only need to prove Established, .
[0028] In order to realize the user's ID A Set and calculate. In this embodiment, preferably, the KGC selects and publishes a private key generation function identifier hid represented by one byte; assuming that the identity of user A is ID A ; The ID of the user A A The calculation formula is as follows: .
[0029] The working principle and use process of the present invention: Step 1: The user signs the message using the improved SM9 signature algorithm: Assume that the message to be signed is a bit string M. In order to obtain the digital signature (h, S) of message M, the signing process of user A is as follows: The first step is to calculate the multiplication cyclic group G T The element g=e(P S , P2); The second step is to select a random number r∈[1, N-1]; Step 3: Calculate the multiplication cyclic group G T The element w=g r , and convert the data type of w to a bit string; Step 4: Calculate the integer h=H2(M||w,N); Step 5: Calculate the integer L = (rh) mod N; if L = 0, reselect a random number; Step 6: Calculate the elements S = [L] · S in the multiplication cyclic group G2 A , and convert the data types of h and S into bit strings, then the signature of message M is (h, S); Step 2: Verification process: In order to verify the message M' and its digital signature (h', S'), user B's signature verification process is as follows: Step 7: Convert the h' data type to an integer and verify whether h'∈[1, N-1] holds. If not, the verification fails. Step 8: Convert the data type of S' to a point on the elliptic curve and check whether S'∈G2 holds. If not, the verification fails. Step 9: Calculate the multiplication cyclic group G TThe element g=e(P S , P2); Step 10: Calculate the multiplication cyclic group G T The element t=g h' ; Step 11: Calculate the integer h1=H1(ID A ||hid, N); Step 12: Calculate the element P=[h1]P1+P in the additive cyclic group G1 S ; Step 13: Calculate the multiplication cyclic group G T The element u=e(P,S'); Step 14: Calculate the multiplication cyclic group G T The element w'=u·t in , and convert the data type of w' into a bit string; Step 15: Calculate the integer h2=H2(M'||w', N) and check whether h2=h' holds. If so, the signature verification passes, otherwise it fails.
[0030] 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 blockchain user transaction signature verification method, characterized in that: The following steps are included: S1. The user signs the message using the improved SM9 signature algorithm: Assume that the message to be signed is a bit string M. In order to obtain the digital signature (h, S) of the message M, the signing process of user A is as follows: S101. Calculate the multiplication cyclic group G T The element g=e(P S , P2); S102, select a random number r∈[1, N-1]; S103, calculate the multiplication cyclic group G T The element w=g r , and convert the data type of w to a bit string; S104. Calculate the integer h=H2(M||w,N); S105, calculate the integer L = (rh) mod N; if L = 0, reselect a random number; S106. Calculate the element S = [L]·S in the multiplication cyclic group G2 A , and convert the data types of h and S into bit strings, then the signature of message M is (h, S); S2. Verification process: In order to verify the message M' and its digital signature (h', S'), user B's signature verification process is as follows: S201, convert the data type of h' into an integer, and verify whether h'∈[1, N-1] holds. If not, the verification fails; S202, convert the data type of S' into a point on the elliptic curve, and check whether S'∈G2 holds. If not, the verification fails; S203, calculate the multiplication cyclic group G T The element g=e(P S , P2); S204, calculate the multiplication cyclic group G T The element t=g h' ; S205, calculate the integer h1=H1(ID A ||hid, N); S206, calculate the element P=[h1]P1+P in the additive cyclic group G1 S ; S207, calculate the multiplication cyclic group G T The element u=e(P,S'); S208, calculate the multiplication cyclic group G T The element w'=u·t in , and convert the data type of w' into a bit string; S209. Calculate the integer h2=H2(M'||w', N) and check whether h2=h' holds. If so, the signature verification passes, otherwise it fails.
2. A blockchain user transaction signature verification method according to claim 1, characterized in that: The improved SM9 signature algorithm in S1 is as follows: The improved SM9 signature algorithm uses the R-Ate pair with good security performance and high computing speed. The bilinear pairing of the R-Ate pair is calculated as follows: That is, (G1, +) and (G2, +) are two additive cyclic groups on the elliptic curve group E(K), where K is a finite field, (G T , ·) is a subgroup of the multiplicative cyclic group, whose orders are all prime numbers N, G T is a multiplicative group of order N, and P1 and P2 are generators of G1 and G2 respectively. There exists a homomorphic mapping f from G2 to G1 such that f(P2)=P1, and the bilinear pairing e is G1×G2→G T 's mapping.
3. A blockchain user transaction signature verification method according to claim 2, characterized in that: The R-Ate pair satisfies bilinearity, non-degeneracy and computability: The bilinearity is that for any P∈G1, Q∈G2, a, b∈Z N , we have e([a]P,[b]Q)=e(P,Q) ab ; The non-degenerate property is that e(P1, P2)≠1, that is, G T The unit element of The computability is that for any P∈G1, Q∈G2, there exists an efficient algorithm to compute e(P, Q) And if G1=G2, then e is called a symmetric bilinear pairing, if G1 G2, then e is called an asymmetric bilinear pairing.
4. A blockchain user transaction signature verification method according to claim 1, characterized in that: The system parameters of the improved SM9 signature algorithm are generated as follows: KGC firstly N Calculate t1=H1(ID A ||hid,N)+S S If t1=0, it is necessary to regenerate the master private key, calculate and publish the master public key, and update the private key of the existing user; otherwise, calculate t2=S S t1 -1 , then calculate S A =t2·P2, S A As user A's private key, calculate Q A =H1(ID A ||hid,N)P1+P S , put Q A As the public key of user A, the public key is made public.
5. A blockchain user transaction signature verification method according to claim 1, characterized in that: The user encryption process of the improved SM9 signature algorithm is as follows: Assume that user A is the encryptor and wants to send the encrypted plaintext M to user B. The implementation process is as follows: A1. Select a random number r∈[1, N-1]; B1. Calculate the element C1=[r]Q in group G2 A , convert the data type of C1 into a bit string; C1. Computation group G T The element g=e(P S , P2); D1. Computation group G T The element w=g r , and then convert the data type of w into a bit string; E1. Calculation is performed based on the method of encrypting plain text: divided into two cases: a serial cipher based on a key derivation function and a block cipher algorithm combined with a key derivation function; F1. Calculate C3 = MAC (K2, C2); G1. Output ciphertext C=C1||C2||C3.
6. A blockchain user transaction signature verification method according to claim 1, characterized in that: The user decryption process of the improved SM9 signature algorithm is as follows: User B acts as the decryptor and the process of decrypting document C is as follows: A2. Take the bit string C1 from C, convert the data type of C1 to a point on the elliptic curve, and verify whether C1∈G2 holds. If not, report an error and exit. B2. Calculation group G T The element w'=e(C1,S A ), and convert the data type of w' into a bit string; C2. Classification and calculation according to the method of encrypting plain text: divided into two cases: the serial cipher based on the key derivation function and the block cipher algorithm combined with the key derivation function; D2. Calculate u=MAC(K2',C2), extract the bit string C3 from C, if u≠C3, report an error and exit; E2. Output plaintext M'.
7. A blockchain user transaction signature verification method according to claim 5, characterized in that: The method for encrypting the plaintext in E1 is a serial cipher based on a key derivation function, and the integer klen=mlen+K is calculated. 2_len , then calculate K=KDF(C1||w||ID A , klen); let K1 be the mlen bits on the left of K, and the rest K 2_len The length of the bit is K2. If K1 is a string of all 0 bits, return B1; otherwise, calculate C2=M⊕K1; The method of encrypting the plaintext in E1 is a block cipher algorithm combined with a key derivation function, and the integer klen=K is calculated. 1_len +K 2_len , then calculate K=KDF(C1||w||ID A , klen), let K1 be the leftmost K 1_len bits, k2 is the remaining K 2_len If K1 is a string of all 0 bits, return B1, otherwise calculate C2=Enc(K1,M).
8. A blockchain user transaction signature verification method according to claim 6, characterized in that: The method for encrypting the plaintext in C2 is a serial cryptographic algorithm based on a key derivation function, and the integer klen=mlen+K is calculated. 2_len , then calculate K'=KDF(C1||w'||ID A , klen); let K 1' The leftmost mlen bits of K' and the rest of K 2_len The length is K bits. 2' , if K 1’ If it is a string of all 0 bits, an error is reported and the program exits. Otherwise, the program calculates M'=C2⊕K 1' ; The method of encrypting the plaintext in C2 is a block cipher algorithm combined with a key derivation function, and the integer klen=K is calculated. 1_len +K 2_len , then calculate K'=KDF(C1||w'||ID A , klen), let K 1' The leftmost K 1_len Bit, k 2' For the remaining K 2_len Bit, if K 1' If it is a string of all 0 bits, an error is reported and the system exits. Otherwise, M'=Dec(K 1' , C2).
9. A blockchain user transaction signature verification method according to claim 1, characterized in that: The process of proving the correctness of the signature during the verification process is as follows: To test Established, only need to prove Established, 。 10. A blockchain user transaction signature verification method according to claim 4, characterized in that: The KGC selects and publishes a private key generation function identifier hid represented by one byte; assuming that the identity of user A is ID A ; The ID of the user A A The calculation formula is as follows: 。
Citation Information
Cited By
Implementation method for security identity authentication protocol of unmanned aerial vehicle
CN119814327A
