Operation method, system and equipment for realizing digital signature and medium

Through independent operations of the central processor, hash processing module and public key cryptography algorithm module, the problem of high resource consumption in complex operations is solved, and efficient digital signature calculation and performance improvement is achieved.

CN119011152APending Publication Date: 2024-11-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411144555.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When handling complex coordinate operations, existing digital signature technology consumes a large amount of system resources, resulting in performance degradation and slow response, especially under the limited computing resources of SOC systems.

Method used

Through the independent existence of the central processor, hash processing module, true random number generator and public key cryptography algorithm module, digital signature operation is realized, avoiding the occupation of other system resources, and hashing is used to use the base point coordinates of the elliptic curve point and the true random number for hashing and judged value calculation to generate a digital signature.

Benefits of technology

It realizes independent completion of digital signature operations, avoids the use of other system resources, improves overall performance, and ensures the security and efficiency of digital signatures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011152A_ABST
    Figure CN119011152A_ABST
Patent Text Reader

Abstract

The invention provides an operation method and system for realizing digital signature, equipment and a medium, mainly relates to the technical field of digital signature, and is used for solving the problems that a large amount of system resources may be consumed, the overall performance is reduced and the like due to the fact that the existing scheme needs support of the system during operation. Comprising the following steps: splicing a password parameter and a to-be-signed message through a central processing unit to obtain a spliced character string; a Hash result is obtained through a Hash processing module; obtaining an X-axis calculated value through a public key cryptographic algorithm module; the central processing unit obtains a first judgment value, and when the central processing unit determines that the first judgment value does not meet a preset first relation, a public key cryptographic algorithm module is called, and a second judgment value is obtained through calculation; when the first judgment value meets a preset first relation or the second judgment value meets a preset second relation, updating the true random number; and when the second judgment value does not meet the preset second relationship, generating a digital signature comprising the first judgment value and the second judgment value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital signatures, and more specifically to an operation method, system, device and medium for realizing digital signatures. Background Art

[0002] Digital signature is a way of signing by generating a series of symbols and codes through cryptographic operations, which is used to replace traditional written signatures or seals. It is based on the principle of public key encryption algorithm and hash function, ensuring the unforgeability of signatures and the integrity of data. Specifically, a digital signature is a string of numbers that can only be generated by the sender of the information and cannot be forged by others. This string of numbers is also a valid proof of the authenticity of the information sent by the sender.

[0003] The existing digital signature workflow usually includes two steps: signing and verification. During the signing process, the sender uses his own private key to encrypt the hash value of the data, generate a digital signature, and send it to the receiver together with the original text. After receiving the data, the receiver uses the sender's public key to decrypt the digital signature, obtain the hash value of the original data, and compare it with the hash value calculated by himself for the original text. If the two are consistent, it proves that the data has not been tampered with during transmission and is indeed from the claimed sender. However, the above scheme requires the support of the SOC (System on Chip) system and other systems during operation, but the SOC system has limited computing resources and memory resources. If the program needs to process a large number of coordinate operations and these operations are complex (for example, involving a large number of floating-point operations or matrix operations), it may consume a lot of system resources, resulting in overall performance degradation or slow system response. Summary of the invention

[0004] In view of the above problems, the purpose of the present invention is to provide a calculation method, system, device and medium for realizing digital signature, which can realize digital signature independently. When the central processing unit, hash processing module, true random number generator and public key cryptographic algorithm module are running, they exist independently from other running systems and do not affect each other, thus avoiding occupying other system resources and affecting the overall performance.

[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions: In the first aspect, the present invention discloses a method for realizing digital signature operation, the method comprising: obtaining the password parameters, the message to be signed and the private key corresponding to the signing user through a central processing unit; performing splicing processing on the password parameters and the message to be signed to obtain a spliced ​​string; wherein the central processing unit is respectively connected to a hash processing module, a true random number generator and a public key cryptographic algorithm module; performing hash processing on the spliced ​​string through the hash processing module to obtain a hash result; generating a true random number that meets the preset conditions through the true random number generator; generating a true random number that meets the preset conditions through the public key cryptographic algorithm module according to the base point coordinates of the built-in elliptic curve point and the true random number generator; generating a true random number that meets the preset conditions through the public key cryptographic algorithm module ... A random number is used to obtain an X-axis calculation value; a hash result is sent to a public key cryptographic algorithm module through a central processing unit, and then a first judgment value is obtained based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate and obtain a second judgment value based on the private key, the true random number and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, a true random number generator is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

[0006] Furthermore, after generating the digital signature including the first judgment value and the second judgment value, the method further includes: outputting the message to be signed and the digital signature through a central processing unit.

[0007] Furthermore, a true random number generator is used to generate a true random number that meets preset conditions, specifically including: a preset n value is built into a public key cryptographic algorithm module; the n value is uploaded to a central processing unit; and the n value is then sent to the true random number generator through the central processing unit; an initial true random number is generated through the true random number generator, and when the initial random number falls within the range of [1, n-1], the current initial random number is determined to be a true random number that meets the preset conditions; otherwise, the initial true random number is generated again until a true random number that falls within the range of [1, n-1] is obtained.

[0008] Furthermore, the X-axis calculation value is obtained according to the base point coordinates and true random numbers of the built-in elliptic curve points through the public key cryptographic algorithm module, specifically including: obtaining the true random number K sent by the central processor; the public key cryptographic algorithm module obtains the stored base point coordinates ( , ); wherein the public key cryptographic algorithm module also includes a domain operation component.

[0009] Calculate the X-axis value through the preset execution steps in the domain operation component: Step 1: Generate P1( , ) = ( , )、P2( , ) = ( , );in, and is the preset value; set the initial value of N to 1.

[0010] Step 2: By formula:

[0011] calculate Value; among them, The default system parameter value.

[0012] Step 3: By formula: , , calculate P3 ( , ), and execute N=N+1.

[0013] Step 4: In P1 The specific value of is updated to P3 , change P1 The specific value of is updated to P3 .

[0014] Step 5: By formula:

[0015] renew value.

[0016] Step 6: By formula: , , update P3 ( , ), and execute N=N+1; determine whether N=(K-1) is true; if true, the current P3 corresponding Calculate the value for the X axis; if not true, loop back to step 4.

[0017] Further, the central processing unit sends a hash result to the public key cryptographic algorithm module, and then obtains a first judgment value based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate and obtain a second judgment value based on the private key, the true random number, and the first judgment value. Specifically, the central processing unit obtains the hash result uploaded by the hash processing module; transmits the hash result and the X-axis calculation value to the public key cryptographic algorithm module, and sends a preset R calculation instruction; wherein the public key cryptographic algorithm module includes a domain operation component, a configuration information storage component, and an inverse operation component; through the preset formula in the domain operation component:

[0018] The first judgment value R is obtained by calculation; wherein e represents the hash result, represents the X-axis calculation value, mod represents the preset finite field modulo operation, and n represents the n value stored in the configuration information storage component; the first judgment value is read back by the central processing unit; when the first judgment value is not equal to 0 and the sum of the first judgment value and the hash result is not equal to n, the public key cryptography algorithm module is called; the central processing unit sends a preset S calculation instruction to the public key cryptography algorithm module.

[0019] By using the preset formula in the domain operation component: S

[0020] The second judgment value S is obtained by calculation; wherein, Call the inverse operation component to calculate and obtain, Indicates the private key, and -1 indicates the inverse operation.

[0021] Further, when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator is called to update the true random number, specifically including: when the first judgment value is equal to 0 or the sum of the first judgment value and the hash result is equal to n, using the true random number generator to update the true random number; when the second judgment value is equal to 0, calling the true random number generator to update the true random number.

[0022] Further, the cryptographic parameters include a preset identifiable identifier, a preset elliptic curve system parameter, and a public key hash value.

[0023] In a second aspect, the present invention further discloses a computing system for implementing digital signatures, the system comprising: A central processing unit, a hash processing module, a true random number generator and a public key cryptographic algorithm module connected to the central processing unit; wherein the central processing unit is used to obtain the password parameters, the message to be signed and the private key corresponding to the signing user; the password parameters and the message to be signed are spliced ​​to obtain a spliced ​​string; wherein the central processing unit is respectively connected to the hash processing module, the true random number generator and the public key cryptographic algorithm module; the hash processing module is used to perform hash processing on the spliced ​​string to obtain a hash result; the true random number generator is used to generate a true random number; the public key cryptographic algorithm module is used to generate a hash result according to the base point coordinates of the built-in elliptic curve point and a true random number to obtain an X-axis calculation value; the central processing unit is also used to send a hash result to the public key cryptographic algorithm module, and then obtain a first judgment value based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate and obtain a second judgment value based on the private key, the true random number and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

[0024] In a third aspect, the present invention further discloses a computing device for implementing a digital signature, comprising: a memory for storing a computing program for implementing a digital signature; and a processor for implementing the steps of any of the above-mentioned computing methods for implementing a digital signature when executing the computing program for implementing a digital signature.

[0025] In a fourth aspect, the present invention further discloses a readable storage medium, on which is stored a calculation program for implementing a digital signature. When the calculation program for implementing a digital signature is executed by a processor, the steps of the calculation method for implementing a digital signature as described above are implemented.

[0026] Compared with the prior art, the beneficial effect of the present invention is that: the present application discloses a method, system, device and medium for realizing digital signature, which can jointly complete the digital signature function through the scheduling hardware hash processing module, true random number generator and public key cryptographic algorithm module of the central controller. In addition, when the central processing unit, hash processing module, true random number generator and public key cryptographic algorithm module are running, they exist independently from other running systems and do not affect each other, thus avoiding the problem of occupying other system resources and affecting the overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0028] Figure 1 It is a method flow chart of a specific implementation mode of the present invention.

[0029] Figure 2 It is a structural schematic diagram corresponding to the method of a specific implementation mode of the present invention.

[0030] Figure 3 It is a schematic diagram of the internal structure of the hash processing module according to a specific embodiment of the present invention.

[0031] Figure 4 It is a schematic diagram of the internal structure of the public key cryptographic algorithm module of a specific implementation method of the present invention.

[0032] Figure 5 It is an overall exemplary flow chart of the method according to a specific embodiment of the present invention.

[0033] Figure 6 It is a schematic diagram of the system structure of a specific implementation mode of the present invention.

[0034] Figure 7 It is a device structure diagram in a specific implementation manner of the present invention.

[0035] Description of reference numerals: 610, central processing unit; 620, hash processing module; 630, true random number generator; 640, public key cryptographic algorithm module. DETAILED DESCRIPTION

[0036] The core of the present invention is to provide a method, system, device and medium for realizing digital signature, which can realize digital signature independently through the preset interface scheduling of hash processing module, true random number generator and public key cryptographic algorithm module in the central processing unit. The present application completes the digital signature function through the scheduling of the central processing unit and the hash processing module, true random number generator and public key cryptographic algorithm module.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0038] The key terms appearing in the present invention are explained below.

[0039] sm2: SM2 Elliptic Curve Public Key Cryptography, sm2 is an elliptic curve public key cryptography algorithm with signature function.

[0040] sm3: SM3 cryptographic hash algorithm is a cryptographic hash algorithm that can generate summary information of fixed length through calculation from a string of data.

[0041] TRNG: True Random Number Generator, true random number generator.

[0042] Digital signature: A string of numbers that can only be generated by the sender of the information and cannot be forged by others. This string of numbers is also a valid proof of the authenticity of the information sent by the sender.

[0043] CPU: Central Processing Unit.

[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0045] This embodiment provides a method for implementing a digital signature operation. Figure 1 As shown, the following steps are included: S1: Obtain the password parameters, the message to be signed and the private key corresponding to the signing user through the central processor; concatenate the password parameters and the message to be signed to obtain a concatenated string.

[0046] It should be noted that the carrier of the operation method for realizing the digital signature, such as Figure 2As shown, the central processing unit is connected to the hash processing module, the true random number generator and the public key cryptographic algorithm module respectively. The central processing unit obtains the password parameters, the message to be signed and the private key corresponding to the signing user through the input interface, and returns through the output interface after calling the module and obtaining the final digital signature. The hash processing module can be a component or device capable of running the sm3 algorithm, the true random number generator can be a TRNG (True Random Number Generator), and the public key cryptographic algorithm module can be a component or device capable of running the sm3 algorithm. In addition, the connection between the central processing unit and the hash processing module, the true random number generator and the public key cryptographic algorithm module can be connected through an AHB bus (Advanced High-performance Bus).

[0047] In a specific implementation, the central processor obtains the cryptographic parameters, the message to be signed and the private key corresponding to the signing user through the input interface. As an example, when the public key cryptographic algorithm module is a component or device capable of running the sm3 algorithm, the cryptographic parameters include a preset identifiable identifier, a preset elliptic curve system parameter and a public key hash value.

[0048] In addition, the central processing unit, hash processing module, true random number generator and public key cryptographic algorithm module can be integrated in the SOC system. After the system is started, the entire system starts to operate, the central processing unit is in working state, and the hash processing module, true random number generator and public key cryptographic algorithm module are initialized.

[0049] S2: Perform hash processing on the concatenated string through the hash processing module to obtain a hash result.

[0050] In a specific implementation, the hash processing module may be a component or device capable of running the sm3 algorithm, such as Figure 3 As shown, the hash processing module includes sm3_cfg component and sm3_core component; specifically, sm3_cfg is a register module, which contains preset configuration information corresponding to the sm3 algorithm in the hash processing module, such as the total length of the message to be hashed, the sm3 start signal, the sm3 calculation result, etc.; the sm3_core component is a component that can implement the entire sm3 algorithm, and the concatenated string is hashed through the sm3_core component to obtain the hash result. The entire hash processing module is connected to the central processing unit through the ahb bus, and the hash processing module is controlled by the central processing unit.

[0051] S3: Generate a true random number that meets the preset conditions through a true random number generator.

[0052] In a specific implementation, this step implements a process of generating a true random number. The process of generating a true random number that meets the preset conditions through a true random number generator is as follows: A preset n value is built into the public key cryptographic algorithm module; the n value is uploaded to the central processing unit; and then the n value is sent to the true random number generator through the central processing unit; an initial true random number is generated through the true random number generator, and when the initial random number falls within the range of [1, n-1], the current initial random number is determined to be a true random number that meets the preset conditions; otherwise, the initial true random number is generated again until a true random number falling within the range of [1, n-1] is obtained.

[0053] It should be noted that the n value is a fixed value in the public key cryptographic algorithm module, and may be FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123 in hexadecimal.

[0054] S4: Obtain the X-axis calculation value through the public key cryptographic algorithm module according to the base point coordinates of the built-in elliptic curve point and the true random number.

[0055] It should be noted that the public key cryptographic algorithm module has a built-in elliptic curve point base point coordinate ( , ); As an example, =0x32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7, =0xBC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0.

[0056] In addition, the public key cryptographic algorithm module can be subdivided into a configuration information storage component, a domain operation component, and an inverse operation component. As an example, the public key cryptographic algorithm module can be a component or device capable of running the SM2 algorithm, including addition, subtraction, multiplication and inverse operations, operations to calculate the X-axis calculation value, and operations to calculate the second judgment value. Figure 4As shown, the public key cryptographic algorithm module includes the sm2_opr component (domain operation component), the sm2_cfg component (configuration information storage component), and the sm2_inv component (inverse operation component); the operations of addition, subtraction, multiplication, and the second judgment value are performed in a preset finite field, and the X-axis calculation value is performed in the elliptic curve field. The operation of the X-axis calculation value needs to be realized by using the addition, subtraction, and multiplication of the finite field in the sm2_opr component; sm2_cfg is the following register configuration information, including the data register to be calculated, the result register of the calculation, and the command register (controlling the calculation to be completed). Figure 4 The entire public key cryptographic algorithm is connected to the central processing unit through the ahb bus and is controlled by the central processing unit. Figure 4 When the second judgment value is obtained, the inverse operation in sm2_inv and the preset finite field addition, subtraction and multiplication operations in sm2_opr are needed.

[0057] In a specific implementation, the specific process of obtaining the X-axis calculated value may be: Get the true random number K sent by the CPU; the public key cryptography algorithm module gets the stored base point coordinates ( , ); wherein the public key cryptographic algorithm module also includes a domain operation component.

[0058] Calculate the X-axis value through the preset execution steps in the domain operation component: Step 1: Generate P1( , ) = ( , )、P2( , ) = ( , );in, and is the preset value; set the initial value of N to 1.

[0059] Step 2: By formula:

[0060] calculate Value; among them, is the preset system parameter value. As an example, =FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC.

[0061] Step 3: By formula: , , calculate P3 ( , ), and execute N=N+1.

[0062] Step 4: In P1 The specific value of is updated to P3 , change P1 The specific value of is updated to P3 .

[0063] Step 5: By formula:

[0064] renew value.

[0065] Step 6: By formula: , , update P3 ( , ), and execute N=N+1; determine whether N=(K-1) is true; if true, the current P3 corresponding Calculate the value for the X axis; if not true, loop back to step 4.

[0066] S5: Send the hash result to the public key cryptographic algorithm module through the central processing unit, and then obtain the first judgment value based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate the second judgment value based on the private key, the true random number, and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

[0067] It should be noted that the execution subject for calculating the first judgment value is the central processing unit.

[0068] In a specific implementation manner, this step implements sending a hash result to a public key cryptographic algorithm module through a central processor, and then obtaining a first judgment value based on the X-axis calculation value and the hash result. When the central processor determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate and obtain a second judgment value based on a private key, a true random number, and the first judgment value, specifically including: The central processor obtains the hash result uploaded by the hash processing module; transmits the hash result and the X-axis calculation value to the public key cryptography algorithm module, and issues the preset R calculation instruction. Among them, the public key cryptography algorithm module includes a domain operation component, a configuration information storage component, and an inverse operation component; By using the preset formula in the domain operation component:

[0069] The first judgment value R is obtained by calculation; wherein e represents the hash result, represents the calculated value of the X-axis, mod represents the preset finite field modulo operation, and n represents the n value stored in the configuration information storage component.

[0070] The first judgment value is read back through the central processing unit; when the first judgment value is not equal to 0 and the sum of the first judgment value and the hash result is not equal to n, the public key cryptographic algorithm module is called.

[0071] The CPU sends the preset S calculation instruction to the public key cryptographic algorithm module; through the preset formula in the domain operation component: S

[0072] The second judgment value S is obtained by calculation; wherein, Call the inverse operation component to calculate and obtain, Indicates the private key, and -1 indicates the inverse operation.

[0073] In addition, this step implements calling a true random number generator to update a true random number when the first judgment value satisfies a preset first relationship or the second judgment value satisfies a preset second relationship, which may be specifically: When the first judgment value is equal to 0 or the sum of the first judgment value and the hash result is equal to n, the true random number generator is used to update the true random number; when the second judgment value is equal to 0, the true random number generator is called to update the true random number.

[0074] In addition, after generating the digital signature including the first judgment value and the second judgment value, the method may further: output the message to be signed and the digital signature through the central processing unit.

[0075] The present invention provides a method for realizing a digital signature operation, which can realize a digital signature independently by setting a preset interface in a central processing unit to schedule the internal programs of a hash processing module, a true random number generator, and a public key cryptographic algorithm module. In addition, when the central processing unit, the hash processing module, the true random number generator, and the public key cryptographic algorithm module are running, they exist independently from other running systems and do not affect each other, thereby avoiding the problem of occupying other system resources and affecting the overall performance.

[0076] Also, see Figure 4As shown, the operation method for implementing the digital signature can be specifically as follows: CPU, obtained through the input port ,M, .

[0077] Step 1, pass 、M splice “||” to get .

[0078] In step 2, the central processing unit calls the hash processing module (the hash processing algorithm can be the SM3 algorithm), transmits the value obtained by splicing in step 1 to the hash processing module, calculates the hash value, and reads the calculated result back to the central processing unit.

[0079] In step 3, the CPU obtains a random number k from the true random number generator (TRNG) and determines the value range of the random number. If k∈[1,n-1] is satisfied, step 5 is executed. If k does not satisfy k∈[1,n-1], random numbers are continuously obtained from the TRNG until it is satisfied.

[0080] In step 4, the CPU calls the public key cryptographic algorithm module (the public key cryptographic algorithm can be the sm2 algorithm) to calculate [K]G, where G is the base point coordinate. In this step, the CPU only needs to inform the public key cryptographic algorithm module of the K value and the command to perform the [K]G operation. The coordinate value of G has been solidified in the public key cryptographic algorithm module, and the CPU does not need to transmit the value of G to the public key cryptographic algorithm module, which reduces the communication time between the CPU and the public key cryptographic algorithm module. After the calculation is completed, the CPU reads the result back from the public key cryptographic algorithm module.

[0081] In step 5, the CPU transmits the hash value calculated in step 2 and the x1 value obtained in step 4 to the public key cryptographic algorithm module through the AHB bus, and at the same time sends the command to calculate the addition to the public key cryptographic algorithm module to complete the calculation, and reads back the calculated result. At the same time, it is necessary to judge the results of r and r+k. When one of the conditions r=0 or r+k=n is met, jump to step 3 and regenerate the random number k, otherwise execute step 6.

[0082] In step 6, the CPU passes the k obtained in step 3 and the r obtained in step 5 to the public key cryptographic algorithm module through the AHB bus, and at the same time passes the command to calculate s to the public key cryptographic algorithm module. When the public key cryptographic algorithm module completes the calculation, it reads the calculated s result back to the CPU. And judge the value of s. If s is 0, jump to step 3 and regenerate the random number k, otherwise execute step 7.

[0083] Step 7: Output the message M and the value of (r, s) through the output interface.

[0084] Through the above steps, the user A's data ZA, M, dA generates signature information (r, s), and the final result of the calculation is output from the system through the output interface.

[0085] The present invention also discloses a computing system for realizing digital signature, see Figure 7 As shown, the system includes: a central processing unit 610, a hash processing module 620 connected to the central processing unit 610, a true random number generator 630 and a public key cryptographic algorithm module 640.

[0086] Among them, the central processing unit 610 is used to obtain the cryptographic parameters, the message to be signed and the private key corresponding to the signing user; the cryptographic parameters and the message to be signed are concatenated to obtain a concatenated string; wherein the central processing unit 610 is respectively connected to the hash processing module 620, the true random number generator 630 and the public key cryptographic algorithm module 640.

[0087] The hash processing module 620 is used to perform hash processing on the concatenated character string to obtain a hash result.

[0088] The true random number generator 630 is used to generate true random numbers.

[0089] The public key cryptographic algorithm module 640 is used to obtain the X-axis calculation value according to the base point coordinates of the built-in elliptic curve point and the true random number.

[0090] The central processing unit 610 is also used to send the hash result to the public key cryptographic algorithm module 640, and then obtain the first judgment value based on the X-axis calculation value and the hash result. When the central processing unit 610 determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module 640 is called to calculate the second judgment value based on the private key, the true random number, and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator 630 is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

[0091] The specific implementation of the operation system for realizing digital signature in this embodiment is basically the same as the specific implementation of the operation method for realizing digital signature described above, and will not be described in detail here.

[0092] See also Figure 6 As shown, the present invention also discloses the above method embodiments in the present application. Based on the same inventive concept, the present application embodiment also provides a medical data monitoring device in a polar environment. The device includes: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes a medical data monitoring method in a polar environment as in the above embodiment.

[0093] Specifically, the server side obtains the password parameters, the message to be signed and the private key corresponding to the signing user through the central processing unit; concatenates the password parameters and the message to be signed to obtain a concatenated string; wherein the central processing unit is respectively connected to the hash processing module, the true random number generator and the public key cryptographic algorithm module; through the hash processing module, the concatenated string is hashed to obtain a hash result; through the true random number generator, a true random number that meets the preset conditions is generated; through the public key cryptographic algorithm module, according to the base point coordinates of the built-in elliptic curve point and the true random number, the X-axis calculation value is obtained; the hash result is sent to the public key cryptographic algorithm module through the central processing unit, and then based on the X-axis calculation value and the hash result, a first judgment value is obtained; when the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate the second judgment value based on the private key, the true random number and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

[0094] The present invention also discloses a readable storage medium, wherein the readable storage medium includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM or any other form of storage medium known in the technical field. The readable storage medium stores a computing program for implementing a digital signature, and when the computing program for implementing a digital signature is executed by a processor, the following steps are implemented: 1. Obtain the password parameters, the message to be signed and the private key corresponding to the signing user through the central processing unit; concatenate the password parameters and the message to be signed to obtain a concatenated string; wherein the central processing unit is respectively connected to the hash processing module, the true random number generator and the public key cryptographic algorithm module.

[0095] 2. Use the hash processing module to perform hash processing on the concatenated string to obtain the hash result.

[0096] 3. Generate true random numbers that meet preset conditions through a true random number generator.

[0097] 4. Through the public key cryptography algorithm module, the X-axis calculation value is obtained according to the base point coordinates of the built-in elliptic curve point and the true random number.

[0098] 5. Send the hash result to the public key cryptographic algorithm module through the central processing unit, and then obtain the first judgment value based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, call the public key cryptographic algorithm module to calculate and obtain the second judgment value based on the private key, the true random number, and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, call the true random number generator to update the true random number; when the second judgment value does not satisfy the preset second relationship, generate a digital signature including the first judgment value and the second judgment value.

[0099] In summary, the present application can independently implement digital signatures. Specifically, when the central processing unit, hash processing module, true random number generator, and public key cryptographic algorithm module are running, other running systems exist independently and do not affect each other, thus avoiding the problem of occupying other system resources and affecting the overall performance.

[0100] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. As for the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0101] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0102] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.

[0105] Similarly, each processing unit in each embodiment of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units may be integrated into one functional module.

[0106] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0107] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0108] The above is a detailed introduction to the operation method, system, device and readable storage medium for realizing digital signature provided by the present invention. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiment is only used to help understand the method and core idea of ​​the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A method for implementing a digital signature, characterized in that: The method comprises: The cryptographic parameters, the message to be signed and the private key corresponding to the signing user are obtained through the central processing unit; the cryptographic parameters and the message to be signed are concatenated to obtain a concatenated string; wherein the central processing unit is respectively connected to the hash processing module, the true random number generator and the public key cryptographic algorithm module; Through the hash processing module, the concatenated string is hashed to obtain the hash result; Generate true random numbers that meet preset conditions through a true random number generator; Through the public key cryptographic algorithm module, the X-axis calculation value is obtained according to the base point coordinates and true random numbers of the built-in elliptic curve points; The hash result is sent to the public key cryptographic algorithm module through the central processing unit, and then the first judgment value is obtained based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate the second judgment value based on the private key, the true random number, and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

2. The method for implementing digital signature according to claim 1, characterized in that: After generating the digital signature including the first judgment value and the second judgment value, the method further includes: The message to be signed and the digital signature are output through the central processing unit.

3. The method for realizing digital signature according to claim 1, characterized in that: Generate true random numbers that meet preset conditions through a true random number generator, including: A preset n value is built into the public key cryptographic algorithm module; Upload the value of n to the central processor; Then, through the central processing unit, the value of n is sent to the true random number generator; An initial true random number is generated by a true random number generator. When the initial random number falls within the range of [1, n-1], the current initial random number is determined to be a true random number that meets the preset conditions; otherwise, the initial true random number is generated again until a true random number falling within the range of [1, n-1] is obtained.

4. The method for realizing digital signature according to claim 1, characterized in that: Through the public key cryptographic algorithm module, the X-axis calculation value is obtained according to the base point coordinates and true random numbers of the built-in elliptic curve points, including: Get the true random number K sent by the CPU; The public key cryptographic algorithm module obtains the stored base point coordinates ( , ); wherein the public key cryptographic algorithm module also includes a domain operation component; Calculate the X-axis value through the preset execution steps in the domain operation component: Step 1: Generate P1( , ) = ( , )、P2( , ) = ( , );in, and is the preset value; Set the initial value of N to 1; Step 2: By formula: calculate Value; among them, is the preset system parameter value; Step 3: By formula: , , calculate P3 ( , ), and execute N=N+1; Step 4: In P1 The specific value of is updated to P3 , change P1 The specific value of is updated to P3 ; Step 5: By formula: renew value; Step 6: By formula: , , update P3 ( , ), and execute N=N+1; Determine whether N=(K-1)is true; if true, the current P3 corresponds to Calculate the value for the X axis; if not true, loop back to step 4.

5. The method for realizing digital signature according to claim 1, characterized in that: The central processor sends a hash result to the public key cryptographic algorithm module, and then obtains a first judgment value based on the X-axis calculation value and the hash result. When the central processor determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate and obtain a second judgment value based on the private key, the true random number, and the first judgment value, specifically including: The central processing unit obtains the hash result uploaded by the hash processing module; The hash result and the X-axis calculation value are transmitted to the public key cryptographic algorithm module, and a preset R calculation instruction is issued; wherein the public key cryptographic algorithm module includes a domain operation component, a configuration information storage component, and an inverse operation component; By using the preset formula in the domain operation component: The first judgment value R is obtained by calculation; wherein e represents the hash result, represents the calculated value of the X-axis, mod represents the preset finite field modulo operation, and n represents the n value stored in the configuration information storage component; Reading back the first judgment value through the central processing unit; When the first judgment value is not equal to 0 and the sum of the first judgment value and the hash result is not equal to n, calling the public key cryptographic algorithm module; The central processing unit sends a preset S calculation instruction to the public key cryptographic algorithm module; By using the preset formula in the domain operation component: S The second judgment value S is obtained by calculation; wherein, Call the inverse operation component to calculate and obtain, Indicates the private key, and -1 indicates the inverse operation.

6. The method for realizing digital signature according to claim 1, characterized in that: When the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, calling the true random number generator to update the true random number specifically includes: When the first judgment value is equal to 0 or the sum of the first judgment value and the hash result is equal to n, using a true random number generator to update the true random number; When the second judgment value is equal to 0, the true random number generator is called to update the true random number.

7. The method for realizing digital signature according to claim 1, characterized in that: The cryptographic parameters include a preset distinguishable identifier, preset elliptic curve system parameters, and a public key hash value.

8. A computing system for implementing digital signature, characterized in that: The system comprises: A central processing unit, a hash processing module, a true random number generator and a public key cryptographic algorithm module connected to the central processing unit; The central processor is used to obtain the password parameters, the message to be signed and the private key corresponding to the signing user; the password parameters and the message to be signed are spliced ​​to obtain a spliced ​​string; the central processor is respectively connected to the hash processing module, the true random number generator and the public key cryptographic algorithm module; A hash processing module is used to perform hash processing on the concatenated string to obtain a hash result; True random number generator, used to generate true random numbers; The public key cryptographic algorithm module is used to obtain the X-axis calculation value according to the base point coordinates and true random numbers of the built-in elliptic curve points; The central processing unit is also used to send the hash result to the public key cryptographic algorithm module, and then obtain the first judgment value based on the X-axis calculation value and the hash result. When the central processing unit determines that the first judgment value does not satisfy the preset first relationship, the public key cryptographic algorithm module is called to calculate the second judgment value based on the private key, the true random number, and the first judgment value; when the first judgment value satisfies the preset first relationship or the second judgment value satisfies the preset second relationship, the true random number generator is called to update the true random number; when the second judgment value does not satisfy the preset second relationship, a digital signature including the first judgment value and the second judgment value is generated.

9. A computing device for implementing digital signature, characterized in that: The device comprises: processor; and a memory having executable codes stored thereon, which, when the executable codes are executed, enable the processor to execute a calculation method for realizing a digital signature as claimed in any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computing program for implementing a digital signature, and when the computing program for implementing a digital signature is executed by a processor, the steps of the computing method for implementing a digital signature as described in any one of claims 1 to 7 are implemented.