A digital signature method, system, device, and computer-readable storage medium
By introducing two random numbers and a private key into elliptic curve digital signatures and employing modular addition and subtraction operations, the problems of low computational efficiency and low security in existing schemes are solved, achieving an efficient and secure signature process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2026-04-03
AI Technical Summary
Existing elliptic curve digital signature schemes are computationally inefficient and lack security, especially in the case of inversion operations, which consume a large amount of computational space.
A novel digital signature method is adopted, which generates two random numbers and two private keys, and uses modular addition and subtraction operations to generate the signature value, avoiding modular multiplication and modular inverse operations. Only modular addition and subtraction operations are used in the signature process, and two private keys are introduced to improve security.
It improves the computational efficiency of elliptic curve digital signatures and enhances security. Even if a private key is leaked, it is difficult for an attacker to crack the signature value, thus reducing the risk of private key leakage.
Smart Images

Figure CN116346328B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and more specifically, to a digital signature method, system, device, and computer-readable storage medium. Background Technology
[0002] With the rapid development and widespread application of computer networks and communication technologies, society is becoming increasingly information-driven, and electronics have become a major tool in daily life. This high degree of information integration makes the network environment vulnerable to attacks, leading to information tampering, leakage, and even forgery. These situations can cause significant losses, thus necessitating the protection of secure information transmission.
[0003] A digital signature (public-key digital signature or electronic seal) is an electronic signature used on the internet, similar in function to a paper signature in real life, helping users verify the authenticity of information in the online environment. Digital signatures combine asymmetric key encryption technology with digital digest technology; essentially, it's a special cryptographic transformation that uses public-key encryption. The sender transmits a secure, counterfeit-resistant digital string that is kept secret. This allows the recipient to verify the reliability and integrity of the data source while preventing forgery. In summary, digital signature technology enables secure and rapid signing over the network, ensuring the authentication, integrity, and non-repudiation of information. It has significant theoretical value and broad practical implications in information and network security, and has promising applications across various sectors of society.
[0004] Elliptic Curve Digital Signature Algorithm (ECDSA) is a simulation of digital signature algorithms. Elliptic Curve Cryptography (ECC), invented in 1985, is currently the most secure public-key encryption algorithm; it is a public-key system based on elliptic curves. The main advantages of elliptic curve cryptography are smaller computational parameters, shorter keys, lower bandwidth requirements, faster processing speed, and high security. Therefore, elliptic curve cryptography has excellent performance and wide applications, especially suitable for situations with limited storage space, processing power, bandwidth, and power consumption, as well as in the field of information security. It can protect information security and integrity while also providing non-repudiation. However, traditional elliptic curve digital signature schemes involve inversion operations, which consume a large amount of computational space, reducing the computational efficiency of elliptic curve digital signature schemes and resulting in lower security.
[0005] In conclusion, how to improve the security of elliptic curve digital signatures while increasing their computational efficiency is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] The purpose of this application is to provide a digital signature method that can, to a certain extent, solve the technical problem of how to improve the security of elliptic curve digital signatures while increasing their computational efficiency. This application also provides a digital signature system, device, and computer-readable storage medium.
[0007] To achieve the above objectives, this application provides the following technical solution:
[0008] A digital signature method, applied to the signer, includes:
[0009] Retrieve the target message to be signed;
[0010] Obtain publicly available target elliptic curve parameters, including the base point of the elliptic curve and the order value of the base point;
[0011] Obtain the first and second private keys of the signer;
[0012] Generate a first random number corresponding to the target message, and perform calculations on the base point based on the first random number to obtain a first signature value;
[0013] Generate a second random number corresponding to the target message;
[0014] The second signature value is obtained by performing a modulo operation on the order value based on the first random number, the second random number, and the first private key;
[0015] The third signature value is obtained by performing a modulo operation on the order value based on the second random number and the second private key.
[0016] The first signature value, the second signature value, and the third signature value are used as the target signature value of the target message.
[0017] Preferably, the step of performing calculations on the base point based on the first random number to obtain the first signature value includes:
[0018] Calculate the product of the first random number and the base point;
[0019] The target coordinate value in the product value is used as the first value, and the target coordinate value includes the horizontal coordinate value or the vertical coordinate value in the product value;
[0020] The second value is obtained by performing a modulo operation on the first value based on the order value.
[0021] If the value of the second value is not zero, then the second value is used as the first signature value; if the value of the second value is zero, then the step of generating the first random number corresponding to the target message is returned.
[0022] Preferably, the step of performing a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain the second signature value includes:
[0023] Using the first calculation formula, a third value is obtained by performing a modulo operation on the order value based on the first random number, the second random number, and the first private key;
[0024] If the third value is not zero, then the third value is used as the second signature value;
[0025] If the third value is zero, then return to the step of generating the second random number corresponding to the target message;
[0026] The first calculation formula includes:
[0027] s1 = (k - d1 - t) mod n;
[0028] Wherein, s1 represents the third numerical value; t represents the second random number; k represents the first random number; d1 represents the first private key; mod represents the modulo operation; and n represents the order value.
[0029] Preferably, the step of performing a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value includes:
[0030] By using the second calculation formula, a fourth value is obtained by performing a modulo operation on the order value based on the second random number and the second private key;
[0031] If the fourth value is not zero, then the fourth value is used as the third signature value;
[0032] If the fourth value is zero, then return to the step of generating the second random number corresponding to the target message;
[0033] The second calculation formula includes:
[0034] s2 = (t - d2) mod n;
[0035] Where s2 represents the fourth value; d2 represents the second private key.
[0036] Preferably, both the first random number and the second random number are integers between [1, n-1], where n represents the order value.
[0037] A digital signature method, applied to the verifier, includes:
[0038] Obtain the target signature value of the target message, wherein the target signature value includes a first signature value, a second signature value, and a third signature value;
[0039] Obtain publicly available target elliptic curve parameters, including the base point of the elliptic curve and the order value of the base point;
[0040] Obtain the first public key and the second public key of the signer, wherein the first public key is generated based on the first private key of the signer and the base point, and the second public key is generated based on the second private key of the signer and the base point;
[0041] A fifth value is generated based on the second signature value, the base point, the third signature value, the first public key, and the second public key;
[0042] The target coordinate value in the fifth value is used as the sixth value, and the target coordinate value includes the horizontal coordinate value or the vertical coordinate value in the fifth value;
[0043] Based on the order value, perform a modulo operation on the sixth numerical value to obtain the verification value;
[0044] If the verification value is equal to the first signature value, the signature verification is successful; if the verification value is not equal to the first signature value, the signature verification fails.
[0045] Specifically, the signer generates a first random number corresponding to the target message, and performs calculations on the base point based on the first random number to obtain the first signature value; generates a second random number corresponding to the target message; performs a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain the second signature value; and performs a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value.
[0046] Preferably, the step of generating a fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key includes:
[0047] The fifth value is generated based on the second signature value, the base point, the third signature value, the first public key, and the second public key using the third calculation formula.
[0048] The third calculation formula includes:
[0049] (s1+s2)G+Q1+Q2=(x2,y2);
[0050] Wherein, (x2, y2) represents the fifth numerical value; s1 represents the second signature value, s1 = (k - d1 - t) mod n; s2 represents the third signature value, s2 = (t - d2) mod n; t represents the second random number; k represents the first random number; d1 represents the first private key; mod represents the modulo operation; n represents the order value; G represents the base point; Q1 represents the first public key; Q2 represents the second public key;
[0051] The signer calculates the product of the first random number and the base point; takes the target coordinate value in the product as the first value; performs a modulo operation on the first value based on the order value to obtain a second value; if the value of the second value is not zero, then the second value is taken as the first signature value.
[0052] A digital signature system, applied to the signatory, includes:
[0053] The first acquisition module is used to acquire the target message to be signed;
[0054] The second acquisition module is used to acquire publicly available target elliptic curve parameters, which include the base point of the elliptic curve and the order value of the base point.
[0055] The third acquisition module is used to acquire the first private key and the second private key of the signer;
[0056] The first generation module is used to generate a first random number corresponding to the target message, and to perform calculations on the base point based on the first random number to obtain a first signature value.
[0057] The second generation module is used to generate a second random number corresponding to the target message;
[0058] The first calculation module is used to perform a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain the second signature value;
[0059] The second calculation module is used to perform a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value;
[0060] The first processing module is used to use the first signature value, the second signature value and the third signature value as the target signature value of the target message.
[0061] A digital signature device, comprising:
[0062] Memory, used to store computer programs;
[0063] A processor for implementing the steps of the digital signature method as described in any of the preceding claims when executing the computer program.
[0064] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described digital signature methods.
[0065] This application provides a digital signature method applied to the signer. The method involves obtaining a target message to be signed; obtaining publicly available target elliptic curve parameters, including the base point and the order of the base point; obtaining the signer's first and second private keys; generating a first random number corresponding to the target message; performing operations on the base point based on the first random number to obtain a first signature value; generating a second random number corresponding to the target message; performing a modulo operation on the order based on the first random number, the second random number, and the first private key to obtain a second signature value; performing a modulo operation on the order based on the second random number and the second private key to obtain a third signature value; and using the first, second, and third signature values as the target signature value of the target message. This application achieves digital signature using elliptic curves. The entire signing process does not involve modular inverse operations or hash operations. Furthermore, the generation of the second and third signature values only uses modular addition and subtraction, without modular multiplication, resulting in high computational efficiency. This application improves the efficiency of elliptic curve digital signatures. Even if one of the signer's private keys is leaked, the attacker cannot crack the target signature value if they cannot obtain the first and second random numbers, thus providing good security. The digital signature system, device, and computer-readable storage medium provided in this application also solve the corresponding technical problems. Attached Figure Description
[0066] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0067] Figure 1 A first flowchart of a digital signature method provided in an embodiment of this application;
[0068] Figure 2 A second flowchart of a digital signature method provided in an embodiment of this application;
[0069] Figure 3 This is a schematic diagram of the structure of a digital signature system provided in an embodiment of this application;
[0070] Figure 4This is a schematic diagram of the structure of a digital signature device provided in an embodiment of this application;
[0071] Figure 5 This is another structural schematic diagram of a digital signature device provided in an embodiment of this application. Detailed Implementation
[0072] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0073] Please see Figure 1 , Figure 1 This is a first flowchart of a digital signature method provided in an embodiment of this application.
[0074] This application provides a digital signature method, applied to a signer, which may include the following steps:
[0075] Step S101: Obtain the target message to be signed.
[0076] In practical applications, the signer can first obtain the target message to be signed. The type of the target message can be determined according to the specific application scenario. For example, the target message can be SMS, encrypted text in software, email, numerical value, etc. This application does not make any specific restrictions here.
[0077] Step S102: Obtain the publicly available target elliptic curve parameters, which include the base point of the elliptic curve and the order of the base point.
[0078] In practical applications, after obtaining the target message to be signed, the signer can obtain the publicly available target elliptic curve parameters. These parameters include the base point and the order of the base point, allowing the signer to subsequently sign the target message based on these base points and order values. It should be noted that the specific values of the base point and order can be determined according to actual needs, and this application does not impose specific limitations on them.
[0079] Furthermore, it should be noted that E is a finite field F. q If an elliptic curve is defined on the finite field F, then the parameters of the elliptic curve in the specific application scenario are T = (q, a, b, G, n, h), where, for the finite field F q q = p or q = 2 m p represents a prime number, m represents a positive integer; a and b are parameters of the elliptic curve equation, and a and b ∈ F. q G represents E(F) qA base point on G; n is the order of the base point G, specifically, n > 2. 160 and h represents the cofactor, h = #E(F) q )mod n,#E(F q ) represents the elliptic curve E(F) q The number of points on the ).
[0080] Step S103: Obtain the first private key and the second private key of the signer.
[0081] In practical applications, after obtaining the publicly available target elliptic curve parameters, the signer can obtain the signer's first and second private keys. For example, two random integers d1 and d2 can be generated as the first and second private keys respectively, so that the target message can be signed based on the first and second private keys.
[0082] Step S104: Generate a first random number corresponding to the target message, and perform calculations on the base point based on the first random number to obtain the first signature value.
[0083] In practical applications, after obtaining the first and second private keys of the signer, the signer can generate a first random number corresponding to the target message, and perform calculations on the base point based on the first random number to obtain the first signature value.
[0084] In a specific application scenario, during the process of obtaining the first signature value by calculating the base point based on the first random number, the signer can calculate the product of the first random number and the base point, that is, calculate kG = (x1, y1), where (x1, y1) represents the product value, k represents the first random number, and G represents the base point; the target coordinate value in the product value is used as the first value β, the target coordinate value includes the horizontal or vertical coordinate value in the product value, for example, the horizontal coordinate value x1 in the product value is used as the first value, etc.; the first value is then moduloed based on the order value to obtain the second value, that is, calculate r = β mod n, where r represents the second value and n represents the order value; if the value of the second value is not zero, the second value is used as the first signature value, and the subsequent steps continue; if the value of the second value is zero, the process returns to generate the first random number corresponding to the target message and the subsequent steps.
[0085] Step S105: Generate a second random number corresponding to the target message.
[0086] Step S106: Perform a modulo operation on the first random number, the second random number, and the first private key to obtain the second signature value.
[0087] In practical applications, after generating a first random number corresponding to the target message, and performing calculations on the base point based on the first random number to obtain the first signature value, the signer can generate a second random number corresponding to the target message. Based on the first random number, the second random number, and the first private key, a modulo operation of addition and subtraction is performed on the order value to obtain the second signature value.
[0088] In specific application scenarios, during the process of obtaining the second signature value by performing a modulo operation on the order value based on the first random number, the second random number, and the first private key, the signer can also use the first calculation formula to perform a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain a third value. If the third value is not zero, then the third value is used as the second signature value; if the third value is zero, then the process returns to the step of generating the second random number corresponding to the target message.
[0089] The first operational formula includes:
[0090] s1 = (k - d1 - t) mod n;
[0091] Where s1 represents the third value; t represents the second random number; k represents the first random number; d1 represents the first private key; mod represents the modulo operation; and n represents the order value.
[0092] Step S107: Perform a modulo operation on the second random number and the second private key to obtain the third signature value.
[0093] In practical applications, after obtaining the second signature value by performing a modulo operation on the order value based on the first random number, the second random number, and the first private key, the signer can then perform a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value.
[0094] In a specific application scenario, when the signer is performing a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value, the signer can also use the second calculation formula to perform a modulo operation on the order value based on the second random number and the second private key to obtain the fourth value. If the fourth value is not zero, then the fourth value is used as the third signature value. If the fourth value is zero, then the process of generating the second random number corresponding to the target message is returned.
[0095] The second calculation formula includes:
[0096] s2 = (t - d2) mod n;
[0097] Where s2 represents the fourth value; d2 represents the second private key.
[0098] It should be noted that, since the attacker cannot crack the first random number generated by the signer, the attacker cannot generate an accurate first signature value; and since the attacker has difficulty cracking the second random number, the attacker has difficulty cracking the second and third signature values to obtain the signer's first and second private keys. Solving the private key using the signer's public key is equivalent to solving the elliptic curve discrete logarithm problem, which is obviously impossible. Therefore, it is difficult for the attacker to crack the signer's private key in the digital signature process of this application. Furthermore, in most existing digital signature methods, the private key is secretly kept by the signer and is generally not obtained by attackers. Therefore, the private key used in existing digital signature methods is secure. If the private key in an existing digital signature method is leaked, an attacker may be able to forge the signing process. In other words, the security of existing digital signature methods also depends on the security of the private key. However, in this application, two private keys are introduced. Even if an attacker obtains one of the private keys leaked by the signer, the attacker cannot accurately generate the first and second random numbers used by the signer in the signing process, nor can they obtain the other private key. Therefore, the attacker cannot forge the signer's signature using the signer's private key. In other words, the digital signature method of this application is more secure.
[0099] Step S108: Use the first signature value, the second signature value, and the third signature value as the target signature value of the target message.
[0100] In practical applications, after generating the first, second, and third signature values, the signer can use these three values as the target signature value for the target message.
[0101] In specific application scenarios, the first random number, the second random number, the first private key, and the second private key generated by the signer in this application are all integers between [1, n-1], etc., and this application does not make specific restrictions here.
[0102] It should also be noted that the digital signature method provided in this application can be applied to fields such as power, Internet of Things, aerospace, smart transportation, smart water management, e-commerce, electronic voting, software and hardware optimization, network security authentication and blockchain technology, and this application does not make specific limitations.
[0103] This application provides a digital signature method applied to the signer. The method involves obtaining a target message to be signed; obtaining publicly available target elliptic curve parameters, including the base point and the order of the base point; obtaining the signer's first and second private keys; generating a first random number corresponding to the target message; performing operations on the base point based on the first random number to obtain a first signature value; generating a second random number corresponding to the target message; performing a modulo operation on the order based on the first random number, the second random number, and the first private key to obtain a second signature value; performing a modulo operation on the order based on the second random number and the second private key to obtain a third signature value; and using the first, second, and third signature values as the target signature value of the target message. This application implements digital signature using elliptic curves. The entire signing process does not involve modular inverse operations or hash operations. Furthermore, the generation of the second and third signature values only uses modular addition and subtraction, without modular multiplication, resulting in high computational efficiency. This application improves the efficiency of elliptic curve digital signatures. Even if one of the signer's private keys is leaked, the attacker cannot crack the target signature value if they cannot obtain the first and second random numbers. Therefore, this application offers good security.
[0104] Please see Figure 2 , Figure 2 This is a second flowchart of a digital signature method provided in an embodiment of this application.
[0105] This application provides a digital signature method, characterized in that, when applied to a verifier, it may include the following steps:
[0106] Step S201: Obtain the target signature value of the target message. The target signature value includes a first signature value, a second signature value, and a third signature value.
[0107] In practical applications, the verifier can first obtain the target signature value of the target message generated by the signer. The process of generating the target signature value is as described in the previous embodiment.
[0108] It should be noted that the verifier and signer can be determined based on the specific application scenario. For example, in a communication process, the signer can be the client sending the message, and the verifier can be the server receiving the message. Of course, the verifier can also be a trusted third-party organization. In this case, after successfully verifying the signature, the verifier transmits the message sent by the client to the server. In addition, the elliptic curve required for the digital signature process by the signer and verifier can be controlled by a trusted third-party organization. In this process, the trusted third-party organization can first generate and publish the elliptic curve required for the digital signature process by the signer and verifier, and then the signer and verifier can obtain the published elliptic curve to perform the digital signature. Alternatively, the elliptic curve required for the digital signature process by the signer and verifier can be controlled by the signer or verifier themselves. In this process, the signer or verifier can first generate and publish the elliptic curve, and then the verifier or signer can obtain the published elliptic curve to perform the digital signature, etc. This application does not impose specific limitations on this.
[0109] Step S202: Obtain the publicly available target elliptic curve parameters, which include the base point of the elliptic curve and the order of the base point.
[0110] In practical applications, after obtaining the target signature value of the target message, the verifier can obtain the publicly available target elliptic curve parameters, which include the base point of the elliptic curve and the order of the base point, so as to verify the target signature value based on the base point and the order value.
[0111] Step S203: Obtain the first public key and the second public key of the signer. The first public key is generated based on the first private key and the base point of the signer, and the second public key is generated based on the second private key and the base point of the signer.
[0112] In practical applications, after obtaining the publicly available target elliptic curve parameters, the verifier can obtain the signer's first and second public keys, and then verify the target signature value based on these first and second public keys.
[0113] It should be noted that the first public key can be obtained by the signer multiplying the first private key and the base point, and the second public key can be obtained by the signer multiplying the second private key and the base point. This application does not make specific limitations here.
[0114] Step S204: Generate a fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key.
[0115] Step S205: Use the target coordinate value in the fifth value as the sixth value. The target coordinate value includes the horizontal or vertical coordinate value in the fifth value.
[0116] In practical applications, after obtaining the first and second public keys of the signer, the verifier can generate a sixth value for signature verification based on the second signature value, the base point, the third signature value, the first public key, and the second public key. Specifically, a fifth value can be generated based on the second signature value, the base point, the third signature value, the first public key, and the second public key, and the target coordinate value in the fifth value can be used as the sixth value. The target coordinate value includes the horizontal or vertical coordinate value in the fifth value.
[0117] In specific application scenarios, when the verifier generates the fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key, the verifier can use the third calculation formula to generate the fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key.
[0118] The third operational formula includes:
[0119] (s1+s2)G+Q1+Q2=(x2,y2);
[0120] Where (x2, y2) represents the fifth value of type coordinate point, also known as coordinate point value; s1 represents the second signature value, s1 = (k - d1 - t) mod n; s2 represents the third signature value, s2 = (t - d2) mod n; t represents the second random number; k represents the first random number; d1 represents the first private key; mod represents the modulo operation; n represents the order value; G represents the base point; Q1 represents the first public key; Q2 represents the second public key; and the signer calculates the product of the first random number and the base point; takes the target coordinate value in the product value as the first value; performs a modulo operation on the first value based on the order value to obtain the second value; if the value of the second value is not zero, then the second value is taken as the first signature value.
[0121] It should be noted that the type of the target coordinate value used by the signer in generating the first signature value must be the same as the type of the target coordinate value used by the verifier in generating the sixth value, that is, both are horizontal coordinate values or both are vertical coordinate values.
[0122] Step S206: Perform a modulo operation on the sixth value based on the order value to obtain the verification value.
[0123] Step S207: If the verification value is equal to the first signature value, the signature verification is successful; if the verification value is not equal to the first signature value, the signature verification fails.
[0124] In practical applications, after the verifier takes the target coordinate value in the fifth value as the sixth value, it can perform a modulo operation on the sixth value based on the order value to obtain the verification value. Then, it compares whether the verification value is equal to the first signature value. If the verification value is equal to the first signature value, the signature verification is successful, and the signature can be received thereafter. If the verification value is not equal to the first signature value, the signature verification fails, and the signature can be rejected thereafter.
[0125] It should be noted that when the target signature value is a correct signature value, because:
[0126] (s1+s2)G+Q1+Q2=(k-d1-t+t-d2)G+(d1+d2)G=kG=(x1,y1);
[0127] Assuming the target coordinates are the x-coordinates, then the first signature value is r = x1 mod n, kG = (x1, y1), the sixth value is x2 = x1, and the corresponding verification value is:
[0128] v = x2 mod n = x1 mod n;
[0129] Therefore, if the verification value is equal to the first signature value, the signature verification is successful; if the verification value is not equal to the first signature value, the signature verification fails.
[0130] It should be noted that when the first random number, second random number, first private key, and second private key generated by the signer are all integers between [1, n-1], and the first signature value, second signature value, and third signature value are all integers between [1, n-1], the verifier, after obtaining the target elliptic curve parameters, can first verify whether the first signature value, second signature value, and third signature value are all integers between [1, n-1]. If so, the verifier can proceed with obtaining the first public key and second public key of the signer and subsequent steps. If not, the verifier can directly determine that the signature verification has failed.
[0131] As can be seen from the digital signature scheme of this application, this application abandons the inverse operation and hash function commonly used in elliptic curve digital signature algorithms, thereby reducing the computational burden of conventional elliptic curve digital signature algorithms to a certain extent. Furthermore, in the signing process, for existing signature equations, this application abandons the commonly used modular multiplication operation, using only the simplest modular addition and subtraction, further improving computational efficiency. At the same time, this application enhances the security of the digital signature method, specifically as follows:
[0132] 1. This application possesses the property of resisting private key attacks. This is because an attacker cannot solve for the private keys d1 and d2 using s1 = (k - d1 - t) mod n and s2 = (t - d2) mod n. For either s1 or s2 individually, s1 contains three unknowns (k, d1, and t), while s2 contains two unknowns (d2 and t). Therefore, solving for the private key is difficult. Solving for the private key using the public key is equivalent to solving the elliptic curve discrete logarithm problem, which is clearly impossible.
[0133] 2. This application possesses the property of unforgeable signatures. This means that attackers cannot create valid signatures, and the verifier will fail, because if an attacker forges the signature (r', s1', s'2), they need to generate correct r', s1', and s'2; generating correct r' requires obtaining a random number k; generating correct s1' and s'2 requires knowing t, k, d1, and d2; obviously, the attacker cannot obtain the above parameters, so the attacker cannot forge the target signature value of the target message.
[0134] 3. Compared with existing elliptic curve digital signature algorithms, this application introduces two private keys to generate a signature with s1 and s2, significantly reducing the risk of private key attacks and signature forgery, and increasing the security of the scheme. Furthermore, the introduction of two private keys also reduces the risk of private key leakage to some extent. This is because in schemes using only one private key, the security of the scheme is severely compromised once the private key is leaked. However, in this application, even if the signer inadvertently leaks one of the private keys, as indicated by the signature equations s1 and s2, the other private key will still protect the security of the scheme.
[0135] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a digital signature system provided in an embodiment of this application.
[0136] This application provides a digital signature system, applied to a signatory, which may include:
[0137] The first acquisition module 101 is used to acquire the target message to be signed;
[0138] The second acquisition module 102 is used to acquire the publicly disclosed target elliptic curve parameters, which include the base point of the elliptic curve and the order value of the base point.
[0139] The third acquisition module 103 is used to acquire the first private key and the second private key of the signer;
[0140] The first generation module 104 is used to generate a first random number corresponding to the target message, and to perform calculations on the base point based on the first random number to obtain a first signature value.
[0141] The second generation module 105 is used to generate a second random number corresponding to the target message;
[0142] The first arithmetic module 106 is used to perform a modulo operation on the first random number, the second random number, and the first private key to obtain the second signature value;
[0143] The second operation module 107 is used to perform a modulo operation on the second random number and the second private key to obtain the third signature value;
[0144] The first processing module 108 is used to use the first signature value, the second signature value and the third signature value as the target signature value of the target message.
[0145] This application provides a digital signature system applied to a signatory, wherein the first generation module may include:
[0146] The first calculation unit is used to calculate the product of the first random number and the base point;
[0147] The first processing unit is used to take the target coordinate value in the product value as the first value, and the target coordinate value includes the horizontal coordinate value or the vertical coordinate value in the product value.
[0148] The second calculation unit is used to perform a modulo operation on the first value based on the order value to obtain the second value;
[0149] The second processing unit is configured to, if the value of the second value is not zero, use the second value as the first signature value; if the value of the second value is zero, return to the step of generating the first random number corresponding to the target message.
[0150] This application provides a digital signature system applied to a signer. The first computation module may include:
[0151] The first processing unit is used to perform a modulo operation on the order value based on the first random number, the second random number, and the first private key using the first processing formula to obtain a third value; if the third value is not zero, the third value is used as the second signature value; if the third value is zero, the second generation module is prompted to perform the step of generating a second random number corresponding to the target message.
[0152] The first operational formula includes:
[0153] s1 = (k - d1 - t) mod n;
[0154] Where s1 represents the third value; t represents the second random number; k represents the first random number; d1 represents the first private key; mod represents the modulo operation; and n represents the order value.
[0155] This application provides a digital signature system applied to a signatory, wherein the second computation module may include:
[0156] The second operation unit is used to perform a modulo operation on the order value based on the second random number and the second private key using the second operation formula to obtain the fourth value; if the fourth value is not zero, the fourth value is used as the third signature value; if the fourth value is zero, the second generation module is prompted to perform the step of generating the second random number corresponding to the target message.
[0157] The second calculation formula includes:
[0158] s2 = (t - d2) mod n;
[0159] Where s2 represents the fourth value; d2 represents the second private key.
[0160] This application provides a digital signature system applied to the signer, wherein the first random number and the second random number are both integers between [1, n-1], where n represents the order value.
[0161] This application provides a digital signature system, applied to a verifier, which may include:
[0162] The fourth acquisition module is used to acquire the target signature value of the target message. The target signature value includes the first signature value, the second signature value, and the third signature value.
[0163] The fifth acquisition module is used to acquire the publicly available target elliptic curve parameters, which include the base point of the elliptic curve and the order of the base point.
[0164] The sixth acquisition module is used to acquire the first public key and the second public key of the signer. The first public key is generated based on the first private key and the base point of the signer, and the second public key is generated based on the second private key and the base point of the signer.
[0165] The third generation module is used to generate a fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key;
[0166] The second processing module is used to take the target coordinate value in the fifth value as the sixth value. The target coordinate value includes the horizontal or vertical coordinate value of the fifth value.
[0167] The third calculation module is used to perform a modulo operation on the sixth value based on the order value to obtain the verification value;
[0168] The first verification module is used to verify the signature if the verification value is equal to the first signature value, and to verify the signature if the verification value is not equal to the first signature value.
[0169] Specifically, the signer generates a first random number corresponding to the target message and performs calculations on the base point based on the first random number to obtain a first signature value; generates a second random number corresponding to the target message; performs a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain a second signature value; and performs a modulo operation on the order value based on the second random number and the second private key to obtain a third signature value.
[0170] This application provides a digital signature system applied to a verifier, wherein the third generation module includes:
[0171] The first generation unit is used to generate a fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key using a third calculation formula;
[0172] The third operational formula includes:
[0173] (s1+s2)G+Q1+Q2=(x2,y2);
[0174] Where (x2, y2) represents the fifth value; s1 represents the second signature value, s1 = (k - d1 - t) mod n; s2 represents the third signature value, s2 = (t - d2) mod n; t represents the second random number; k represents the first random number; d1 represents the first private key; mod represents the modulo operation; n represents the order value; G represents the base point; Q1 represents the first public key; Q2 represents the second public key;
[0175] The signer calculates the product of the first random number and the base point; takes the target coordinate value in the product as the first value; performs a modulo operation on the first value based on the order value to obtain the second value; if the value of the second value is not zero, then the second value is taken as the first signature value.
[0176] This application also provides a digital signature device and a computer-readable storage medium, both of which have the corresponding effects of a digital signature method provided in the embodiments of this application. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of a digital signature device provided in an embodiment of this application.
[0177] This application provides a digital signature device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the digital signature method described in any of the above embodiments.
[0178] Please see Figure 5Another digital signature device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the digital signature device and the outside. The display unit 204 may be a display panel, a laser scanner, or the like; the communication method used by the communication module 205 includes, but is not limited to, Mobile High Definition Link (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), wireless connectivity: Wi-Fi, Bluetooth, Bluetooth Low Energy, and IEEE 802.11s-based communication technology.
[0179] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the digital signature method described in any of the above embodiments.
[0180] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage media known in the art.
[0181] For descriptions of relevant parts of the digital signature system, device, and computer-readable storage medium provided in this application's embodiments, please refer to the detailed description of the corresponding parts in the digital signature method provided in this application's embodiments; they will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0182] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0183] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A digital signature method, characterized in that, Applicable to the signing party, including: Retrieve the target message to be signed; Obtain publicly available target elliptic curve parameters, including the base point of the elliptic curve and the order value of the base point; Obtain the first and second private keys of the signer; Generate a first random number corresponding to the target message, and perform calculations on the base point based on the first random number to obtain a first signature value; Generate a second random number corresponding to the target message; The second signature value is obtained by performing a modulo operation on the order value based on the first random number, the second random number, and the first private key; The third signature value is obtained by performing a modulo operation on the order value based on the second random number and the second private key. The first signature value, the second signature value, and the third signature value are used as the target signature value of the target message.
2. The method according to claim 1, characterized in that, The step of performing calculations on the base point based on the first random number to obtain the first signature value includes: Calculate the product of the first random number and the base point; The target coordinate value in the product value is used as the first value, and the target coordinate value includes the horizontal coordinate value or the vertical coordinate value in the product value; The second value is obtained by performing a modulo operation on the first value based on the order value. If the value of the second value is not zero, then the second value is used as the first signature value; if the value of the second value is zero, then the step of generating the first random number corresponding to the target message is returned.
3. The method according to claim 2, characterized in that, The step of performing a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain the second signature value includes: Using the first calculation formula, a third value is obtained by performing a modulo operation on the order value based on the first random number, the second random number, and the first private key; If the third value is not zero, then the third value is used as the second signature value; If the third value is zero, then return to the step of generating the second random number corresponding to the target message; The first calculation formula includes: ; in, This refers to the third numerical value; This represents the second random number; This represents the first random number; This represents the first private key; This represents the modulo operation; This indicates the order value.
4. The method according to claim 3, characterized in that, The step of performing a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value includes: By using the second calculation formula, a fourth value is obtained by performing a modulo operation on the order value based on the second random number and the second private key; If the fourth value is not zero, then the fourth value is used as the third signature value; If the fourth value is zero, then return to the step of generating the second random number corresponding to the target message; The second calculation formula includes: ; in, This represents the fourth numerical value; This represents the second private key.
5. The method according to any one of claims 1 to 4, characterized in that, Both the first random number and the second random number belong to Integers between, where This indicates the order value.
6. A digital signature method, characterized in that, Applied to the validator, including: Obtain the target signature value of the target message, wherein the target signature value includes a first signature value, a second signature value, and a third signature value; Obtain publicly available target elliptic curve parameters, including the base point of the elliptic curve and the order value of the base point; Obtain the first public key and the second public key of the signer, wherein the first public key is generated based on the first private key of the signer and the base point, and the second public key is generated based on the second private key of the signer and the base point; A fifth value is generated based on the second signature value, the base point, the third signature value, the first public key, and the second public key; The target coordinate value in the fifth value is used as the sixth value, and the target coordinate value includes the horizontal coordinate value or the vertical coordinate value in the fifth value; Based on the order value, perform a modulo operation on the sixth numerical value to obtain the verification value; If the verification value is equal to the first signature value, the signature verification is successful; if the verification value is not equal to the first signature value, the signature verification fails. Specifically, the signer generates a first random number corresponding to the target message, and performs calculations on the base point based on the first random number to obtain the first signature value; generates a second random number corresponding to the target message; performs a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain the second signature value; and performs a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value.
7. The method according to claim 6, characterized in that, The generation of the fifth value based on the second signature value, the base point, the third signature value, the first public key, and the second public key includes: The fifth value is generated based on the second signature value, the base point, the third signature value, the first public key, and the second public key using the third calculation formula. The third calculation formula includes: ; in, This represents the fifth numerical value; This represents the second signature value. ; This represents the third signature value. ; This represents the second random number; This represents the first random number; This represents the first private key; This represents the second private key; This represents the modulo operation; Indicates the order value; Indicates the base point; This represents the first public key; This represents the second public key; The signer calculates the product of the first random number and the base point; takes the target coordinate value in the product as the first value; performs a modulo operation on the first value based on the order value to obtain a second value; if the value of the second value is not zero, then the second value is taken as the first signature value.
8. A digital signature system, characterized in that, Applicable to the signing party, including: The first acquisition module is used to acquire the target message to be signed; The second acquisition module is used to acquire publicly available target elliptic curve parameters, which include the base point of the elliptic curve and the order value of the base point. The third acquisition module is used to acquire the first private key and the second private key of the signer; The first generation module is used to generate a first random number corresponding to the target message, and to perform calculations on the base point based on the first random number to obtain a first signature value. The second generation module is used to generate a second random number corresponding to the target message; The first calculation module is used to perform a modulo operation on the order value based on the first random number, the second random number, and the first private key to obtain the second signature value; The second calculation module is used to perform a modulo operation on the order value based on the second random number and the second private key to obtain the third signature value; The first processing module is used to use the first signature value, the second signature value and the third signature value as the target signature value of the target message.
9. A digital signature device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the digital signature method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the digital signature method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Digital signature generation method and device, digital signature verification method and device, electronic equipment and storage medium
CN112737778A