Handwritten signature method based on collaborative signature technology
By using SM2 single-time collaborative signature technology and handwritten signature method, the problems of cumbersome operation, security risks and insufficient compliance of existing electronic signature technology are solved, realizing convenient operation and high security of high-frequency and scenario-based signing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2026-03-31
AI Technical Summary
Existing electronic signature technologies suffer from cumbersome operation, high security risks, and insufficient compliance, making it difficult to meet the high-frequency and scenario-based signature needs.
It adopts SM2 single-time collaborative signature technology, combined with handwritten signature method, and generates electronic seal through client and server collaborative signature, which complies with national cryptographic standards. The key is destroyed after a single interaction, ensuring security and convenience.
It enables convenient operation of high-frequency, scenario-based signing, improves key security, complies with national standards, reduces the risk of key theft, and meets the needs of high security and convenience.
Smart Images

Figure CN120124112B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication security technology, and in particular to a handwritten signature method based on collaborative signature technology. Background Technology
[0002] With the rapid development of e-government and e-commerce, electronic signature technology has become a core technical means to ensure the legal validity of electronic documents. Traditional electronic signature systems mostly adopt PKI-based digital certificate technology, which typically requires users to pre-generate and store digital certificate private keys on the client side, completing the electronic signature through a local signature algorithm. However, this approach has certain problems: First, digital certificates require pre-application and long-term management, which is cumbersome for high-frequency, scenario-based signature needs; second, local storage of the signature private key poses a security risk of being stolen by malicious software. Furthermore, existing handwritten signature schemes are insufficient in terms of compliance, with some failing to meet the mandatory requirements of the GM / T 0031-2014 standard for electronic signature data format, cryptographic algorithms, and certificate management. These problems restrict the widespread application of electronic signature technology in high-security, high-convenience scenarios, necessitating a new electronic signature solution that complies with national cryptographic standards, offers high key security, supports dynamic certificate management, and integrates natural interaction methods. Summary of the Invention
[0003] The purpose of this invention is to provide a handwritten signature method based on collaborative signature technology. This invention effectively addresses the need for frequent, scenario-specific signatures. Using SM2 single-use collaborative signature as its core, and combining standard-compliant electronic signatures with natural handwritten signatures, this invention offers better ease of operation and higher key security, while also complying with national cryptographic standards.
[0004] The technical solution of this invention: A handwritten signature method based on collaborative signature technology, comprising a client and a server, comprising the following steps:
[0005] S1. Collect user identity information and biometric characteristics through the client;
[0006] S2. The client initializes the random number generator, generates the client SM2 collaborative signature key component d1 and public key negotiation parameter P1, and sends them to the server.
[0007] S3. The server generates the server SM2 collaborative signature key component d2, negotiates with the client public key negotiation parameter P1 to generate public key P, and applies for an event certificate from the certificate authority.
[0008] S4. The server generates an electronic seal based on the handwritten signature trajectory image, and assembles the data to be electronically signed by combining the original text to be signed, the timestamp, and the event certificate.
[0009] S5. The server and client complete the SM2 collaborative signature of the data to be electronically signed through a single interaction, generate a signature value, and assemble the electronic signature data.
[0010] S7: The client and server destroy the generated data.
[0011] The aforementioned handwritten signature method based on collaborative signature technology includes user identity information such as user's name, ID number, handwritten signature trajectory image, and mobile phone number; user biometrics include face and fingerprint; and biometrics collection is completed through at least one of the following devices: ID card reader, camera, fingerprint collector, and handwriting tablet.
[0012] In the aforementioned handwritten signature method based on collaborative signature technology, all communication processes between the client, server, and certificate authority are protected using the TLCP protocol compliant with GB / T 38636-2020.
[0013] In the aforementioned handwritten signature method based on collaborative signature technology, the generation of the SM2 collaborative signature key component in steps S2 and S3 is based on a software random number generator that conforms to GM / T 0105-2021. During the operation of the software random number generator, entropy is continuously accumulated in the entropy pool, which is accumulated by the system entropy source and the hardware random number input obtained from the server.
[0014] In the aforementioned handwritten signature method based on collaborative signature technology, step S4 involves generating an electronic seal in accordance with the GM / T0031-2014 standard. This includes using a handwritten signature trajectory image as the seal body, embedding the user certificate into the seal information structure, and storing face and / or fingerprint information through custom data fields.
[0015] In the aforementioned handwritten signature method based on collaborative signature technology, step S5, the single interaction process of SM2 collaborative signature includes:
[0016] Using the key component d1 generated by the client in S2 and the public key negotiation parameter P1 = d1 -1 *G, calculate Q1=k1*G, where k1∈[1,n-1] is a random number generated by the client, and G is a generator in the SM2 algorithm;
[0017] P1, Q1, and the original text are sent to the server. The server uses the public key P = d2. -1 *Calculate Q2=k2*G and the preprocessed value e=P_Hash(P,plaintext,UserID) using P1-G and random number k2∈[1,n-1], where: P_Hash is the preprocessing function, plaintext is the plain text, and UserID is the user ID;
[0018] The server generates a random number k3∈[1,n-1], calculates (x1,y1)=k3*Q1+Q2 and r=(x1+e)modn. If r=0, k3 is regenerated and r is calculated until r≠0.
[0019] Finally, the server calculates S2 = (d2*k3)modn and S3 = (d2*(r+k2))modn, and returns the signature parameters r, S2 and S3 to the client.
[0020] The client calculates S based on S2 and S3:
[0021] s=((d1*k1)*S2+d1*S3-r)modn
[0022] If S≠0 and S≠nr, then the signature value (r,s) is generated.
[0023] In the aforementioned handwritten signature method based on collaborative signature technology, step S7 involves a complete data destruction operation that includes alternating overwriting of 0s and 1s in the volatile memory at least three times to ensure that the key components and temporary parameters are unrecoverable.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] 1. Ease of use: Users do not need to generate keys or create certificates in advance. They can electronically sign data simply by handwriting, which greatly simplifies the operation process and meets the high-frequency, scenario-based signing needs.
[0026] 2. Key Security: Based on the one-time key principle, the key is used only in a single interaction and is destroyed immediately after use. The key-related parameters are stored in volatile storage, which effectively reduces the risk of key theft and improves key security.
[0027] 3. Compliance: Strictly follow GM / T 0031-2014 "Secure Electronic Signature Cryptographic Technical Specification" for electronic seal creation, data format processing and certificate management, and GB / T38636-2020 "Information Security Technology Transport Layer Cryptographic Protocol" for communication protection to ensure that the entire handwritten signature process complies with national cryptographic standards. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating the present invention;
[0029] Figure 2 This is a schematic diagram of the SM2 collaborative signature process of the present invention. Detailed Implementation
[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this should not be construed as limiting the present invention.
[0031] Example: A handwritten signature method based on collaborative signature technology, such as... Figure 1 As shown, including both the client and server sides, proceed as follows:
[0032] S1. Collect user identity information and biometrics through the client. In this step, the client can collect user identity information and biometrics in various ways, such as reading name and ID number through an ID card reader, capturing facial photos through a camera, collecting user fingerprints through a fingerprint scanner, capturing handwritten signature trajectory images through a handwriting tablet, or collecting user identity information such as mobile phone number through form filling. This step needs to collect information including name, ID number, mobile phone number, and signature trajectory image, which will be used for applying for certificates and creating electronic seals.
[0033] S2. The client initializes the random number generator, generating the client SM2 collaborative signature key component d1 and public key negotiation parameter P1, and sends them to the server. In this step, to ensure key security, the client has a built-in software random number generator (RNG). The random number generator design meets the requirements of GM / T 0105-2021 "Software Random Number Generator Design Guide" for RNG design based on the SM3 algorithm. During RNG operation, entropy needs to be continuously accumulated in the entropy pool, which is accumulated from the system entropy source and hardware random number input obtained from the server. Cryptographic operations can only be performed after the RNG is initialized; if it cannot be initialized, all subsequent processes will terminate. The client uses the RNG to generate the client SM2 collaborative signature key component d1∈[1,n-1], and calculates P1=d1. -1 *G is used as the SM2 collaborative signature client request parameter. The client generates a random number k1∈[1,n-1], calculates Q1=k1*G, and sends P1, Q1, the original text to be signed, user identity information and biometric features to the server.
[0034] S3. The server generates a server-side SM2 collaborative signature key component d2, negotiates it with the client's public key negotiation parameter P1 to generate a public key P, and applies for an event certificate from a certificate authority. In this step, upon receiving P1 from the client, the server generates a random number d2∈[1,n-1] using its internal hardware random number generator, uses d2 as the server-side SM2 collaborative signature key component, and negotiates it with the client's public key negotiation parameter P1 to generate a public key P.
[0035] P = d2 -1 *P1-G;
[0036] The server then uses the public key P and the user's identity information to apply for an event certificate from the Certificate Authority (CA).
[0037] S4. The server generates an electronic seal based on the handwritten signature trajectory image, and assembles the data to be electronically signed by combining the original text to be signed, the timestamp, and the event certificate. In this step, the server uses the handwritten signature trajectory image as the seal image according to GM / T 0031-2014 "Secure Electronic Signature Cryptographic Technical Specification", puts the user event certificate into the corresponding structure of the seal information (SES_SealInfo), and sets the seal validity period to be consistent with the certificate validity period. If it carries information such as face or fingerprint, and this information is not in the same image as the signature trajectory image, then this information will be stored in the seal information as custom data (ExtensionDatas). The seal maker signs the seal information structure to generate an electronic seal (SESeal).
[0038] S5. The server and client complete the SM2 collaborative signature of the data to be electronically signed through a single interaction, generate a signature value, and assemble the electronic signature data.
[0039] In this step, the preparation of the electronic seal and the data to be signed requires the server to calculate the SM3 hash value of the original text to be signed as the original text hash value, generate a timestamp through the timestamp server, and assemble the electronic seal, the hash value of the original text to be signed, the timestamp, event certificate, and other information into the data to be electronically signed (TBS_Sign). Note that the generation process of TBS_Sign should meet the requirements of GM / T0031-2014 "Secure Electronic Signature Cryptographic Technical Specification" 6.2.2 Electronic Signature Generation Process; after TBS_Sign is generated, the SM2 single-time collaborative signature electronic signature begins, such as... Figure 2 As shown, it includes the following steps:
[0040] Step 1: Use the key component d1 generated by the client in S2 and the public key negotiation parameter P1 = d1 -1 *G, calculate Q1=k1*G, where k1∈[1,n-1] is the random number generated by the client, and G is the generator in the SM2 algorithm;
[0041] Step 2: Send P1, Q1, and the original text to the server. The server uses the public key P = d2. -1 *Calculate Q2=k2*G and the preprocessed value e=P_Hash(P,plaintext,UserID) using P1-G and random number k2∈[1,n-1], where: P_Hash is the preprocessing function, plaintext is the plain text, and UserID is the user ID;
[0042] The server generates a random number k3∈[1,n-1], calculates (x1,y1)=k3*Q1+Q2 and r=(x1+e)modn. If r=0, k3 is regenerated and r is calculated until r≠0.
[0043] Finally, the server calculates S2 = (d2*k3)modn and S3 = (d2*(r+k2))modn, and returns the signature parameters r, S2 and S3 to the client.
[0044] Step 3: The client calculates S based on S2 and S3:
[0045] s=((d1*k1)*S2+d1*S3-r)modn
[0046] If S≠0 and S≠nr, then the signature value (r,s) is generated.
[0047] After generating the signature value, electronic signature data is generated according to the electronic signature data format and then returned to the caller.
[0048] In this step, the SM2 algorithm is used to solve the elliptic curve equation y over a finite field. 2 =x 3 +ax+b, the base point G (generator), curve parameter n, curve parameters a and b are defined in Part 5: Parameter Definition of GM / T 0003-2012 "SM2 Elliptic Curve Public Key Cryptography Algorithm".
[0049] Points on an elliptic curve over a finite field are represented by (x, y) or uppercase letters, such as (x1, y1), P, and Q. The operation of multiplying a point P by a factor of k on an elliptic curve can be represented as k*P, i.e. k is a positive integer.
[0050] The SM2 signature algorithm requires preprocessing of the original text. P_Hash is the preprocessing function, implemented as follows: Let x||y be the concatenation of x and y, H... 256 () represents an SM3 cryptographic hash function with a message length of 256 bits, the plaintext to be processed is M, and the user's public key is P. A User A has a length entlen A Bit-distinguished identifier ID A ENTL A It is composed of integer entlen A The two bytes generated will contain the coordinates x of the elliptic curve equation parameters a, b, and G. G y G and public key P A coordinates x A y A Convert the data type to a bit string (see GM / T 0003 for conversion method), and calculate Z. A =H 256 (ENTLEN A ||ID A ||a||b||xG ||y G ||x A ||y A ); e is the preprocessed value.
[0051] S6. The client and server destroy the generated data. In this step, the server destroys d2, k2, k3, e, r, S2, S3, and TBS_Sign; the client destroys d1, k1, r, S2, S3, and TBS_Sign. Both the client and server use the same data destruction process, which involves repeatedly overwriting 0s and 1s on the volatile memory storing the relevant data at least three times to prevent recovery.
[0052] The handwritten signature method based on collaborative signature technology of the present invention will be described in detail below with specific scenarios.
[0053] Suppose an employee of a company needs to sign an electronic contract by hand. First, the employee uses an internal company device to read their name and ID number using an ID card reader, captures a facial image using a camera, collects a fingerprint using a fingerprint scanner, writes their signature on a handwriting pad to obtain an image of the handwritten signature, and fills in their mobile phone number in a form. This information is then input into the client application.
[0054] After receiving this information, the client inputs the original text of the electronic contract to be signed and initializes the random number generator. The random number generator operates according to the GM / T 0105-2021 standard, accumulating entropy in the entropy pool, which is accumulated from the system entropy source and hardware random number inputs obtained from the server. After initialization, the client generates the client SM2 collaborative signature key component d1 and calculates P1 = d1. -1 *G generates a random number k1∈[1,n-1] and calculates Q1=k1*G. Then, P1, Q1, the original electronic contract, employee identity information, and biometric features are sent to the server.
[0055] After receiving the data, the server generates a server-side SM2 collaborative signature key component d2 using a hardware random number generator, and calculates and negotiates the public key P based on the client parameters. Then, the server uses the public key and employee identity information to apply for an event certificate from the CA. Following the GM / T 0031-2014 standard, the employee's handwritten signature trace image is used to create an electronic seal, the certificate is placed in the seal information structure, and the seal's validity period is set to be consistent with the certificate's validity period. The server calculates the SM3 hash value of the original electronic contract text, obtains the timestamp, and assembles the electronic seal, original text hash value, timestamp, event certificate, etc., into the data to be electronically signed (TBS_Sign). The server performs SM2 signature preprocessing on TBS_Sign to generate e, then generates random numbers k2∈[1,n-1] and k3∈[1,n-1], calculates r, S2, and S3, and returns these parameters and the TBS_Sign structure to the client, while simultaneously destroying the relevant keys and data generated by the server in this operation.
[0056] After receiving the parameters returned by the server, the client executes the SM2 single-signature collaboration, calculates s = ((d1*k1)*S2 + d1*S3 - r) mod n. If S ≠ 0 and S ≠ nr, then a signature value (r, s) is generated. Electronic signature data is formed according to the electronic signature data format and returned to the caller (such as the enterprise's contract management system). Subsequently, the client also destroys the relevant keys and data generated in this operation.
[0057] Through the above steps, the company's employees successfully completed the handwritten signature of the electronic contract. The entire process was safe, convenient, and in compliance with relevant standards and regulations.
[0058] In summary, this invention can effectively solve the high-frequency, scenario-based signature requirements. This invention uses SM2 single-time collaborative signature as its core, combined with standard electronic signature and natural handwritten signature, which has better operational convenience and higher key security, and complies with national cryptographic standards.
Claims
1. A handwritten signature method based on a co-signature technique, comprising a client and a server, characterized in that: The following steps are taken: S1, collect the user's identity information and biological characteristics through the client; S2, the client initializes a random number generator, generates a client SM2 co-signature key component and public key negotiation parameters , and sends to the server; S3, the server generates a server SM2 co-signature key component Negotiate parameters with the client public key Negotiate to generate a public key And apply for an event certificate to the certificate authority; S4, the server generates an electronic seal based on the handwritten signature track picture, combines the original text to be signed, the timestamp and the event certificate, and assembles the electronic signature data to be signed; S5, the server and the client complete the SM2 collaborative signature of the electronic signature data to be signed through single interaction, generate a signature value, and assemble the electronic signature data; S6, the client and the server destroy the generated data; In step S5, the single interaction process of SM2 collaborative signature includes: Using the client-generated key component in S2 and the public key to negotiate parameters , calculate , where is a random number generated by the client, is a generator in the SM2 algorithm; Will , The original text is sent to the server, which uses the public key. and random numbers calculate and preprocessed values In the formula: For preprocessing functions, This is the original text. User ID; The server generates a random number , compute and , if then re-generate compute until ; Final server computation , Returning signature parameters , and to the client; The client computes and computes : ; If and then a signature value is generated.
2. The method of claim 1, wherein the method is based on a co-signature technique. The user's identity information includes the user's name, ID number, handwritten signature track picture and mobile phone number; the user's biological characteristics include face and fingerprint; the biological characteristic collection is completed through at least one of the following devices: ID card reader, camera, fingerprint collector, and handwriting board.
3. The method of claim 2, wherein the method is based on a co-signature technique. All communication processes between the client, server and certificate authority are protected by TLCP protocol in accordance with GB / T 38636-2020.
4. The method of claim 2, wherein the method is based on a co-signature technique. The generation of SM2 collaborative signature key components in steps S2 and S3 is based on a software random number generator in accordance with GM / T 0105-2021. The software random number generator continuously accumulates entropy in the entropy pool during operation. The entropy pool is accumulated by system entropy source and hardware random number input from the server.
5. The method for handwritten signature based on the synergic signature technique according to claim 1, characterized in that: In step S4, the generation of electronic seal conforms to the GM / T 0031-2014 standard, including taking the handwritten signature track picture as the seal main body, embedding the user certificate into the seal information structure, and storing the face and / or fingerprint information through a custom data field.
6. The method for handwritten signature based on the synergic signature technique according to claim 1, characterized in that: In step S6, the complete destruction of data includes at least 3 times of alternating overwriting of 0 and 1 on volatile memory to ensure that the key components and temporary parameters cannot be recovered.
Citation Information
Patent Citations
SM2 algorithm collaborative signature and decryption method, device and system
CN109672539A
Electronic document signing method based on electronic notarization and SM2 collaborative signature and server adopted by electronic document signing method
CN111817857A