Parallel signature system and method based on key generation
Through a parallel signature system based on key generation, the mechanism of the root key management module and the signature request gateway is used to derive and manage the private key and public key certificate of the scalable signature module, solving the digital signature performance bottleneck and private key issues in the digital currency system. Key security issues are addressed, achieving a balance between security and performance.
Patent Information
- Application Number
- CN202011287688.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-11-17
AI Technical Summary
The performance of digital signatures in existing digital currency systems has become a bottleneck, and it is difficult to balance the security and performance of private keys. The risk of private key leakage is high, and pure password encryption services lead to performance limitations.
Adopt a parallel signature system based on key generation, derive the private key and public key certificate of the extensible signature module through the root key management module, use the signature request gateway to select the extensible signature module for signature, realize parallel processing of signature requests, and pass The certificate revocation mechanism ensures the security of private keys.
It improves the security of private keys and system efficiency, reduces the risk of root key leakage, improves system security and performance, and can achieve a balance between high security and high performance scenarios.
Smart Images

Figure CN112258169B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to encryption technology, and in particular to a parallel signature system and method based on key generation. Background Art
[0002] Digital currency is a new generation of currency, which is equivalent to the existing circulating currency. The issuing institution will issue encrypted strings in the form of currency issuance, and these encrypted strings represent real currency with denominations. Users can store and manage these currencies in their wallets. At the same time, the issuing institution will operate the digital currency registration center to record the ownership conversion relationship of currency during the circulation process. The digital currency registration center uses strings associated with public keys to mark the ownership of currency. When using currency, users need to use their own private keys to sign transactions. The digital currency registration center will verify the transaction itself according to the currency number and the corresponding public key. After determining the identity of the currency owner, the currency ownership will be converted and the corresponding currency ownership will be marked as a new public key. In essence, the transaction payment process of digital currency is the process of transferring currency ownership. Since the existing digital currency is a system based on public key cryptographic signatures to implement specific functions, the performance of digital signatures in the system will become an important performance bottleneck of the entire system. The existing digital signature algorithm process depends on the private key managed by the system. For security reasons, the private key needs to be properly kept and even placed in proprietary cryptographic hardware. Therefore, how to balance the existing signature mode to achieve a balance between security and performance.
[0003] The general solution for managing private keys is to use TEE or SE chips. The general TEE solution allows users to import and export private keys at will. Its implementation principle is to protect fixed memory areas and CPU register groups to prevent illegal access. This solution can ensure security to a certain extent, and its computing resources are not so valuable. It can run more than just key-related code. The computing resources in SE are more valuable. Private keys imported into SE are often not allowed to be exported at will. At the same time, SE's computing resources are also more valuable and its performance is not high. However, SE is often needed in scenarios with high security requirements. This scenario may also have high-performance scenario requirements, so it is necessary to balance performance and security in this case.
[0004] Public key infrastructure is a digital certificate system based on digital signatures. The security of distributed public keys is guaranteed through CA signature authentication. As long as the security of the root public key is guaranteed, the trustworthiness of all public keys under the entire public key tree can be guaranteed. In essence, a digital certificate is a data structure that binds a public key to authentication information. Through this model, digital certificates can form a chained data authentication model to ensure the security of user public keys.
[0005] In summary, each digital signature of existing cryptography requires the participation of a private key, which leads to the risk of leakage of the root private key. Considering the need for high security, placing the private key in hardware will be subject to the performance limitations of the security protection hardware, and this performance limitation is difficult to break directly. Due to the sensitivity of private keys, deploying private keys in parallel will inevitably threaten the confidentiality of private keys, and a simple password encryption service will become a performance bottleneck for the system. Summary of the invention
[0006] In view of this, the purpose of this application is to provide a parallel signature system and method based on key generation to improve private key security and system efficiency.
[0007] In a first aspect, the embodiments of the present application provide:
[0008] A parallel signature system based on key generation, comprising:
[0009] A root key management module, used to respond to a private key derivation request of an extensible signature module, generate a private key, a public key certificate and a random code of the extensible signature module based on a root key, and respond to a destruction request of the extensible signature module to destroy the extensible signature module;
[0010] An extensible signature module, used to request the root private key module to derive a private key and request destruction, and send a public key certificate to a signature request gateway for registration, and sign the data in the signature request based on the private key and the random number according to the signature request of the signature request gateway;
[0011] The signature request gateway is used to receive the signature request from the external system, select an extensible signature module according to the signature request to sign the data in the signature request, and return the data signed by the extensible signature module to the external system.
[0012] In some embodiments, the responding to the private key derivation request of the extensible signature module and generating the private key, public key certificate and random code of the extensible signature module based on the root key specifically includes:
[0013] In response to a private key derivation request from an extensible module, obtaining a root private key, a root random code, a root public key, and a flag of the extensible signature module in the private key derivation request;
[0014] Linking the root public key, the root random code and the logo of the extensible signature module and performing hash processing to obtain a first hash value;
[0015] Taking the high bits of the length set by the first Hash value as the second Hash value, and taking the low bits of the length set by the first Hash value to obtain the third Hash value;
[0016] Adding the second hash value and the root private key to obtain the private key of the extensible signature module;
[0017] Using the third hash value as a random code of the private key of the extensible signature module;
[0018] The public key of the extensible signature module is obtained according to the private key of the extensible signature module.
[0019] In some embodiments, selecting an extensible signature module according to the signature request to sign the data in the signature request includes:
[0020] Generate a random number k, and k belongs to the interval [1,n-1], where n is the number of elliptic curve elements in the SM2 algorithm;
[0021] Calculate the elliptic curve point (x0, y0), where (x0, y0) = kG, G is the generator of the elliptic curve selected by the SM2 algorithm;
[0022] Calculate the value r, where r = (h0 + x0) mod (n), h0 is the hash value to be signed, mod remainder operation, if r = 0, return to the step of generating the random number k;
[0023] Calculate s = ((1 + x A ) -1 *(kr*x A ))mod(n), if S=0, then return to the step of generating a random number k; where x A is the private key of the extensible signature module;
[0024] Get the signature based on s and r.
[0025] In some embodiments, when the extensible signature module requests the root private key module to derive a private key, the process includes:
[0026] The extensible signature module generates a unique token;
[0027] The extensible signature module sends a private key derivation request carrying the flag to the root key management module;
[0028] The extensible signature module receives and stores the random code and public key certificate returned by the root key management module.
[0029] In some embodiments, the signature gateway verifies the public key certificate of the extensible signature module in the following manner:
[0030] Read the public key Y1 and random code c1 of the extensible signature module from the public key certificate of the extensible signature module;
[0031] The public key certificate of the extensible signature module is verified using the root public key certificate, wherein the verification process includes:
[0032] Read the root public key Y0 of the root public key certificate;
[0033] When Y1=Y0+c1G, the verification is passed.
[0034] In some embodiments, in response to the destruction request of the extensible signature module, destroying the extensible signature module includes:
[0035] Receiving a destruction request for the extensible signature module;
[0036] Read the public key certificate of the extensible signature module;
[0037] Determine whether the extensible signature module is valid according to the public key certificate of the extensible signature module, and when the extensible signature module is valid, generate a revocation certificate according to the destruction request;
[0038] The revocation certificate is signed by a root private key, and the signed revocation certificate is returned to the extensible signature module.
[0039] In some embodiments, when the extensible signature module requests the root private key module to destroy, it includes:
[0040] The extensible signature module generates a destruction request according to its own logo and public key certificate;
[0041] The extensible signature module signs the destruction request with its own private key and sends it to the root key management module;
[0042] Receive the revocation certificate returned by the root key management module.
[0043] In some embodiments, after the extensible signature module receives the revocation certificate, the extensible signature module sends the revocation certificate to the signature request gateway to revoke the public key certificate stored in the signature request gateway and stop the service.
[0044] In some embodiments, the root key management module runs based on an SE chip.
[0045] In a second aspect, the embodiments of the present application provide:
[0046] A parallel signature method based on key generation is performed by the above-mentioned parallel signature system based on key generation, and the method comprises the following steps:
[0047] The root key management module responds to the private key derivation request of the extensible signature module and generates the private key, public key certificate and random code of the extensible signature module based on the root key;
[0048] The signature request gateway receives the signature request from the external system, selects an extensible signature module according to the signature request to sign the data in the signature request, and returns the data signed by the extensible signature module to the external system.
[0049] The embodiment of the present application manages the registration and deregistration of the extensible signature module through the root key management module, and multiple extensible signature modules can be used to sign the signature request received by the signature request gateway. At the same time, since the root key is only used to sign the extensible signature module, the risk of leakage can be reduced. The deregistration mechanism can also ensure the security of the private key of the extensible signature module to a certain extent, thereby greatly improving the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 It is a module block diagram of a parallel signature system based on key generation provided in an embodiment of the present application;
[0052] Figure 2 This is a flowchart of a private key derivation process of an expandable signature module provided in an embodiment of the present application;
[0053] Figure 3 This is a flow chart of an extensible signature module cancellation process provided by an embodiment of the present application;
[0054] Figure 4 This is a flowchart of a parallel signing method based on key generation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described through the implementation method with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0056] Reference Figure 1, this embodiment discloses a parallel signature system based on key generation, including:
[0057] A root key management module, used to respond to a private key derivation request of an extensible signature module, generate a private key, a public key certificate and a random code of the extensible signature module based on a root key, and respond to a destruction request of the extensible signature module to destroy the extensible signature module;
[0058] An extensible signature module, used to request the root private key module to derive a private key and request destruction, and send a public key certificate to a signature request gateway for registration, and sign the data in the signature request based on the private key and the random number according to the signature request of the signature request gateway;
[0059] The signature request gateway is used to receive the signature request from the external system, select an extensible signature module according to the signature request to sign the data in the signature request, and return the data signed by the extensible signature module to the external system.
[0060] It should be understood that this embodiment can solve the problem that it is difficult for a digital signature-based system to implement signature parallel acceleration, avoid the loss of the root key through the key derivation algorithm, and also derive more private keys for data acceleration according to the system performance requirements. Combined with the certificate of the public key infrastructure, the certificate can be directly revoked when the key is leaked, avoiding causing a wider range of system security problems.
[0061] This embodiment proposes a high-performance parallel signature system based on a key derivation algorithm. The external system sends the data to be signed to the request gateway, and the request gateway returns the signed data and the corresponding signature certificate to the external system. In this solution, the elliptic curve signature algorithm SM2 is used as an example. In fact, this algorithm can be extended to any signature algorithm based on elliptic curves.
[0062] In this design, each key pair requires the following elements: private key x, public key Y, random code c and index i. Among them, x and c are numbers of equal length. Taking the elliptic curve signature algorithm SM2 as an example, the length of private key x is 32 bytes, then the random code c is also 32 bytes. This design needs to select a hash function, and the output length of this hash function needs to be twice the length of private key x. For example, when the length of private key x is 32 bytes, SHA512 can be selected as the hash function because its output length is 64 bits. The description of the following embodiment takes the elliptic curve signature algorithm SM2 as an example, where the generator of SM2 is G, SHA512 is used as the hash function, the hash function is represented by H(), and the SM2 digital signature algorithm function is: s=Sign(x, H(M)).
[0063] The root key management module manages the core root key of the system, which needs to be strictly protected. In actual applications, the private key can be stored in the SE hardware chip so that the private key cannot be exported, ensuring the overall security of the private key. At the same time, the root private key management module is responsible for signing the unsigned certificate of the extensible signature module and managing the information of the extensible signature module.
[0064] The root key management module also needs to record an extensible signature module list, which will record which extensible signature modules are valid online and how many extensible signature modules have been deregistered offline.
[0065] The extensible signature module is a basic module that can be expanded in parallel. Each extensible signature module holds a derived private key and is responsible for executing the signature from the derived private key. The extensible signature module is responsible for the signature calculation process in the signature process; applying for the derived private key from the root key management module; generating the public key certificate corresponding to the current derived private key; and generating the revocation certificate of the current extensible signature module. The system can have more than one extensible signature module at the same time, and the system users can freely add new modules to improve the overall performance of the system according to the needs of the system.
[0066] The signature request gateway is responsible for receiving external signature requests, completing the calculation of the hash value part of the signature request, selecting an extensible signature module, and sending the data to be signed to the extensible signature module. It is also responsible for returning the corresponding certificate of the signed extensible signature module to the requester.
[0067] The signature request gateway has a mapping table of extensible signature modules, which records the signs of all extensible signature modules and the public key certificates corresponding to the extensible signature modules. The external system can obtain the corresponding public key certificate according to the sign of the extensible signature module.
[0068] Reference Figure 2 In some embodiments, the responding to the private key derivation request of the extensible signature module and generating the private key, public key certificate and random code of the extensible signature module based on the root key specifically include:
[0069] In response to the private key derivation request of the extensible module, obtain the root private key x0 and the root random code C r0 , the root public key Y0=x0G and the identifier i of the extensible signature module in the private key derivation request; it should be understood that the root private key x0 and the root random code C r0 The hash value l=H(r0) calculated by the random number seed r0, and the high 32 bytes of the hash value l are taken as the private key x0, and the low 32 bytes are taken as the random code c r0 .
[0070] The root public key Y0, the root random code C r0 The first hash value l=H(X0||c r0 ||i);
[0071] The high bits of the length set by the first hash value are taken as the second hash value, and the low bits of the length set by the first hash value are taken to obtain the third hash value; wherein the high 32 bytes of l are l R , the lower 32 bytes are l L .
[0072] The second hash value l R Add the root private key x0 to obtain the private key x of the extensible signature module i = l R +x0;
[0073] The third hash value l L A random code ci as the private key of the extensible signature module;
[0074] Obtain the public key Y of the extensible signature module according to the private key of the extensible signature module i =x i G.
[0075] In some embodiments, selecting an extensible signature module according to the signature request to sign the data in the signature request includes:
[0076] Generate a random number k, and k belongs to the interval [1, n-1], where n is the number of elliptic curve elements in the SM2 algorithm;
[0077] Calculate the elliptic curve point (x0, y0), where (x0, y0) = kG, G is the generator of the elliptic curve selected by the SM2 algorithm;
[0078] Calculate the value r, where r = (h0 + x0) mod (n), h0 is the hash value to be signed, mod remainder operation, if r = 0, return to the step of generating the random number k;
[0079] Calculate s = ((1 + x A ) -1 *(kr*x A ))mod(n), if S=0, then return to the step of generating a random number k; where x A is the private key of the extensible signature module;
[0080] The signature is obtained based on s and r and can be represented by (s, r).
[0081] It can be understood that through the above-mentioned registration mechanism, an extensible signature module can be flexibly added based on the SM2 algorithm to achieve high-concurrency signature processing, and the security of the root key can be guaranteed by deriving the key.
[0082] Reference Figure 2 In some embodiments, when the extensible signature module requests the root private key module to derive a private key, the process includes:
[0083] The extensible signature module generates a unique identifier i;
[0084] The extensible signature module sends a private key derivation request carrying the flag i to the root key management module;
[0085] The extensible signature module receives and stores the random code c returned by the root key management module. i and a public key certificate.
[0086] In some embodiments, the signature gateway verifies the public key certificate of the extensible signature module in the following manner:
[0087] Read the public key Y of the extensible signature module from the public key certificate of the extensible signature module i and random code c1;
[0088] The public key certificate of the extensible signature module is verified using the root public key certificate, wherein the verification process includes:
[0089] Read the root public key Y0 of the root public key certificate;
[0090] When Y i =Y0+c1G, the verification is passed.
[0091] By verifying the public key certificate of the extensible module through the signature gateway, the validity of the extensible module registration can be ensured.
[0092] Reference Figure 3 In some embodiments, in response to the destruction request of the extensible signature module, destroying the extensible signature module includes:
[0093] Receiving a destruction request for the extensible signature module;
[0094] Read the public key certificate of the extensible signature module;
[0095] Determine whether the extensible signature module is valid according to the public key certificate of the extensible signature module, and when the extensible signature module is valid, generate a revocation certificate according to the destruction request;
[0096] The revocation certificate is signed by a root private key, and the signed revocation certificate is returned to the extensible signature module.
[0097] Reference Figure 3 In some embodiments, when the extensible signature module requests the root private key module to destroy, it includes:
[0098] The extensible signature module generates a destruction request according to its own logo and public key certificate;
[0099] The extensible signature module signs the destruction request with its own private key and sends it to the root key management module;
[0100] Receive the revocation certificate returned by the root key management module.
[0101] In some embodiments, after the extensible signature module receives the revocation certificate, the extensible signature module sends the revocation certificate to the signature request gateway to revoke the public key certificate stored in the signature request gateway and stop the service.
[0102] In some embodiments, the root key management module is run based on the SE chip, wherein the root key is stored in the SE chip, which can ensure the security of the root key.
[0103] In some embodiments, when the signature request gateway receives the signature request information from the external system, the specific signature execution process is as follows
[0104] Read the request information M that needs to be signed, and calculate the hash value h0=H(M) corresponding to the signature information, where h0 is the calculated hash value and H is the hash algorithm.
[0105] The signature request gateway selects an online extensible signature module based on the distributed system node selection algorithm and sends the hash value to it.
[0106] After obtaining the signed digital signature, the corresponding extensible signature module certificate is read and returned to the requester.
[0107] Reference Figure 4 This embodiment discloses a parallel signature method based on key generation, which is executed by the above-mentioned parallel signature system based on key generation. The method includes the following steps:
[0108] The root key management module responds to the private key derivation request of the extensible signature module and generates the private key, public key certificate and random code of the extensible signature module based on the root key;
[0109] The signature request gateway receives the signature request from the external system, selects an extensible signature module according to the signature request to sign the data in the signature request, and returns the data signed by the extensible signature module to the external system.
[0110] It should be understood that the above method embodiments can be implemented based on system embodiments and can achieve the same technical effects.
[0111] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0112] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A parallel signature system based on key generation, characterized in that: include: A root key management module, used to respond to a private key derivation request of an extensible signature module, generate a private key, a public key certificate and a random code of the extensible signature module based on a root key, and respond to a destruction request of the extensible signature module to destroy the extensible signature module; An extensible signature module, used to request the root key management module to derive and destroy a private key, send a public key certificate to a signature request gateway for registration, and sign the data in the signature request based on the private key and the random number according to the signature request of the signature request gateway; The signature request gateway is used to receive the signature request from the external system, select an extensible signature module according to the signature request to sign the data in the signature request, and return the data signed by the extensible signature module to the external system.
2. The parallel signature system based on key generation according to claim 1, characterized in that: The responding to the private key derivation request of the extensible signature module, generating the private key, public key certificate and random code of the extensible signature module based on the root key, specifically includes: In response to a private key derivation request from an extensible module, obtaining a root private key, a root random code, a root public key, and a flag of the extensible signature module in the private key derivation request; Linking the root public key, the root random code and the logo of the extensible signature module and performing hash processing to obtain a first hash value; Taking the high bits of the length set by the first Hash value as the second Hash value, and taking the low bits of the length set by the first Hash value to obtain the third Hash value; Adding the second hash value and the root private key to obtain the private key of the extensible signature module; Using the third hash value as a random code of the private key of the extensible signature module; The public key of the extensible signature module is obtained according to the private key of the extensible signature module.
3. The parallel signature system based on key generation according to claim 1, characterized in that: The step of selecting an extensible signature module according to the signature request to sign the data in the signature request includes: Generate random numbers k ,and k Belongs to the interval [1, n -1], where n is the number of elliptic curve elements in the SM2 algorithm; Compute elliptic curve points ( x 0 ,y 0 ),in( x 0 ,y 0 )= k , G The generator of the elliptic curve selected by the SM2 algorithm; calculate r Value, where r =( h 0 +x 0 )mod( n ), h 0 Is the hash value that needs to be signed, mod remainder operation, if r =0, then return the generated random number k Steps; calculate s =((1+ x A ) -1 *( kr*x A ))mod( n ),like S =0, then return the generated random number k steps; wherein, x A is the private key of the extensible signature module; according to s and r Get the signature.
4. The parallel signature system based on key generation according to claim 1, characterized in that: When the extensible signature module requests the root key management module to derive a private key, it includes: The extensible signature module generates a unique token; The extensible signature module sends a private key derivation request carrying the flag to the root key management module; The extensible signature module receives and stores the random code and public key certificate returned by the root key management module.
5. The parallel signature system based on key generation according to claim 1, characterized in that: The signature gateway verifies the public key certificate of the extensible signature module in the following way: Read the public key of the extensible signature module from the public key certificate of the extensible signature module Y 1 and random code c 1 ; The public key certificate of the extensible signature module is verified using the root public key certificate, wherein the verification process includes: Read the root public key of the root public key certificate Y 0 ; when , passed the verification.
6. The parallel signature system based on key generation according to claim 1, characterized in that: The step of performing destruction processing on the extensible signature module in response to the destruction request of the extensible signature module comprises: Receiving a destruction request for the extensible signature module; Read the public key certificate of the extensible signature module; Determine whether the extensible signature module is valid according to the public key certificate of the extensible signature module, and when the extensible signature module is valid, generate a revocation certificate according to the destruction request; The revocation certificate is signed by a root private key, and the signed revocation certificate is returned to the extensible signature module.
7. The parallel signature system based on key generation according to claim 1, characterized in that: When the extensible signature module requests the root key management module to destroy, it includes: The extensible signature module generates a destruction request according to its own logo and public key certificate; The extensible signature module signs the destruction request with its own private key and sends it to the root key management module; Receive the revocation certificate returned by the root key management module.
8. The parallel signature system based on key generation according to claim 7, characterized in that: After the extensible signature module receives the revocation certificate, the extensible signature module sends the revocation certificate to the signature request gateway to revoke the public key certificate stored in the signature request gateway and stop the service.
9. The parallel signature system based on key generation according to claim 1, characterized in that: The root key management module runs based on the SE chip.
10. A parallel signature method based on key generation, characterized in that: The method is performed by the parallel signature system based on key generation according to any one of claims 1 to 9, and comprises the following steps: The root key management module responds to the private key derivation request of the extensible signature module and generates the private key, public key certificate and random code of the extensible signature module based on the root key; The signature request gateway receives the signature request from the external system, selects an extensible signature module according to the signature request to sign the data in the signature request, and returns the data signed by the extensible signature module to the external system.
Citation Information
Patent Citations
Digital signature method and system
CN106921496A
