A cloud-based collaborative signature system and method based on national secret algorithm
By adopting SM2 elliptic curve public key cryptography algorithm and collaborative signature technology on mobile smart terminals, combined with PIN code authentication, the problem of insufficient security of key management in the existing technology is solved, and efficient and secure key sharding is achieved and collaborative signatures improve the security and efficiency of mobile smart terminals.
Patent Information
- Application Number
- CN202210669196.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2042-06-14
AI Technical Summary
The existing key management technology has insufficient security in mobile smart terminals, especially in complex scenarios, and too many key shards lead to management difficulties, complex distribution, and inefficient efficiency.
The cloud-end collaborative signature system based on SM2 elliptic curve public key cryptography algorithm is adopted. Through key sharding technology and collaborative signature technology, the interaction between the cloud and mobile smart terminals is used, and the identity verification is used is used, and the GmSSL library function is used to achieve encryption. Secure management and collaborative signature of keys.
On the premise of ensuring security and efficiency, data signature and universal password service functions are realized, the security of the private keys of mobile smart terminal users is ensured, the collaborative signature process is simplified, efficiency is improved, network and hardware resource consumption is reduced, and the system is enhanced. Resist attack ability.
Smart Images

Figure CN115002759B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cloud-based collaborative signature system and method based on a national secret algorithm, and in particular to a system and method that combines key sharding technology with collaborative signature technology and PIN code-based identity authentication technology. Background Art
[0002] Most of the key management technologies currently applied to mobile smart terminals have the problem of insufficient security. At the same time, in the article "Research on Mobile Security Access of Government Affairs Based on National Secret Algorithm Sharding Key Technology" (Jiao Di. Research on Mobile Security Access of Government Affairs Based on National Secret Algorithm Sharding Key Technology [J]. Network Security Technology and Application, 2020 (09): 28-30.), the author Jiao Di introduced the SM9 algorithm into e-government for discussion. The use of the SM9 ready-made key sharding algorithm can increase the security of digital signatures to a certain extent. Compared with the present invention, the use of the ready-made SM9 key sharding algorithm is not flexible enough and difficult to cope with complex and changeable scenarios. The present invention uses the SM2 public key algorithm as the basis to design a collaborative signature module, leaving room for improvement. In addition, the author did not provide a practical and specific implementation method in the article.
[0003] In the article "Smart Grid Multi-Source Data Security Protection Based on Combined Keys" (Gao Jian, Chen Wenbin, Pang Jianmin, Yu Huadong, Song Guorui. Smart Grid Multi-Source Data Security Protection Based on Combined Keys [J]. Telecommunications Science, 2020, 36(01): 134-138.), the authors Gao Jian et al. proposed a scheme to divide a key into several different sub-key fragments (hereinafter referred to as Scheme B), and then combine these key fragments to generate new keys and distribute them to different terminals in the system. The key calculation method in Scheme B is only matrix multiplication, which is less secure than the elliptic curve algorithm in the present invention. In addition, due to the excessive number of key fragments in Scheme B, it also brings about problems such as difficult management, complex distribution, and low efficiency. Summary of the invention
[0004] The technology of the present invention solves the problem: Overcoming the shortcomings of the prior art, providing a cloud-based collaborative signature system and method based on the national secret algorithm, meeting the needs of cryptographic applications such as identity authentication, digital signature and integrity protection in applications such as mobile office, instant messaging and online video conferencing, and realizing data signature and general cryptographic service functions on mobile smart terminals while ensuring security and efficiency, thereby ensuring the security of private keys of mobile smart terminal users.
[0005] The technical solution of the present invention is: a cloud-based collaborative signature system based on a national secret algorithm, including a cloud, a mobile smart terminal and a server cryptographic device;
[0006] The cloud is responsible for responding to the key sharding and collaborative signature requests of the mobile smart terminal, and providing the cloud public and private key sharding generation function; in the key sharding process, the public key shards generated by the cloud are sent to the mobile smart terminal, and the public key shards sent by the mobile smart terminal are received at the same time, and the key sharding is completed by interaction with the mobile smart terminal; in the collaborative signature process, various intermediate values of the collaborative signature sent by the mobile smart terminal are sent and received, and the collaborative signature is completed by interaction with the mobile smart terminal. After receiving the user's ID, PIN code and public key shards, a storage application will be issued to the server cryptographic device to store the user's ID, PIN code and public key shards in the server cryptographic device, and a temporary application will be made to the server cryptographic device when the user password and key data are needed in the cloud;
[0007] The mobile intelligent terminal provides sharded key generation, update and storage functions; during the key sharding process, the public key shards generated by the mobile intelligent terminal are sent to the cloud, and the public key shards sent by the cloud are received at the same time, and the key sharding is completed by interacting with the cloud; during the collaborative signature process, various intermediate values of the collaborative signature sent by the cloud are sent and received, and the collaborative signature is completed by interacting with the cloud. During the collaborative signature process, the SM2 elliptic curve public key cryptography algorithm with independent intellectual property rights of my country is used by calling GmSSL, wherein GmSSL is an open source cryptographic toolbox that supports national secrets (national commercial cryptography) algorithms such as SM2 / SM3 / SM4 / SM9 / ZUC.
[0008] The server cryptographic device provides a shard key update and storage function, stores the user's PIN code and public key shards, encrypts the user's PIN code and private key shards, enhances the cloud's anti-attack capability, responds to the cloud's request when the cloud needs the user's password and key data, and provides the cloud with the user's PIN code and public key shards it needs;
[0009] This module design is based on the SM2 elliptic curve public key cryptographic algorithm with independent intellectual property rights in my country. The SM2 elliptic curve public key cryptographic algorithm is a public key cryptographic algorithm independently designed by my country, including SM2-1 elliptic curve digital signature algorithm, SM2-2 elliptic curve key exchange protocol, SM2-3 elliptic curve public key encryption algorithm, which are used to implement digital signature key negotiation and data encryption functions. And call the GmSSL library function at the bottom layer to implement a series of operations. Among them, GmSSL is an open source cryptographic toolbox that supports SM2 / SM3 / SM4 / SM9 / ZUC and other national secret (national commercial cryptographic) algorithms.
[0010] The cloud includes: a cloud SM2 collaborative signature module, a cloud signature verification module, a cloud SM3 hash module, a cloud SM4 encryption and decryption module, a cloud key management module, a cloud communication module and a cloud GmSSL library function;
[0011] Cloud key management module: updates and stores the keys generated by the cloud SM2 collaborative signature module through key security management technology. The cloud key management module manages the keys and password data used by the SM2 collaborative signature module by applying to the server password device;
[0012] Cloud-based SM2 collaborative signature module: The collaborative signature function is realized by the collaborative work of the mobile smart terminal SM2 collaborative signature module and the cloud-based SM2 collaborative signature module. Before the collaborative signature, the cloud authenticates the mobile smart terminal user by verifying the PIN code. After the verification, the cloud and the mobile smart terminal can perform a series of data interaction processes such as key sharding and collaborative signature through data interaction. The public key and private key used by the SM2 collaborative signature modules of the cloud and mobile smart terminals are each composed of multiple parts, namely, mobile smart terminal public key sharding, mobile smart terminal private key sharding, cloud-based public key sharding and cloud-based private key sharding. In addition, the joint public key can be calculated based on the mobile smart terminal public key sharding and cloud-based public key sharding. The cloud-based SM2 collaborative signature module uses the collaborative signature technology and sharded key technology of the SM2 public key cryptography to realize the collaborative signature between the cloud and the mobile smart terminal. The cloud-based public key The sharding and cloud private key sharding are generated by the interaction of the SM2 collaborative signature module on the cloud and the SM2 collaborative signature module on the mobile smart terminal. After generation, the cloud public key sharding, the cloud private key sharding, the mobile smart terminal public key sharding obtained from the mobile smart terminal, and the joint public key are stored in the server cryptographic device through the cloud password management module; after the key sharding is completed, the collaborative signature is performed, and the cloud SM2 collaborative signature module and the mobile smart terminal SM2 collaborative signature module will interact with the intermediate calculation data of four messages to complete the collaborative signature; when the cloud SM2 collaborative signature module needs to use the key and password data, it applies to the server cryptographic device through the cloud key management module; the entire collaborative signature calculation process only uses four messages to complete the entire process, which simplifies the collaborative signature process, improves the efficiency of collaborative signature, consumes less network resources and hardware resources, and has good security;
[0013] Cloud signature verification module: It is a submodule of cloud collaborative signature. It verifies the signature generated by oneself or others through the signature verification technology based on SM2 public key cryptography to realize the function of identity authentication. This module can complete the signature verification function without communicating with the mobile smart terminal.
[0014] Cloud SM3 hash module: implements the hash function and provides a function for hashing data as a supplement to the functions of other modules;
[0015] The cloud communication module realizes data interaction between the mobile smart terminal and the cloud; before the mobile smart terminal interacts with the cloud, the cloud will first verify the identity of the mobile smart terminal user. The identity is identified by verifying the ID and PIN code sent by the mobile smart terminal user. After receiving the ID and PIN code sent by the mobile smart terminal user, the cloud will apply for the PIN code corresponding to this ID from the server password device through the cloud password management module. If this PIN code is the same as the PIN code sent by the mobile smart terminal user, the verification is successful; after the verification is successful, the cloud will apply for various keys of the user corresponding to this ID from the server password device through the cloud password management module, and interact with the mobile smart terminal user to generate key calculation data;
[0016] The cloud-side GmSSL library function provides method interfaces for other modules in the cloud;
[0017] The mobile intelligent terminal includes: a mobile intelligent terminal SM2 collaborative signature module, a mobile intelligent terminal verification module, a mobile intelligent terminal SM3 hash module, a mobile intelligent terminal SM4 encryption and decryption module, a mobile intelligent terminal key management module, a mobile intelligent terminal communication module and a mobile intelligent terminal GmSSL library function;
[0018] The key management module of the mobile smart terminal updates and stores the keys and passwords generated by the mobile smart terminal SM2 collaborative signature module through key security management technology. The mobile smart terminal SM2 collaborative signature module applies to the key management module of the mobile smart terminal when using the key and password data; the key management module of the mobile smart terminal uses the key security management technology, which is designed and implemented using the PIN code. The PIN code is an identification password. Only by entering the correct PIN code can the various keys stored in the password management module of the mobile smart terminal be read; once the PIN code is entered incorrectly for multiple consecutive times, the device will be locked; when the mobile smart terminal loads the mobile smart terminal public key shard, the mobile smart terminal private key shard, and the cloud public key shard sensitive information, it also needs to pass the mobile smart terminal's own biometric identity authentication (such as fingerprint verification, facial recognition, etc.), and retrieve sensitive information from the mobile smart terminal password management module after passing the verification;
[0019] Mobile smart terminal SM2 collaborative signature module: The mobile smart terminal SM2 collaborative signature module uses the collaborative signature technology of SM2 public key cryptography and sharded key technology to realize collaborative signature between the cloud and the mobile smart terminal; the mobile smart terminal public key shard, the mobile smart terminal private key shard, and the joint public key are generated by the interaction of the SM2 collaborative signature module of the mobile smart terminal and the SM2 collaborative signature module of the cloud. After generation, the mobile smart terminal public key shard, the mobile smart terminal private key shard, the mobile smart terminal public key shard obtained from the cloud, and the joint public key are stored in the password management module of the mobile smart terminal; the final collaborative signature is generated in the mobile smart terminal, and the complete signature realizes the non-repudiation of data and the non-repudiation of operation; this module works together with the cloud SM2 collaborative signature module, and the contents described in the cloud SM2 collaborative signature module can be seen in the other parts;
[0020] Mobile smart terminal signature verification module: The mobile smart terminal signature verification module is a submodule of the mobile smart terminal collaborative signature. It verifies the signature generated by itself or others through the signature verification technology based on the SM2 public key cryptography to realize the identity authentication function; this module can complete the signature verification function without communicating with the cloud;
[0021] Mobile smart terminal SM3 hash module: The mobile smart terminal SM3 hash module implements the hash function and provides a function of hashing data as a supplement to the functions of other modules;
[0022] The mobile smart terminal communication module realizes the data interaction between the mobile smart terminal and the cloud; before the mobile smart terminal interacts with the cloud, the cloud will first verify the identity of the mobile smart terminal user. The identity is identified by verifying the ID and PIN code sent by the mobile smart terminal user. After receiving the ID and PIN code sent by the mobile smart terminal user, the cloud will apply for the PIN code corresponding to this ID from the server password device through the cloud password management module. If this PIN code is the same as the PIN code sent by the mobile smart terminal user, the verification is successful; after the verification is successful, the cloud will apply for various keys of the user corresponding to this ID from the server password device through the cloud password management module, and interact with the mobile smart terminal user to generate key calculation data;
[0023] The cloud-side GmSSL library function provides method interfaces for other cloud-side modules.
[0024] The method of the cloud collaborative signature system based on the national secret algorithm of the present invention comprises the following steps:
[0025] Step 1: The mobile smart terminal and the cloud interact to generate their own public and private key fragments. The mobile smart terminal will store the public and private keys in the key storage module of the mobile smart terminal, and the cloud will store the public and private keys in the server cryptographic device;
[0026] Step 2: Call the SM2 collaborative signature module. The mobile smart terminal cryptographic module uses the first mobile smart terminal key fragment to calculate the message, and then transmits part of the calculation result s to the cloud. The cloud uses the cloud key fragment to transform the signature result to generate t and transmit it back to the mobile smart terminal. The entire collaborative signature only uses four messages (2 round trips) to complete the entire process, and finally obtains the signature data (r, s) on the mobile smart terminal.
[0027] Step 3: Call the signature verification module to verify the signature. Verify the joint signature of others on the mobile smart terminal. Enter the data content, unverified signature data (r, s), joint public key, and the ID of the person being verified. The signature verification function can be completed without communicating with the cloud.
[0028] The advantages of the present invention compared with the prior art are:
[0029] (1) The core technologies of the present invention are key sharding technology and collaborative signature technology. Key sharding, namely the mobile smart terminal password module and the collaborative signature server, provides a simple and secure SM2 collaborative digital signature method and device. That is, the private key is divided into two parts: the first shard subkey and the second shard subkey. The first shard subkey is stored in the mobile smart terminal, and the second shard subkey is derived and generated by the collaborative signature server. Finally, the completed collaborative signature is generated in the mobile smart terminal, and the complete signature can achieve non-repudiation of data and non-repudiation of operations.
[0030] The collaborative signature technology is that the mobile smart terminal cryptographic module uses the first shard subkey to sign the message, and then transmits the partial signature result s to the collaborative signature server. The collaborative signature server uses the second shard subkey to transform the signature result to generate t and transmit it back to the mobile smart terminal. The entire collaborative signature process only uses four messages (2 round trips) to complete the entire process, which simplifies the collaborative signature process, improves the efficiency of collaborative signature, consumes less network resources and hardware resources, and has good security.
[0031] At the same time, key security management technology is used, which is designed and implemented using PIN codes. The PIN code is an identification password. Only by entering the correct PIN code can the private key of the mobile smart terminal be read. Once the PIN code is entered incorrectly for multiple consecutive times, the device will be locked. When loading the private key shard, the mobile smart terminal needs to pass the identity authentication (such as face recognition, fingerprint recognition, etc.) provided by the mobile smart terminal. After passing, the key shard can be retrieved from the password management module. The cloud will verify the ID and PIN code. If the verification is successful, the cloud can read the various keys of the terminal user and interact with the user to generate key calculation data. By setting the PIN code on the mobile smart terminal and verifying the key security management technology in the cloud, the security of the system is greatly improved, and it effectively resists offline and online brute force cracking.
[0032] The signature verification technology is also used to verify the joint signature of others on a mobile smart terminal. The data content, (r, s), joint public key, and the ID of the person being verified are input. The signature verification function can be completed without communicating with the cloud.
[0033] (2) The present invention innovatively uses the cloud UsbKey as a device for securely storing PIN codes. The cooperation with the joint signature module enables the data required for the entire signature process to be stored separately in three different devices, and any attack on any party cannot obtain enough information to forge a signature. After testing and verification, the beneficial effect of the present invention compared with the prior art is that it is superior to similar solutions in terms of security and is not affected in terms of efficiency. Compared with other joint signature systems on the market, this system has obvious advantages. For example, the joint signature designed by Luo Yongan, Si Yali, and Liu Wenyuan requires public and private keys of both parties. More initial data brings more calculation processes. The number of scalar multiplications in the example is significantly more than that of the present invention. Since performance testing is not performed in the example, the present invention is only analyzed from the perspective of calculation amount. In addition, the present invention preprocesses the data during the signature process, further improving the operating efficiency of the system. At the same time, it can meet the second-level security requirements of "GM / T 0028-2014 Technical Requirements for Security of Cryptographic Modules", is easy to transform achievements, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the system structure of the present invention;
[0035] Figure 2 It is the key sharding flow chart;
[0036] Figure 3 It is a collaborative signature flow chart;
[0037] Figure 4 It is a signature verification flow chart;
[0038] Figure 5 It is a flow chart of the use of the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0040] like Figure 1 As shown, a cloud collaborative signature system based on a national secret algorithm of the present invention includes a cloud, a mobile smart terminal and a server cryptographic device;
[0041] The cloud includes the cloud SM2 collaborative signature module, the cloud signature verification module, the cloud SM3 hash module, the cloud SM4 encryption and decryption module, the cloud key management module, and the cloud communication module; it is responsible for responding to the collaborative signature request of the mobile smart terminal, completing the collaborative signature by interacting with the data stored in the server cryptographic device, and returning the data and joint public key required for the complete signature to the mobile smart terminal;
[0042] The mobile smart terminal encapsulates multiple security interfaces, supports multiple development languages, and provides shard key storage and management functions; including the mobile smart terminal SM2 collaborative signature module, the mobile smart terminal signature verification module, the mobile smart terminal SM3 hash module, the mobile smart terminal SM4 encryption and decryption module, the mobile smart terminal key management module and the mobile smart terminal communication module; sends out collaborative signature requests and completes the signature with the cloud; completes the shard key generation, update and storage functions;
[0043] The key management module of the mobile smart terminal updates and stores the keys and passwords generated by other modules through key security management technology. When other modules use the key and password data, they temporarily apply to the first key management module. The key management module of the mobile smart terminal uses key security management technology, which is designed and implemented using PIN code. The PIN code is an identification password. Only when the correct PIN code is entered can the various keys of the mobile smart terminal be read. Once the PIN code is entered incorrectly for multiple consecutive times, the device will be locked. When loading the private key fragment, the mobile smart terminal needs to pass the identity authentication provided by the mobile smart terminal (such as face recognition, fingerprint recognition, etc.). After passing, the key fragment is retrieved from the password management module. The cloud will verify the ID and PIN code. If the verification is successful, the cloud will read the various keys of the terminal user and interact with the user to generate key calculation data. By setting the PIN code on the mobile smart terminal and verifying the key security management technology on the cloud, the security of the system is greatly improved, and it effectively resists offline and online brute force cracking. The security of the system is enhanced by adding identity authentication methods.
[0044] The key management module of the cloud uses key security management technology. Only after the user of the mobile smart terminal enters the correct PIN code to authenticate with the cloud, the cloud will read the various keys of the user of the mobile smart terminal and interact with the user to generate key calculation data;
[0045] The cloud SM2 collaborative signature module uses the collaborative signature technology and sharding key technology of the SM2 public key cryptography to implement collaborative signatures in the cloud, and stores the passwords and keys generated or obtained by itself in the cloud key management module;
[0046] The SM2 collaborative signature module function is implemented by the mobile smart terminal and the cloud. The cloud authenticates the mobile smart terminal user by verifying the PIN code. After the identity authentication is passed, the mobile smart terminal signs the message with the first shard subkey and transmits the partial signature result s to the cloud. The collaborative signature server transforms the signature result with the second shard subkey to generate t and transmits it back to the mobile smart terminal. The entire collaborative signature calculation process uses only four messages (2 round trips) to complete the entire process, which simplifies the collaborative signature process, improves the collaborative signature efficiency, consumes less network resources and hardware resources, and has good security.
[0047] (1) A high-performance, high-security collaborative signature system is implemented.
[0048] (2) All verification passwords, keys and other data used in the cloud must be applied to the server password device (server password device), which enhances security.
[0049] (3) The communication process is optimized, and the entire collaborative signature process can be completed using only four messages;
[0050] The SM2 collaborative signature module in the mobile smart terminal and the cloud divides the private key into two parts: the first shard subkey and the second shard subkey. The first shard subkey is stored in the mobile smart terminal, and the second shard subkey is derived and generated by the collaborative signature server. After generation, the cloud private key and the mobile smart terminal public key are stored in the server cryptographic device; finally, the completed collaborative signature is generated in the mobile smart terminal, and the complete signature realizes the non-repudiation of data and the non-repudiation of operation.
[0051] (1) A highly secure and feasible implementation scheme for public key sharding is provided.
[0052] (2) Provides an offline key storage method.
[0053] The cloud-based signature verification module verifies the signature generated by itself or others through the signature verification technology based on SM2 public key cryptography to realize the function of identity authentication; input data content, unverified signature data (r, s), joint public key, and the ID of the person to be verified, and the signature verification function is completed without communicating with the cloud;
[0054] The cloud SM3 hash module implements the hashing function and provides a function for hashing data;
[0055] The cloud-side SM4 encryption and decryption module uses a symmetric key algorithm to encrypt data and expand application scenarios. The first SM4 encryption and decryption module stores the symmetric key in the first key management module;
[0056] The cloud communication module and the mobile intelligent terminal communication module realize data exchange between the mobile intelligent terminal and the cloud;
[0057] At the same time, the GmSSL library function is called at the bottom layer to implement a series of calculation operations. The upper layer is encapsulated into the cloud SM2 collaborative signature module and the mobile smart terminal SM2 collaborative signature module, the cloud signature verification module and the mobile smart terminal signature verification module as the interface provided to the outside;
[0058] The server password device generates a unique digital signature, stores the user's PIN code and private key fragments, and encrypts the user's PIN code and private key fragments to enhance the cloud's anti-attack capabilities; when the cloud needs user passwords and key data, it needs to temporarily apply to the cloud key management module;
[0059] When loading private key shards, mobile smart terminals need to pass the mobile smart terminal's own identity authentication (such as face recognition, fingerprint recognition, etc.). After passing, the key shards are retrieved from the password management module. The cloud will verify the ID and PIN code. If the verification is successful, the cloud will read the terminal user's various keys and interact with the user to generate key calculation data. The key security management technology of setting PIN codes on mobile smart terminals and verifying them in the cloud greatly improves the security of the system and effectively resists offline and online brute force cracking.
[0060] The cloud collaborative signature method based on the national secret algorithm of the present invention is implemented in the following steps:
[0061] In the first step, the user initiates a request to the cloud after passing the local identity authentication of the mobile smart terminal, during which the cloud interacts with the server password device;
[0062] In the second step, the mobile smart terminal and the cloud jointly generate key shards. During this period, the cloud interacts with the server cryptographic device. The key sharding is implemented as follows: Figure 2 shown.
[0063] Define p as a large prime number, Fp as a finite field. Select a, b∈Fp as the parameters of the elliptic curve E, define P as a point on the elliptic curve E, and use it as the generator of the group G. The order of the group G is q, M is the message to be signed, ENTL is the length of IDT, SM3 is a domestic hash algorithm, and IDT is the name of the signing user. The remaining unspecified variables are intermediate variables of the calculation.
[0064] (1) Given a security parameter λ, the mobile smart terminal initializes the elliptic curve parameters p,a,b,P,q. The mobile smart terminal randomly and secretly selects the mobile smart terminal private key shard dA∈Z * q(Z *q is a random number set), and calculates the public key shard pkA = dA*P of the mobile smart terminal, and then transmits pkA to the cloud;
[0065] (2) Given the security parameter λ, the cloud initializes the elliptic curve parameters p,a,b,P,q. The cloud randomly and secretly selects the cloud private key shard dB∈Zq * , calculate the cloud public key shard pkB = dB*P and the joint public key pk = dA*dB*PP, that is, pk = dB*pkA-P, and store (pk, dB, pkA) in the server cryptographic device, and transmit pkB to the mobile smart terminal;
[0066] (3) After receiving the cloud public key shards, the mobile smart terminal can calculate the joint public key pk, pk = dA*dB*PP, that is, pk = dA*pkB-P, and store (pk, dA, pkB);
[0067] (4) The mobile smart terminal sets a PIN code, which is bound to the user ID and its private key and stored in the server password device (pk is the joint public key, pkA is the mobile smart terminal public key shard, pkB is the cloud public key shard, dA is the mobile smart terminal private key shard, and dB is the cloud private key shard);
[0068] The third step is that the mobile smart terminal and the cloud collaborate to sign, during which the cloud interacts with the server cryptographic device, such as Figure 3 shown.
[0069] (1) Enter the PIN code on the mobile smart terminal to load the key shards;
[0070] (2) The mobile smart terminal and the cloud perform mutual authentication. After the cloud passes the identity authentication, it can apply to the server cryptographic device for the key shard corresponding to the user. And calculate R A =k A *P,R A '=k A *pk B , and transmit the values of RA and RA' to the cloud; verify in the cloud whether R is satisfied A '=k A *pk B , if satisfied, then calculate R B =k B *pk A ,R B '=k B *P, and sends RB, RB' to the mobile intelligent terminal; after the mobile intelligent terminal receives the message, it verifies whether it satisfies R B =d A *R B', if satisfied, start signing;
[0071] (3) The mobile intelligent terminal uses the shard private key to generate a partial signature s' and calculates R' = RA + RB = (xA, yA), ZA = SM3 (ENTL || IDT || a || b || P || pk), r = SM3 (ZA || M) + xA mod q, and calculates s' = (kA + r) dA -1 mod q then sends the value of s' to the cloud and requests the cloud to perform collaborative signing;
[0072] (4) Cloud computing t = (s' + kB) dB -1 mod q, generate a partial signature, and then send the value of t to the mobile smart terminal;
[0073] (5) The mobile intelligent terminal calculates s=tr and outputs the collaborative signature;
[0074] The fourth step is to verify the signature offline on a mobile smart terminal or in the cloud. Figure 4 shown.
[0075] Letters with a superscript "'" mean unverified data and have the same meaning as letters without a superscript.
[0076] (1) Verify whether r', s'∈Zq* holds. If so, proceed to the next step. Otherwise, the signature verification fails.
[0077] (2) Assume ZA = SM3(ENTL||IDT||a||b||P||pk), calculate e' = SM3(ZA||M');
[0078] (3) Calculate t = r' + s'. If t = 0, the signature verification fails. Otherwise, calculate the elliptic curve point R' = s'·P + t·Q = (x1', y1') and verify whether r' = e' + x1' mod q holds. If the verification succeeds, output 1 to indicate that the signature verification succeeds. Otherwise, output 0 to indicate that the signature verification fails.
[0079] like Figure 5 As shown in the figure, the three devices from left to right are the mobile smart terminal, the server, and the server password device. The three devices complete the collaborative signature through secure data transmission. The mobile smart terminal and the cloud generate their own private key fragments and collaborate to sign. The cloud stores sensitive information such as the user's PIN code, public and private keys in the server password device and applies to the server password device when needed.
[0080] Cloud: Connect the device to the Internet, set the cloud port, and click Secure Start Cloud. Insert the server password device into the device where the cloud is located.
[0081] Mobile smart terminal:
[0082] When users enter the APP, they need to pass the identity authentication (such as face recognition, fingerprint recognition, etc.) of the mobile smart terminal to call their own private key shards and other sensitive data, and then they can enter Figure 5 The interface shown in the mobile smart terminal.
[0083] A: Fill in the cloud's IP address and port number in ①②, fill in your own ID in ③, and click button ④ to connect to the cloud.
[0084] B: The cloud sends a prompt of successful connection to the mobile smart terminal.
[0085] C: Click ⑤ to generate public and private keys. The mobile smart terminal obtains the private key fragment and public key fragment of the mobile smart terminal through calculation, and sends the public key fragment of the mobile smart terminal to the cloud.
[0086] D: After the cloud receives the public key fragment from the mobile smart terminal, it will calculate and generate the cloud private key fragment, public key fragment, and joint public key, and send the cloud public key fragment to the mobile smart terminal. After the mobile smart terminal receives the message, it can calculate the joint public key and Displayed in.
[0087] E: On your mobile smart terminal, enter the PIN code at ⑥ and click ⑦ to send the set PIN code to the cloud.
[0088] F: Enter your PIN in ⑥, enter the data to be signed in ⑧, and click Sign jointly and send the information to the cloud.
[0089] G: The cloud first verifies whether the PIN code of the mobile smart terminal is correct. After verification, the necessary information is transmitted to the mobile smart terminal after calculation. The mobile smart terminal receives the message and calculates the signature information, which will be displayed in ⑨⑩.
[0090] H: Fill in the data to be verified into ⑧, the signer ID into ③, the signature information into ⑨⑩, and the public key into Click Signature verification: The mobile smart terminal calculates locally whether the signature verification has passed.
[0091] Cloud test environment:
[0092] Hardware environment:
[0093] CPU: Intel Xeon(R)Bronze 3106CPU@1.70GHz×16RAM: 16.0GB
[0094] Software environment: System: Ubuntu 20.04.3LTS 64-bit
[0095] Test platform: Qt Creator 4.8.0Based on Qt 5.12.0(GCC 5.3.1)
[0096] Mobile test environment:
[0097] Hardware environment:
[0098] CPU: HiSilicon Kirin 970 processor
[0099] RAM: 6.0GB
[0100] Software environment: System: Android 10
[0101] Test platform: Android studio 11
[0102] Test scope: Test the performance of the collaborative signature module.
[0103] Initialize system parameters: The core parameters are the parameters that determine the conic curve. To ensure security, the mobile smart terminal and the cloud collaborative signature module use conic curve parameters that change over time. The terminal and the server maintain clock synchronization, but due to unstable factors such as network delays, the tolerance for time errors can be up to 1 minute. For example, if Beijing time is 12:04:32, the conic curve parameters of the mobile terminal and the server are both 1204.
[0104] Table 1 Performance test data
[0105]
[0106] In Table 1, serial number 1 is the number of signatures that the collaborative signature module can sign per second, serial number 2 is the number of signatures that the verification module can verify per second, and serial number 3 is the number of key fragments and joint public keys that the collaborative signature module can generate per second.
[0107] It can be concluded from the performance test that the present invention has made great progress in collaborative signing and signature verification speed compared with similar products, while effectively ensuring security.
Claims
1. A cloud-based collaborative signature system based on a national secret algorithm, characterized in that: It includes a cloud, a mobile smart terminal and a server cryptographic device; the mobile smart terminal and the cloud interact to generate their own public and private key fragments, the mobile smart terminal stores the public and private keys in a key storage module of the mobile smart terminal, and the cloud stores the public and private keys in the server cryptographic device; The cloud is responsible for responding to key sharding and collaborative signature requests from mobile smart terminals, and providing cloud public and private key sharding generation functions; During the key sharding process, the public and private key shards generated in the cloud are sent to the mobile smart terminal, and the public and private key shards sent by the mobile smart terminal are received at the same time, and the key sharding is completed by interacting with the mobile smart terminal; During the collaborative signature process, it sends and receives various intermediate values of the collaborative signature sent by the mobile smart terminal, interacts with the mobile smart terminal to complete the collaborative signature, and after receiving the user's ID, PIN code and public key fragment, it will send a storage application to the server password device to store the user's ID, PIN code and public key fragment in the server password device. When the user password and key data are needed in the cloud, it will temporarily apply to the server password device; The mobile smart terminal provides sharded key generation, update and storage functions; during the key sharding process, the public and private key shards generated by the mobile smart terminal are sent to the cloud, and the public and private key shards sent by the cloud are received at the same time, and the key sharding is completed by interacting with the cloud; During the collaborative signature process, various intermediate values of the collaborative signature sent by the cloud are sent and received, and the collaborative signature is completed by interacting with the cloud. During the collaborative signature process, the SM2 elliptic curve public key cryptography algorithm is used by calling GmSSL, where GmSSL is an open source cryptographic toolbox that supports SM2 / SM3 / SM4 / SM9 / ZUC national cryptographic algorithms; The server cryptographic device provides a shard key update and storage function, stores the user's PIN code and public key shards, encrypts the user's PIN code and private key shards, enhances the cloud's anti-attack capability, responds to the cloud's request when the cloud needs the user's password and key data, and provides the cloud with the user's PIN code and public key shards it needs; The cloud includes: a cloud SM2 collaborative signature module, a cloud signature verification module, a cloud SM3 hash module, a cloud SM4 encryption and decryption module, a cloud key management module, a cloud communication module and a cloud GmSSL library function; Cloud key management module: updates and stores the keys generated by the cloud SM2 collaborative signature module through key security management technology. The cloud key management module manages the keys and password data used by the SM2 collaborative signature module through application of the server password device; Cloud-based SM2 collaborative signature module: The collaborative signature function is realized by the collaborative work of the mobile smart terminal SM2 collaborative signature module and the cloud-based SM2 collaborative signature module. Before the collaborative signature, the cloud authenticates the mobile smart terminal user by verifying the PIN code. After the verification, the cloud and the mobile smart terminal can perform a series of data interaction processes such as key sharding and collaborative signature through data interaction; the public key and private key used by the SM2 collaborative signature module of the cloud and the mobile smart terminal are each composed of multiple parts, namely, the mobile smart terminal public key shard, the mobile smart terminal private key shard, the cloud-based public key shard and the cloud-based private key shard. In addition, the joint public key can be calculated based on the mobile smart terminal public key shard and the cloud-based public key shard; the cloud-based SM2 collaborative signature module uses the SM2 public key password Collaborative signature technology and sharded key technology realize collaborative signature between the cloud and the mobile smart terminal; cloud public key shards and cloud private key shards are generated by the interaction of the SM2 collaborative signature module on the cloud and the SM2 collaborative signature module on the mobile smart terminal. After generation, the cloud public key shards, cloud private key shards, mobile smart terminal public key shards obtained from the mobile smart terminal, and the joint public key are stored in the server cryptographic device through the cloud password management module; collaborative signature is performed after key sharding is completed, and the intermediate calculation data of four messages will be interacted between the cloud SM2 collaborative signature module and the mobile smart terminal SM2 collaborative signature module to complete the collaborative signature; when the cloud SM2 collaborative signature module needs to use the key and password data, it applies to the server cryptographic device through the cloud key management module; Cloud signature verification module: It is a submodule of cloud collaborative signature. It verifies the signature generated by oneself or others through the signature verification technology based on SM2 public key cryptography to realize the function of identity authentication. This module can complete the signature verification function without communicating with the mobile smart terminal. Cloud SM3 hash module: implements the hash function and provides a function for hashing data; The cloud communication module realizes data interaction between the mobile smart terminal and the cloud; before the mobile smart terminal interacts with the cloud, the cloud will first verify the identity of the mobile smart terminal user. The identity is identified by verifying the ID and PIN code sent by the mobile smart terminal user. After receiving the ID and PIN code sent by the mobile smart terminal user, the cloud will apply for the PIN code corresponding to this ID from the server password device through the cloud password management module. If this PIN code is the same as the PIN code sent by the mobile smart terminal user, the verification is successful; after the verification is successful, the cloud will apply for various keys of the user corresponding to this ID from the server password device through the cloud password management module, and interact with the mobile smart terminal user to generate key calculation data; The cloud-side GmSSL library function provides method interfaces for other modules in the cloud; The mobile intelligent terminal includes: a mobile intelligent terminal SM2 collaborative signature module, a mobile intelligent terminal signature verification module, a mobile intelligent terminal SM3 hash module, a mobile intelligent terminal SM4 encryption and decryption module, a mobile intelligent terminal key management module, a mobile intelligent terminal communication module and a mobile intelligent terminal GmSSL library function; The key management module of the mobile smart terminal updates and stores the keys and passwords generated by the SM2 collaborative signature module of the mobile smart terminal through key security management technology. The SM2 collaborative signature module of the mobile smart terminal applies to the key management module of the mobile smart terminal when using the key and password data; the key management module of the mobile smart terminal uses key security management technology, which is designed and implemented using a PIN code. The PIN code is an identification password. Only by entering the correct PIN code can the various keys stored in the password management module of the mobile smart terminal be read; once the PIN code is entered incorrectly for multiple consecutive times, the device will be locked; when loading the mobile smart terminal public key shard, the mobile smart terminal private key shard, and the cloud public key shard sensitive information, the mobile smart terminal also needs to pass the mobile smart terminal's own biometric identity authentication. After passing the authentication, the sensitive information is retrieved from the password management module of the mobile smart terminal; Mobile smart terminal SM2 collaborative signature module: The mobile smart terminal SM2 collaborative signature module uses the collaborative signature technology of SM2 public key cryptography and sharded key technology to realize collaborative signature between the cloud and the mobile smart terminal; the mobile smart terminal public key shard, the mobile smart terminal private key shard, and the joint public key are generated by the interaction of the SM2 collaborative signature module of the mobile smart terminal and the SM2 collaborative signature module of the cloud. After generation, the mobile smart terminal public key shard, the mobile smart terminal private key shard, the mobile smart terminal public key shard obtained from the cloud, and the joint public key are stored in the password management module of the mobile smart terminal; the final collaborative signature is generated in the mobile smart terminal, and the complete signature realizes the non-repudiation of data and operation; this module works together with the cloud SM2 collaborative signature module, and the content of the cloud SM2 collaborative signature module can be seen in other parts; Mobile smart terminal signature verification module: The mobile smart terminal signature verification module is a submodule of the mobile smart terminal collaborative signature. It verifies the signature generated by itself or others through the signature verification technology based on SM2 public key cryptography to realize the identity authentication function; this module completes the signature verification function without communicating with the cloud; Mobile smart terminal SM3 hash module: The mobile smart terminal SM3 hash module implements the hash function and provides a function of hashing data as a supplement to the functions of other modules; The mobile smart terminal communication module realizes the data interaction between the mobile smart terminal and the cloud; before the mobile smart terminal interacts with the cloud, the cloud will first verify the identity of the mobile smart terminal user. The identity is identified by verifying the ID and PIN code sent by the mobile smart terminal user. After receiving the ID and PIN code sent by the mobile smart terminal user, the cloud will apply for the PIN code corresponding to this ID from the server password device through the cloud password management module. If this PIN code is the same as the PIN code sent by the mobile smart terminal user, the verification is successful; after the verification is successful, the cloud will apply for various keys of the user corresponding to this ID from the server password device through the cloud password management module, and interact with the mobile smart terminal user to generate key calculation data; Mobile intelligence GmSSL library functions provide method interfaces for other modules of mobile intelligence.
2. A method for implementing the cloud collaborative signature system based on the national secret algorithm as described in claim 1, characterized in that: Here are the steps: Step 1: The mobile smart terminal and the cloud interact to generate their own public and private key fragments. The mobile smart terminal will store the public and private keys in the key storage module of the mobile smart terminal, and the cloud will store the public and private keys in the server cryptographic device; Step 2: Call the SM2 collaborative signature module. The mobile smart terminal cryptographic module uses the mobile smart terminal key fragment to calculate the message, and then transmits part of the calculation result s to the cloud. The cloud uses the cloud key fragment to transform the signature result to generate t and transmit it back to the mobile smart terminal. The mobile terminal calculates the signature component r through s and t. The entire collaborative signature only uses four messages to complete the entire process, and finally obtains the signature data (r, s) on the mobile smart terminal. Step 3: Call the signature verification module to verify the signature. Verify the joint signature of others on the mobile smart terminal. Enter the data content, unverified signature data (r, s), joint public key, and the ID of the person being verified. The signature verification function can be completed without communicating with the cloud.
Citation Information
Patent Citations
SM2 algorithm key segmentation signature system and method
CN107483191A
Internet of Things security cloud platform implementation method based on national cryptographic algorithm security chip
CN113595985A