WO2015021934A1 - 一种生成数字签名的方法及装置 - Google Patents

一种生成数字签名的方法及装置 Download PDF

Info

Publication number
WO2015021934A1
WO2015021934A1 PCT/CN2014/084380 CN2014084380W WO2015021934A1 WO 2015021934 A1 WO2015021934 A1 WO 2015021934A1 CN 2014084380 W CN2014084380 W CN 2014084380W WO 2015021934 A1 WO2015021934 A1 WO 2015021934A1
Authority
WO
WIPO (PCT)
Prior art keywords
digital signature
parameter
signature parameter
random number
elliptic curve
Prior art date
Application number
PCT/CN2014/084380
Other languages
English (en)
French (fr)
Inventor
李志勇
万红涛
颜湘
Original Assignee
西安西电捷通无线网络通信股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安西电捷通无线网络通信股份有限公司 filed Critical 西安西电捷通无线网络通信股份有限公司
Priority to EP14836006.8A priority Critical patent/EP3035590B1/en
Priority to KR1020167006251A priority patent/KR101992270B1/ko
Priority to US14/911,143 priority patent/US10038561B2/en
Priority to JP2016533807A priority patent/JP6353536B2/ja
Publication of WO2015021934A1 publication Critical patent/WO2015021934A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3252Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using DSA or related signature schemes, e.g. elliptic based signatures, ElGamal or Schnorr schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves

Definitions

  • the present application relates to the field of information technology, and in particular, to a method and an apparatus for generating a digital signature.
  • the SM2 digital signature algorithm As an integral part of the SM2 cryptographic algorithm, the SM2 digital signature algorithm is well applied in the field of user identity authentication and information integrity verification. In the application process of SM2 digital signature algorithm, the efficiency of algorithm operation has always been the focus of algorithmic users.
  • the SM2 digital signature algorithm consists of an SM2 digital signature generation algorithm and an SM2 digital signature verification algorithm.
  • the message to be signed is M.
  • the digital signature (r, s) of the message M when the user A needs to use the digital signature, the following SM2 digital signature generation algorithm can be implemented:
  • A2 Calculation And convert the data type of e from a bit string to an integer.
  • H v () is a cryptographic hash function with a message digest length of v bits, such as the SM3 cryptographic hash algorithm.
  • A3 Generate a random number k ⁇ [1, n-1] using a random number generator.
  • n is an elliptic curve parameter
  • G is the base point of the elliptic curve and [k]G represents the k and G point multiplication.
  • d A is the private key of the above user A.
  • A7 Convert the data type of r and s from an integer to a byte string, and the digital signature of the message M is (r, s).
  • the user A may be a system or a device, and the SM2 digital signature generation algorithm may be a subsystem disposed inside the user A, a hardware module, a software module executable in the user A, or the like, or may communicate with the user A. Connection, system or device called by user A.
  • User A has a discernable identification ID A of length entlen A bits, and ANTL A is two bytes converted from the integer entlen A.
  • ANTL A is two bytes converted from the integer entlen A.
  • P A is the public key of user A
  • H 256 () is a cryptographic hash function with a message digest length of 256 bits, such as the SM3 cryptographic hash algorithm.
  • the SM2 digital signature generation algorithm is implemented based on the ECC algorithm theory.
  • the large integer multiplication and large integer modular multiplication operations are the most important factors affecting the computational efficiency of the algorithm.
  • the existing SM2 digital signature generation algorithm can satisfy the requirements. There is a certain need for computational efficiency, but if there is a desire to further improve the computational efficiency, there is no corresponding solution in the prior art.
  • the purpose of the present application is to provide a method and apparatus for generating a digital signature to further improve the computational efficiency of generating a digital signature based on the SM2 digital signature generation algorithm.
  • a method of generating a digital signature comprising:
  • the device generates a digital signature parameter r that satisfies the validity determination condition
  • the apparatus generates a digital signature parameter s based on a private key d A , a random number k having a value range of [1, n-1], the digital signature parameter r, and an elliptic curve parameter n, based on the following formula:
  • the device determines whether the generated digital signature parameter s is 0. If it is 0, regenerates the digital signature parameter r that satisfies the validity determination condition, and uses the private key d A to regenerate the value range of [1, a random number k of n-1], the regenerated digital signature parameter r, and the elliptic curve parameter n, regenerating the digital signature parameter s until the digital signature parameter s is not 0;
  • the device converts the data type of the finally obtained digital signature parameter r and the digital signature parameter s that is not 0 into a byte string to obtain a digital signature (r, s).
  • the method provided in the embodiment of the present invention can reduce the number of large integer operations when obtaining the digital signature parameter s, thereby improving the operation efficiency of generating a digital signature based on the SM2 digital signature generation algorithm.
  • the modulo operation is performed on the elliptic curve parameter n by using the large integer addition result
  • the device adds a private key d A and then performs an inverse modulo calculation on the elliptic curve parameter n;
  • the device performs a large integer multiplication operation on the operation result of the modulo operation and the modulo inverse operation;
  • the device subtracts the digital signature parameter r from the result of the large integer multiplication operation and performs a modulo operation on the elliptic curve parameter n to obtain a digital signature parameter s.
  • the method may further include:
  • the device acquires the validity judgment condition operation result r+k of r, so as to generate a digital signature by using the validity judgment condition operation result r+k of the private key d A , r , the digital signature parameter r, and the elliptic curve parameter n Parameter s.
  • the validity judgment condition calculation result (r+k) of r can be directly used to further improve the calculation efficiency.
  • the method may further include:
  • the device acquires a validity judgment condition operation result (r+k) mod n of r, so as to use the validity of the private key d A , r to determine a condition operation result (r+k) mod n, the digital signature parameter r, And the elliptic curve parameter n generates a digital signature parameter s.
  • a device for generating a digital signature comprising:
  • a parameter input interface unit configured to obtain a hash value Z A and a message M to be signed
  • a cascading operation unit configured to perform a cascading operation on the hash value Z A obtained by the parameter input interface unit and the message M to be signed, to generate ;
  • a cryptographic hash algorithm operation unit for generating the cascading operation unit Performing a cryptographic hash operation to generate message digest information e;
  • a random number generator for generating a random number k having a value range of [1, n-1];
  • a data type conversion unit configured to convert a data type of the message digest information e generated by the cryptographic hash algorithm operation unit into an integer type, and also used to use the data of the elliptic curve point abscissa x 1 generated by the ECC algorithm operation unit Type conversion to an integer type;
  • a large integer operation unit configured to perform message type information e and elliptic curve point abscissa x 1 by using the data type conversion unit to generate a digital signature parameter r;
  • a validity determining unit configured to perform validity determination on the digital signature parameter r generated by the large integer operation unit
  • the random number generator regenerates a random number k having a value range of [1, n-1]; the ECC algorithm operation unit generates according to the random number The regenerated random number k regains the elliptic curve point abscissa x 1 ; the data type conversion unit performs data type conversion on the retrieved elliptic curve point abscissa x 1 ; the large integer arithmetic unit is based on the message digest
  • the information e and the regenerated elliptic curve point abscissa x 1 regenerate the digital signature parameter r and utilize the regenerated digital signature parameter r and the regenerated random number k, the validity determining unit regenerating the digital signature
  • the parameter r is used for validity determination;
  • the validity determining unit is further configured to: determine whether the digital signature parameter s generated by the large integer operation unit is 0;
  • the random number generator regenerates a random number k having a value range of [1, n-1], the large integer arithmetic unit regenerating the digital signature parameter r, and in the regenerated digital signature
  • the private key d A is used to regenerate the random number k of the range [1, n-1], the regenerated digital signature parameter r, and the ellipse Curve parameter n, regenerating the digital signature parameter s;
  • the data type conversion unit is further configured to convert the data type of the digital signature parameter r finally generated by the large integer operation unit and the digital signature parameter s of not 0 to a byte string to obtain a digital signature (r, s) ;
  • Parameter output interface unit for outputting digital signatures (r, s).
  • the device provided in the embodiment of the present invention can reduce the number of large integer operations when acquiring the digital signature parameter s, thereby improving the operation efficiency of generating the digital signature based on the SM2 digital signature generation algorithm.
  • the large integer operation unit when generating the digital signature parameter s, is specifically configured to:
  • the digital signature parameter r is added to the random number k generated by the random number generator by a large integer
  • the elliptic curve parameter n is subjected to a modulo operation using a large integer addition result
  • the elliptic curve parameter n is subjected to a modulo inverse operation
  • the elliptic curve parameter n is subjected to a modulo operation to obtain a digital signature parameter s.
  • the operation unit is further configured to generate a validity judgment condition operation result r of the digital signature parameter r by using the generated digital signature parameter r and the random number k generated by the random number generator. +k;
  • the large integer arithmetic unit is used to:
  • the elliptic curve parameter n is subjected to a modulo inverse operation
  • the elliptic curve parameter n is subjected to a modulo operation to obtain a digital signature parameter s.
  • the validity judgment condition calculation result (r+k) of r can be directly used to further improve the calculation efficiency.
  • the validity determining unit determines the validity of the digital signature parameter r using the validity determination condition operation result (r+k) mod n of the digital signature parameter r
  • the large integer operation unit is further configured to generate a digital signature by using the generated digital signature parameter r, the random number k generated by the random number generator, and an elliptic curve parameter n.
  • the validity of the parameter r determines the condition operation result (r+k) mod n;
  • the large integer arithmetic unit is used to:
  • the elliptic curve parameter n is subjected to a modulo inverse operation
  • the elliptic curve parameter n is subjected to a modulo operation to obtain a digital signature parameter s.
  • the private key used by the large integer arithmetic unit can be generated by the device or externally.
  • the following examples illustrate:
  • the device also includes:
  • a key generation unit configured to generate the private key d A ;
  • a key storage unit for storing the private key d A generated by the key generation unit; the large integer operation unit acquiring the private key d A from the key storage unit to generate a digital signature parameter s .
  • the parameter input interface unit is further configured to acquire the private key d A ; the large integer operation unit acquires the private key d A from the parameter input interface unit to generate a digital signature parameter s.
  • the device further includes a key storage unit; the parameter input interface unit is further configured to acquire the private key d A ; the key storage unit is configured to save the private key d A acquired by the parameter input interface unit
  • the large integer arithmetic unit acquires the private key d A from the key storage unit to generate a digital signature parameter s.
  • FIG. 1 is a flowchart of a first method according to an embodiment of the present application
  • FIG. 3 is a flowchart of a third method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a device according to an embodiment of the present application.
  • the embodiment of the present application provides a technical solution for generating a digital signature. After generating a digital signature parameter r that satisfies the validity determination condition, the device uses a private key d A and a random number with a value range of [1, n-1].
  • s ((1 + d A ) -1 ⁇ (r + k) - r) mod n, determine the generated digital signature parameters Whether s is 0, if it is 0, regenerate the digital signature parameter r that satisfies the validity determination condition, and use the private key d A to regenerate the random number k of the range [1, n-1]
  • the regenerated digital signature parameter r, and the elliptic curve parameter n regenerate the digital signature parameter s until the digital signature parameter s is not 0, and the final digital signature parameter r and the number not 0 are obtained.
  • a digital signature (r, s) is obtained.
  • the digital signature parameter s is obtained, the number of large integer operations can be reduced, thereby improving the computational efficiency of generating a digital signature based on the SM2 digital signature generation algorithm.
  • a method for generating a digital signature provided by the embodiment of the present application is as shown in FIG. 1 , and specifically includes the following operations:
  • Step 100 The device generates a digital signature parameter r that satisfies a validity determination condition.
  • the satisfying validity determination condition means that the obtained digital signature parameter r is not 0, and r+k is not n.
  • n is an elliptic curve parameter, and k is a random number whose value range is [1, n-1].
  • the digital signature parameter r that satisfies the validity determination condition may be generated, but not limited to, by calculating r in the SM2 digital signature generation algorithm.
  • Step 110 The apparatus generates the digital signature parameter s based on the following formula by using the private key d A , the random number k, the digital signature parameter r, and the elliptic curve parameter n:
  • the formula 5 is a simplified form of the above formula 2, and the digital signature parameter s is generated based on the formula 5. Without performing the r ⁇ d A operation, one large integer operation can be reduced.
  • the principle of formula simplification is as follows:
  • the private key d A is a private key of a digital signature user (for example, the user A above).
  • the digital signature user may be a system or a device.
  • the digital signature user may be a user equipment (UE), or may be a network node participating in identity authentication, such as a base station, a mobility management entity (MME), or the like.
  • UE user equipment
  • MME mobility management entity
  • Step 120 The device determines whether the generated digital signature parameter s is 0. If not, performs step 130. If it is 0, regenerates the digital signature parameter r that satisfies the validity determination condition, and uses the private key d A , The regenerated value of the random number k of [1, n-1], the regenerated digital signature parameter r, and the elliptic curve parameter n above, regenerate the digital signature parameter s until the generated digital signature parameter s is not 0.
  • Step 130 The device converts the data type of the finally obtained digital signature parameter r and the digital signature parameter s that is not 0 into a byte string to obtain a digital signature (r, s).
  • the digital signature generator (ie, the above device) that performs the above operations to generate a digital signature may be a subsystem disposed inside the digital signature user, a hardware module, a software module executable in the digital signature user, or the like, or may be A digitally signed user has a communication connection or a system or device that is called by a digitally signed user.
  • the digital signature generator For the private key of the digital signature user, if the digital signature generator is a subsystem set inside the digital signature user, a hardware module, a software module executable in the digital signature user, etc., the digital signature generator can generate The key is saved. For the digital signature user's private key, the digital signature generator can also be obtained and saved from the digital signature user, and can also be obtained and applied from the digital signature user, but not saved.
  • the digital signature parameter s can be obtained through different implementation methods, thereby reducing one large integer multiplication operation or large integer modular multiplication operation.
  • the apparatus generates the digital signature parameter s according to the following formula using the private key d A , the random number k, the digital signature parameter r, and the elliptic curve parameter n:
  • the elliptic curve parameter n is subjected to modulo operation using the large integer addition result; the elliptic curve parameter is added after the private key d A is increased by one.
  • n performs a modulo inverse operation, performs a large integer multiplication operation on the modulo operation and the modulo inverse operation result, subtracts the digital signature parameter r from the large integer multiplication result, and performs a modulo operation on the elliptic curve parameter n.
  • Digital signature parameter s Digital signature parameter s.
  • the validity judgment condition calculation result r+k of r may be acquired before the digital signature parameter s is generated.
  • the apparatus can directly generate the digital signature parameter s by using the validity judgment condition calculation result r+k of r, the private key d A , the digital signature parameter r, and the elliptic curve parameter n.
  • the validity judgment condition calculation result (r+k) mod n of r may be acquired before the digital signature parameter s is generated.
  • the apparatus can directly generate the digital signature parameter s by using the validity judgment condition calculation result (r+k) mod n of r, the private key d A , the digital signature parameter r and the elliptic curve parameter n.
  • the validity of the r is judged according to the validity judgment condition operation result (r+k) mod n and the validity of r is judged according to the validity judgment condition operation result r+k, and the equivalent principle is
  • Equation 6 an implementation manner of acquiring the digital signature (r, s) of M is described in detail below by taking Equation 6 as an example.
  • the implementation specifically includes the following operations:
  • Step 200 Perform a cascade operation on the hash value of the digital signature user and the message M, that is, set
  • Step 210 Obtain message summary information e, that is, calculate And convert the data type of e from a bit string to an integer.
  • Step 220 Generate a random number k ⁇ [1, n - 1] by using a random number generator.
  • Step 260 Using the digital signature user's private key d A , r validity determination condition calculation result r+k, digital signature parameter r, and elliptic curve parameter n, generate a digital signature parameter s according to the following formula:
  • Equation VII is Equation 6 above. The only difference is that the meaning of Equation 7 is: when generating the digital signature s, it is not necessary to repeatedly calculate r+k, but the conditional operation result r+k is determined by the validity of r.
  • Step 280 Convert the data type of the obtained digital signature parameters r and s from an integer to a byte string, and obtain a digital signature of the message M as (r, s).
  • Equation 6 an implementation manner of acquiring the digital signature (r, s) of M is described in detail below by taking Equation 6 as an example.
  • the implementation specifically includes the following operations:
  • Step 300 Perform a cascade operation on the hash value of the digital signature user and the message M, that is, set
  • Step 310 Obtain message summary information e, that is, calculate And convert the data type of e from a bit string to an integer.
  • Step 320 Generate a random number k ⁇ [1, n-1] by using a random number generator.
  • Step 360 Using the digital signature user's private key d A , r validity determination condition operation result (r+k) mod n, digital signature parameter r, and elliptic curve parameter n, generate a digital signature parameter s according to the following formula:
  • Equation 8 is Equation 6 above. The only difference is that the meaning of the formula 8 is that when the digital signature s is generated, it is not necessary to repeatedly calculate (r+k) mod n, but the conditional operation result (r+k) mod n is determined by the validity of r.
  • Step 380 Convert the data type of the obtained digital signature parameter r and s from an integer to a byte string to obtain a message M.
  • the digital signature is (r, s).
  • the embodiment of the present application further provides an apparatus for generating a digital signature, and the structure thereof is as shown in FIG. 4, and specifically includes:
  • the parameter input interface unit 401 is configured to acquire the hash value Z A and the message M to be signed.
  • the parameter input interface unit 401 outputs the acquired hash value Z A and the message M to be signed to the cascade operation unit 402.
  • the cascading operation unit 402 is configured to perform a cascading operation on the hash value Z A acquired by the parameter input interface unit 401 and the message M to be signed, to generate
  • the cascade operation unit 402 will generate It is output to the cryptographic hash algorithm operation unit 403.
  • a cryptographic hash algorithm operation unit 403 configured to generate the cascading operation unit 402
  • a password hash operation is performed to generate message digest information e.
  • the cryptographic hash algorithm operation unit 403 outputs the generated message digest information to the data type conversion unit 406.
  • the random number generator 404 is configured to generate a random number k with a value range of [1, n-1].
  • the random number generator 404 transmits the generated random number to the ECC algorithm operation unit 405.
  • the ECC algorithm operation unit 405 outputs the obtained elliptic curve point abscissa x 1 to the data type conversion unit 406.
  • the data type conversion unit 406 is configured to convert the data type of the message digest information e generated by the cryptographic hash algorithm operation unit 403 into an integer type, and also to use the elliptic curve point abscissa generated by the ECC algorithm operation unit 405.
  • the data type of 1 is converted to an integer type.
  • the data type conversion unit 406 outputs the message summary information e after the conversion type and the elliptic curve point abscissa x 1 to the large integer operation unit 407.
  • the large integer operation unit 407 is configured to generate the digital signature parameter r by using the message type information e and the elliptic curve point abscissa x 1 of the data type conversion by the data type conversion unit 406.
  • the large integer arithmetic unit 407 outputs the generated digital signature parameter r to the validity determining unit 408.
  • the validity determining unit 408 is configured to perform validity determination on the digital signature parameter r generated by the large integer operation unit 407.
  • the random number generator 404 regenerates the random number k having a value range of [1, n-1]; the ECC algorithm operation unit 405 is based on the random number The random number k regenerated by the number generator 404 regains the elliptic curve point abscissa x 1 ; the data type conversion unit 406 performs data type conversion on the retrieved elliptic curve point abscissa x 1 ; the large integer operation unit 407
  • the digital signature parameter r is regenerated according to the message digest information e and the regenerated elliptic curve point abscissa x 1 , and the regenerated digital signature parameter r and the regenerated random number k are utilized, the validity determining unit 408 The validity of the regenerated digital signature parameter r is determined.
  • the validity determining unit 408 may trigger the random number generator 404 to regenerate the random number, or may trigger the random number generator 404 to be restarted by the additionally set control unit. Generate a random number.
  • the large integer operation unit 407 is further configured to generate a number based on the following formula by using the private key d A , the random number k generated by the random number generator 404, the digital signature parameter r, and the elliptic curve parameter n.
  • the signature parameter s: s ((1 + d A ) -1 ⁇ (r + k) - r) mod n.
  • the validity determining unit 408 is further configured to determine whether the digital signature parameter s generated by the large integer operation unit 407 is 0.
  • the random number generator 404 regenerates a random number k having a value range of [1, n-1], and the large integer operation unit 407 regenerates the digital signature parameter r, and in the regenerated
  • the private key d A is used to regenerate the random number k of the range [1, n-1], the regenerated digital signature parameter r, and the The elliptic curve parameter n is regenerated to regenerate the digital signature parameter s.
  • the data type conversion unit 406 is further configured to convert the data type of the digital signature parameter r finally generated by the large integer operation unit 407 and the digital signature parameter s that is not 0 into a byte string to obtain a digital signature (r, s).
  • the parameter output interface unit 409 is configured to output a digital signature (r, s).
  • the large integer operation unit 407 is specifically configured to:
  • the elliptic curve parameter n is subjected to a modulo operation using a large integer addition result
  • the elliptic curve parameter n is subjected to a modulo inverse operation
  • the elliptic curve parameter n is subjected to a modulo operation to obtain a digital signature parameter s.
  • the validity determining unit 408 determines the validity of the digital signature parameter r using the validity determination condition operation result r+k of the digital signature parameter r
  • the large integer operation unit 407 is further configured to generate the validity of the digital signature parameter r by using the generated digital signature parameter r and the random number k generated by the random number generator 404. Sex determination condition calculation result r+k;
  • the large integer operation unit 407 is used to:
  • the elliptic curve parameter n is subjected to a modulo inverse operation
  • the elliptic curve parameter n is subjected to a modulo operation to obtain a digital signature parameter s.
  • the validity determining unit 408 uses the validity of the digital signature parameter r to determine the conditional operation result (r+k) mod n is valid for the digital signature parameter r
  • the determination is performed, and the large integer operation unit 407 is further configured to use the generated digital signature parameter r, the random number k and the elliptic curve parameter generated by the random number generator 404 after generating the digital signature parameter r. n, generating a digital signature parameter r validity determination condition operation result (r + k) mod n;
  • the large integer operation unit 407 is used to:
  • the elliptic curve parameter n is subjected to a modulo inverse operation
  • the elliptic curve parameter n is subjected to a modulo operation to obtain a digital signature parameter s.
  • the private key d A used by the large integer arithmetic unit 407 can be generated by the present apparatus or externally.
  • the following examples illustrate:
  • the apparatus provided in this embodiment of the present application further includes a key generation unit and a key storage unit.
  • the key generation unit is configured to generate the private key d A ;
  • the key storage unit is configured to save the private key d A generated by the key generation unit.
  • the large integer operation unit 407 acquires the private key d A from the key storage unit to generate a digital signature parameter s.
  • the parameter input interface unit 401 is further configured to acquire the private key d A .
  • the large integer operation unit 407 acquires the private key d A from the parameter input interface unit 401 to generate a digital signature parameter s.
  • the apparatus provided in this embodiment of the present application further includes a key storage unit.
  • the parameter input interface unit 401 is further configured to acquire the private key d A ; the key storage unit is configured to save the private key d A acquired by the parameter input interface unit 401.
  • the large integer operation unit 407 acquires the private key d A from the key storage unit to generate a digital signature parameter s.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)
  • Complex Calculations (AREA)

Abstract

本申请公开了一种生成数字签名的方法及装置。其方法包括:装置生成满足有效性判定条件的数字签名参数r;利用私钥dA、随机数k、r和椭圆曲线参数n,按照如下公式生成数字签名参数s:s=((1+dA)-1·(r+k)-r)mod n,其中,k的取值范围为[1,n-1];判断生成的s是否为0,如果为0,重新生成满足有效性判定条件的r,并利用dA、重新生成的取值范围为[1,n-1]的k、重新生成的r、和n,重新生成s,直至s不为0;将r和不为0的s的数据类型转换为字节串,得到数字签名(r,s)。本申请实施例提供的技术方案,通过使用简化的计算公式获取数字签名参数s,可以减少大整数运算的次数,从而提高了基于SM2数字签名生成算法生成数字签名的运算效率。

Description

一种生成数字签名的方法及装置
本申请要求在2013年8月16日提交中国专利局、申请号为201310363349.7、发明名称为“一种生成数字签名的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息技术领域,尤其涉及一种生成数字签名的方法及装置。
背景技术
SM2数字签名算法作为SM2密码算法的一个组成部分,其在用户身份认证和信息完整性校验功能领域得到很好的应用。在SM2数字签名算法应用过程中,算法运算效率一直是算法应用者们所关注的重点。SM2数字签名算法由SM2数字签名生成算法和SM2数字签名验证算法构成。
设待签名的消息为M,为了获取消息M的数字签名(r,s),当用户A需要使用数字签名时,可通过如下SM2数字签名生成算法实现:
A1:置
Figure PCTCN2014084380-appb-000001
其中,||表示级联运算,ZA为通过密码杂凑函数求得的上述生成数字签名的用户A的杂凑值。
A2:计算
Figure PCTCN2014084380-appb-000002
并将e的数据类型由比特串转换为整数。
其中,Hv()为消息摘要长度为v比特的密码杂凑函数,如SM3密码杂凑算法。
A3:用随机数发生器产生随机数k∈[1,n-1]。
其中,n为椭圆曲线参数。
A4:计算椭圆曲线点(x1,y1)=[k]G,结果x1为域元素,将x1的数据类型转换为整数。
其中,G为椭圆曲线的基点,[k]G表示k与G点乘。
使用的椭圆曲线方程,其类型可选择素数域方程y2=x3+ax+b或二元扩域方程y2+xy=x3+ax2+b。
A5:计算r=(e+x1)mod n     公式一
即使用(e+x1)对n求模。
若r=0或r+k=n则返回A3。
A6:计算s=((1+dA)-1·(k-r·dA))mod n     公式二
若s=0则返回A3。
其中,dA为上述用户A的私钥。
A7:将r、s的数据类型由整数转换为字节串,消息M的数字签名为(r,s)。
用户A可以是系统或设备,执行上述SM2数字签名生成算法的可以是设置于用户A内部的子系统、硬件模块、在用户A内可执行的软件模块等等,也可以是与用户A有通信连接、被用户A调用的系统或设备。
用户A具有长度为entlenA比特的可辨别标识IDA,记ENTLA是由整数entlenA转换而成的两个字节。在上述SM2数字签名生成算法中,将G的坐标xG、yG和PA的坐标xA、yA的数据类型转换为比特串,则上述ZA=H256(ENTLA||IDA||a||b||xG||yG||xA||yA)。其中,PA为用户A的公钥,H256()为消息摘要长度为256比特的密码杂凑函数,如SM3密码杂凑算法。
另外,在具体工程实现过程中,本领域技术人员通常会对公式二采用如下公式三和公式四两种变形,将公式二中(1+dA)-1求负整数指数幂运算转换为(1+dA)-1mod n求模逆运算,便于工程实现。
s=(((1+dA)-1mod n)·((k-r·dA)mod n))mod n         公式三
s=(((1+dA)-1mod n)·((k-(r·dA)mod n)mod n))mod n     公式四
SM2数字签名生成算法是基于ECC算法理论实现的,实现过程中大整数乘法、大整数模乘运算等大整数运算是影响算法运算效率最为主要的因素,现有的SM2数字签名生成算法虽然能够满足一定的运算效率的需求,但如果希望进一步提高运算效率,现有技术中还没有相应的解决方案。
发明内容
本申请的目的是提供一种生成数字签名的方法及装置,以进一步提高基于SM2数字签名生成算法生成数字签名的运算效率。
本申请的目的是通过以下技术方案实现的:
一种生成数字签名的方法,包括:
装置生成满足有效性判定条件的数字签名参数r;
所述装置利用私钥dA、取值范围为[1,n-1]的随机数k、所述数字签名参数r和椭圆曲线参数n,基于如下公式生成数字签名参数s:
s=((1+dA)-1·(r+k)-r)mod n;
所述装置判断生成的数字签名参数s是否为0,如果为0,重新生成满足有效性判定条件的数字签名参数r,并利用所述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、所述重新生成的数字签名参数r、和所述椭圆曲线参数n,重新生成数字签名参数s,直至所述数字签名参数s不为0;
所述装置将最终得到的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串,得到数字签名(r,s)。
本申请实施例提供的方法,获取数字签名参数s时可以减少大整数运算的次数,从而提高基于SM2数字签名生成算法生成数字签名的运算效率。
较佳地,所述装置基于s=((1+dA)-1·(r+k)-r)mod n,生成数字签名参数s,包括:
所述装置将数字签名参数r与随机数k进行大整数加法运算后,使用大整数加法运算结果对椭圆曲线参数n进行求模运算;
所述装置将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
所述装置将求模运算与求模逆运算的运算结果进行大整数乘法运算;
所述装置将该大整数乘法运算结果减去数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
通过上述处理过程生成数字签名参数s,可减少1次大整数乘法或1次大整数模乘运算。
在上述任意实施例基础上,较佳地,生成数字签名参数s之前,该方法还可以包括:
所述装置获取r的有效性判定条件运算结果r+k,以便利用私钥dA、r的有效性判定条件运算结果r+k、所述数字签名参数r、和椭圆曲线参数n生成数字签名参数s。
生成数字签名参数s时,可以直接使用r的有效性判定条件运算结果(r+k),进一步提高运算效率。
在上述任意实施例基础上,较佳地,生成数字签名参数s之前,该方法还可以包括:
所述装置获取r的有效性判定条件运算结果(r+k)mod n,以便利用私钥dA、r的有效性判定条件运算结果(r+k)mod n、所述数字签名参数r、和椭圆曲线参数n生成数字签名参数s。
由于避免了(r·dA)mod n的运算,因此,可以减少1次大整数模乘运算。
一种生成数字签名的装置,包括:
参数输入接口单元,用于获取杂凑值ZA和待签名的消息M;
级联运算单元,用于将所述参数输入接口单元获取的杂凑值ZA和待签名的消息M进行级联运算,生成
Figure PCTCN2014084380-appb-000003
密码杂凑算法运算单元,用于将所述级联运算单元生成的
Figure PCTCN2014084380-appb-000004
进行密码杂凑运算,生成消息摘要信息e;
随机数发生器,用于生成取值范围为[1,n-1]的随机数k;
ECC算法运算单元,用于根据所述随机数发生器生成的随机数k进行椭圆曲线算法点乘运算(x1,y1)=kG,得到椭圆曲线点横坐标x1,其中G为椭圆曲线参数;
数据类型转换单元,用于将所述密码杂凑算法运算单元生成的消息摘要信息e的数据 类型转换为整数类型,还用于将所述ECC算法运算单元生成的椭圆曲线点横坐标x1的数据类型转换为整数类型;
大整数运算单元,用于利用所述数据类型转换单元进行数据类型转换的消息摘要信息e和椭圆曲线点横坐标x1,生成数字签名参数r;
有效性判定单元,用于对所述大整数运算单元生成的数字签名参数r进行有效性判定;
如果所述数字签名参数r不满足有效性判定条件,所述随机数发生器重新生成取值范围为[1,n-1]的随机数k;所述ECC算法运算单元根据所述随机数发生器重新生成的随机数k重新得到椭圆曲线点横坐标x1;所述数据类型转换单元对重新得到的椭圆曲线点横坐标x1进行数据类型转换;所述大整数运算单元根据所述消息摘要信息e和重新生成的椭圆曲线点横坐标x1,重新生成数字签名参数r,并利用重新生成的数字签名参数r和重新生成的随机数k,所述有效性判定单元对重新生成的数字签名参数r进行有效性判定;
所述大整数运算单元还用于,利用私钥dA、所述随机数发生器生成的所述随机数k、所述数字签名参数r、和椭圆曲线参数n,基于如下公式生成数字签名参数s:s=((1+dA)-1·(r+k)-r)mod n;
所述有效性判定单元还用于,判断所述大整数运算单元生成的数字签名参数s是否为0;
如果为0,所述随机数发生器重新生成取值范围为[1,n-1]的随机数k,所述大整数运算单元重新生成数字签名参数r,并在所述重新生成的数字签名参数r满足有效性判定条件时,利用所述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、所述重新生成的数字签名参数r、和所述椭圆曲线参数n,重新生成数字签名参数s;
所述数据类型转换单元还用于,将所述大整数运算单元最终生成的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串,得到数字签名(r,s);
参数输出接口单元,用于输出数字签名(r,s)。
本申请实施例提供的装置,获取数字签名参数s时可以减少大整数运算的次数,从而提高基于SM2数字签名生成算法生成数字签名的运算效率。
较佳地,生成数字签名参数s时,所述大整数运算单元具体用于:
将所述数字签名参数r与所述随机数发生器生成的所述随机数k进行大整数加法运算后,使用大整数加法运算结果对椭圆曲线参数n进行求模运算;
将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
将所述求模运算结果与所述求模逆运算结果进行大整数乘法运算;
将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
通过上述处理过程生成数字签名参数s,可减少1次大整数乘法或1次大整数模乘运 算。
在上述任意装置实施例基础上,较佳地,如果所述有效性判定单元使用数字签名参数r的有效性判定条件运算结果r+k对数字签名参数r的有效性进行判定,所述大整数运算单元在生成所述数字签名参数r后,还用于利用生成的数字签名参数r和所述随机数发生器生成的所述随机数k,生成数字签名参数r的有效性判定条件运算结果r+k;
生成数字签名参数s时,所述大整数运算单元用于:
使用所述r的有效性判定条件运算结果r+k对椭圆曲线参数n进行求模运算;
将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
将所述求模运算结果与所述求模逆运算结果进行大整数乘法运算;
将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
生成数字签名参数s时,可以直接使用r的有效性判定条件运算结果(r+k),进一步提高运算效率。
在上述任意装置侧实施例基础上,较佳地,如果所述有效性判定单元使用数字签名参数r的有效性判定条件运算结果(r+k)mod n对数字签名参数r的有效性进行判定,所述大整数运算单元在生成所述数字签名参数r后,还用于利用生成的数字签名参数r、所述随机数发生器生成的所述随机数k和椭圆曲线参数n,生成数字签名参数r的有效性判定条件运算结果(r+k)mod n;
生成数字签名参数s时,所述大整数运算单元用于:
将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
将所述r的有效性判定条件运算结果(r+k)mod n与所述求模逆运算结果进行大整数乘法运算;
将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
由于避免了(r·dA)mod n的运算,因此,可以减少1次大整数模乘运算。
在上述任意实施例基础上,大整数运算单元所使用的私钥,既可以由该装置生成,也可以从外部获取。下面举例说明:
方式一:
所述装置还包括:
密钥生成单元,用于生成所述私钥dA
密钥存储单元,用于保存所述密钥生成单元生成的所述私钥dA;所述大整数运算单元从所述密钥存储单元中获取所述私钥dA以生成数字签名参数s。
方式二:
所述参数输入接口单元还用于获取所述私钥dA;所述大整数运算单元从所述参数输入接口单元获取所述私钥dA以生成数字签名参数s。
方式三:
所述装置还包括密钥存储单元;所述参数输入接口单元还用于获取所述私钥dA;所述密钥存储单元用于保存所述参数输入接口单元获取的所述私钥dA;所述大整数运算单元从所述密钥存储单元获取所述私钥dA以生成数字签名参数s。
附图说明
图1为本申请实施例提供的第一种方法流程图;
图2为本申请实施例提供的第二种方法流程图;
图3为本申请实施例提供的第三种方法流程图;
图4为本申请实施例提供的装置示意图。
具体实施方式
本申请实施例提供了一种生成数字签名的技术方案,装置在生成满足有效性判定条件的数字签名参数r后,利用私钥dA、取值范围为[1,n-1]的随机数k、数字签名参数r和椭圆曲线参数n,基于如下公式生成数字签名参数s:s=((1+dA)-1·(r+k)-r)mod n,判断生成的数字签名参数s是否为0,如果为0,重新生成满足有效性判定条件的数字签名参数r,并利用所述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、所述重新生成的数字签名参数r、和所述椭圆曲线参数n,重新生成数字签名参数s,直至所述数字签名参数s不为0,将最终得到的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串后,得到数字签名(r,s)。获取数字签名参数s时可以减少大整数运算的次数,从而提高了基于SM2数字签名生成算法生成数字签名的运算效率。
下面将结合附图,对本申请实施例提供的技术方案进行详细描述。
本申请实施例提供的一种生成数字签名的方法如图1所示,具体包括如下操作:
步骤100、装置生成满足有效性判定条件的数字签名参数r。
其中,满足有效性判定条件是指,得到的数字签名参数r不为0,并且r+k不为n。n为椭圆曲线参数,k为取值范围是[1,n-1]的随机数。
可以但不仅限于采用SM2数字签名生成算法中计算r的方式生成满足有效性判定条件的数字签名参数r。
步骤110、该装置利用私钥dA、上述随机数k、上述数字签名参数r和上述椭圆曲线参数n,基于如下公式生成数字签名参数s:
s=((1+dA)-1·(r+k)-r)mod n        公式五
其中,公式五是上述公式二的简化形式,基于公式五生成数字签名参数s,不用进行r·dA运算,可以减少一次大整数运算。公式化简的原理如下:
s=((1+dA)-1·(k-r·dA))mod n
=((1+dA)-1·(k-r·dA+r-r))mod n
=((1+dA)-1·((r+k)-r(1+dA)))mod n
=((1+dA)-1·(r+k)-r)mod n
其中,私钥dA是数字签名使用者(例如上述用户A)的私钥。该数字签名使用者可以是系统或设备,具体的,数字签名使用者可以是用户设备(UE),也可以是参与身份认证的网络节点,如基站、移动性管理实体(MME)等等。
步骤120、该装置判断生成的数字签名参数s是否为0,如果不为0,执行步骤130,如果为0,重新生成满足有效性判定条件的数字签名参数r,并利用上述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、重新生成的数字签名参数r、和上述椭圆曲线参数n,重新生成数字签名参数s,直至生成的数字签名参数s不为0。
步骤130、该装置将最终得到的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串,得到数字签名(r,s)。
执行上述操作生成数字签名的数字签名生成者(即上述装置)可以是设置于数字签名使用者内部的子系统、硬件模块、在数字签名使用者内可执行的软件模块等等,也可以是与数字签名使用者有通信连接、被数字签名使用者调用的系统或设备。
对于数字签名使用者的私钥,如果数字签名生成者是设置于数字签名使用者内部的子系统、硬件模块、在数字签名使用者内可执行的软件模块等等,则数字签名生成者可以生成该密钥并保存。对于数字签名使用者的私钥,数字签名生成者也可以从数字签名使用者处获取并保存,还可以从数字签名使用者处获取并应用,但不保存。
在实际应用过程中,基于公式五,具体可以通过不同的实现方式得到数字签名参数s,从而减少一次大整数乘法运算或者大整数模乘运算。
一种优选的实现方式中,该装置利用私钥dA、随机数k、上述数字签名参数r、和椭圆曲线参数n,按照如下公式生成数字签名参数s:
s=(((1+dA)-1mod n)·((r+k)mod n)-r)mod n       公式六
该公式六是s=((1+dA)-1·(r+k)-r)mod n的变形。
也就是说,上述装置将数字签名参数r与随机数k进行大整数加法运算后,使用大整数加法运算结果对椭圆曲线参数n进行求模运算;将私钥dA加1后对椭圆曲线参数n进行求模逆运算,将求模运算与求模逆运算的运算结果进行大整数乘法运算,将该大整数乘法 运算结果减去数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
公式化简的原理如下:
s=((1+dA)-1·(r+k)-r)mod n
=((((1+dA)-1mod n)·((r+k)mod n))mod n-r mod n)mod n
=(((1+dA)-1mod n)·((r+k)mod n)-r)mod n
在该优选的实现方式中,在计算数字签名参数s时,利用该公式六实现。
应当指出的是,生成数字签名参数s的具体实现方式不仅限于该优选实施例。在本申请实施例提出了简化的公式五后,基于公式五的具体实现公式是本领域技术人员不需要付出创造性劳动即可得到的,也在本申请的保护范围之内。
在上述任一实施例的基础上,为了进一步提高生成数字签名的运算效率,还可以在生成数字签名参数s之前,获取r的有效性判定条件运算结果r+k。该装置可以直接利用r的有效性判定条件运算结果r+k,私钥dA、上述数字签名参数r和椭圆曲线参数n,生成数字签名参数s。
在上述任一实施例的基础上,为了进一步提高生成数字签名的运算效率,还可以在生成数字签名参数s之前,获取r的有效性判定条件运算结果(r+k)mod n。该装置可以直接利用r的有效性判定条件运算结果(r+k)mod n,私钥dA、上述数字签名参数r和椭圆曲线参数n,生成数字签名参数s。该优选的实现方式中,根据有效性判定条件运算结果(r+k)mod n判断r的有效性与根据有效性判定条件运算结果r+k判断r的有效性等效,其等效原理是:在SM2数字签名生成算法中,数字签名参数r和随机数k的取值范围均在[1,n-1]之间,因此r+k的取值范围在[2,2n-2]之间,故(r+k)mod n=0与r+k=n等效。相应的,在生成满足判定性条件的数字签名参数r的过程中,可以判断是否(r+k)mod n=0代替判断是否r+k=n。
假设待签名的消息为M,下面以公式六为例,结合图2对获取M的数字签名(r,s)的一种实现方式进行详细说明。该实现方式具体包括如下操作:
步骤200、将数字签名使用者的杂凑值与消息M进行级联运算,即:置
Figure PCTCN2014084380-appb-000005
步骤210、获取消息摘要信息e,即:计算
Figure PCTCN2014084380-appb-000006
并将e的数据类型由比特串转换为整数。
步骤220、用随机数发生器产生随机数k∈[1,n-1]。
步骤230、计算椭圆曲线点(x1,y1)=[k]G,结果x1为域元素,将x1的数据类型转换为整数。
步骤240、生成数字签名参数r,即:计算r=(e+x1)mod n       公式一
步骤250、对r进行有效性判定:假设t=r+k,判断r和t的取值,如果r=0或t=n, 则r不满足有效性判定条件,返回步骤220,如果r≠0且t≠n,则r满足有效性判定条件,执行步骤260。
步骤260、利用数字签名使用者的私钥dA、r的有效性判定条件运算结果r+k、数字签名参数r、和椭圆曲线参数n,按照如下公式生成数字签名参数s:
s=(((1+dA)-1mod n)·(tmod n)-r)mod n    公式七
应当指出的是,公式七即上述的公式六。区别仅在于,公式七表示的含义是:生成数字签名s时,不需要重复计算r+k,而是利用r的有效性判定条件运算结果r+k。
步骤270、判断s的取值是否为0,若s=0,返回步骤220,否则,执行步骤280。
步骤280、将得到的数字签名参数r、s的数据类型由整数转换为字节串,得到消息M的数字签名为(r,s)。
图2所示的实施例中,利用公式七生成数字签名参数s,可减少1次大整数乘法或1次大整数模乘运算,且在使用公式七生成数字签名参数s时,可以直接使用r的有效性判定条件运算结果(r+k),进一步提高运算效率。
假设待签名的消息为M,下面以公式六为例,结合图3对获取M的数字签名(r,s)的一种实现方式进行详细说明。该实现方式具体包括如下操作:
步骤300、将数字签名使用者的杂凑值与消息M进行级联运算,即:置
Figure PCTCN2014084380-appb-000007
步骤310、获取消息摘要信息e,即:计算
Figure PCTCN2014084380-appb-000008
并将e的数据类型由比特串转换为整数。
步骤320、用随机数发生器产生随机数k∈[1,n-1]。
步骤330、计算椭圆曲线点(x1,y1)=[k]G,结果x1为域元素,将x1的数据类型转换为整数。
步骤340、生成数字签名参数r,即:计算r=(e+x1)mod n       公式一
步骤350、对r进行有效性判定:假设t=(r+k)mod n,判断r和t的取值,如果r=0或t=0,则r不满足有效性判定条件,返回步骤320,如果r≠0且t≠0,则r满足有效性判定条件,执行步骤360。
步骤360、利用数字签名使用者的私钥dA、r的有效性判定条件运算结果(r+k)mod n、数字签名参数r、和椭圆曲线参数n,按照如下公式生成数字签名参数s:
s=(((1+dA)-1mod n)·t-r)mod n    公式八
应当指出的是,公式八即上述的公式六。区别仅在于,公式八表示的含义是:生成数字签名s时,不需要重复计算(r+k)mod n,而是利用r的有效性判定条件运算结果(r+k)mod n。
步骤370、判断s的取值是否为0,若s=0,返回步骤320,否则,执行步骤380。
步骤380、将得到的数字签名参数r、s的数据类型由整数转换为字节串,得到消息M 的数字签名为(r,s)。
图3所示的实施例中,利用公式八生成数字签名参数s,可减少1次大整数乘法或1次大整数模乘运算,且在使用公式八生成数字签名参数s时,可以直接使用r的有效性判定条件运算结果(r+k)mod n,进一步提高运算效率。
另外,需说明,利用本申请方案对生成数字签名的方法进行改进时,相对于公式三将节省一次大整数乘法运算,相对于公式四将节省一次大整数模乘运算。
基于与方法相同的发明构思,本申请实施例还提供一种生成数字签名的装置,其结构如图4所示,具体包括:
参数输入接口单元401,用于获取杂凑值ZA和待签名的消息M。
参数输入接口单元401将获取的杂凑值ZA和待签名的消息M输出给级联运算单元402。
级联运算单元402,用于将所述参数输入接口单元401获取的杂凑值ZA和待签名的消息M进行级联运算,生成
Figure PCTCN2014084380-appb-000009
级联运算单元402将生成的
Figure PCTCN2014084380-appb-000010
输出给密码杂凑算法运算单元403。
密码杂凑算法运算单元403,用于将所述级联运算单元402生成的
Figure PCTCN2014084380-appb-000011
进行密码杂凑运算,生成消息摘要信息e。
密码杂凑算法运算单元403将生成的消息摘要信息输出给数据类型转换单元406。
随机数发生器404,用于生成取值范围为[1,n-1]的随机数k。
随机数发生器404将生成的随机数发送给ECC算法运算单元405。
ECC算法运算单元405,用于根据所述随机数发生器404生成的随机数k进行椭圆曲线算法点乘运算(x1,y1)=kG,得到椭圆曲线点横坐标x1,其中G为椭圆曲线参数。
ECC算法运算单元405将得到的椭圆曲线点横坐标x1输出给数据类型转换单元406。
数据类型转换单元406,用于将所述密码杂凑算法运算单元403生成的消息摘要信息e的数据类型转换为整数类型,还用于将所述ECC算法运算单元405生成的椭圆曲线点横坐标x1的数据类型转换为整数类型。
数据类型转换单元406将转换类型后的消息摘要信息e和椭圆曲线点横坐标x1输出给大整数运算单元407。
大整数运算单元407,用于利用所述数据类型转换单元406进行数据类型转换的消息摘要信息e和椭圆曲线点横坐标x1,生成数字签名参数r。
大整数运算单元407将生成的数字签名参数r输出给有效性判定单元408。
有效性判定单元408,用于对所述大整数运算单元407生成的数字签名参数r进行有效性判定。
如果所述数字签名参数r不满足有效性判定条件,所述随机数发生器404重新生成取 值范围为[1,n-1]的随机数k;所述ECC算法运算单元405根据所述随机数发生器404重新生成的随机数k重新得到椭圆曲线点横坐标x1;所述数据类型转换单元406对重新得到的椭圆曲线点横坐标x1进行数据类型转换;所述大整数运算单元407根据所述消息摘要信息e和重新生成的椭圆曲线点横坐标x1,重新生成数字签名参数r,并利用重新生成的数字签名参数r和重新生成的随机数k,所述有效性判定单元408对重新生成的数字签名参数r进行有效性判定。
其中,如果所述数字签名参数r不满足有效性判定条件,既可以由有效性判定单元408触发随机数发生器404重新生成随机数,也可以通过另外设置的控制单元触发随机数发生器404重新生成随机数。
所述大整数运算单元407还用于,利用私钥dA、所述随机数发生器404生成的所述随机数k、所述数字签名参数r、和椭圆曲线参数n,基于如下公式生成数字签名参数s:s=((1+dA)-1·(r+k)-r)mod n。
所述有效性判定单元408还用于,判断所述大整数运算单元407生成的数字签名参数s是否为0。
如果为0,所述随机数发生器404重新生成取值范围为[1,n-1]的随机数k,所述大整数运算单元407重新生成数字签名参数r,并在所述重新生成的数字签名参数r满足有效性判定条件时,利用所述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、所述重新生成的数字签名参数r、和所述椭圆曲线参数n,重新生成数字签名参数s。
所述数据类型转换单元406还用于,将所述大整数运算单元407最终生成的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串,得到数字签名(r,s)。
参数输出接口单元409,用于输出数字签名(r,s)。
较佳地,生成数字签名参数s时,所述大整数运算单元407具体用于:
将所述数字签名参数r与所述随机数发生器404生成的所述随机数k进行大整数加法运算后,使用大整数加法运算结果对椭圆曲线参数n进行求模运算;
将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
将所述求模运算结果与所述求模逆运算结果进行大整数乘法运算;
将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
在基于图4所示的实施例基础上,较佳地,如果所述有效性判定单元408使用数字签名参数r的有效性判定条件运算结果r+k对数字签名参数r的有效性进行判定,所述大整数运算单元407在生成所述数字签名参数r后,还用于利用生成的数字签名参数r和所述随机数发生器404生成的所述随机数k,生成数字签名参数r的有效性判定条件运算结果r+k;
生成数字签名参数s时,所述大整数运算单元407用于:
使用所述r的有效性判定条件运算结果r+k对椭圆曲线参数n进行求模运算;
将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
将所述求模运算结果与所述求模逆运算结果进行大整数乘法运算;
将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
在基于图4所示的实施例基础上,较佳地,如果所述有效性判定单元408使用数字签名参数r的有效性判定条件运算结果(r+k)mod n对数字签名参数r的有效性进行判定,所述大整数运算单元407在生成所述数字签名参数r后,还用于利用生成的数字签名参数r、所述随机数发生器404生成的所述随机数k和椭圆曲线参数n,生成数字签名参数r的有效性判定条件运算结果(r+k)mod n;
生成数字签名参数s时,所述大整数运算单元407用于:
将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
将所述r的有效性判定条件运算结果(r+k)mod n与所述求模逆运算结果进行大整数乘法运算;
将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
在基于图4所示的任意实施例基础上,大整数运算单元407所使用的私钥dA可以由本装置生成,也可以从外部获取。下面举例说明:
方式一:
本申请实施例提供的装置还包括密钥生成单元和密钥存储单元。密钥生成单元用于生成所述私钥dA;密钥存储单元用于保存所述密钥生成单元生成的所述私钥dA
相应的,所述大整数运算单元407从所述密钥存储单元中获取所述私钥dA以生成数字签名参数s。
方式二:
参数输入接口单元401还用于获取所述私钥dA
相应的,所述大整数运算单元407从所述参数输入接口单元401获取所述私钥dA以生成数字签名参数s。
方式三:
本申请实施例提供的装置还包括密钥存储单元。
所述参数输入接口单元401还用于获取所述私钥dA;所述密钥存储单元用于保存所述参数输入接口单元401获取的所述私钥dA
相应的,所述大整数运算单元407从所述密钥存储单元获取所述私钥dA以生成数字签 名参数s。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种生成数字签名的方法,其特征在于,包括:
    装置生成满足有效性判定条件的数字签名参数r;
    所述装置利用私钥dA、取值范围为[1,n-1]的随机数k、所述数字签名参数r、和椭圆曲线参数n,基于如下公式生成数字签名参数s:
    s=((1+dA)-1·(r+k)-r)mod n;
    所述装置判断生成的数字签名参数s是否为0,如果为0,重新生成满足有效性判定条件的数字签名参数r,并利用所述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、所述重新生成的数字签名参数r、和所述椭圆曲线参数n,重新生成数字签名参数s,直至所述数字签名参数s不为0;
    所述装置将最终得到的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串,得到数字签名(r,s)。
  2. 根据权利要求1所述的方法,其特征在于,所述装置基于s=((1+dA)-1·(r+k)-r)mod n,生成数字签名参数s,包括:
    所述装置将数字签名参数r与随机数k进行大整数加法运算后,使用大整数加法运算结果对椭圆曲线参数n进行求模运算;
    所述装置将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
    所述装置将求模运算与求模逆运算的运算结果进行大整数乘法运算;
    所述装置将该大整数乘法运算结果减去数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
  3. 根据权利要求1或2所述的方法,其特征在于,生成数字签名参数s之前,该方法还包括:
    所述装置获取r的有效性判定条件运算结果r+k,以便利用私钥dA、r的有效性判定条件运算结果r+k、所述数字签名参数r、和椭圆曲线参数n生成数字签名参数s。
  4. 根据权利要求1或2所述的方法,其特征在于,生成数字签名参数s之前,该方法还包括:
    所述装置获取r的有效性判定条件运算结果(r+k)mod n,以便利用私钥dA、r的有效性判定条件运算结果(r+k)mod n、所述数字签名参数r、和椭圆曲线参数n生成数字签名参数s。
  5. 一种生成数字签名的装置,包括:
    参数输入接口单元,用于获取杂凑值ZA和待签名的消息M;
    级联运算单元,用于将所述参数输入接口单元获取的杂凑值ZA和待签名的消息M进行级联运算,生成
    Figure PCTCN2014084380-appb-100001
    密码杂凑算法运算单元,用于将所述级联运算单元生成的
    Figure PCTCN2014084380-appb-100002
    进行密码杂凑运算,生成消息摘要信息e;
    随机数发生器,用于生成取值范围为[1,n-1]的随机数k;
    ECC算法运算单元,用于根据所述随机数发生器生成的随机数k进行椭圆曲线算法点乘运算(x1,y1)=kG,得到椭圆曲线点横坐标x1,其中G为椭圆曲线参数;
    数据类型转换单元,用于将所述密码杂凑算法运算单元生成的消息摘要信息e的数据类型转换为整数类型,还用于将所述ECC算法运算单元生成的椭圆曲线点横坐标x1的数据类型转换为整数类型;
    大整数运算单元,用于利用所述数据类型转换单元进行数据类型转换的消息摘要信息e和椭圆曲线点横坐标x1,生成数字签名参数r;
    有效性判定单元,用于对所述大整数运算单元生成的数字签名参数r进行有效性判定;
    如果所述数字签名参数r不满足有效性判定条件,所述随机数发生器重新生成取值范围为[1,n-1]的随机数k;所述ECC算法运算单元根据所述随机数发生器重新生成的随机数k重新得到椭圆曲线点横坐标x1;所述数据类型转换单元对重新得到的椭圆曲线点横坐标x1进行数据类型转换;所述大整数运算单元根据所述消息摘要信息e和重新生成的椭圆曲线点横坐标x1,重新生成数字签名参数r,并利用重新生成的数字签名参数r和重新生成的随机数k,所述有效性判定单元对重新生成的数字签名参数r进行有效性判定;
    其特征在于,所述大整数运算单元还用于,利用私钥dA、所述随机数发生器生成的所述随机数k、所述数字签名参数r、和椭圆曲线参数n,基于如下公式生成数字签名参数s:s=((1+dA)-1·(r+k)-r)mod n;
    所述有效性判定单元还用于,判断所述大整数运算单元生成的数字签名参数s是否为0;
    如果为0,所述随机数发生器重新生成取值范围为[1,n-1]的随机数k,所述大整数运算单元重新生成数字签名参数r,并在所述重新生成的数字签名参数r满足有效性判定条件时,利用所述私钥dA、重新生成的取值范围为[1,n-1]的随机数k、所述重新生成的数字签名参数r、和所述椭圆曲线参数n,重新生成数字签名参数s;
    所述数据类型转换单元还用于,将所述大整数运算单元最终生成的数字签名参数r和不为0的数字签名参数s的数据类型转换为字节串,得到数字签名(r,s);
    参数输出接口单元,用于输出数字签名(r,s)。
  6. 根据权利要求5所述的装置,其特征在于,生成数字签名参数s时,所述大整数运算单元具体用于:
    将所述数字签名参数r与所述随机数发生器生成的所述随机数k进行大整数加法运算后,使用大整数加法运算结果对椭圆曲线参数n进行求模运算;
    将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
    将所述求模运算结果与所述求模逆运算结果进行大整数乘法运算;
    将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
  7. 根据权利要求5所述的装置,其特征在于,如果所述有效性判定单元使用数字签名参数r的有效性判定条件运算结果r+k对数字签名参数r的有效性进行判定,所述大整数运算单元在生成所述数字签名参数r后,还用于利用生成的数字签名参数r和所述随机数发生器生成的所述随机数k,生成数字签名参数r的有效性判定条件运算结果r+k;
    生成数字签名参数s时,所述大整数运算单元用于:
    使用所述r的有效性判定条件运算结果r+k对椭圆曲线参数n进行求模运算;
    将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
    将所述求模运算结果与所述求模逆运算结果进行大整数乘法运算;
    将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
  8. 根据权利要求5所述的装置,其特征在于,如果所述有效性判定单元使用数字签名参数r的有效性判定条件运算结果(r+k)mod n对数字签名参数r的有效性进行判定,所述大整数运算单元在生成所述数字签名参数r后,还用于利用生成的数字签名参数r、所述随机数发生器生成的所述随机数k和椭圆曲线参数n,生成数字签名参数r的有效性判定条件运算结果(r+k)mod n;
    生成数字签名参数s时,所述大整数运算单元用于:
    将私钥dA加1后对椭圆曲线参数n进行求模逆运算;
    将所述r的有效性判定条件运算结果(r+k)mod n与所述求模逆运算结果进行大整数乘法运算;
    将所述大整数乘法运算结果减去所述数字签名参数r后对椭圆曲线参数n进行求模运算,得到数字签名参数s。
  9. 根据权利要求5~8任一项所述的装置,其特征在于,还包括:
    密钥生成单元,用于生成所述私钥dA
    密钥存储单元,用于保存所述密钥生成单元生成的所述私钥dA;所述大整数运算单元从所述密钥存储单元中获取所述私钥dA以生成数字签名参数s。
  10. 根据权利要求5~8任一项所述的装置,其特征在于:
    所述参数输入接口单元还用于获取所述私钥dA;所述大整数运算单元从所述参数输入 接口单元获取所述私钥dA以生成数字签名参数s;或者,
    还包括密钥存储单元;所述参数输入接口单元还用于获取所述私钥dA;所述密钥存储单元用于保存所述参数输入接口单元获取的所述私钥dA;所述大整数运算单元从所述密钥存储单元获取所述私钥dA以生成数字签名参数s。
PCT/CN2014/084380 2013-08-16 2014-08-14 一种生成数字签名的方法及装置 WO2015021934A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP14836006.8A EP3035590B1 (en) 2013-08-16 2014-08-14 Method and device for generating digital signature
KR1020167006251A KR101992270B1 (ko) 2013-08-16 2014-08-14 디지털 서명 생성 방법 및 장치
US14/911,143 US10038561B2 (en) 2013-08-16 2014-08-14 Method and device for generating digital signature
JP2016533807A JP6353536B2 (ja) 2013-08-16 2014-08-14 デジタル署名の生成方法及び装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310363349.7A CN103427997B (zh) 2013-08-16 2013-08-16 一种生成数字签名的方法及装置
CN201310363349.7 2013-08-16

Publications (1)

Publication Number Publication Date
WO2015021934A1 true WO2015021934A1 (zh) 2015-02-19

Family

ID=49652205

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084380 WO2015021934A1 (zh) 2013-08-16 2014-08-14 一种生成数字签名的方法及装置

Country Status (6)

Country Link
US (1) US10038561B2 (zh)
EP (1) EP3035590B1 (zh)
JP (1) JP6353536B2 (zh)
KR (1) KR101992270B1 (zh)
CN (1) CN103427997B (zh)
WO (1) WO2015021934A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259184A (zh) * 2018-01-16 2018-07-06 飞天诚信科技股份有限公司 一种基于用户标识的数字签名、验签方法及装置
CN114205081A (zh) * 2021-12-03 2022-03-18 中国科学院大学 一种保护用户隐私的盲协同签名方法
CN115208615A (zh) * 2022-05-20 2022-10-18 北京科技大学 一种数控系统数据加密传输方法

Families Citing this family (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103427997B (zh) 2013-08-16 2016-06-22 西安西电捷通无线网络通信股份有限公司 一种生成数字签名的方法及装置
CN104683102A (zh) * 2013-11-29 2015-06-03 上海复旦微电子集团股份有限公司 一种sm2签名计算方法和装置
CN103701598B (zh) * 2013-12-05 2017-07-11 武汉信安珞珈科技有限公司 一种基于sm2签名算法的复核签名方法和数字签名设备
US10503510B2 (en) 2013-12-27 2019-12-10 Intel Corporation SM3 hash function message expansion processors, methods, systems, and instructions
US9317719B2 (en) 2014-09-04 2016-04-19 Intel Corporation SM3 hash algorithm acceleration processors, methods, systems, and instructions
US9658854B2 (en) 2014-09-26 2017-05-23 Intel Corporation Instructions and logic to provide SIMD SM3 cryptographic hashing functionality
FR3035986B1 (fr) * 2015-05-06 2018-07-27 Morpho Procede de generation d'une signature de message a partir d'un jeton de signature chiffre a l'aide d'une fonction de chiffrement homomorphique
CN106856431A (zh) * 2015-12-09 2017-06-16 上海华虹集成电路有限责任公司 改进的椭圆曲线数字签名算法及验签方法
FR3045253A1 (fr) * 2015-12-15 2017-06-16 Oberthur Technologies Procede et dispositif de traitement cryptographique
US10341098B2 (en) * 2017-01-24 2019-07-02 Nxp B.V. Method of generating cryptographic key pairs
EP3367716B1 (en) * 2017-02-22 2021-04-21 CTIA - The Wireless Association Mobile message source authentication
CN106712968B (zh) * 2017-02-22 2019-08-30 北京智慧云测科技有限公司 密钥获取方法、数字签名方法和装置
CN106899413B (zh) * 2017-04-07 2020-05-08 深圳奥联信息安全技术有限公司 数字签名验证方法及系统
CN107040385B (zh) * 2017-05-23 2020-10-27 广东工业大学 一种基于sm2椭圆曲线的签名验证算法的实现方法及系统
CN107294720A (zh) * 2017-07-07 2017-10-24 广东工业大学 一种素域Fp下的SM2椭圆曲线公钥加密算法的硬件实现系统
CN109936455B (zh) * 2017-12-19 2022-06-07 航天信息股份有限公司 一种数字签名的方法、装置和系统
CN110278073B (zh) * 2018-03-14 2021-11-02 西安西电捷通无线网络通信股份有限公司 一种群组数字签名、验证方法及其设备和装置
CN110278082B (zh) * 2018-03-14 2021-11-16 西安西电捷通无线网络通信股份有限公司 一种群组数字签名的群组成员发布方法和设备
CN108667621A (zh) * 2018-05-14 2018-10-16 河南科技大学 一种椭圆曲线数字签名方法
CN108809658B (zh) * 2018-07-20 2021-06-01 武汉大学 一种基于sm2的身份基的数字签名方法与系统
CN109698751A (zh) * 2018-11-09 2019-04-30 北京中宇万通科技股份有限公司 数字签名生成及验签方法、计算机设备和存储介质
CN109586912B (zh) * 2018-11-09 2020-04-07 天津海泰方圆科技有限公司 一种sm2数字签名的生成方法、系统、设备及介质
CN109872155A (zh) * 2019-02-22 2019-06-11 矩阵元技术(深圳)有限公司 数据处理方法和装置
EP3673616A4 (en) * 2019-05-31 2020-10-28 Advanced New Technologies Co., Ltd. PUBLIC KEY RESTORATION PROCESS BASED ON AN SM2 SIGNATURE
CN110493003B (zh) * 2019-06-24 2021-08-17 广东工业大学 一种基于四基二进制底层模运算的快速加密系统
CN110365487A (zh) * 2019-07-19 2019-10-22 北京向芯力科技有限公司 一种基于sm2算法的协同签名方法与装置
CN110535636B (zh) * 2019-07-19 2022-04-15 北京向芯力科技有限公司 一种轻量级的基于sm2算法的协同签名方法与装置
KR102449817B1 (ko) * 2019-09-17 2022-09-30 (주)라닉스 확장함수를 이용한 복수의 묵시적 인증서 발급 시스템 및 그 발급 방법
CN110990896B (zh) * 2019-12-03 2023-01-06 成都卫士通信息产业股份有限公司 基于sm2白盒的数字签名装置、方法、存储介质及设备
CN111147250B (zh) * 2019-12-18 2022-08-02 北京江南天安科技有限公司 一种数字签名方法、装置、发送端、接收端及系统
CN111162907B (zh) * 2019-12-28 2023-05-23 飞天诚信科技股份有限公司 一种协商密钥的生成方法及智能卡设备
CN111475856B (zh) * 2020-04-03 2023-12-22 数据通信科学技术研究所 数字签名方法和验证数字签名的方法
CN111861474A (zh) * 2020-08-04 2020-10-30 晋商博创(北京)科技有限公司 基于cpk的转账方法、用户终端及云端服务器
CN112152808B (zh) * 2020-09-27 2022-11-11 成都国泰网信科技有限公司 一种基于sm2算法的多方协同数字签名方法
CN112152807B (zh) * 2020-09-27 2022-11-11 成都国泰网信科技有限公司 一种基于sm2算法的两方协同数字签名方法
CN112100644B (zh) * 2020-11-19 2021-03-16 飞天诚信科技股份有限公司 一种生成数据签名的方法及装置
CN112737778B (zh) * 2020-12-30 2022-08-12 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) 数字签名生成、验证方法及装置、电子设备及存储介质
CN114285577B (zh) * 2021-04-27 2024-05-03 博雅中科(北京)信息技术有限公司 多方协同签名方法及系统
CN113190862B (zh) * 2021-05-10 2023-01-06 成都卫士通信息产业股份有限公司 基于sm2的无证书密钥生成方法、装置、电子设备及介质
CN113992329B (zh) * 2021-10-28 2023-04-07 深圳前海微众银行股份有限公司 一种区块链下基于sm2的交易签名方法、装置、设备及介质
CN114257380A (zh) * 2021-12-20 2022-03-29 湖南国科微电子股份有限公司 一种数字签名方法、系统及设备
CN114928438A (zh) * 2022-02-10 2022-08-19 中国科学院信息工程研究所 抗内存信息泄露攻击的椭圆曲线数字签名计算方法及装置
CN114338049B (zh) * 2022-03-14 2022-07-05 山东区块链研究院 基于模归约的国密算法sm2的快速实现方法及系统
CN116032490B (zh) * 2023-01-09 2023-10-03 郑州轻工业大学 一种基于改进SM2算法的Fabric区块链构建方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610153A (zh) * 2008-06-20 2009-12-23 航天信息股份有限公司 基于椭圆曲线签名算法的电子签章认证方法
CN102761415A (zh) * 2011-04-27 2012-10-31 航天信息股份有限公司 p元域SM2椭圆曲线的数字签名生成、验证及混合系统
CN103427997A (zh) * 2013-08-16 2013-12-04 西安西电捷通无线网络通信股份有限公司 一种生成数字签名的方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100363253B1 (ko) 2000-01-07 2002-11-30 삼성전자 주식회사 통신에서 비밀키를 생성하는 방법 및 그 장치
JP4193176B2 (ja) 2003-11-11 2008-12-10 学校法人金沢工業大学 楕円曲線整数倍演算装置、ならびにその装置を利用可能な鍵生成装置、暗号化装置および復号装置
CA2542556C (en) * 2005-06-03 2014-09-16 Tata Consultancy Services Limited An authentication system executing an elliptic curve digital signature cryptographic process
US8027466B2 (en) * 2007-03-07 2011-09-27 Research In Motion Limited Power analysis attack countermeasure for the ECDSA
US20090016523A1 (en) * 2007-07-12 2009-01-15 Atmel Corporation Masking and Additive Decomposition Techniques for Cryptographic Field Operations
US8971528B2 (en) * 2013-01-29 2015-03-03 Certicom Corp. Modified elliptic curve signature algorithm for message recovery

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610153A (zh) * 2008-06-20 2009-12-23 航天信息股份有限公司 基于椭圆曲线签名算法的电子签章认证方法
CN102761415A (zh) * 2011-04-27 2012-10-31 航天信息股份有限公司 p元域SM2椭圆曲线的数字签名生成、验证及混合系统
CN103427997A (zh) * 2013-08-16 2013-12-04 西安西电捷通无线网络通信股份有限公司 一种生成数字签名的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259184A (zh) * 2018-01-16 2018-07-06 飞天诚信科技股份有限公司 一种基于用户标识的数字签名、验签方法及装置
CN114205081A (zh) * 2021-12-03 2022-03-18 中国科学院大学 一种保护用户隐私的盲协同签名方法
CN114205081B (zh) * 2021-12-03 2023-12-19 中国科学院大学 一种保护用户隐私的盲协同签名方法
CN115208615A (zh) * 2022-05-20 2022-10-18 北京科技大学 一种数控系统数据加密传输方法
CN115208615B (zh) * 2022-05-20 2023-12-19 北京科技大学 一种数控系统数据加密传输方法

Also Published As

Publication number Publication date
KR101992270B1 (ko) 2019-06-24
JP2016528555A (ja) 2016-09-15
EP3035590B1 (en) 2018-11-21
JP6353536B2 (ja) 2018-07-04
EP3035590A1 (en) 2016-06-22
EP3035590A4 (en) 2016-08-17
CN103427997B (zh) 2016-06-22
US10038561B2 (en) 2018-07-31
CN103427997A (zh) 2013-12-04
KR20160042435A (ko) 2016-04-19
US20160191252A1 (en) 2016-06-30

Similar Documents

Publication Publication Date Title
WO2015021934A1 (zh) 一种生成数字签名的方法及装置
WO2020253234A1 (zh) 实现隐私保护的数据同态加解密方法及装置
US20200366477A1 (en) Elliptic Curve Random Number Generation
US10778410B2 (en) Homomorphic data encryption method and apparatus for implementing privacy protection
EP2787682B1 (en) Key negotiation method and apparatus according to sm2 key exchange protocol
JP2012014203A5 (zh)
CN106571925B (zh) 对区块链系统中的区块进行工作量证明的方法及装置
JP6120961B2 (ja) 特定フォーマットを有する代替データの生成および検証
CN105515778B (zh) 云存储数据完整性服务签名方法
US20150071435A1 (en) Identity based encryption
US20170207914A1 (en) Computer-readable recording medium, shared key generation method, and information processing terminal
CN112737778B (zh) 数字签名生成、验证方法及装置、电子设备及存储介质
CN107463849B (zh) 基于单服务器的隐私信息恢复方法
US20200213100A1 (en) Multi-chain information management method, storage medium and blockchain identity parser
CN107947943B (zh) 一种在线离线循环非平衡油醋签名方法
CN113708927A (zh) 基于sm2数字签名的泛指定验证者签名证明系统
CN112434269A (zh) 文件的零知识证明方法、验证方法、计算设备和存储介质
CN111030823A (zh) 超轻量级多次签名的数据处理方法、系统、物联网平台
JP5528842B2 (ja) ハッシングする方法及び装置
CN117118637B (zh) 数据处理方法、装置、设备及计算机可读存储介质
CN111654369B (zh) 一种安全性仅依赖于离散对数的数字签名方法及系统
US9479193B2 (en) Apparatus and method for performing compression operation in hash algorithm
JP4914377B2 (ja) 署名生成装置、署名検証装置、署名生成検証システム、それらの方法及びプログラム
CN116628765A (zh) 一种基于新型卷积数据安全保护方法
JP2010256565A (ja) ハッシュ値演算装置、方法、プログラム及びその記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14836006

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14911143

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2016533807

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2014836006

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20167006251

Country of ref document: KR

Kind code of ref document: A