A method, apparatus and medium for batch signature verification based on SM2
By generating batch verification auxiliary data using the SM2 algorithm, the problem of low efficiency in repeatedly verifying a large number of signatures in existing technologies is solved, and the effect of fast batch verification is achieved.
Patent Information
- Application Number
- CN202211688004.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-12-27
AI Technical Summary
Existing technologies suffer from time-consuming and labor-intensive technical problems when repeatedly and frequently verifying a large number of signatures, especially in scenarios such as databases and blockchains, where the verification efficiency of large amounts of data and signature values that need to be stored for a long time is low.
A batch verification signature method based on the SM2 algorithm is adopted. By calculating the summation and hashing of elliptic curve points, batch verification auxiliary data is generated, reducing point multiplication and point addition operations and improving verification efficiency.
After completing a standard verification, multiple signature values can be quickly verified by batch verification auxiliary data, significantly improving verification performance.
Smart Images

Figure CN116232601B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signature batch verification technology, and more specifically, to a method, apparatus and medium for batch signature verification based on SM2. Background Technology
[0002] The SM2 algorithm is a public-key cryptography algorithm based on elliptic curves released by the State Cryptography Administration. It is an important component of my country's commercial cryptographic algorithm standards.
[0003] In scenarios requiring repeated and frequent verification of a large number of signatures, such as signing data in a database or on a blockchain, large amounts of data and signature values need to be stored long-term, necessitating frequent verification of these signatures. This tedious work presents significant time-consuming and labor-intensive technical challenges. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method, apparatus, and medium for batch signature verification based on SM2.
[0005] According to one aspect of the present invention, a method for batch signature verification based on SM2 is provided, comprising:
[0006] Step 1, calculate Z i =H 256 (ENTL Ai ||ID Ai ||a||b||x G ||y G ||x Ai ||y Ai ), where H 256 For the national cryptographic SM3 hash algorithm, ENTL Ai and ID Ai User parameters, a, b, x G y G These are fixed parameters;
[0007] Step 2, calculate e i =H v (Z i ||M i ), where H v It uses the national cryptographic SM3 hash algorithm;
[0008] Step 3, calculate r' i =(e i +x i mod n, and check r' i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0009] Step 4, check si Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0010] Step 5, calculate t i =(r' i +s i ) mod n, if t i If the value is equal to 0, the verification fails.
[0011] Step 6, Inspection Whether it is true or not, i.e. (x i ,y i Check if the point is on the elliptic curve; if not, the verification fails.
[0012] Step 7, Calculate Among them, the user's public key P Ai =(x Ai ,y Ai ), output (x s1 ,y s1 );
[0013] Step 8, calculate the elliptic curve point (x i ,y i The sum of the points is (x) s2 ,y s2 ), where (x i ,y i ) is equivalent to [k] in signature step 4. i ]*G, so the sum of the points is equivalent to
[0014] Step 9, if (x s1 ,y s1 ) equals (x s2 ,y s2 If so, the batch verification passes;
[0015] Step 10, compare r' in step 3 i Compared with the standard signature value r i If they are equal, then the standard signature value (r) is used. i ,s i )correct.
[0016] Optionally, step 7 includes:
[0017] In P Ai If they are equal, first calculate the sum t. i ,Right now
[0018] Calculate (x) again s1 ,y s1 ).
[0019] Optionally, the input parameters for verification include: the user's public key P Ai =(x Ai ,y Ai ), original signature M i Batch validation of auxiliary data (x) i ,y i ), standard signature value (r) i ,s i ), User Parameters ENTL Ai and ID Ai Fixed parameters a, b, x G y G .
[0020] According to another aspect of the present invention, an apparatus for bulk signature verification based on SM2 is provided, comprising:
[0021] Module 1, Calculate Z i =H 256 (ENTL Ai ||ID Ai ||a||b||x G ||y G ||x Ai ||y Ai ), where H 256 For the national cryptographic SM3 hash algorithm, ENTL Ai and ID Ai User parameters, a, b, x G y G These are fixed parameters;
[0022] Module 2, Calculate e i =H v (Z i ||M i ), where H v It uses the national cryptographic SM3 hash algorithm;
[0023] Module 3, Calculate r' i =(e i +x i mod n, and check r' i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0024] Module 4, Check s i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0025] Module 5, Calculate t i =(r' i +s i ) mod n, if t i If the value is equal to 0, the verification fails.
[0026] Module 6, Inspection Whether it is true or not, i.e. (x i ,y i Check if the point is on the elliptic curve; if not, the verification fails.
[0027] Module 7, Calculation Among them, the user's public key P Ai =(x Ai ,y Ai ), output (x s1 ,y s1 );
[0028] Module 8, Calculate the points (x) on the elliptic curve i ,y i The sum of the points is (x) s2 ,y s2 ), where (x i ,y i ) is equivalent to [k] in signature module 4 i ]*G, so the sum of the points is equivalent to
[0029] Module 9, if (x s1 ,y s1 ) equals (x s2 ,y s2 If so, the batch verification passes;
[0030] Module 10, compare r' in Module 3 i Compared with the standard signature value r i If they are equal, then the standard signature value (r) is used. i ,s i )correct.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the methods described in any of the above aspects of the present invention.
[0032] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method described in any of the preceding aspects of the present invention.
[0033] Therefore, this application is applicable to scenarios that require repeated and frequent verification of a large number of signatures, such as signing data in a database or signing on a blockchain. These are large amounts of data and signature values that need to be stored for a long time. Different verifiers and use cases need to repeatedly verify the signatures of different data. A standard verification can be performed on the basis of the standard signature value to obtain batch verification auxiliary data. Then, the signature values of different data can be batch verified by batch verification. By using batch verification, the verification performance can be greatly improved. Attached Figure Description
[0034] Exemplary embodiments of the present invention can be more fully understood by referring to the following figures:
[0035] Figure 1 This is a flowchart illustrating a method for batch signature verification based on SM2 provided in an exemplary embodiment of the present invention;
[0036] Figure 2 This is a schematic diagram of the structure of an apparatus for batch signature verification based on SM2 provided in an exemplary embodiment of the present invention;
[0037] Figure 3 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. Detailed Implementation
[0038] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0039] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention.
[0040] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of the present invention are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.
[0041] It should also be understood that in the embodiments of the present invention, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.
[0042] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more unless explicitly defined or given contrary instructions in the context.
[0043] Furthermore, the term "and / or" in this invention is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this invention generally indicates that the preceding and following related objects have an "or" relationship.
[0044] It should also be understood that the description of the various embodiments in this invention emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0045] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0046] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0047] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.
[0048] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0049] The embodiments of this invention can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Well-known examples of terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.
[0050] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0051] Exemplary methods
[0052] Figure 1 This is a flowchart illustrating a method for batch signature verification based on SM2 according to an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as… Figure 1 As shown, the SM2-based batch signature verification method 100 includes the following steps:
[0053] Step 1, calculate Z i =H 256 (ENTL Ai ||ID Ai ||a||b||x G ||y G ||x Ai ||y Ai ), where H 256 For the national cryptographic SM3 hash algorithm, ENTL Ai and ID Ai User parameters, a, b, x G y G These are fixed parameters;
[0054] Step 2, calculate e i =H v (Z i ||M i ), where H v It uses the national cryptographic SM3 hash algorithm;
[0055] Step 3, calculate r' i =(e i +x i mod n, and check r' i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0056] Step 4, check s i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0057] Step 5, calculate t i =(r' i +s i ) mod n, if t i If the value is equal to 0, the verification fails.
[0058] Step 6, Inspection Whether it is true or not, i.e. (x i ,y i Check if the point is on the elliptic curve; if not, the verification fails.
[0059] Step 7, Calculate Among them, the user's public key P Ai =(x Ai ,y Ai ), output (x s1 ,y s1 ), in P Ai If they are equal, first calculate the sum t. i ,Right now
[0060] Step 8, calculate the elliptic curve point (x i ,y i The sum of the points is (x) s2 ,y s2 ), where (x i ,y i ) is equivalent to [k] in signature step 4. i ]*G, so the sum of the points is equivalent to
[0061] Step 9, if (x s1 ,y s1 ) equals (x s2 ,y s2 If so, the batch verification passes;
[0062] Step 10, compare r' in step 3 i Compared with the standard signature value r i If they are equal, then the standard signature value (r) is used. i ,s i )correct.
[0063] Optionally, the input parameters for verification include: the user's public key P Ai =(x Ai ,y Ai ), original signature M i Batch validation of auxiliary data (x) i ,y i ), standard signature value (r) i ,s i ), User Parameters ENTL Ai and IDAi Fixed parameters a, b, x G y G .
[0064] This scheme requires adding auxiliary data (x, y) to the standard signature value (r, s), where x, y are x1, y1 from signature step 4. Therefore, the result (x, y) can be output during the signature process. This is because [k]*G in signature step 4 equals [s]*G + [t]*P in verification step 6. A Therefore, after the standard signature value (r, s) passes verification, batch verification auxiliary data (x, y) can also be output, where x, y are x1, y1 in verification step 6. Thus, batch verification auxiliary data can also be obtained after a correct standard signature verification.
[0065] For w original messages M i and corresponding batch verification auxiliary data (x) i ,y i ) and user public key P Ai =(x Ai ,y Ai ), where i = 1,...,w. Standard signature value (r i ,s i Use batch verification to verify whether the signature value is correct.
[0066] In step 8, the SM2 elliptic curve point (x) i ,y i ) can be randomly transformed into (x) i ,-y i ), corresponding to s in step 7 i With t i It should also be changed to -s i With -t i Because [-k] i ]*G=(x i ,-y i Therefore, the sum of the two results (x) s1 `,y s1 `) and (x s2 `,y s2 `) are also equal.
[0067] The reason for adding batch verification auxiliary data is that r = (e + x) mod n, but x cannot be obtained by (re) mod n. This is because n is the order of the base point G of the SM2 elliptic curve, with a value range of [0, 0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123), while x is an element of the prime field Fp of the SM2 elliptic curve, with a value range of [0, 0xFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF]. Therefore, (re) mod n cannot cover the range of x. Given x, only ±y can be calculated, but it's impossible to determine which one it is.
[0068] As can be seen from the above, the x value cannot be calculated entirely from the r value, so it is necessary to add batch verification auxiliary data (x, y), which can be obtained in two ways.
[0069] 1. During the signing process, output (x1, y1) from signing step 4, which is the auxiliary data (x, y) for batch verification.
[0070] 2. Based on the standard signature value (r,s), perform a standard verification. If the verification passes, output (x1,y1) from verification step 6, which is the auxiliary data (x,y) for batch verification.
[0071] Then we can use w batch verification auxiliary data (x) i ,y i ) and w signature values (r i ,s i Perform batch verification, especially when the user's public key P i When signatures are equal, batch verification of w signatures requires only two dot multiplication operations and w dot addition operations, and there is no limit to the number of w. Even with only the standard signature value (r, s), a single standard verification can be performed to obtain auxiliary data (x, y) for batch verification, which can then be used for subsequent batch verification.
[0072] This application applies to scenarios requiring frequent and repeated signature verification (such as blockchains and databases). These signatures are stored, and the data does not change, often requiring repeated verification by different third-party users. This allows for batch verification data to be obtained after the initial standard verification, enabling subsequent batch verification to accelerate the verification process.
[0073] Therefore, this application is applicable to scenarios that require repeated and frequent verification of a large number of signatures, such as signing data in a database or signing on a blockchain. These are large amounts of data and signature values that need to be stored for a long time. Different verifiers and use cases need to repeatedly verify the signatures of different data. A standard verification can be performed on the basis of the standard signature value to obtain the signature value for batch verification. Then, the signature values of different data can be batch verified by batch verification. By using batch verification, the verification performance can be greatly improved.
[0074] Exemplary device
[0075] Figure 2 This is a schematic diagram of the structure of an apparatus for batch signature verification based on SM2 provided in an exemplary embodiment of the present invention. Figure 2 As shown, the device 200 includes:
[0076] Module 1, Calculate Z i =H 256 (ENTL Ai ||ID Ai ||a||b||x G ||y G ||x Ai ||y Ai ), where H 256 For the national cryptographic SM3 hash algorithm, ENTL Ai and ID Ai User parameters, a, b, x G y G These are fixed parameters;
[0077] Module 2, Calculate e i =H v (Z i ||M i ), where H v It uses the national cryptographic SM3 hash algorithm;
[0078] Module 3, Calculate r' i =(e i +x i mod n, and check r' i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0079] Module 4, Check s i Check if the condition ∈ [1, n-1] is true; if not, the verification fails.
[0080] Module 5, Calculate t i =(r' i +s i ) mod n, if ti If the value is equal to 0, the verification fails.
[0081] Module 6, Inspection Whether it is true or not, i.e. (x i ,y i Check if the point is on the elliptic curve; if not, the verification fails.
[0082] Module 7, Calculation Among them, the user's public key P Ai =(x Ai ,y Ai ), output (x s1 ,y s1 );
[0083] Module 8, Calculate the points (x) on the elliptic curve i ,y i The sum of the points is (x) s2 ,y s2 ), where (x i ,y i ) is equivalent to [k] in signature module 4 i ]*G, so the sum of the points is equivalent to
[0084] Module 9, if (x s1 ,y s1 ) equals (x s2 ,y s2 If so, the batch verification passes;
[0085] Module 10, compare r' in Module 3 i Compared with the standard signature value r i If they are equal, then the standard signature value (r) is used. i ,s i )correct.
[0086] Optionally, module 7 includes:
[0087] In P Ai If they are equal, first calculate the sum t. i ,Right now
[0088] Calculate (x) again s1 ,y s1 ).
[0089] Optionally, the input parameters for verification include: the user's public key P Ai =(x Ai ,y Ai ), original signature M i Batch validation of auxiliary data (x) i ,y i), standard signature value (r) i ,s i ), User Parameters ENTL Ai and ID Ai Fixed parameters a, b, x G y G .
[0090] Exemplary electronic devices
[0091] Figure 3 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. For example... Figure 3 As shown, the electronic device 30 includes one or more processors 31 and memory 32.
[0092] The processor 31 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0093] The memory 32 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 31 may execute the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above, and / or other desired functions. In one example, the electronic device may also include an input device 33 and an output device 34, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0094] In addition, the input device 33 may also include, for example, a keyboard, a mouse, etc.
[0095] The output device 34 can output various information to the outside. The output device 34 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0096] Of course, for the sake of simplicity, Figure 3 Only some of the components of the electronic device relevant to the present invention are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0097] Exemplary computer program products and computer-readable storage media
[0098] In addition to the methods and apparatus described above, embodiments of the present invention may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of the present invention described in the "Exemplary Methods" section above.
[0099] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0100] Furthermore, embodiments of the present invention may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the methods for information mining of historical change records according to various embodiments of the present invention as described in the "Exemplary Methods" section above.
[0101] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0102] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the aforementioned specific details.
[0103] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0104] The block diagrams of devices, systems, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, systems, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0105] The methods and systems of the present invention may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of the present invention are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the present invention may also be implemented as a program recorded on a recording medium, the program comprising machine-readable instructions for implementing the methods according to the present invention. Thus, the present invention also covers recording media storing programs for performing the methods according to the present invention.
[0106] It should also be noted that in the systems, apparatus, and methods of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered equivalents of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0107] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A method for verifying a signature based on SM2 batch verification, characterized in that, include: Step 1, calculation = ( || ||a||b|| || || || ), wherein is the national secret SM3 hash algorithm, and are user parameters, a, b, , ; Step 2, calculation = ( || ), is the signature text, w is the number of signature texts; Step 3, computation = ( + ) mod n, and check if ∈ [1, n-1] holds, if not verification fails, ( auxiliary data, i.e. elliptic curve point; Step 4, verification whether ∈[1,n-1] is true, if not, verification fails, is a standard signature value; Step 5, Compute = ( + ) mod n, if == 0 then verification fails; Step 6, Inspection Whether it is true or not, that is ( , Is the point on the elliptic curve? If not, the verification fails. Step 7, compute ( , ) = *G + * where the user public key ( , ), and output ( , ). Step 8, calculate the points on the elliptic curve ( , The sum of the points is ( , ),in( , This is equivalent to the signature generation process. *G, so the sum of the points is equivalent to *G; Step 9, if ( , ) is equal to ( , ) then the bulk verification passes; Step 10, compare with the standard signature value in step 3 with the standard signature value is equal, the standard signature value (step 6) is correct. , is not equal, the standard signature value (step 6) is incorrect.
2. The method of claim 1, wherein, Step 7 includes: In In the case of equality, , i.e. * ; Recalculations , ).
3. The method according to claim 1, characterized in that, The input parameters for verification include: user public key =( , ), signature plaintext , batch verification auxiliary data , ), standard signature value , , user parameters and , fixed parameters a, b 、 .
4. An apparatus for verifying a signature based on SM2 batch verification, characterized in that, The device includes: Module 1, Calculation = ( || ||a||b|| || || || ),in It uses the national cryptographic SM3 hash algorithm. and For user parameters, a, b, , ; Module 2, Calculation = ( || ),in It uses the national cryptographic SM3 hash algorithm. For the original signature, w represents the number of original signatures; Module 3, computation = ( + )mod n, and check if ∈[1,n-1] holds, if not verification fails, ( auxiliary data, i.e. elliptic curve point; Module 4, Inspection Check if ∈[1,n-1] is true; if not, the verification fails. Module 5, Calculation = ( + mod n, if If == 0, the verification fails. The standard signature value; Module 6, Inspection Whether it is true or not, that is ( , Is the point on the elliptic curve? If not, the verification fails. Module 7, Calculation ( , ) = *G + * Among them, the user's public key =( , ), output ( , ); Module 8, Calculate points on an elliptic curve ( , The sum of the points is ( , ),in( , This is equivalent to the signature generation process. *G, so the sum of the points is equivalent to *G; Module 9, if ( , )equal( , If so, the batch verification passes; Module 10, compared with Module 3 With standard signature value Are they equal? If they are equal, then the standard signature value ( , )correct.
5. The apparatus according to claim 4, characterized in that, Module 7 includes: exist In the case of equality, ,Right now * ; Recalculate ( , ).
6. The apparatus according to claim 4, characterized in that, The input parameters for verification include: the user's public key. =( , Original signature Batch verification of auxiliary data ( , ), standard signature value ( , User parameters and Fixed parameters a, b, , .
7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1-3.
8. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-3.
Citation Information
Patent Citations
Batch signature verification method and device based on national cipher SM2 algorithm, equipment and medium
CN112636915A
Efficient batch verification method and system based on SM2 signature
CN115174102A
