Short signature generation method and device, electronic equipment and computer storage medium

By generating short digital signatures using random numbers and signature factors, the problem of excessively long digital signatures is solved, resulting in a reduction in data volume and an increase in transmission speed.

CN119675878BActive Publication Date: 2026-01-16AISINO CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411884515.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2026-01-16
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In existing technologies, digital signatures are relatively long, resulting in a large amount of data during transmission or storage, which increases the burden of transmission and storage.

Method used

By generating a random number, a signature factor is generated based on the random number. The first private key and the first public key are generated using the signature factor. The first signature part is generated by combining the first hash value with the first signature part. The random number and the first signature part are combined to form a short digital signature.

Benefits of technology

The length of digital signatures has been reduced, making the amount of data to be transmitted or stored for short digital signatures only half that of existing technologies, thereby increasing transmission speed or reducing storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119675878B_ABST
    Figure CN119675878B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a short signature generation method, device, electronic equipment and computer storage medium. The short signature generation method comprises: generating a random number; generating a signature factor according to the random number; generating a first private key and a first public key according to the signature factor; generating a first signature part according to the first private key, the first public key and a pre-generated hash value; and combining the random number and the first signature part to obtain a short digital signature. The short digital signature generated by the short signature generation method provided by the present application has a length smaller than that of a digital signature in the prior art, and the amount of data in the transmission or storage process can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of information security, and in particular, to a short signature generation method and device, electronic equipment and computer storage medium. BACKGROUND

[0002] With the development of cloud platforms, big data, blockchains and other technologies, data security has become a critical issue, and therefore corresponding security technical measures need to be taken for data. As one of the means to protect network information security, a digital signature mechanism can solve problems such as forgery, denial, impersonation and tampering with data, and improve data security.

[0003] At present, a cryptographic device generates a first signature part and a second signature part of a digital signature using a national standard SM2 elliptic curve algorithm, and combines the first signature part and the second signature part to form the digital signature.

[0004] However, when a large number of digital signatures are transmitted or stored, the length of the digital signature formed by the combination of the first signature part and the second signature part is relatively long, resulting in a large amount of data for transmitting or storing the digital signature. SUMMARY

[0005] Therefore, embodiments of the present application provide a short signature generation method and device, electronic equipment and computer storage medium to at least partially solve the above problems.

[0006] According to a first aspect of embodiments of the present application, a short signature generation method is provided, including: generating a random number; generating a signature factor according to the random number; generating a first private key and a first public key according to the signature factor; generating a first signature part according to the first private key, the first public key and a pre-generated hash value; and combining the random number and the first signature part to obtain a short digital signature.

[0007] In a possible implementation manner, the generating a signature factor according to the random number includes: obtaining a signature identifier; obtaining a conversion parameter according to the length of the signature identifier; and calculating the signature factor by a hash algorithm according to pre-computed preprocessing information, the signature identifier, the conversion parameter, to-be-signed information and the random number.

[0008] In a possible implementation manner, the generating a first private key and a first public key according to the signature factor includes: determining N index coordinates according to M bits included in the signature factor, where N is an integer greater than or equal to 2, 2 MThe index range of the combination factor table includes a private key combination factor table and / or a public key combination factor table; N private key elements corresponding to the N index coordinates are extracted from the private key combination factor table according to the N index coordinates; N public key elements corresponding to the N index coordinates are extracted from the public key combination factor table according to the N index coordinates, wherein the public key combination factor table is generated according to the private key combination factor table; a first private key is generated according to the N private key elements, and a first public key is generated according to the N public key elements.

[0009] In a possible implementation, the first private key is generated according to the N private key elements, and the first public key is generated according to the N public key elements, including: performing finite field addition operation on the N private key elements to obtain the first private key; and performing elliptic point addition operation on the N public key elements to obtain the first public key.

[0010] In a possible implementation, the method further includes: determining whether the first private key is equal to 0; if the first private key is equal to 0, generating a random number to regenerate the first private key.

[0011] In a possible implementation, the first signature part is generated according to the first private key, the first public key and a pre-generated hash value, including: calculating a second signature part according to the hash value and an abscissa in the first public key; and generating the first signature part according to the hash value, the first private key, a signature private key and the second signature part.

[0012] In a possible implementation, it is determined whether the first signature part and the second signature part are equal to 0; if the first signature part and / or the second signature part is equal to 0, a random number is generated to regenerate the first signature part and the second signature part.

[0013] According to a second aspect of the embodiments of the present application, a short signature generation apparatus is provided, including: a first generation unit configured to generate a random number; a second generation unit configured to generate a signature factor according to the random number; a third generation unit configured to generate a first private key and a first public key according to the signature factor; a fourth generation unit configured to generate a first signature part according to the first private key, the first public key and a pre-generated hash value; and a combination unit configured to combine the random number and the first signature part to obtain a short digital signature.

[0014] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the method according to the first aspect.

[0015] According to a fourth aspect of the embodiments of the present application, a computer storage medium is provided, and the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to the first aspect.

[0016] According to the short signature generation method provided by the embodiments of the present application, a random number is generated, a signature factor is generated according to the random number, a first private key and a first public key are generated according to the signature factor, a first signature part is generated according to the first private key, the first public key and a pre-generated hash value, and a short digital signature is obtained by combining the random number and the first signature part. Since the finally generated short digital signature is the combination of the random number and the first signature part, compared with the digital signature including the first signature part and the second signature part in the prior art, the length of the digital signature is reduced, the amount of data for transmitting or storing the short digital signature is only half of that of the prior art, the amount of data for transmitting or storing the digital signature is low, and the transmission speed can be improved or the storage space required for storing the digital signature can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings required to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can also be obtained by those skilled in the art according to these drawings.

[0018] Figure 1 is a flowchart of a short signature generation method provided by the embodiments of the present application;

[0019] Figure 2 is a flowchart of a method for generating a private key and a public key provided by the embodiments of the present application;

[0020] Figure 3 is a schematic diagram of a short signature generation device provided by the embodiments of the present application;

[0021] Figure 4 is a structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0022] In the following well-known description of the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art should belong to the scope of protection of the present application.

[0023] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein means and includes any or all possible combinations of one or more associated listed items.

[0024] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, without departing from the scope of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon determination" or "in response to determining".

[0025] Figure 1 is a flowchart of a short signature generation method provided by the embodiments of the present application, as shown in Figure 1 The method comprises the following steps 101 to 105:

[0026] Step 101, generating a random number.

[0027] A random number z is generated, which can be a random number generated according to the ID of the user, or a randomly generated number, etc. In an example, the length of the random number z is 1 byte. The 1 byte random number z is to avoid the occurrence of infinite point or zero value in the signature operation, if it occurs, the step needs to be re-operated.

[0028] Step 102, generating a signature factor according to the random number.

[0029] A signature factor t is generated according to the random number, in an example, the length of the signature factor t is 32 bytes.

[0030] Step 103, generating a first private key and a first public key according to the signature factor.

[0031] A first private key sk m and a first public key PKm , a first private key sk m and a first public key PK m corresponding to the first private key sk m . If PK m is an infinite point, a 1-byte random number z needs to be regenerated and sk m and PK A are calculated.

[0032] Step 104, generating a first signature part according to the first private key, the first public key and a pre-generated hash value.

[0033] Optionally, pre-processing information can be generated according to related parameters of an elliptic curve and an identity of a signer, and a hash value e can be generated according to the pre-processing information. Specifically, the related parameters of the elliptic curve are initialized, and the pre-processing information Z A is calculated through a formula Z 256 = H A (ENTL A || ID G || a || b || x G || y A || x A || y A , wherein Z A is used to represent the pre-processing information, H 256 () is used to represent a hash function, ID A is used to represent the identity of the signer, ENTL A is two bytes converted from a bit length of ID A , a and b are used to represent two elements in a prime field Fp and satisfy y 2 = x 3 + ax + b, (x G , y G ) is used to represent coordinates of a base point G on the elliptic curve, n is an order of the base point G, (x A , y A ) is used to represent a signature public key held by the signer, and a corresponding signature private key is d A , that is, (x A , y A ) = d A * G.

[0034] After the pre-processing information Z A is calculated, the hash value e is calculated through a formula e = H A (Z v || Ms) according to the pre-processing information Z A , wherein H v () is used to represent a hash function, Ms is a message to be signed, that is, a signature original text, and e is used to represent the hash value e. Thus, the generation of the hash value e can be realized.

[0035] It should be understood that H 256 () and H v () are used to represent a hash function, which is generally a national standard SM3 hash algorithm, through which a hash value e can be generated.

[0036] After generating the hash value e, a first private key sk m and a first public key PK m and the hash value e, a first signature part s is generated, and the first signature part s is 32 bytes. If s is 0, a 1-byte random number z needs to be regenerated, and sk m and PK m are calculated.

[0037] Step 105, combining the random number and the first signature part to obtain a short digital signature.

[0038] The random number z and the first signature part s are combined to obtain a short digital signature (z||s). It should be understood that the length of the first signature part s is 32 bytes, and the length of the random number z is 1 byte, so the length of the short digital signature is 33 bytes. The length of the digital signature including the first signature part and the second signature part in the prior art is 64 bytes, so the length of the short digital signature provided in the embodiment of the present application is only 51.6% of the length of the digital signature in the prior art.

[0039] It should be noted that when performing signature verification, the second signature part r can be restored according to the public parameter, the signature original text and the random number z in the signature value, so that the short digital signature (z||s) can be converted into a digital signature (r||s) to realize authentication of the signature. For specific description, please refer to the description in the subsequent embodiments.

[0040] In the embodiment of the present application, a random number is generated, a signature factor is generated according to the random number, a first private key and a first public key are generated according to the signature factor, a first signature part is generated according to the first private key, the first public key and a pre-generated hash value, and a short digital signature is obtained by combining the random number and the first signature part. Since the finally generated short digital signature is a combination of the random number and the first signature part, compared with the digital signature including the first signature part and the second signature part in the prior art, the length of the digital signature is reduced, the amount of data for transmitting or storing the short digital signature is only half of that in the prior art, the amount of data for transmitting or storing the digital signature is low, the transmission speed can be improved or the storage space required for storing the digital signature can be reduced.

[0041] In a possible implementation, when the signature factor is generated according to the random number, the signature identifier can be acquired, the conversion parameter can be acquired according to the length of the signature identifier, and the signature factor can be obtained by calculating, according to the pre-calculated preprocessing information, the signature identifier, the conversion parameter, the to-be-signed information, and the random number, through a hash algorithm.

[0042] The signature identifier is a specific identifiable identifier ID S , for example, the name or domain name of the system, in an example, the signature identifier ID S can be disclosed as a public parameter of the system. After the ID S is acquired, the length of the ID S is converted to obtain the conversion parameter ENTL s , ENTL S is two bytes converted from the bit length of the ID S , the signature factor t is calculated according to the preprocessing information Z A , the signature identifier ID s , the conversion parameter ENTL s , the to-be-signed information Ms, and the random number z through a hash algorithm t = H v (z || ENTL s || ID s || Z A || Ms). It should be noted that the preprocessing information Z A can refer to the calculation method in the above embodiment, and will not be described here.

[0043] In the embodiment of the application, the signature factor is obtained by calculating, according to the pre-calculated preprocessing information, the signature identifier, the conversion parameter, the to-be-signed information, and the random number, through a hash algorithm. Since the signature factor is generated according to the random number, and the signature identifier is a public parameter, the first private key and the first public key generated according to the signature factor can be deduced according to the random number, so as to convert the random number into a second signature part. Therefore, when the digital signature is transmitted, only the combination of the first signature part and the random number into a short digital signature can be transmitted, so as to reduce the amount of data transmitted or stored.

[0044] Figure 2 is a flowchart of a method for generating a private key and a public key provided by the embodiment of the application, as shown in Figure 2 , when the first private key and the first public key are generated according to the library signature factor, the following steps 201 to 204 can be performed:

[0045] Step 201, determining N index coordinates according to M bits included in the signature factor.

[0046] Determine N index coordinates according to M bits included in the signature factor, N is an integer greater than or equal to 2, 2 MTo index the range of the combination factor table, it should be understood that, since the signature factor t is data generated by a hash algorithm, the length of the signature factor t is 256 bits, M is obtained according to the size of the combination factor table, for example: when M is 8 bits, the combination factor table has 256 elements, and the signature factor includes a total of 256 / 8 = 32 index coordinates, when M is 12 bits, the combination factor table has 4096 elements, and a signature factor includes 256 / 12 = 21 index coordinates, when M is 16 bits, the combination factor table has 65536 elements, and the signature factor includes a total of 256 / 16 = 8 index coordinates, that is, N is equal to the ratio of the bit length of t to the bit length of M, and the combination factor table includes a private key combination factor table and / or a public key combination factor table.

[0047] Step 202, extracting N private key elements corresponding to the index coordinates from the private key combination factor table according to the N index coordinates.

[0048] The private key combination factor table is generated in advance, and N private key elements corresponding to the index coordinates are extracted from the private key combination factor table according to the N index coordinates, in an example, a plurality of non-repeating random numbers k i ∈[1,n-1] are generated when the signature device is initialized to form the private key combination factor table.

[0049] Step 203, extracting N public key elements corresponding to the index coordinates from the public key combination factor table according to the N index coordinates.

[0050] The public key combination factor table is generated according to the private key combination factor table, in an example, each public key element corresponding to a private key element in the private key combination factor table can be generated according to the formula P i =[k i ]*G to form the public key combination factor table, it should be noted that, since the public key combination factor table is generated according to the private key combination factor table, the N private key elements and the N public key elements extracted according to the N index coordinates correspond to each other, that is, the N private key elements and the N public key elements correspond one by one, and both satisfy P i =[k i ]*G. G is the base point (x G ,y G ) on the elliptic curve in the above embodiment.

[0051] It should be noted that the public key combination factor table can be disclosed as a public parameter of the system, that is, the identifiable ID S and the public key combination factor table can be disclosed as public parameters of the system.

[0052] Step 204, generating a first private key according to the N private key elements, and generating a first public key according to the N public key elements.

[0053] In the embodiments of the present application, the N index coordinates are determined according to the M bits included in the signature factor, the N private key elements are extracted from the private key combination factor table according to the N index coordinates, and the N public key elements are extracted from the public key combination factor table according to the N index coordinates, so as to generate the first private key and the first public key according to the signature factor. Since the first private key and the first public key are generated according to the signature factor, and the signature factor is generated according to the random number, in the signature verification process, the first public key can be restored according to the random number z in the public parameter, the signature original text and the signature value, so as to restore the digital signature including the first signature part and the second signature part, so that the short digital signature can represent the normal length digital signature, so as to reduce the data amount in the transmission or storage process.

[0054] In a possible implementation, when the first private key is generated according to the N private key elements, and the first public key is generated according to the N public key elements, the N private key elements can be subjected to finite field addition operation to obtain the first private key, and the N public key elements can be subjected to elliptic point addition operation to obtain the first public key.

[0055] In the embodiments of the present application, the N private key elements are subjected to finite field addition operation to obtain the first private key, and the N public key elements are subjected to elliptic point addition operation to obtain the first public key. The first private key generated by using the finite field addition operation and the first public key generated by using the elliptic curve point addition operation replace the random number k and the result of the point multiplication operation of k and the base point G in the existing signature generation method. Since the private key combination factor table and the public key combination factor table are generated in advance, the point multiplication operation is not required in the generation process of the short digital signature, and the operation amount of the small amount of finite field addition operation and the small amount of elliptic curve point addition operation is far less than that of one point multiplication operation. Therefore, the operation amount of the short signature generation method is low, only a small amount of point addition operation is required, and the performance requirement of the cryptographic device is low. Therefore, the short signature generation method is suitable for the cryptographic device with poor performance, and has high applicability. The signature performance of the same cryptographic device per unit time can also be improved by reducing the operation amount of the signature.

[0056] In a possible implementation, it can also be judged whether the first private key is equal to 0. If the first private key is equal to 0, the process of generating the random number is executed to regenerate the first private key.

[0057] If the value of the first private key is 0, that is, the first private key sk m == 0, the process of generating the random number is re-executed, so that a new signature factor can be generated according to the regenerated random number, and then new index coordinates can be determined according to the new signature factor, so that a new first private key can be generated according to the new index coordinates.

[0058] In the embodiments of the present application, if the first private key is equal to 0, the random number is regenerated, and then the first private key can be regenerated, so that the first private key generated according to the method can meet the signature requirement, and prevent the first public key from being an infinitely distant point on the ellipse due to the first private key being equal to 0.

[0059] In a possible implementation, when the first signature part is generated according to the first private key, the first public key and the pre-generated hash value, the second signature part can be calculated according to the horizontal coordinate in the hash value and the first public key, and the first signature part is generated according to the first private key, the signature private key and the second signature part.

[0060] The second signature part r is calculated according to the hash value and the horizontal coordinate in the first public key by the following formula: r = (e + x1) mod n, wherein e is the signature message Ms and the preprocessed information Z A The calculated hash value and x1 are used to represent the x-axis coordinate of the first public key PK i , and n is used to represent the order of the base point G. It should be understood that, since the generation process of the public key is the point addition operation of the elliptic curve, the final value of the first public key is a point (x1, y1) on the elliptic curve.

[0061] The first signature part s is generated according to the first private key, the signature private key and the second signature part by the following formula: s = ((1 + d A ) -1 *(sk i -r*d A )) mod n, wherein d A is used to represent the signature private key held by the signature user, sk i is used to represent the first private key. The normal signature process is to combine the second signature part r and the first signature part s to form a digital signature (r, s), but in the embodiments of the present application, the second signature part r is calculated by the hash value and the first public key, and the first public key is obtained according to the signature factor, the signature factor is generated according to the random number, and the identifiable ID S and the public key combination factor table are used as public parameters of the system, so that the second signature part r can be calculated by the public parameters, the signature original text and the random number z in the signature value in the signature verification process, and therefore the digital signature (r, s) can be represented by the short signature (z||s).

[0062] In the embodiment of the present application, the second signature part can be calculated according to the hash value and the abscissa in the first public key, and the first signature part can be generated according to the first private key, the signature private key and the second signature part, thereby realizing the generation of the digital signature. In the signature verification process, the first public key can be calculated through the random number z in the public parameter, the signature original text and the signature value, thereby restoring the second signature part r, and thus the data amount in the transmission or storage process can be reduced by representing the digital signature (r, s) through the short digital signature (z||s).

[0063] In a possible implementation, it is judged whether the first signature part and the second signature part are equal to 0, and if the first signature part and / or the second signature part is equal to 0, a random number is generated to regenerate the first signature part and the second signature part.

[0064] When the first signature part and / or the second signature part is equal to 0, the step of generating the random number is re-executed, and after the random number is regenerated, the signature factor changes due to the change of the random number, the first private key and the first public key generated according to the signature factor change, and thus the first signature part and the second signature part can be regenerated until the requirement is met.

[0065] In the embodiment of the present application, when the first signature part and / or the second signature part does not meet the requirement, the random number is regenerated, the effectiveness of the short digital signature is ensured, the situation that the invalid short digital signature is generated is avoided, and the practicability of the short signature generation method is improved.

[0066] Figure 3 is a schematic diagram of a short signature generation device provided by the embodiment of the present application, as shown in the figure, the device 300 comprises: Figure 3

[0067] The first generation unit 301 is configured to generate a random number.

[0068] The second generation unit 302 is configured to generate a signature factor according to the random number.

[0069] The third generation unit 303 is configured to generate a first private key and a first public key according to the signature factor.

[0070] The fourth generation unit 304 is configured to generate a first signature part according to the first private key, the first public key and a pre-generated hash value.

[0071] The combination unit 305 is configured to combine the random number and the first signature part to obtain a short digital signature.

[0072] ​In the embodiments of the present application, the first generating unit 301 can be configured to perform step 101 in the method embodiments described above, the second generating unit 302 can be configured to perform step 102 in the method embodiments described above, the third generating unit 303 can be configured to perform step 103 in the method embodiments described above, the fourth generating unit 304 can be configured to perform step 104 in the method embodiments described above, and the combining unit 305 can be configured to perform step 105 in the method embodiments described above.

[0073] In a possible implementation, the second generating unit 302 is further configured to obtain a signature identifier, obtain a conversion parameter according to the length of the signature identifier, and obtain a signature factor by performing a hash algorithm according to the pre-calculated preprocessing information, the signature identifier, the conversion parameter, the information to be signed, and the random number.

[0074] In a possible implementation, the third generating unit 303 is further configured to determine N index coordinates according to M bits included in the signature factor, where N is an integer greater than or equal to 2, 2 M In order to determine the index range of the combination factor table, the combination factor table includes a private key combination factor table and / or a public key combination factor table, N private key elements corresponding to the N index coordinates are extracted from the private key combination factor table according to the N index coordinates, N public key elements corresponding to the N index coordinates are extracted from the public key combination factor table according to the N index coordinates, the public key combination factor table is generated according to the private key combination factor table, a first private key is generated according to the N private key elements, and a first public key is generated according to the N public key elements.

[0075] In a possible implementation, the third generating unit 303 is further configured to perform finite field addition operation on the N private key elements to obtain the first private key, and perform elliptic point addition operation on the N public key elements to obtain the first public key.

[0076] In a possible implementation, the first generating unit 301 is further configured to determine whether the first private key is equal to 0, and if the first private key is equal to 0, generate a random number to regenerate the first private key.

[0077] In a possible implementation, the fourth generating unit 304 is further configured to calculate a second signature part according to the hash value and the horizontal coordinate in the first public key, and generate a first signature part according to the hash value, the first private key, the signature private key, and the second signature part.

[0078] In a possible implementation, the first generating unit 301 is further configured to determine whether the first signature part and the second signature part are equal to 0, and if the first signature part and / or the second signature part is equal to 0, generate a random number to regenerate the first signature part and the second signature part.

[0079] It should be noted that the information interaction, execution process and the like between the modules in the short signature generation apparatus are based on the same concept as the short signature generation method embodiments, and the specific content can be referred to the description in the short signature generation method embodiments.

[0080] Referring to Figure 4 , a structural schematic diagram of an electronic device according to an embodiment of the present application is shown, and the specific implementation of the electronic device is not limited in the embodiment of the present application.

[0081] As Figure 4 shown, the electronic device can include a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0082] Among them:

[0083] The processor 402, the communications interface 404, and the memory 406 complete the communication with each other through the communications bus 408.

[0084] The communications interface 404 is configured to communicate with other electronic devices or servers.

[0085] The processor 402 is configured to execute the program 410, and specifically can execute the related steps in the short signature generation method embodiments.

[0086] Specifically, the program 410 can include program code including computer operation instructions.

[0087] The processor 402 can be a central processing unit CPU, or a graphics processing unit GPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiments of the present application. One or more processors included in the smart device can be the same type of processor, such as one or more CPUs; one or more GPUs; or different types of processors, such as one or more CPUs and one or more GPUs and one or more ASICs.

[0088] The memory 406 is configured to store the program 410. The memory 406 can include a high-speed RAM memory, and can also include a non-volatile memory such as at least one disk memory.

[0089] The program 410 can be specifically used to enable the processor 402 to perform the short signature generation method in any of the preceding embodiments.

[0090] The specific implementation of each step in the program 410 can refer to the corresponding description in the corresponding step and unit in any of the preceding short signature generation method embodiments, which will not be repeated here. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working process of the above-described device and module can refer to the corresponding process description in the preceding method embodiments, which will not be repeated here.

[0091] In the embodiments of the present application, a random number is generated, a signature factor is generated according to the random number, a first private key and a first public key are generated according to the signature factor, a first signature part is generated according to the first private key, the first public key and a pre-generated hash value, the random number and the first signature part are combined, and a short digital signature is obtained. Since the finally generated short digital signature is the combination of the random number and the first signature part, compared with the digital signature including the first signature part and the second signature part in the prior art, the length of the digital signature is reduced, the amount of data for transmitting or storing the short digital signature is only half of that in the prior art, the amount of data for transmitting or storing the digital signature is lower, and the transmission speed can be improved or the storage space required for storing the digital signature can be reduced.

[0092] [HZTC-HXJMJJ241005][HS2411170CCN]

[0093] The embodiments of the present application also provide a computer program product, which includes computer instructions, and the computer instructions instruct a computing device to perform operations corresponding to any of the methods in the above method embodiments.

[0094] It should be noted that, according to the needs of implementation, each component / step described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or part of the operations of the components / steps can be combined into new components / steps, to achieve the purpose of the embodiments of the present application.

[0095] The methods according to the embodiments of the present application described above can be implemented in hardware, firmware, or software, or a combination of them, and can be stored in a recording medium such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or downloaded from a network and stored in a local recording medium, so that the methods described herein can be processed by such software using a general-purpose computer, a special-purpose processor, or programmable or dedicated hardware such as an ASIC or FPGA. It can be understood that the computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the short signature generation method described herein. Furthermore, when a general-purpose computer accesses code for implementing the short signature generation method shown herein, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the short signature generation method shown herein.

[0096] Those skilled in the art can understand that the units and method steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.

[0097] The above embodiments are only used to illustrate but not limit the embodiments of the present application, and a person of ordinary skill in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, therefore all equivalent technical solutions belong to the scope of the embodiments of the present application, and the patent protection scope of the embodiments of the present application should be defined by the claims.

Claims

1. A short signature generation method characterized by comprising: The method comprises: generating a random number; generating a signature factor according to the random number; generating a first private key and a first public key according to the signature factor; generating a first signature part according to the first private key, the first public key and a pre-generated hash value; combining the random number and the first signature part to obtain a short digital signature; The signature factor is generated according to the random number, comprising: obtaining a signature identifier; obtaining a conversion parameter according to the length of the signature identifier; and obtaining the signature factor by calculating the pre-processed information, the signature identifier, the conversion parameter, the information to be signed and the random number through a hash algorithm.

2. The method of claim 1, wherein, The first private key and the first public key are generated according to the signature factor, comprising: determining N index coordinates according to the M bits included in the signature factor, wherein N is an integer greater than or equal to 2, 2 M an index range of a combination factor table, the combination factor table including a private key combination factor table and / or a public key combination factor table; extracting N private key elements corresponding to the index coordinates from the private key combination factor table according to the N index coordinates; extracting N public key elements corresponding to the index coordinates from the public key combination factor table according to the N index coordinates, wherein the public key combination factor table is generated according to the private key combination factor table; generating the first private key according to the N private key elements and generating the first public key according to the N public key elements.

3. The method of claim 2, wherein, The first private key is generated according to the N private key elements, and the first public key is generated according to the N public key elements, comprising: performing finite field addition operation on the N private key elements to obtain the first private key; performing elliptic point addition operation on the N public key elements to obtain the first public key.

4. The method of claim 3, wherein, The method further comprises: judging whether the first private key is equal to 0; if the first private key is equal to 0, generating a random number to regenerate the first private key.

5. The method of claim 1, wherein, The first signature part is generated according to the first private key, the first public key and a pre-generated hash value, comprising: calculating a second signature part according to the hash value and the abscissa in the first public key; generating the first signature part according to the hash value, the first private key, a signature private key and the second signature part.

6. The method of claim 5, wherein, The method further comprises: judging whether the first signature part and the second signature part are equal to 0; if the first signature part and / or the second signature part is equal to 0, generating a random number to regenerate the first signature part and the second signature part.

7. A short signature generation apparatus characterized by comprising: The method comprises: a first generating unit configured to generate a random number; a second generating unit configured to generate a signature factor according to the random number; a third generating unit configured to generate a first private key and a first public key according to the signature factor; a fourth generating unit configured to generate a first signature part according to the first private key, the first public key and a pre-generated hash value; a combining unit configured to combine the random number and the first signature part to obtain a short digital signature; The signature factor is generated according to the random number, comprising: obtaining a signature identifier; obtaining a conversion parameter according to the length of the signature identifier; and obtaining the signature factor by calculating the pre-processed information, the signature identifier, the conversion parameter, the information to be signed and the random number through a hash algorithm.

8. An electronic device, comprising: The method comprises: a processor, a memory, a communication interface and a communication bus, which complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, which makes the processor execute the short signature generation method as claimed in any one of claims 1-6.

9. A computer storage medium, characterized in that a computer program is stored thereon, which is executed by the processor to realize the short signature generation method as claimed in any one of claims 1-6.

Citation Information

Patent Citations

  • Signature implementation method, signature verification method, signature terminal, signature verification terminal and storage medium

    CN113573304A

  • Signature method, signature verification method and electronic equipment

    CN115242402A