Data security protection method integrating signature and encryption

By integrating signature and encryption into a single cryptographic scheme, this data security protection method solves the problem of low efficiency in existing step-by-step schemes, achieving efficient data security protection and meeting the security requirements of important business scenarios.

CN121283781BActive Publication Date: 2026-03-24SICHUAN DIGITAL CERTIFICATE AUTHENTICATION MANAGEMENT CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, digital signature, encryption/decryption, and message authentication code technologies need to be performed step-by-step when addressing data security issues at different stages, resulting in low system operating efficiency and high overhead in network transmission and storage resources.

Method used

A signature-encryption integrated data security protection method is adopted, which integrates signature, encryption and message authentication into a single cryptographic scheme. The SM2 key is used to sign and encrypt messages and generate message authentication codes. The signature-encryption messages are generated and verified through the SM3 and SM4 algorithms.

Benefits of technology

It achieves efficient data security protection, reduces network transmission bandwidth and storage resource overhead, and meets the high reliability requirements of data security in important business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121283781B_ABST
    Figure CN121283781B_ABST
Patent Text Reader

Abstract

The application discloses a kind of data security protection methods of signing and encrypting integration, it is related to information security technical field, including: signing and encrypting encapsulation: preparing SM2 key, message signature and encryption, generating message authentication code and sending signing and encrypting message;Signing and encrypting decapsulation: receiving signing and encrypting message and verifying the message authentication code, then message decryption and signature verification;The application integrates signature, encryption, message authentication in a cryptographic scheme, compared with the step-by-step scheme of traditional signature first, then encryption, finally message authentication, has higher efficiency and smaller ciphertext data amount, can reduce network transmission bandwidth and storage resource occupation overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and in particular to a data security protection method that integrates signature and encryption. Background Technology

[0002] In the current digital economy era, the Internet of Things, cloud computing, and big data have been widely and deeply applied. To ensure the security of these applications and data, various important business systems generally employ technologies such as digital signatures, encryption / decryption, and message authentication codes to protect the confidentiality, integrity, and non-repudiation of business data. Digital signature technology addresses the integrity and non-repudiation of information exchange; the data receiver can verify the source of the message and the sender's identity, and the sender cannot deny their signature information. However, the message is transmitted in plaintext, posing a risk of privacy leakage. Encryption / decryption technology addresses the confidentiality of information exchange; only the communicating parties or a specific receiver can obtain the plaintext message after decrypting it using their own keys. Message authentication code technology verifies the authenticity of the message source and the integrity of the received message, preventing messages from being forged or tampered with during transmission.

[0003] Digital signature, encryption / decryption, and message authentication technologies address data security issues at different stages. If comprehensive protection is required for the authenticity, confidentiality, integrity, and non-repudiation of the message source, including the identity of the sender and the message itself, during transmission, it is typically necessary to first digitally sign the message, then encrypt the data, and finally authenticate the message. Additionally, the message authentication key needs to be secretly sent to the recipient using extra security measures. These step-by-step measures impose overhead on system operation, reduce processing efficiency, and generate a significant amount of ciphertext and authentication data, resulting in substantial overhead on network bandwidth and storage resources. Summary of the Invention

[0004] To address the problems existing in the prior art, the purpose of this invention is to provide a data security protection method that integrates signature and encryption. This invention integrates signature, encryption, and message authentication into a single cryptographic scheme, which is more efficient and produces less ciphertext data than the traditional step-by-step scheme that involves signing first, then encryption, and finally message authentication. This reduces network transmission bandwidth and storage resource consumption.

[0005] To achieve the above objectives, the technical solution adopted by this invention is: a data security protection method integrating signature and cryptography, comprising the following steps:

[0006] Step 1, Signature Packaging: Prepare the SM2 key, sign and encrypt the message, generate the message authentication code, and send the signed message;

[0007] Step 2, Sign-decryption and decryption: Receive the sign-decryption message and verify the message authentication code, then decrypt the message and verify the signature.

[0008] As a further improvement of the present invention, in step 1, the preparation of the SM2 key is as follows:

[0009] Message sender A calls the cryptographic module to generate their own SM2 asymmetric key pair, with the private key denoted as sk. A The public key is denoted as PK. A Based on the principle of the SM2 elliptic curve algorithm, PK A =[sk A ]G, where G is the base point of the SM2 elliptic curve, [sk A G is the sk of the base point G on the elliptic curve. A Double point; Message receiver B calls the cryptographic module to generate its own SM2 asymmetric key pair, with the private key denoted as sk. B The public key is denoted as PK. B Similarly, in a PK (player versus player) scenario B =[sk B G; Message sender A and message receiver B exchange their respective public keys, i.e., PK. A —>B、PK B —>A.

[0010] As a further improvement of the present invention, step 1, message signing specifically includes the following steps:

[0011] (1) Let the original text of the message to be signed and encrypted be M;

[0012] (2) Call the SM3 algorithm to calculate e=SM3(M), and convert the data type of e to an integer;

[0013] (3) Select a random number k1∈[1,n-1], where n is the order of the base point G of the SM2 elliptic curve;

[0014] (4) Calculate (x1,y1)=[k1]G, where x1 and y1 represent the bit strings of the x-axis and y-axis coordinates of the k1 times point of the elliptic curve, respectively;

[0015] (5) Convert the data type of x1 to an integer, calculate r=(e+x1) mod n, and if r=0 or r+k1=n, return (3).

[0016] (6) Calculate s = ((1+sk) A ) -1 ·(k1-r·sk A If s=0, then return (3);

[0017] (7) Calculate t=(r+s) mod n. If t=0, return (3).

[0018] As a further improvement of the present invention, in step 1, the message encryption is specifically performed as follows:

[0019] Select a random number k2∈[1,n-1], and calculate PK. k2 =[k2]G; Calculate (x2,y2)=[k2]PK B Here, x2 and y2 represent the bit strings of the x-axis and y-axis coordinates of the points on the elliptic curve, respectively; the key derivation function is called to calculate the SM4 symmetric key key1=KDF(x2||y2,128), where || represents concatenation; the SM4 encryption algorithm is called to calculate the ciphertext c=SM4Enc(M,key1) on the original message M.

[0020] As a further improvement of the present invention, in step 1, generating the message authentication code and sending the signature message are specifically as follows:

[0021] Calculate (x3, y3) = [sk A ]PK B Here, x3 and y3 represent the bit strings of the x-axis and y-axis coordinates of the points on the elliptic curve, respectively; the key derivation function is called to calculate the SM3 message authentication key key2=KDF(x3||y3,256); key2 is used to call the HMAC-SM3 algorithm to check r, s, c, and PK. K2 The combined message calculates the message authentication code mac = HMAC - SM3(r||s||c||PK). K2 ,key2); Message sender A sends a signed 5-tuple (r,s,c,PK) K2 ,mac) to receiver B.

[0022] As a further improvement of the present invention, in step 2, receiving the signature message and verifying the message authentication code are specifically as follows:

[0023] Message receiver B receives the signature quintuple (r, s, c, PK) from sender A. K2 ,mac); calculate (x3) ’ ,y3 ’ )=[sk B ]PK A , where x3 ’ y3 ’ The bit strings represent the x-axis and y-axis coordinates of points on the elliptic curve, respectively; the key derivation function is called to calculate the SM3 message authentication key key2. ’ =KDF(x3 ’ ||y3 ’ ,256), because (x3 ’ ,y3 ’ )==(x3,y3), therefore key2 ’==key2; Calculate mac' = HMAC - SM3(r||s||c||PK) K2 key2 ’ ), due to key2 ’ ==key2, so mac' == mac; if mac' and mac are not equal, it indicates an error in message transmission, and the process terminates.

[0024] As a further improvement of the present invention, in step 2, the message decryption is specifically performed as follows:

[0025] Calculate (x2) ’ ,y2 ’ )=[sk B ]PK k2 , where x2 ’ y2 ’ The bit strings represent the x-axis and y-axis coordinates of points on the elliptic curve, respectively; the key derivation function is called to calculate the SM4 symmetric key key1. ’ =KDF(x2 ’ ||y2 ’ ,128), because (x2 ’ ,y2 ’ )==(x2,y2), so key1 ’ ==key1; Call the SM4 decryption algorithm to calculate the plaintext M = SM4Dec(c,key1) ’ ).

[0026] As a further improvement of the present invention, in step 2, the message signature verification is performed as follows:

[0027] Calculate t = (r + s) mod n; calculate the point (x1) on the elliptic curve. ’ ,y1 ’ = [s]G + [t]PK A , where x1 ’ y1 ’ The bit strings representing the x-axis and y-axis coordinates of points on the elliptic curve are respectively; x1 ’ Convert the data type of e to an integer; calculate e = SM3(M), and convert the data type of e to an integer; calculate r. ’ =(e+x1 ’ ) mod n; check r ’ Whether ==r is true, since (x1) ’ ,y1 ’ )==(x1,y1), therefore x1 ’ ==x1,r ’ =(e+x1 ’ = (e+x1)=r, verification passed.

[0028] The beneficial effects of this invention are:

[0029] 1. This invention integrates SM2 signature, SM4 encryption, and HMAC-SM3 message authentication into one, and the signature result has multiple security features such as authenticity, confidentiality, integrity and non-repudiation, which meets the high reliability requirements of data security in important business scenarios.

[0030] 2. In this invention, the key sensitivity parameter of the message authentication code is directly calculated using the SM2 public and private keys of the sender and receiver. Only the two parties can decrypt and obtain it. The two parties do not need to negotiate in advance or send it secretly through an additional secure channel, which can reduce communication overhead. Attached Figure Description

[0031] Figure 1 This is a flowchart of an embodiment of the present invention. Detailed Implementation

[0032] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0033] Example

[0034] like Figure 1 As shown, a data security protection method integrating signature and encryption is presented, which integrates signature, encryption, and message authentication into a single cryptographic scheme. This method is more efficient and produces less ciphertext data than the traditional step-by-step scheme that involves signing first, then encryption, and finally message authentication. For applications requiring digital signatures, data encryption, and message authentication simultaneously, it can achieve protection of message source authenticity, confidentiality, integrity, and non-repudiation with minimal overhead. Specifically, it includes the following steps:

[0035] S1: Sealing and sealing process.

[0036] S101: Prepare the SM2 key.

[0037] S10101: Message sender A calls the cryptographic module to generate its own SM2 asymmetric key pair (including a private key and a public key), denoted as sk. A The public key is denoted as PK. A .

[0038] S10102: Based on the principle of the SM2 elliptic curve algorithm, PK A =[sk A ]G, where G is the base point of the SM2 elliptic curve, [sk A G is the sk of the base point G on the elliptic curve. A Double point (the same applies below).

[0039] S10103: Message receiver B calls the cryptographic module to generate its own SM2 asymmetric key pair (including a private key and a public key), the private key being sk. B The public key is denoted as PK. B Similarly, in a PK (player versus player) scenario B =[sk B ]G.

[0040] S10104: Message sender A and message receiver B exchange their respective public keys, i.e., PK. A —>B、PK B —>A.

[0041] S102: Sign the message.

[0042] S10201: Let the original text of the message to be signed and encrypted be M.

[0043] S10202: Call the SM3 algorithm to calculate e=SM3(M) and convert the data type of e to an integer.

[0044] S10203: Select a random number k1∈[1,n-1], where n is the order of the base point G of the SM2 elliptic curve (the same applies below).

[0045] S10204: Calculate (x1,y1)=[k1]G, where x1 and y1 represent bit strings of x-axis and y-axis coordinates of a point k1 times the elliptic curve, respectively.

[0046] S10205: Convert the data type of x1 to an integer, calculate r=(e+x1) mod n, and if r=0 or r+k1=n, return S10203.

[0047] S10206: Calculate s=((1+sk) A ) -1 ·(k1-r·sk A If s=0, then return S10203.

[0048] S10207: Calculate t=(r+s) mod n. If t=0, return to S10203.

[0049] S103: Encrypt the message.

[0050] S10301: Select a random number k2∈[1,n-1], and calculate PK. k2 =[k2]G.

[0051] S10302: Calculate (x2, y2) = [k2]PK B , where x2 and y2 represent the bit strings of the x-axis and y-axis coordinates of the points on the elliptic curve, respectively.

[0052] S10303: Call the key derivation function to calculate the SM4 symmetric key key1=KDF(x2||y2,128).

[0053] S10304: Call the SM4 encryption algorithm to calculate the ciphertext c=SM4Enc(M,key1) on the plaintext message M.

[0054] S104: Generate message authentication code.

[0055] S10401: Calculate (x3, y3) = [sk A ]PK B , where x3 and y3 represent the bit strings of the x-axis and y-axis coordinates of the points on the elliptic curve, respectively.

[0056] S10402: Call the key derivation function to calculate the SM3 message authentication key key2=KDF(x3||y3,256).

[0057] S10403: Use key2 to call the HMAC-SM3 algorithm to process r, s, c, and PK. K2 The combined message calculates the message authentication code mac = HMAC - SM3(r||s||c||PK). K2 ,key2);

[0058] S105: Send a signature message.

[0059] S10501: Message sender A sends a signed quintuple (r, s, c, PK) K2 ,mac) to receiver B.

[0060] S2: Signature and decryption process.

[0061] S201: Receive signature message.

[0062] S20101: Message receiver B receives the signature quintuple (r, s, c, PK) from sender A. K2 (mac).

[0063] S202: Verification message authentication code.

[0064] S20201: Calculate (x3) ’ ,y3 ’ )=[sk B ]PK A , where x3 ’ y3 ’ The bit strings represent the x-axis and y-axis coordinates of points on the elliptic curve, respectively.

[0065] S20202: Proof (x3) ’ ,y3’ )==(x3,y3),

[0066] (x3 ’ ,y3 ’ )=[sk B ]PK A

[0067] =[sk B ]·[sk A G

[0068] =[sk A ]·[sk B G

[0069] =[sk A ]PK B

[0070] =(x3,y3), Q.E.D.

[0071] S20203: Call the key derivation function to calculate the SM3 message authentication key key2 ’ =KDF(x3 ’ ||y3 ’ ,256), because (x3 ’ ,y3 ’ )==(x3,y3), therefore key2 ’ ==key2.

[0072] S20204: Calculate mac' = HMAC - SM3(r||s||c||PK) K2 key2 ’ ), due to key2 ’ ==key2, so mac'==mac.

[0073] S20205: If mac' is not equal to mac, it indicates an error in message transmission, and the process terminates.

[0074] S203: Decrypt the message.

[0075] S20301: Calculate (x2) ’ ,y2 ’ )=[sk B ]PK k2 , where x2 ’ y2 ’ The bit strings represent the x-axis and y-axis coordinates of points on the elliptic curve, respectively.

[0076] S20202: Proof (x2) ’ ,y2 ’ )==(x2,y2),

[0077] (x2 ’ ,y2 ’ )=[sk B ]PK k2

[0078] =[sk B ]·[k2]G

[0079] =[k2]·[sk B G

[0080] =[k2]PK B

[0081] =(x2,y2), Q.E.D.

[0082] S20303: Call the key derivation function to calculate the SM4 symmetric key key1 ’ =KDF(x2 ’ ||y2 ’ ,128), because (x2 ’ ,y2 ’ )==(x2,y2), so key1 ’ ==key1.

[0083] S20304: Call the SM4 decryption algorithm to calculate the original text M=SM4Dec(c,key1) from the ciphertext c. ’ ).

[0084] S204: Verify the signature of the message.

[0085] S20401: Calculate t = (r + s) mod n.

[0086] S20402: Calculate the point (x1) on the elliptic curve ’ ,y1 ’ = [s]G + [t]PK A , where x1 ’ y1 ’ These are bit strings representing the x-axis and y-axis coordinates of points on the elliptic curve, respectively.

[0087] S20403: Proof (x1) ’ ,y1 ’ )==(x1,y1),

[0088] (x1 ’ ,y1 ’ = [s]G + [t]PK A

[0089] =[s]G+[t][sk A G

[0090] =[s+t·sk A G

[0091] =[s+(r+s)·sk A G

[0092] =[s·(1+sk A )+r·sk A G

[0093] =[((1+sk A ) -1 ·(k1-r·sk A ))·(1+sk A )+r·sk A G

[0094] =[k1-r·sk A +r·sk A G

[0095] =[k1]G

[0096] =(x1,y1), Q.E.D.

[0097] S20404: x1 ’ The data type is converted to an integer.

[0098] S20405: Calculate e = SM3(M), and convert the data type of e to an integer.

[0099] S20406: Calculate r ’ =(e+x1 ’ ) mod n.

[0100] S20407: Test r ’ Whether ==r is true, since (x1) ’ ,y1 ’ )==(x1,y1), therefore x1 ’ ==x1,r ’ =(e+x1 ’ = (e+x1)=r, verification passed.

[0101] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. A data security protection method integrating signature and cryptography, characterized in that, Includes the following steps: Step 1, Signature Packaging: Prepare the SM2 key, sign and encrypt the message, generate the message authentication code, and send the signed message; In step 1, the SM2 key is prepared as follows: Message sender A calls the cryptographic module to generate their own SM2 asymmetric key pair, with the private key denoted as sk. A The public key is denoted as PK. A Based on the principle of the SM2 elliptic curve algorithm, PK A =[sk A ]G, where G is the base point of the SM2 elliptic curve, [sk A G is the sk of the base point G on the elliptic curve. A Double point; Message receiver B calls the cryptographic module to generate its own SM2 asymmetric key pair, with the private key denoted as sk. B The public key is denoted as PK. B Similarly, in a PK (player versus player) scenario B =[sk B G; Message sender A and message receiver B exchange their respective public keys, i.e., PK. A —>B、PK B —>A; Step 1, specifically the message signing process, includes the following steps: (1) Let the original text of the message to be signed and encrypted be M; (2) Call the SM3 algorithm to calculate e=SM3(M), and convert the data type of e to an integer; (3) Select a random number k1∈[1,n-1], where n is the order of the base point G of the SM2 elliptic curve; (4) Calculate (x1,y1)=[k1]G, where x1 and y1 represent the bit strings of the x-axis and y-axis coordinates of the k1 times point of the elliptic curve, respectively; (5) Convert the data type of x1 to an integer, calculate r=(e+x1) mod n, and if r=0 or r+k1=n, return (3). (6) Calculate s = ((1+sk) A ) -1 ·(k1-r·sk A If s=0, then return (3); (7) Calculate t=(r+s) mod n. If t=0, return (3). In step 1, the message encryption is performed as follows: Select a random number k2∈[1,n-1], and calculate PK. k2 =[k2]G; Calculate (x2,y2)=[k2]PK B Here, x2 and y2 represent the bit strings of the x-axis and y-axis coordinates of the points on the elliptic curve, respectively; the key derivation function is called to calculate the SM4 symmetric key key1=KDF(x2||y2,128), where || represents concatenation; the SM4 encryption algorithm is called to calculate the ciphertext c=SM4Enc(M,key1) on the original message M; In step 1, the generation of the message authentication code and the sending of the signature message are as follows: Calculate (x3, y3) = [sk A ]PK B Here, x3 and y3 represent the bit strings of the x-axis and y-axis coordinates of the points on the elliptic curve, respectively; the key derivation function is called to calculate the SM3 message authentication key key2=KDF(x3||y3,256); key2 is used to call the HMAC-SM3 algorithm to check r, s, c, and PK. K2 The combined message calculates the message authentication code mac = HMAC - SM3(r||s||c||PK). K2 ,key2); Message sender A sends a signed 5-tuple (r,s,c,PK) K2 (mac) is given to receiver B; Step 2, Sign-decryption and decryption: Receive the sign-decryption message and verify the message authentication code, then decrypt the message and verify the signature.

2. The data security protection method integrating signature and password as described in claim 1, characterized in that, In step 2, receiving the signature message and verifying the message authentication code are as follows: Message receiver B receives the signature quintuple (r, s, c, PK) from sender A. K2 ,mac); calculate (x3) ’ ,y3 ’ )=[sk B ]PK A , where x3 ’ y3 ’ The bit strings represent the x-axis and y-axis coordinates of points on the elliptic curve, respectively; the key derivation function is called to calculate the SM3 message authentication key key2. ’ =KDF(x3 ’ ||y3 ’ ,256), because (x3 ’ y3 ’ )==(x3,y3), therefore key2 ’ ==key2; Calculate mac' = HMAC - SM3(r||s||c||PK) K2 key2 ’ ), due to key2 ’ ==key2, so mac' == mac; if mac' and mac are not equal, it indicates an error in message transmission, and the process terminates.

3. The data security protection method integrating signature and password as described in claim 2, characterized in that, In step 2, the message decryption is performed as follows: Calculate (x2) ’ ,y2 ’ )=[sk B ]PK k2 , where x2 ’ y2 ’ These are bit strings representing the x-axis and y-axis coordinates of points on the elliptic curve, respectively. Call the key derivation function to calculate the SM4 symmetric key key1 ’ =KDF(x2 ’ ||y2 ’ ,128), because (x2 ’ ,y2 ’ )==(x2,y2), so key1 ’ ==key1; Call the SM4 decryption algorithm to calculate the plaintext M = SM4Dec(c,key1) ’ ).

4. The data security protection method integrating signature and password as described in claim 3, characterized in that, In step 2, the message signature verification is performed as follows: Calculate t = (r + s) mod n; calculate the point (x1) on the elliptic curve. ’ ,y1 ’ = [s]G + [t]PK A , where x1 ’ y1 ’ The bit strings representing the x-axis and y-axis coordinates of points on the elliptic curve are respectively; x1 ’ Convert the data type of e to an integer; calculate e = SM3(M), and convert the data type of e to an integer; calculate r. ’ =(e+x1 ’ ) mod n; check r ’ Whether ==r is true, since (x1) ’ ,y1 ’ )==(x1,y1), therefore x1 ’ ==x1,r ’ =(e+x1 ’ = (e+x1)=r, verification passed.

Citation Information

Patent Citations

  • Data link trusted transmission method and system

    CN114826656A

  • Authenticable key exchange method and application based on SM2 signature

    CN120546889A