An elliptic curve signature method resistant to quantum computer attacks

By calculating the transformed private key dA and user identification id, and using hash function and elliptic curve point multiplication operation, the problem of insufficient security of SM2 public key cryptographic encryption method under quantum computer attacks is solved, and the elliptic curve signature method is realized resistance to quantum computer attacks.

CN118611880BActive Publication Date: 2024-11-29ZEROJI DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410663495.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-11-29
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

When facing quantum computer attacks, the private key d is easily calculated, and the public key P is difficult to reverse the private key d, but quantum computers can crack the discrete logarithmic problem of elliptic curves in polynomial time, resulting in security. insufficient.

Method used

By calculating the transformed private key dA and user ID, using hash function and elliptic curve point multiplication operation, the process of inversely pushing the private key d from the public key P is changed from computing difficulty to uncalculability, using more than 256 bits The hashing algorithm resists quantum computer attacks.

Benefits of technology

It realizes the ability to resist quantum computer attacks while keeping the signature time fast and the secret key short, ensuring that the private key d and user ID cannot be reversely calculated, preventing forgery of signatures, and improving security.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention provides an elliptic curve signature method resistant to quantum computer attacks. In this method, the original private key d is a 32-byte random number, and the private key d is hashed to obtain a new private key d. A , so that it satisfies d A ∈[1,n‑1], the corresponding public key P is a 32-byte x,y coordinate, and the user ID required in the signing and verification process is also obtained through the hash transformation of the original private key d. This method realizes the process of deducing the private key from the known public key from computational difficulty to incomputability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of encryption methods, and in particular to an elliptic curve signature method resistant to quantum computer attacks. Background Art

[0002] Elliptic Curve Cryptography (ECC) is an asymmetric encryption algorithm based on the mathematical theory of elliptic curves.

[0003] The SM2 algorithm is a type of elliptic curve algorithm. Currently, the SM2 public key encryption method is as follows:

[0004] The SM2 algorithm uses the prime field 256-bit elliptic equation y 2 = x 3 + ax + b.

[0005] G(x,y) is the base point on the elliptic curve, K*G is the point multiplication calculation on the elliptic curve, and the result is still a point on the elliptic curve.

[0006] n is a prime number, which is the order of point G on the elliptic curve, n*G = ∞.

[0007] The original private key d is a 32-byte random number. The corresponding public key P = d * G, which is a 32-byte x,y coordinate. The public key P can be easily calculated from the private key d, but it is difficult to calculate the private key d given the public key P. This effectively protects the private key d.

[0008] In practice, the security of elliptic curve cryptography stems from the intractability of the discrete logarithm problem. Given two points P and Q belonging to a subgroup of the elliptic curve with a base point G and order n, finding an integer x such that Q = xP is a challenging task. However, for a quantum computer, this computational difficulty is negligible. A quantum algorithm, Shor's algorithm, exists that can compute the discrete logarithm problem in polynomial time. Its time complexity is O((logn)³) and space complexity is O(logn). Although quantum computers are far from mature, their commercialization is imminent. Therefore, research on algorithms resistant to quantum computer attacks is urgent and necessary. Summary of the Invention

[0009] The present invention addresses the shortcomings of the current SM2 public key cryptographic encryption method, in which the public key P can be easily calculated using the private key d, but the private key d is difficult to calculate given the public key P, and is vulnerable to attacks using quantum computers. An elliptic curve signature method resistant to quantum computer attacks is provided. In this signature method, the improved idea is to transform the process of inferring the private key d from the public key P from computational difficulty to incomputability.

[0010] The technical solution for achieving the technical purpose of the present invention is: an elliptic curve signature method resistant to quantum computer attacks, comprising the following steps:

[0011] (1) The original text is M, the original private key is d, the public key is P(x,y), the base point is G(x,y), the order is n, and a and b are the coefficients of the elliptic curve equation;

[0012] (2) The transformed private key is calculated as d A = min(H256(H512(d), rand(n-1)));

[0013] (3) Calculate id = MD5(H512(d)), which is a 16-byte user ID;

[0014] (4) Calculate Za = H256(0x0080||id||a||b||Gx||Gy||Px||Py);

[0015] (5) Calculate e = H256(Za||M);

[0016] (6) Generate a random number k and calculate k*G = T(x,y) on the curve;

[0017] (7) Calculate r = (e + Tx) mod n. If r = 0 or r + k = n, return to (6) and recalculate.

[0018] (8) Calculate s = ((1 + d A )-1*(k - r * d A )) mod n If s = 0, return to (6) and recalculate, otherwise use (r, s, id) as the signature result;

[0019] Among them, H256 is a 256-bit hash function, H512 is a 512-bit hash function, MD5 is a message digest hash function, min is a minimum function, rand is a random number function, and K*G is a point multiplication calculation on the elliptic curve.

[0020] Furthermore, in the aforementioned elliptic curve signature method that is resistant to quantum computer attacks, when the signature result is (r, s, id), the signature verification algorithm includes the following steps:

[0021] (21) Calculate t = (r + s) mod n. If t = 0, verification fails.

[0022] (22) Calculate the coordinates T(x1,y1) of the point s*G+t*P;

[0023] (23) Calculate R = (e + Tx1) mod n. If R = r, the verification passes. Otherwise, the verification fails.

[0024] (24) The process of proving that R = r:

[0025] If the verification M is consistent with the original text and the public key is correct, according to the generation rule of e, the e used for verification is consistent with the e generated during signing;

[0026] ∵ P = d A * G, t = (r + s) mod n

[0027] ∴ T(x1,y1) = s*G + t*P

[0028] = s*G + d A t*G

[0029] = (s + d A t)*G

[0030] = (s + sd A + rd A )*G

[0031] = (s(1+d A ) + rd A )*G

[0032] According to the signature calculation process, s = ((1 + dA)-1*(k - rdA)) mod n, substituting into the above formula:

[0033] T(x1,y1) = (k - rdA + rdA)*G = k*G = T(x,y)

[0034] ∴ R = (e + Tx1) mod n = (e + Tx) mod n = r.

[0035] The process of deducing the private key from a known public key is computationally difficult, but for quantum computers, this computational difficulty does not exist, and hash algorithms with more than 256 bits can resist attacks from quantum computers. Therefore, even if a quantum computer uses Shor's algorithm to reversely calculate the transformed private key d A It is also impossible to deduce the original private key d and user identification id, making it impossible to forge a signature. The process of deducing the private key based on a known public key is transformed from computationally difficult to incomputable.

[0036] The elliptic curve signature method of the present invention can be used to infer the transformed private key d. A, and further forge the signature (r,s). However, since the original private key d cannot be calculated, the transformed signature result (r,s,id) cannot be forged. This method maintains the advantages of the elliptic curve signature algorithm (ECSA) in terms of fast signing time and short secret key and signature results, while also being resistant to attacks by quantum computers.

[0037] The present invention will be described in more detail below with reference to the embodiments. DETAILED DESCRIPTION

[0038] Example 1: The basic principles of this example are as follows:

[0039] Select the prime field 256-bit elliptic equation y2 = x3 + ax + b;

[0040] G(x,y) is the base point on the elliptic curve, K*G is the point multiplication calculation on the elliptic curve, and the result is still a point on the elliptic curve;

[0041] n is a prime number, which is the order of point G on the elliptic curve, n*G = ∞;

[0042] The original private key d is a 32-byte random number. The private key d is hashed to obtain the new private key d. A , so that it satisfies d A ∈[1,n-1], the corresponding public key P is the 32-byte x,y coordinates. The user ID required in the signing and verification process is also obtained through the hash transformation of the original private key d.

[0043] d A = min(H256(H512(d), rand(n-1))) satisfies d A ∈[1,n-1]

[0044] P = d A * G

[0045] id = MD5(H512(d))

[0046] H256 is a 256-bit hash function, H512 is a 512-bit hash function, MD5 is a message digest hash function, min is a minimum value function, and rand is a random number function.

[0047] The process of deducing the private key from a known public key is computationally difficult, but for quantum computers, this difficulty does not exist, and hash algorithms with more than 256 bits are resistant to quantum computer attacks. Therefore, even if a quantum computer uses Shor's algorithm to reverse-engineer the transformed private key dA, it cannot derive the original private key d and the user identifier id, making it impossible to forge a signature. This transforms the process of deducing the private key from a known public key from computationally difficult to uncomputable.

[0048] The signing process is as follows:

[0049] (1) The original text is M, the original private key is d, the public key is P(x,y), the base point is G(x,y), the order is n, and a and b are the coefficients of the elliptic curve equation;

[0050] (2) The transformed private key is calculated as d A = min(H256(H512(d), rand(n-1)));

[0051] (3) Calculate id = MD5(H512(d)), which is a 16-byte user ID;

[0052] (4) Calculate Za = H256(0x0080||id||a||b||Gx||Gy||Px||Py);

[0053] (5) Calculate e = H256(Za||M);

[0054] (6) Generate a random number k and calculate k*G = T(x,y) on the curve;

[0055] (7) Calculate r = (e + Tx) mod n. If r = 0 or r + k = n, return to (6) and recalculate.

[0056] (8) Calculate s = ((1 + d A )-1*(k - r * d A )) mod n If s = 0, return to (6) and recalculate; otherwise, use (r, s, id) as the signature result.

[0057] The following is the signature verification algorithm of this embodiment:

[0058] (21) The original text is M, the signature result is (r, s, id), the public key is P(x, y), the base point is G(x, y), the order is n, and a and b are the coefficients of the elliptic curve equation;

[0059] (22) Calculate Za = H256(0x0080||id||a||b||Gx||Gy||Px||Py);

[0060] (23) Calculate e = H256(Za||M);

[0061] (24) Calculate t = (r + s) mod n. If t = 0, verification fails.

[0062] (25) Calculate the coordinates T(x1,y1) of the point s*G+t*P;

[0063] (26) Calculate R = (e + Tx1) mod n. If R = r, the verification passes; otherwise, the verification fails.

[0064] (27) The process of proving that R = r:

[0065] If the verification M is consistent with the original text and the public key is correct, according to the generation rule of e, the e used for verification is consistent with the e generated during signing.

[0066] ∵ P = d A * G, t = (r + s) mod n

[0067] ∴ T(x1,y1) = s*G + t*P

[0068] = s*G + d A t*G

[0069] = (s + d A t)*G

[0070] = (s + sd A + rdA)*G

[0071] = (s(1+d A ) + rd A )*G

[0072] According to the signature calculation process, s = ((1 + d A )-1*(k - rd A )) mod n, substitute into the above formula:

[0073] T(x1,y1) = (k - rd A + rd A )*G = k*G = T(x,y)

[0074] ∴ R = (e + Tx1) mod n = (e + Tx) mod n = r

[0075] With the above elliptic curve signature method, an attacker may be able to infer the transformed private key d A , and further forge the signature (r, s). However, since the original private key d cannot be calculated, the transformed signature result (r, s, id) cannot be forged. The method of this embodiment maintains the advantages of the elliptic curve signature algorithm (ECSA) in terms of fast signing time and short secret key and signature results, while also being able to resist attacks from quantum computers.

Claims

1. An elliptic curve signature method resistant to quantum computer attacks, characterized in that: The following steps are involved: (1) The original text is M, the original private key is d, the public key is P(x,y), the base point is G(x,y), the order is n, and a and b are the coefficients of the elliptic curve equation; (2) Calculate the transformed private key as d A = min(H256(H512(d), rand(n-1))); (3) Calculate id = MD5(H512(d)), which is a 16-byte user ID; (4) Calculate Za = H256(0x0080||id||a||b||Gx||Gy||Px||Py); (5) Calculate e = H256(Za||M); (6) Generate a random number k and calculate k*G = T(x,y) on the curve; (7) Calculate r = (e + Tx) mod n. If r = 0 or r + k = n, return to (6) and recalculate. (8) Calculate s = ((1 + d A )-1*(k - r * d A )) mod n If s = 0, return to (6) and recalculate, otherwise use (r, s, id) as the signature result; Among them, H256 is a 256-bit hash function, H512 is a 512-bit hash function, MD5 is a message summary hash function, min is a minimum value function, rand is a random number function, and k*G is a point multiplication calculation on the elliptic curve.

2. The elliptic curve signature method against quantum computer attacks according to claim 1, characterized in that: When the signature result is (r, s, id), the signature verification algorithm includes the following steps: (21) Calculate t = (r + s) mod n. If t = 0, the verification fails. (22) Calculate the coordinates T(x1,y1) of the point s*G+t*P; (23) Calculate R = (e + Tx1) mod n. If R = r, the verification passes. Otherwise, the verification fails. (24) The process of proving that R = r: If the verification M is consistent with the original text and the public key is correct, according to the generation rule of e, the e used for verification is consistent with the e generated during signing; ∵ P = d A * G, t = (r + s) mod n ∴ T(x1,y1) = s*G + t*P = s*G + d A t*G = (s + d A t)*G = (s + sd A + rd A )*G = (s(1+d A ) + rd A )*G According to the signature calculation process, s = ((1 + dA)-1*(k - rdA)) mod n, substitute into the above formula: T(x1,y1) = (k - rdA + rdA)*G = k*G = T(x,y) ∴ R = (e + Tx1) mod n = (e + Tx) mod n = r.

Citation Information

Patent Citations

  • SM2 signature algorithm protection method for resisting error attack based on lattice

    CN104852805A

  • SM2 digital signature method and system for resisting side channel attack

    CN114969836A