A signature method, device, server, medium and signature system

By using double-encrypted private keys in the database, the security and trust issues in the traditional electronic signature scenario where multiple people use the same seal are solved, and the signature business scenario where multiple people use the same seal is realized, and improves the The security of the signature is improved.

CN113868684BActive Publication Date: 2024-10-08CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111161751.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2024-10-08
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

In the electronic signature scenario, due to the limitations of the physical UKey in the traditional mode, it is impossible to realize the business scenario of multiple people using the same seal to perform signatures, and there are security issues.

Method used

By using the double-encrypted private key method in the database, the cryptographic machine and the user end encrypt the private key in sequence and store it in the database, ensuring that the private key is stored safely. The server cannot be used independently, and the user cannot be used independently, which solves the trust problem. , and realize the signature of multiple people using the same seal.

Benefits of technology

It improves the security of signatures, solves the problem of business scenarios where multiple people use the same seal, ensures the safe storage and use of private keys, and enhances trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868684B_ABST
    Figure CN113868684B_ABST
Patent Text Reader

Abstract

The present invention provides a signature method, device, server, medium and signature system, the method includes: obtaining a key pair signature request sent by a user end; reading a private key ciphertext from a database according to a key identifier of the key pair signature request, the private key ciphertext being the ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end; obtaining a first private key ciphertext obtained by the user end decrypting the private key ciphertext using the encrypted private key; using the cipher machine to decrypt the first private key ciphertext to obtain the private key, using the private key to perform a signature operation on the signature data to obtain a signature value; and sending the signature value to the user end. Through the above technical solution, by storing the private key ciphertext in a database to achieve multi-person sharing, and using a method of doubly encrypting the private key, the private key is securely stored, the server end cannot independently use the doubly encrypted private key for operation, and the user end cannot independently use the doubly encrypted private key for operation, which solves the trust problem of the user end and the server end, and improves the security of the signature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of signature technology, and in particular to a signature method, device, server, medium and signature system. Background Art

[0002] In the electronic signature application scenario, there is a business scenario where multiple people share a private key to complete the signature. In general signature applications, the signature private key is stored in the user-side password module such as UKey (intelligent password key), and when executing the signature operation, the user uses the user-side password module such as UKey on the terminal to complete the signature operation.

[0003] Taking the user-side password module as Ukey as an example, in some signature scenarios, such as seal applications, in the current application mode, after an electronic seal is produced, the seal signature private key is usually stored in UKey. The UKey is inserted during signing, and the digital signature operation is completed at the terminal. That is, the user can only perform the seal signature operation after obtaining the physical UKey; but in actual business scenarios, according to business needs, it is usually necessary for multiple people to use the same seal to sign the business. The problem this brings is that in the traditional mode, due to the limitations of the physical UKey, it is impossible to truly realize the business scenario where multiple people use the same seal to sign.

[0004] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0005] The purpose of this application is to provide a signature method, device, server, medium and signature system, which can truly realize the business scenario of multiple people using the same seal to perform signatures, and can improve the security of signatures. The specific scheme is as follows:

[0006] The present application discloses a signing method, comprising:

[0007] Get the key pair signature request sent by the user;

[0008] Reading a private key ciphertext from a database according to the key identifier of the key pair signature request, wherein the private key ciphertext is the ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end;

[0009] Obtaining a first private key ciphertext obtained by the user end decrypting the private key ciphertext using the encrypted private key;

[0010] Decrypting the first private key ciphertext using the key encryption key of the cipher machine to obtain the private key, and using the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value;

[0011] Send the signature value to the user terminal.

[0012] Preferably, it also includes:

[0013] Signing the first data to be sent using the signature private key, and sending the signed first data to the user terminal, so that the user terminal verifies the signed first data;

[0014] Verifying the signed second data sent by the user terminal, and obtaining the second data after passing the verification;

[0015] Wherein, the first data at least includes the private key ciphertext and the signature value;

[0016] The second data includes at least: the key pair signature request and the first private key ciphertext.

[0017] Preferably, after reading the private key ciphertext from the database according to the key identifier of the key pair signing request, the method further comprises:

[0018] Generate a session key and encrypt it using the user's public key;

[0019] Sending the encrypted session key to the client, so that the client uses a private key to decrypt the encrypted session key to obtain the session key, and uses the session key to encrypt the first private key ciphertext;

[0020] The first private key ciphertext encrypted by the session key is decrypted by the cipher machine to obtain the first private key ciphertext.

[0021] Preferably, the sending the signature value to the user terminal includes:

[0022] Encrypting the signature value using the user's public key;

[0023] The encrypted signature value is sent to the user end, so that the user end uses the encryption private key to decrypt the encrypted signature value to obtain the signature value.

[0024] Preferably, the process of generating the private key includes:

[0025] Get the key creation request sent by the user;

[0026] Extracting a user encryption public key from a user encryption certificate of the key creation request;

[0027] Generate a public key and a private key using the cryptographic machine, and encrypt the private key using the key encryption key of the cryptographic machine to obtain the first private key ciphertext;

[0028] The first private key ciphertext is encrypted using the user encryption public key to obtain the private key ciphertext, and the private key ciphertext is stored in the database.

[0029] Preferably, it also includes:

[0030] Obtaining an authorization request from the user terminal;

[0031] According to the key pair identifier in the authorization request, read the corresponding private key ciphertext from the database, so that the user end decrypts the private key ciphertext using the encryption private key to obtain the first private key ciphertext, and encrypts the first private key ciphertext according to the public key of the encryption certificate of the authorized person;

[0032] Obtain the first private key ciphertext, and determine that the key pair generation type is authorized generation.

[0033] Preferably, it also includes:

[0034] Obtaining a request for revoking authorization from the user terminal;

[0035] According to the key pair identifier in the revocation authorization request, the generation type of the key pair corresponding to the key pair identifier in the database is recorded as revocation authorization.

[0036] Preferably, it also includes:

[0037] Record business operation data.

[0038] The present application discloses a signature device, comprising:

[0039] The request acquisition module is used to obtain the key pair signature request sent by the user;

[0040] A reading module is used to read a private key ciphertext from a database according to a key identifier of a key pair signature request, where the private key ciphertext is a ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end;

[0041] A first private key ciphertext acquisition module, used to acquire a first private key ciphertext obtained by a user end decrypting the private key ciphertext using an encrypted private key;

[0042] A decryption and signing module, used to use the key encryption key of the cipher machine to decrypt the first private key ciphertext to obtain a private key, and use the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value;

[0043] The sending module is used to send the signature value to the user end.

[0044] The present application discloses a server, comprising:

[0045] Memory for storing computer programs;

[0046] A processor is used to implement the steps of the above-mentioned signature method when executing the computer program.

[0047] The present application discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned signature method are implemented.

[0048] The present application discloses a signature system, comprising:

[0049] A user terminal; a user terminal password module; a database; a cryptographic machine; and a server terminal as described above connected to the user terminal, the database, and the cryptographic machine.

[0050] The present application discloses a signature method, including: obtaining a key pair signature request sent by a user end; reading a private key ciphertext from a database according to a key identifier of the key pair signature request, the private key ciphertext being a ciphertext obtained by encrypting the private key in sequence by a cipher machine and a user end; obtaining a first private key ciphertext obtained by the user end decrypting the private key ciphertext using the encrypted private key; decrypting the first private key ciphertext using the key encryption key of the cipher machine to obtain a private key, and using the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value; and sending the signature value to the user end.

[0051] Through the above technical solution, the encryption algorithm includes the private key in the key pair generated by the cipher machine. The cipher machine and the user end encrypt the private key in turn to obtain the private key ciphertext, which is stored in the database. The method of double encryption of the private key is used to ensure the safe storage of the private key. The server cannot independently use the double encrypted private key for calculation, and the user end cannot independently use the double encrypted private key for calculation. The trust problem of the user end and the server end is solved, and the security of the signature is improved. And by storing the private key ciphertext in the database, multiple users can use the private key together to solve the problem that it is impossible to truly realize that multiple people can use the same seal to execute the signature in the prior art. The signature device, server, computer-readable storage medium, and signature system involved in the present disclosure also solve the corresponding technical problems.

[0052] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0054] Figure 1 A flowchart of a signing method provided in an embodiment of the present application;

[0055] Figure 2 This is an example of signing in a communication integrity verification manner between a user end and a server end according to an embodiment of the present application;

[0056] Figure 3 A schematic diagram of a private key generation process provided in an embodiment of the present application;

[0057] Figure 4 A schematic diagram of a private key generation process provided in an embodiment of the present application;

[0058] Figure 5 A schematic diagram of a key authorization process provided in an embodiment of the present application;

[0059] Figure 6 A schematic diagram of a key authorization process provided in an embodiment of the present application;

[0060] Figure 7 A schematic diagram of a process for revoking key authorization provided in an embodiment of the present application;

[0061] Figure 8 A schematic diagram of a process for revoking key authorization provided in an embodiment of the present application;

[0062] Fig. 9 A schematic diagram of the structure of a signature device provided in an embodiment of the present application;

[0063] Fig.10 is a block diagram of a server according to an exemplary embodiment;

[0064] Fig.11 A schematic diagram of a system composition architecture provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with 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 this application.

[0066] In some signature scenarios, such as seal applications, in the current application mode, after an electronic seal is produced, the seal signature private key is usually stored in the user-side password module such as UKey. Taking UKey as an example, the UKey is inserted when signing, and the digital signature operation is completed at the terminal. That is, the user can perform the seal signature operation only after obtaining the physical UKey; but in actual business scenarios, according to business needs, it is usually necessary for multiple people to use the same seal to sign the business. The problem this brings is that in the traditional mode, due to the limitations of the physical UKey, it is impossible to truly realize the business scenario of multiple people using one seal to sign.

[0067] Based on the above technical problems, this embodiment provides a signature method, which uses an encryption algorithm including a private key in a key pair generated by a cipher machine. The cipher machine and the user end encrypt the private key in turn to obtain a private key ciphertext, which is stored in a database. A double encryption method for the private key is used to ensure the secure storage of the private key. The server end cannot independently use the double-encrypted private key for calculations, and the user end cannot independently use the double-encrypted private key for calculations. This solves the trust problem between the user end and the server end, and improves the security of the signature.

[0068] Please refer to Figure 1 , Figure 1 A flowchart of a signing method provided in an embodiment of the present application specifically includes:

[0069] S101, obtaining a key pair signature request sent by a user;

[0070] The user uses the user-side password module on the user side to initiate a key pair signature request to the server side, where the request content of the key pair signature request includes but is not limited to the key identifier and the data to be signed, and the user-side password module includes but is not limited to UKey, software password module, security chip, password card, server password machine, signature verification server and other forms.

[0071] S102, reading a private key ciphertext from a database according to the key identifier of the key pair signature request, where the private key ciphertext is the ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end;

[0072] The private key ciphertext is read from the database according to the key identifier. The private key ciphertext is obtained after the cipher machine generates the private key, and the private key is encrypted with the key encryption key inside the cipher machine (the key used to encrypt the key in the cipher machine) to obtain the first private key ciphertext. The first private key ciphertext is then encrypted with the public key of the user on the user side to obtain the private key ciphertext. The private key ciphertext is double-encrypted by the cipher machine and the user.

[0073] The purpose of this step is to read the private key ciphertext from the database.

[0074] Furthermore, it may also include:

[0075] Query the key from the database according to the key identifier and the user signature certificate SN;

[0076] Determine whether the key status is normal. If normal, read the private key ciphertext from the database according to the key identifier.

[0077] Among them, the corresponding key can be queried from the database according to the key identifier and the user signature certificate. There are multiple keys stored in the database. The storage method is no longer limited in this embodiment. It can be stored according to the key identifier or the user signature certificate. Of course, in order to facilitate the query, it can be stored according to the key identifier and the user signature certificate so that the key can be directly queried. After the key is queried, the key status is obtained. The key status includes but is not limited to a normal state and an abnormal state. Among them, the abnormal state may include a state that exceeds the set time. When the set time is exceeded, the key is in an unavailable state. Only when the key status is a normal state, the private key secret can be read from the database according to the identifier.

[0078] S103, obtaining a first private key ciphertext obtained by decrypting the private key ciphertext using the encrypted private key at the user end;

[0079] The user end obtains the private key ciphertext, and decrypts the private key ciphertext using the encrypted private key to obtain the first private key ciphertext. At this time, the first private key ciphertext only includes the part encrypted by the cipher machine with the private key.

[0080] S104, using the key encryption key of the cipher machine to decrypt the first private key ciphertext to obtain a private key, and using the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value; wherein the first private key ciphertext is obtained by the user end decrypting the private key ciphertext using the encryption private key;

[0081] After the server obtains the first private key ciphertext, it uses the key encryption key of the cipher machine to decrypt the first private key ciphertext to obtain the private key, and then uses the private key to sign the data to be signed in the signature request to obtain the signature value.

[0082] S105. Send the signature value to the user end.

[0083] The final user obtains the signature value and completes the signature operation.

[0084] Based on the above technical solution, this embodiment uses an encryption algorithm including a private key in a key pair generated by a cipher machine, and the cipher machine and the user end encrypt the private key in turn to obtain a private key ciphertext, which is stored in a database. The method of double encryption of the private key is used to ensure the safe storage of the private key. The server cannot independently use the double encrypted private key for calculation, and the user end cannot independently use the double encrypted private key for calculation, which solves the trust problem of the user end and the server end, and improves the security of the signature. And by storing the private key ciphertext in the database, multiple user ends can use the private key together, so as to solve the problem in the prior art that it is impossible to truly realize that multiple people can use the same seal to execute the signature.

[0085] Furthermore, in order to improve the security of data transmission between the server and the user, the signature method further includes:

[0086] S106. Sign the first data to be sent using the signature private key, and send the signed first data to the user terminal, so that the user terminal verifies the signed first data;

[0087] S107, verifying the signed second data sent by the user end, and obtaining the second data after passing the verification;

[0088] The first data includes at least a private key ciphertext and a signature value; the second data includes at least a key pair signature request and a first private key ciphertext.

[0089] This embodiment does not limit the order of S106 and S107. S106 may be executed first and then S107, or S107 may be executed first and then S106.

[0090] The verification process performed by the server may include any one or combination of the following: confirming whether it is within the time window; verifying the integrity using the user's signature certificate; verifying the authenticity of the signature certificate using the certificate chain; and verifying the validity of the signature certificate using the CRL.

[0091] The time window can be set by the user according to actual needs, and this embodiment will not limit it. Using the user's signature certificate to verify the completeness, the certificate chain to verify the authenticity of the signature certificate, and the CRL to verify the validity of the signature certificate are all existing technologies, and this embodiment will not be repeated, as long as the purpose of this embodiment can be achieved.

[0092] The verification process on the user side may include any one or a combination of the following: confirming whether it is within the time window; verifying the integrity using the signature certificate of the server; verifying the authenticity of the signature certificate using the certificate chain; and verifying the validity of the signature certificate using the CRL.

[0093] It can be understood that in this embodiment, all communications between the user end and the server end are digitally signed and verified. Of course, the first data for signing and verification includes private key ciphertext and signature value; the second data includes: key pair signature request, first private key ciphertext. Users can set it according to actual needs. The signing and verification of communication can ensure the integrity and authenticity of the communication data, and avoid the occurrence of tampering of the content of the communication.

[0094] Based on the above technical solution, in order to ensure the integrity and authenticity of the communication between the user end and the server end, this embodiment confirms the integrity and non-repudiation of the communication data by verifying the digital signature, and confirms the authenticity by verifying the signature certificate.

[0095] Furthermore, in order to ensure the privacy of the session and improve the security of the signature, this embodiment converts the user public key encryption into the server session key encryption to ensure security. After reading the private key ciphertext from the database according to the key identifier of the key pair signature request, it also includes:

[0096] S108, generate a session key and encrypt it using the user's public key;

[0097] S109, sending the encrypted session key to the user end, so that the user end decrypts the encrypted session key with the private key to obtain the session key, and uses the session key to encrypt the first private key ciphertext;

[0098] S110. Decrypt the first private key ciphertext encrypted by the session key using a cryptographic machine to obtain the first private key ciphertext.

[0099] This embodiment generates a session key ek, and uses the user's public key to encrypt it to obtain Euk(ek); and feeds it back to the user end. It can be understood that this step can be established in the case where the user end and the server end are talking to protect each other. Of course, it can also be unprotected. The user can set it according to actual needs. Then, the user end uses the private key to decrypt the encrypted session key to obtain the session key, and uses the session key to encrypt the first private key ciphertext. The user end key is transferred to protection, and the user public key encryption is converted to server end session key encryption. The accuracy of the first private key ciphertext is guaranteed.

[0100] Based on the above technical solution, this embodiment converts the user public key encryption into the server session key encryption through user-side key transfer protection, thereby ensuring the privacy of the session and improving the security of the signature.

[0101] Furthermore, the signature value is sent to the user end, including:

[0102] Encrypt the signature value using the user's public key;

[0103] The encrypted signature value is sent to the user end, so that the user end uses the encryption private key to decrypt the encrypted signature value to obtain the signature value.

[0104] After the signature value is generated in this embodiment, in order to ensure that the data is not tampered with, the user's public key is used to encrypt the signature value in this application and feed it back to the user end so that the user end can decrypt and obtain the signature value.

[0105] Please refer to Figure 2 , Figure 2 An example of signing in a communication integrity verification manner between a user terminal and a server terminal according to an embodiment of the present application includes:

[0106] 1. The user uses UKey or other user-side password modules on the client side to initiate a key pair signing request to the server side. The request content includes:

[0107] (1) Key pair identification;

[0108] (2) The user signs the request using the signature private key SM = Suk(M), where M is the request and Suk() is the private key signature algorithm;

[0109] 2. The server verifies the client's request:

[0110] (1) Confirm that the application request is within the time window;

[0111] (2) Use the user's signature certificate to verify the integrity of the request Vuk(SM,M), where Vuk() is the algorithm for public key signature verification;

[0112] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s), where Vchain() is a method of using the certificate chain to verify the digital certificate, and cert_s is the signature certificate;

[0113] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s), where Vcrl() is the CRL verification method;

[0114] 3. The server returns the private key ciphertext

[0115] (1) Query the key based on the key ID and user signature certificate SN;

[0116] (2) Confirm that the key status is normal;

[0117] (3) Read the private key ciphertext from the database and prepare to return; Euk(Emk(key_s)), where key_s is the private key, Emk() is the encryption algorithm of the cipher machine key encryption key, and Euk() is the encryption algorithm of the user end using the user's public key;

[0118] (4) Generate a session key ek and encrypt Euk(ek) using the user's public key;

[0119] (5) The session key handle is bound to the application service ID (Identity document) and temporarily stored in memory;

[0120] (6) Read the signature certificate corresponding to the escrow key and prepare to return;

[0121] (7) The server uses the signature private key to sign the data to be returned SM = Ssk(M), where Ssk() is the algorithm for signing with the server private key;

[0122] (8) Return response data;

[0123] (9) Recording the application for key pair service data;

[0124] 4. The client verifies the server request:

[0125] (1) Confirm that the application request is within the time window;

[0126] (2) Use the server's signature certificate to verify the integrity of the request Vsk(SM,M), where Vsk() is the server's signature verification algorithm;

[0127] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s);

[0128] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s);

[0129] 5. User-side key protection, converting from user public key encryption to server-side session key encryption:

[0130] (1) Extract the private key ciphertext from the server response and use the user encrypted private key in UKey to decrypt Duk(Euk(Emk(key_s)))=Emk(key_s), where Duk() is the user private key decryption algorithm;

[0131] (2) Extract the session key from the server response and decrypt it with the private key to obtain the session key Duk(Euk(ek))=ek;

[0132] (3) Use the session key to encrypt the private key ciphertext Eek(Emk(key_s));

[0133] 6. User-side request for signature operation

[0134] (1) Read the data to be signed from the response and calculate the original signature hash H(Src), where Src is the data to be signed and H() is the hash value calculation method;

[0135] (2) Assemble the original signature hash H(Src), private key ciphertext Eek(Emk(key_s)), key pair identifier and other data to generate a request and sign SM=Suk(M);

[0136] 7. The server verifies the client request:

[0137] (1) Confirm that the application request is within the time window;

[0138] (2) Use the user's signature certificate to verify the integrity of the request Vuk(SM,M);

[0139] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s);

[0140] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s);

[0141] 8. Perform signature operation

[0142] (1) Extract the corresponding key data in the database (the key ID is consistent with the user certificate SN) and verify the signature Vsk(M) of the data;

[0143] (2) Find the temporarily stored session key handle based on the application service ID;

[0144] (3) Confirm that the key status is normal;

[0145] (4) Import the private key ciphertext and session key handle into the cryptographic module;

[0146] (5) In the cryptographic device, decrypt the private key plaintext;

[0147] (6) Dmk(Dek(Eek(Emk(key_s))))=key_s, where Dmk() is the algorithm for encrypting and decrypting the cipher key;

[0148] (7) In the cryptographic device, a signature operation Sign = Skey_s(Src) is performed on the data, where sign is the signature value;

[0149] (8) destroy the session key;

[0150] 9. Return the signature operation response

[0151] (1) Use the user's public key to encrypt the signature value Euk(Sign);

[0152] (2) The server uses the signature private key to sign the data to be returned SM = Ssk (M);

[0153] (3) Return response data;

[0154] (4) Record signature operation business data;

[0155] 10. The client verifies the server request:

[0156] (1) Confirm that the application request is within the time window;

[0157] (2) Use the server's signature certificate to verify the integrity of the request Vsk(SM,M);

[0158] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s);

[0159] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s);

[0160] 11. The client obtains the signature value data

[0161] (1) The user uses the encrypted private key to decrypt the signature ciphertext Duk(Euk(Sign));

[0162] (2) Verify the signature value Vkey_p(Sign,Hkey_p(M));

[0163] (3) Obtain the signature value and complete the signature operation.

[0164] It can be understood that the above steps may constitute the signature method in whole or in part, and this embodiment will not limit it. Users can combine them according to actual needs. As long as the purpose of this embodiment can be achieved, they belong to the protection scope of this application.

[0165] Furthermore, this embodiment provides a method for generating a private key, please refer to Figure 3 , Figure 3 A schematic diagram of a private key generation process provided in an embodiment of the present application includes:

[0166] S21, obtaining a key creation request sent by the user terminal;

[0167] The key creation request includes but is not limited to a user encryption certificate.

[0168] S22, extracting the user encryption public key from the user encryption certificate of the key creation request;

[0169] S23, using a cryptographic machine to generate a public key and a first private key ciphertext;

[0170] The cipher generates a key pair, which includes a public key and a private key. The cipher performs a first encryption on the private key to obtain a first private key ciphertext, thereby avoiding the occurrence of a situation where the private key can be leaked by only decrypting through the user end.

[0171] S24. Encrypt the first private key ciphertext using the user encryption public key to obtain the private key ciphertext, and store the private key ciphertext in the database.

[0172] Based on the above technical solution, this embodiment uses a cryptographic machine to encrypt the private key once, and then uses the user encryption public key to encrypt the first private key ciphertext obtained by the once-encrypted key to obtain the private key ciphertext. Double encryption is used to ensure the secure storage of the private key. The server cannot independently use the doubly encrypted private key for calculations, and the user end cannot independently use the doubly encrypted private key for calculations. This solves the trust problem between the user end and the server end and improves the security of the signature.

[0173] Please refer to Figure 4 , Figure 4 A schematic diagram of a private key generation process provided in an embodiment of the present application includes:

[0174] 1. The user inserts UKey or other types of user-side password modules on the user side and initiates an escrow key creation application to the server. The application data includes:

[0175] (1) The user's encryption certificate and signature certificate;

[0176] (2) Use the user's private key to sign the application information.

[0177] 2. After receiving the application, the server verifies the application:

[0178] (1) Confirm that the application request is within the time window;

[0179] (2) Use the user's signature certificate to verify the integrity of the application;

[0180] (3) Verify the authenticity and validity of the signature certificate, and compare the consistency of the user signature certificate and encryption certificate.

[0181] 3. The server calls the cryptographic machine to generate a key pair;

[0182] (1) The business administrator shall review the application;

[0183] (2) Extract the public key from the user encryption certificate;

[0184] (3) The cipher generates a key pair internally and encrypts the private key data using the key encryption key, which is then encrypted using the user's public encryption key;

[0185] (4) The server derives a key pair from the cryptographic machine, where the public key is in plain text and the private key is in cipher text (the first private key cipher text);

[0186] (5) The server records the application key pair service data;

[0187] 4. Key Storage

[0188] (1) Assemble into storage key data, where the key generation type is creation generation;

[0189] (2) Use the server private key to sign data such as the public key, private key ciphertext, and signature certificate;

[0190] (3) Data such as key pairs, certificates, and signatures are stored in the database, and the entire process is recorded.

[0191] It can be understood that the above steps may constitute the signature method in whole or in part, and this embodiment will not limit it. Users can combine them according to actual needs. As long as the purpose of this embodiment can be achieved, they belong to the protection scope of this application.

[0192] Furthermore, this embodiment provides a key authorization method, please refer to Figure 5 , Figure 5 A schematic diagram of a key authorization process provided in an embodiment of the present application includes:

[0193] S31, obtaining the authorization request from the user terminal;

[0194] According to the key pair identifier in the authorization request, read the corresponding private key ciphertext from the database, so that the user end uses the encrypted private key to decrypt the private key ciphertext to obtain the first private key ciphertext, and encrypt the first private key ciphertext according to the public key of the encryption certificate of the authorized person;

[0195] S32. Obtain the first private key ciphertext, and determine that the key pair generation type is authorized generation.

[0196] After obtaining the first private key ciphertext, it is determined that the authorization is successful, and the key pair generation type is changed to authorized generation.

[0197] Key authorization operations can only be initiated by the creator of the key. Please refer to Figure 6 , Figure 6 A schematic diagram of a key authorization process provided in an embodiment of the present application, the detailed business process is as follows:

[0198] 1. The key creator inserts UKey or other types of user-side password modules on the user side and initiates an authorization request to the server. The application data includes:

[0199] (1) Key pair identification;

[0200] (2) Use the user's signature private key to sign the application information SM = Suk (M);

[0201] 2. After receiving the application, the server verifies the application:

[0202] (1) Confirm that the application request is within the time window;

[0203] (2) Use the user's signature certificate to verify the integrity of the application Vuk(SM,M);

[0204] (3) Use the certificate chain to verify the authenticity of the signature certificate and encryption certificate Vchain (cert_s) and Vchain (cert_e);

[0205] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s) and the encryption certificate, Vcrl(cert_e);

[0206] 3. The server returns the private key ciphertext

[0207] (1) Query the key based on the key ID and user signature certificate SN;

[0208] (2) Confirm that the key status is normal;

[0209] (3) Read the private key ciphertext from the database and prepare to return Euk(Emk(key_s));

[0210] (4) The server uses the signature private key to sign the data to be returned SM = Ssk (M);

[0211] (5) Return response data;

[0212] (6) Recording authorized key pair service data;

[0213] 4. The client verifies the server request:

[0214] (1) Confirm that the application request is within the time window;

[0215] (2) Use the server's signature certificate to verify the integrity of the request Vsk(SM,M);

[0216] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s);

[0217] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s);

[0218] 5. User-side key protection is converted from user public key encryption to authorized person public key encryption:

[0219] (1) Extract the private key ciphertext from the server response and decrypt it using the user encrypted private key in Key; Duk(Euk(Emk(key_s))) = Emk(key_s);

[0220] (2) Obtain the encryption certificate of the authorized person and use its public key to encrypt and decrypt the private key ciphertext; Euk1(Emk(key_s));

[0221] 6. Report the authorization request operation;

[0222] (1) Obtain the signature certificate of the authorized person;

[0223] (2) Assemble the authorized person's signature certificate and private key ciphertext (Euk1(Emk(key_s))), generate a request and sign SM=Suk(M);

[0224] 7. The server verifies the client request:

[0225] (1) Confirm that the application request is within the time window;

[0226] (2) Use the user's signature certificate to verify the integrity of the request Vuk(SM,M);

[0227] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s);

[0228] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s);

[0229] 8. Storing Authorization Keys

[0230] (1) Extract relevant data from the corresponding escrow key data of the creator to form a new key pair data, where the generation type of the key pair is authorized generation.

[0231] (2) Use the server private key to sign the public key, private key ciphertext (Euk1(Emk(key_s))), signature certificate and other data Ssk(M);

[0232] (3) Data such as key pairs, certificates, and signatures are stored in the database;

[0233] (4) Record authorized operations.

[0234] It can be understood that the above steps may constitute the signature method in whole or in part, and this embodiment will not limit it. Users can combine them according to actual needs. As long as the purpose of this embodiment can be achieved, they belong to the protection scope of this application.

[0235] Furthermore, this embodiment provides a method for revoking key authorization, please refer to Figure 7 , Figure 7 A schematic diagram of a process for revoking key authorization provided in an embodiment of the present application includes:

[0236] S33, obtaining a request for revoking authorization from the user end;

[0237] S34. According to the key pair identifier in the revocation authorization request, the generation type of the key pair corresponding to the key pair identifier in the database is recorded as revocation authorization.

[0238] This embodiment uses the communication integrity verification between the user end and the server end as an example. Figure 8 , Figure 8 A schematic diagram of a process for revoking key authorization provided in an embodiment of the present application includes:

[0239] The key authorization revocation operation can only be initiated by the creator of the key. The detailed business process is as follows:

[0240] 1. The user inserts UKey or other types of user-side password modules on the client side and initiates a key authorization revocation request to the server side. The request content includes:

[0241] (1) Key pair identification;

[0242] (2) The authorized user certificate is revoked;

[0243] (3) The user signs the request using the signature private key SM = Suk(M);

[0244] 2. The server verifies the client request:

[0245] (1) Confirm that the application request is within the time window;

[0246] (2) Use the user's signature certificate to verify the integrity of the request Vuk(SM,M);

[0247] (3) Use the certificate chain to verify the authenticity of the signature certificate Vchain(cert_s);

[0248] (4) Use CRL to verify the validity of the signature certificate Vcrl(cert_s);

[0249] 3. Revoke the key

[0250] (1) Query the key based on the key ID and user signature certificate SN;

[0251] (2) The status of the corresponding key in the database is changed to revoked;

[0252] (3) Clear the key data in the database record;

[0253] (4) Re-sign the record Vsk(M);

[0254] (5) Record the revocation of authorization operations.

[0255] It can be understood that the above steps may constitute the signature method in whole or in part, and this embodiment will not limit it. Users can combine them according to actual needs. As long as the purpose of this embodiment can be achieved, they belong to the protection scope of this application.

[0256] In summary, the business and security issues of implementing digital signatures on the server side have been solved. Users can authorize others to use the centralized private key by applying for it. In addition, double key encryption can ensure that the use process is authentic. The service system cannot use the double encrypted private key to perform any calculations independently, and the user side cannot use the double encrypted private key to perform calculations independently. This solves the trust problem of both parties and effectively guarantees security. At the same time, a method and process for protecting the signature private key using the user encryption private key and the server key encryption key. A method for securely storing a double-encrypted private key. A method for transmitting private key data that uses a one-time temporary key and a server password encryption key to double-encrypt the signature private key.

[0257] Furthermore, in order to ensure that the system can be traced, the present embodiment can record business operation data, ensuring that each business is recorded for easy reference by users.

[0258] The following is an introduction to a signature device provided in an embodiment of the present application. The signature device described below and the signature method described above can be referenced to each other. The relevant modules are all set in the server. Fig. 9 , Fig. 9 A structural diagram of a signature device provided in an embodiment of the present application includes:

[0259] Request acquisition module 910, used to acquire a key pair signature request sent by a user end;

[0260] A reading module 920 is used to read a private key ciphertext from a database according to a key identifier of a key pair signature request, where the private key ciphertext is a ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end;

[0261] The first private key ciphertext acquisition module 930 is used to obtain the first private key ciphertext obtained by the user end by decrypting the private key ciphertext using the encrypted private key;

[0262] The decryption and signing module 940 is used to use the key encryption key of the cipher machine to decrypt the first private key ciphertext to obtain the private key, and use the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value;

[0263] The sending module 950 is used to send the signature value to the user end.

[0264] In some embodiments, it also includes:

[0265] A signature module, used to sign the first data to be sent using a signature private key, and send the signed first data to a user terminal, so that the user terminal verifies the signed first data;

[0266] A verification module, used to verify the signed second data sent by the user end, and obtain the second data after passing the verification;

[0267] The first data at least includes a private key ciphertext and a signature value;

[0268] The second data includes at least: a key pair signature request and a first private key ciphertext.

[0269] Preferably, it also includes:

[0270] A temporary session key generation module, used to generate a session key and encrypt it using a user public key;

[0271] The session key generation module is used to send the encrypted session key to the user end, so that the user end decrypts the encrypted session key with the private key to obtain the session key, and encrypts the first private key ciphertext with the session key;

[0272] The encryption module is used to decrypt the first private key ciphertext encrypted by the session key using a cipher machine to obtain the first private key ciphertext.

[0273] Preferably, the sending module 950 includes:

[0274] A public key encryption unit, used to encrypt the signature value using the user's public key;

[0275] The signature value sending unit is used to send the encrypted signature value to the user end, so that the user end uses the encryption private key to decrypt the encrypted signature value to obtain the signature value.

[0276] Preferably, it also includes: a private key generation module, used to:

[0277] Get the key creation request sent by the user;

[0278] Extract the user encryption public key from the user encryption certificate of the key creation request;

[0279] Generate a public key and a private key using a cryptographic machine, and encrypt the private key using the cryptographic machine's key encryption key to obtain a first private key ciphertext;

[0280] The first private key ciphertext is encrypted using the user encryption public key to obtain the private key ciphertext, and the private key ciphertext is stored in the database.

[0281] Preferably, it also includes: an authorization module, which is used to:

[0282] Get the authorization request from the user;

[0283] According to the key pair identifier in the authorization request, read the corresponding private key ciphertext from the database, so that the user end uses the encrypted private key to decrypt the private key ciphertext to obtain the first private key ciphertext, and encrypt the first private key ciphertext according to the public key of the encryption certificate of the authorized person;

[0284] Obtain the first private key ciphertext, and determine that the key pair generation type is authorized generation.

[0285] Preferably, it also includes: a key authorization revocation module, which is used to:

[0286] Get the authorization revocation request from the user;

[0287] According to the key pair identifier in the revocation authorization request, the generation type of the key pair corresponding to the key pair identifier in the database is recorded as revocation authorization.

[0288] Preferably, it also includes:

[0289] The recording module is used to record business operation data.

[0290] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0291] The present application discloses a server, comprising:

[0292] Memory for storing computer programs;

[0293] A processor is used to implement the steps of the above signing method when executing a computer program.

[0294] Fig.10 FIG. 1 is a block diagram of a server 100 according to an exemplary embodiment. Figure 7 As shown, the server 100 may include: a processor 101 and a memory 102. The server 100 may also include one or more of a multimedia component 103, an input / output (I / O) interface 104, and a communication component 105.

[0295] The processor 101 is used to control the overall operation of the server 100 to complete all or part of the steps in the above-mentioned signature method. The memory 102 is used to store various types of data to support the operation of the server 100. For example, these data may include instructions for any application or method used to operate on the server 100, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 103 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 102 or sent through the communication component 105. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 104 provides an interface between the processor 101 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the server 100 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 105 may include: Wi-Fi module, Bluetooth module, NFC module.

[0296] In an exemplary embodiment, the server 100 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned signature method.

[0297] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned signature method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 102 including program instructions, and the above-mentioned program instructions can be executed by the processor 101 of the server 100 to complete the above-mentioned signature method.

[0298] The present application discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above signing method are implemented.

[0299] This application discloses a signature system, please refer to Fig.11 , Fig.11 A schematic diagram of a system composition architecture provided for an embodiment of the present application includes:

[0300] A user terminal; a user terminal password module; a database; a cryptographic machine; and a server terminal as described above connected to the user terminal, the database, and the cryptographic machine.

[0301] Among them, the user-side password module includes but is not limited to UKey, software password module, security chip, password card, server password machine, signature verification server and other forms; the password machine includes but is not limited to security chip, password card, server password machine, signature verification server and other forms.

[0302] In order to solve the scenario where multiple people share a private key and solve the security risks of using private keys, in this method, the signature private key is transferred from the user-side password module to the server-side password device, and the signature operation is transferred from the user-side password module to the server-side password device. The use of the private key is granted to designated personnel through the authorization policy, and the server and the user jointly complete the signature operation. The application scenario of completing centralized digital signatures on the server side is realized; the authorization scenario of server-side signature is realized; the private key user and the server-side password device jointly complete the signature operation, and a single party cannot complete the signature operation, ensuring safe use.

[0303] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0304] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0305] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A signature method, characterized in that: include: Get the key pair signature request sent by the user; Reading a private key ciphertext from a database according to the key identifier of the key pair signature request, wherein the private key ciphertext is the ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end; Send the private key ciphertext and the session key ciphertext to the user end; wherein the session key ciphertext is obtained by encrypting the session key using the user public key; the user end decrypts the private key ciphertext using the user encrypted private key to obtain the first private key ciphertext; the user end decrypts the session key using the user private key; the user end encrypts the first private key ciphertext using the session key, and sends the encrypted first private key ciphertext to the service end; Obtaining a first private key ciphertext sent by the client, and decrypting the first private key ciphertext using the session key; Decrypting the first private key ciphertext using the key encryption key of the cipher machine to obtain the private key, and using the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value; Sending the signature value to the user terminal; The process of generating the private key includes: Get the key creation request sent by the user; Extracting a user encryption public key from a user encryption certificate of the key creation request; Generate a public key and a private key using the cryptographic machine, and encrypt the private key using the key encryption key of the cryptographic machine to obtain the first private key ciphertext; The first private key ciphertext is encrypted using the user encryption public key to obtain the private key ciphertext.

2. The signature method according to claim 1, characterized in that: Also includes: Signing the first data to be sent using the signature private key, and sending the signed first data to the user terminal, so that the user terminal verifies the signed first data; Verifying the signed second data sent by the user terminal, and obtaining the second data after passing the verification; Wherein, the first data at least includes the private key ciphertext and the signature value; The second data includes at least: the key pair signature request and the first private key ciphertext.

3. The signature method according to claim 1, characterized in that: After reading the private key ciphertext from the database according to the key identifier of the key pair signing request, the method further includes: Generate a session key and encrypt it using the user's public key; Sending the encrypted session key to the client, so that the client uses a private key to decrypt the encrypted session key to obtain the session key, and uses the session key to encrypt the first private key ciphertext; The first private key ciphertext encrypted by the session key is decrypted by the cipher machine to obtain the first private key ciphertext.

4. The signature method according to claim 1, characterized in that: The sending the signature value to the user terminal includes: Encrypting the signature value using the user's public key; The encrypted signature value is sent to the user end, so that the user end uses the encryption private key to decrypt the encrypted signature value to obtain the signature value.

5. The signature method according to claim 1, characterized in that: The private key ciphertext is stored in the database.

6. The signature method according to claim 1, characterized in that: Also includes: Obtaining an authorization request from the user terminal; According to the key pair identifier in the authorization request, read the corresponding private key ciphertext from the database, so that the user end decrypts the private key ciphertext using the encryption private key to obtain the first private key ciphertext, and encrypts the first private key ciphertext according to the public key of the encryption certificate of the authorized person; Obtain the first private key ciphertext, and determine that the key pair generation type is authorized generation.

7. The signature method according to claim 6, characterized in that: Also includes: Obtaining a request for revoking authorization from the user terminal; According to the key pair identifier in the revocation authorization request, the generation type of the key pair corresponding to the key pair identifier in the database is recorded as revocation authorization.

8. The signature method according to claim 1, characterized in that: Also includes: Record business operation data.

9. A signature device, characterized in that: include: The request acquisition module is used to obtain the key pair signature request sent by the user; A reading module is used to read a private key ciphertext from a database according to a key identifier of a key pair signature request, wherein the private key ciphertext is a ciphertext obtained by encrypting the private key in sequence by the cipher machine and the user end; wherein the private key ciphertext and the ciphertext of the session key are sent to the user end; the ciphertext of the session key is obtained by encrypting the session key using the user public key; the user end decrypts the private key ciphertext using the user encrypted private key to obtain a first private key ciphertext; the user end decrypts the session key using the user private key; the user end encrypts the first private key ciphertext using the session key, and sends the encrypted first private key ciphertext to the service end; A first private key ciphertext acquisition module, used to acquire a first private key ciphertext sent by a user terminal, and decrypt the first private key ciphertext using the session key; A decryption and signing module, used to use the key encryption key of the cipher machine to decrypt the first private key ciphertext to obtain a private key, and use the private key to perform a signature operation on the data to be signed in the signature request to obtain a signature value; A sending module, used for sending the signature value to the user end; The process of generating the private key includes: Get the key creation request sent by the user; Extracting a user encryption public key from a user encryption certificate of the key creation request; Generate a public key and a private key using the cryptographic machine, and encrypt the private key using the key encryption key of the cryptographic machine to obtain the first private key ciphertext; The first private key ciphertext is encrypted using the user encryption public key to obtain the private key ciphertext.

10. A server, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the signature method according to any one of claims 1 to 8 when executing the computer program.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the signature method according to any one of claims 1 to 8 are implemented.

12. A signature system, characterized in that: include: A user terminal; a user terminal password module; a database; a cryptographic machine; and a server as claimed in claim 10 connected to the user terminal, the database and the cryptographic machine.