SM2 collaborative signature and encryption / decryption system and method with anti-quantum characteristics

By integrating quantum-resistant algorithm software and hardware enhancements into a standard server cryptographic machine, embedding quantum-resistant collaborative signature and encryption/decryption modules, and using the national cryptographic TLCP protocol for secure transmission, the security shortcomings of the traditional SM2 collaborative mechanism under the threat of quantum computing are solved, achieving efficient and reliable key management and data transmission.

CN121283626BActive Publication Date: 2026-05-08ZHEJIANG ICINFO TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG ICINFO TECH
Filing Date
2025-11-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Traditional SM2 collaborative mechanisms face security deficiencies, vulnerability to man-in-the-middle attacks and data tampering under the threat of quantum computing. Furthermore, they lack a dynamic adaptation mechanism for massive storage of server-side private keys, resulting in low reliability and response efficiency in collaborative signature and encryption/decryption processes.

Method used

By combining software-based and hardware-enhanced quantum-resistant algorithms without altering the standard server cryptographic machine hardware, key generation, storage, and rotation are achieved. Quantum-resistant collaborative signature and encryption/decryption modules are embedded, and secure transmission is achieved through the national cryptographic TLCP protocol. Security strategies are dynamically adjusted to adapt to different threat levels.

Benefits of technology

It significantly improves the reliability and response efficiency of collaborative signature and encryption/decryption processes, ensures long-term key security, resists quantum computing threats, and prevents man-in-the-middle attacks and data tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121283626B_ABST
    Figure CN121283626B_ABST
Patent Text Reader

Abstract

The application discloses a SM2 collaborative signature and encryption and decryption system and method with quantum resistance, and relates to the field of cryptography and information security; the application deeply integrates quantum-resistant cryptographic algorithms and the SM2 collaborative computing framework of the national secret, and constructs a key security system: through the softwareization of quantum-resistant algorithms and the hardware enhancement module, SM2 sub-private keys, quantum-resistant key pairs and public keys are generated, the private keys are encrypted and stored, and the private keys are periodically rotated; based on the quantum-resistant collaborative signature, encryption and decryption modules, a quantum-resistant verification mechanism is embedded, data is transmitted in combination with the TLCP protocol of the national secret, and signature, encryption and decryption operations are completed; the device integration and the dynamic security control unit monitor the security state, calculate a threat index to generate a protection strategy, and dynamically switch the security mode, effectively solving the problems of the insufficient security, vulnerability to attacks and data tampering of the traditional SM2 algorithm under the threat of quantum computing, and significantly improving the long-term attack resistance and operation reliability of the device in high-security demand scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cryptography and information security, specifically to an SM2 cooperative signature and encryption / decryption system and method that integrates quantum-resistant properties. Background Technology

[0002] With the rapid evolution of quantum computing technology, traditional cryptographic systems based on the elliptic curve discrete logarithm problem face a significant security threat from being cracked by Shor's algorithm. Simultaneously, the deepening implementation of policies and standards such as the "Basic Requirements for Cybersecurity Level Protection in Information Security Technology" and "GM / T0039-2019 Technical Requirements for Server Cryptographic Machines," along with the surge in demand for high security, high compliance, and collaborative signature and encryption / decryption capabilities in fields such as cloud computing, e-government, and fintech, has made collaborative security technologies that integrate quantum resistance and national cryptographic algorithms a core direction for transformation in the fields of cryptography and information security. However, existing technologies still have many shortcomings.

[0003] Traditional technologies lack sufficient quantization fusion logic between the SM2 collaborative mechanism and quantum-resistant algorithms. The control strategy does not integrate the collaborative constraint parameters of standard server cryptographic machine hardware capabilities and software-level quantum-resistant computation. It also lacks a dynamic adaptation mechanism for massive storage of server private keys. Furthermore, security verification does not consider the compliance-related distribution of the Chinese cryptographic TLCP protocol in client-server communication. This results in low reliability and response efficiency for collaborative signature and encryption / decryption processes covering a wide range of scenarios.

[0004] To address the aforementioned shortcomings, a technical solution is provided. Summary of the Invention

[0005] The purpose of this invention is to solve the problems of insufficient security of the traditional SM2 algorithm under the threat of quantum computing, vulnerability to man-in-the-middle attacks and data tampering during collaborative operation, and to propose an SM2 collaborative signature and encryption / decryption system and method that integrates quantum-resistant characteristics.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] A quantum-resistant SM2 cooperative signature and encryption / decryption system includes:

[0008] Quantum-resistant algorithm software and hardware enhancement: Without changing the standard server cryptographic machine hardware that only supports Chinese cryptographic algorithms, the client uses software random numbers to generate the SM2 sub-private key D1. The server requests hardware random numbers from the standard server cryptographic machine to generate the quantum-resistant key pair, the SM2 sub-private key D2, and the public key P. The plaintext private key is encrypted with the SM4 key stored in the secure area of ​​the cryptographic machine hardware and stored in an external database. At the same time, based on a predetermined periodic cipher, the old ciphertext is decrypted with the old SM4 master key and then re-encrypted with the new SM4 master key, the database record is updated, and the old key is securely erased to achieve key rotation.

[0009] Quantum-resistant collaborative signature module: This module is used to embed quantum-resistant security elements into the SM2 two-party collaborative signature process. The client generates a random number, calculates the signature fragment and verification code, and sends them to the server. The server verifies the signature fragment, calculates the signature fragment, and returns it. The client then aggregates the results to obtain the complete signature.

[0010] Quantum-resistant cooperative encryption module: When the client needs to send sensitive data to the target receiver, the client first initiates the quantum-resistant cooperative encryption process;

[0011] Quantum-resistant collaborative decryption module: When the target receiver receives the encryption result, it initiates the quantum-resistant collaborative decryption process;

[0012] Device integration and dynamic security control module: used to deploy cryptographic components during the initialization phase, monitor security status during operation, dynamically adjust security policies based on threat index, and realize intelligent switching between normal mode, enhanced mode and highest protection mode.

[0013] As a further improvement of the present invention, the specific operation steps of the quantum-resistant algorithm software and hardware enhancement module are as follows:

[0014] When the server-side key management service is triggered, the server software requests the standard server cryptographic machine to generate a random seed with an entropy value of not less than 256 bits. With random numbers The standard server cryptographic machine generates random numbers through an internal true random number generator, tests their randomness, and then returns them through a secure internal channel; the server software uses... To generate a quantum-resistant key pair as the unique seed for a deterministic random bit generator; simultaneously, based on Public key component obtained from the client and quantum-resistant public keys Perform cryptographic binding, through formula Obtain the hash value of the quantum-resistant public key SM3 represents the Chinese cryptographic hash algorithm;

[0015] Will Mapped to the range of order n of the SM2 elliptic curve ;

[0016] Through formula mod n yields the server's SM2 sub-private key D2; where mod n represents the modulo operation. ;

[0017] Server-side software obtains the client's SM2 public key component Through formula The complete public key P is obtained by modulo n, and the client verifies the correctness of the public key based on the sub-private key D1;

[0018] After the server software successfully generates all plaintext private keys in memory, it encrypts each private key based on the standard server cryptographic machine and returns the resulting ciphertext private key to the server software. When the key reaches the predetermined period, the key management service automatically starts the rotation process, and the rotation objects include the SM4 master key and the associated ciphertext private key.

[0019] As a further improvement of the present invention, the specific operation steps of the quantum-resistant cooperative signature module include:

[0020] The client software generates a session key by encapsulating the public key with a quantum key in the server-side code. Generate temporary random numbers The temporary public key point is obtained by combining the base point G of the SM2 elliptic curve; a message to be signed is generated based on the user identifier hash value, the original message and the session key; and the SM3 hash value of the message to be signed is obtained through the hash value algorithm.

[0021] The client, based on its own quantum-resistant digital signature private key and SM2 sub-private key D1, signs the concatenated data of the client's temporary public key point and the hash value of the message to be signed, generates a client signature verification code, and transmits the session key, the hash value of the message to be signed, the client's temporary public key point and the signature verification code to the server through the secure channel of the national cryptographic TLCP1.1 protocol.

[0022] The server verifies the client's signature verification code based on the client's quantum-resistant digital signature public key; if the verification fails, the signing process is aborted; if the verification is successful, the server reads the corresponding private key ciphertext from the external database, sends it to the standard server cryptographic machine to decrypt and obtain the plaintext private key, and temporarily returns it to the server software.

[0023] As a further improvement of the present invention, the specific operation steps of the quantum-resistant cooperative signature module also include:

[0024] The server software requests the cipher machine to generate random numbers. Based on random numbers The SM2 sub-private key D2 obtained from the cryptographic machine, the hash value of the message to be signed sent by the client, and the client's temporary public key point are used to calculate the signature fragment based on the improved SM2 two-party collaborative signature algorithm, including the signature random number and signature component.

[0025] The server signs the concatenated data of the signature fragment based on the quantum-resistant digital signature private key, generates a server-side signature verification code, and returns the signature fragment to the client through a TLCP secure channel, while clearing the private key from memory.

[0026] The client verifies the server's signature verification code based on the quantum-resistant digital signature public key; if verification fails, the signing process is aborted; if verification succeeds, the client verifies the signature code based on the SM2 sub-private key D1 and a random number. The system uses the signature fragment and session key to obtain the aggregated signature value and outputs the complete signature result.

[0027] As a further improvement of the present invention, the specific operation steps of the quantum-resistant cooperative encryption module are as follows:

[0028] The client generates a temporary session key based on the server's post-quantum key encapsulation public key and the post-quantum key encapsulation algorithm. It then generates the main session key and auxiliary key based on a double hash algorithm and key derivation function. The client preprocesses the original plaintext data, generating a random parameter L and an integrity check value C3 obtained by combining the timestamp and plaintext. These are then concatenated to form the data block to be encrypted. The client generates random numbers. The system combines the base point G to obtain the SM2 elliptic curve point C1 and the encryption request parameters. The client then uses its quantum-resistant digital signature private key to sign the concatenated data of the encryption request parameters, the main session key, C3, and the timestamp, generating a client-side encrypted signature verification code. The client transmits the post-quantum key-encapsulated ciphertext, encryption request parameters, signature verification code, timestamp, and random parameter L in segments via a secure TLCP1.1 channel to the server. The server verifies the timestamp's validity and then verifies the client's signature. Upon successful verification, the server securely obtains the SM2 sub-private key D2 and the post-quantum key-encapsulated private key from the cryptographic machine, decapsulates them to obtain the session key, and derives the main session key and auxiliary key. The server generates encryption response parameters, performs SM2 encryption to generate ciphertext including C1, C2, and the verification value, and signs it to generate a server-side encrypted signature verification code. The server sends the encryption result to the client. After verifying the timestamp and the server's signature, the client uses the encryption response parameters and the auxiliary key to generate a symmetric key and outputs the ciphertext.

[0029] As a further improvement of the present invention, the specific operation steps of the anti-quantum cooperative decryption module are as follows:

[0030] The client, using its own post-quantum key encapsulated private key, decapsulates the parsed post-quantum key encapsulated ciphertext to restore the session key; the client generates random numbers. It calculates the hash value, combines its own SM2 sub-private key D1 and the elliptic curve point C1 in the ciphertext to obtain the decryption request parameters, and uses the quantum-resistant digital signature private key to sign the decryption request parameters, session key and random number hash value to generate the client decryption signature verification code;

[0031] The client transmits the decryption request parameters, signature verification code, random number, and current timestamp to the server via the national cryptographic TLCP1.1 secure channel.

[0032] Upon receiving the data, the server verifies the validity of the timestamp and the consistency of the random hash value, and also verifies the validity of the client's signature. After successful verification, the server securely obtains the SM2 sub-private key D2 and the post-quantum key encapsulated private key from the cryptographic machine. Based on the post-quantum private key, the server decapsulates the session key, generates decryption response parameters, and derives a symmetric key t from the session key to decrypt the ciphertext data C2, obtaining the intermediate plaintext. The server then calculates a verification value for integrity verification. After signing the decryption response parameters and verification value using a quantum-resistant digital signature private key, the server sends the server's response signature verification code to the client and clears the plaintext private key from memory. After verifying the server's signature, the client performs decryption calculations based on the decryption response parameters, derives the symmetric key t to recover the plaintext M, verifies its integrity, and outputs the plaintext M upon successful verification.

[0033] As a further improvement of the present invention, the specific operation steps of the device integration and dynamic safety control module include:

[0034] During the initialization phase, cryptographic components are deployed and key materials are generated through quantum-resistant algorithm software and hardware enhancement modules. During the operational phase, the security situation awareness unit collects cryptographic operation frequency, network request characteristics, and abnormal behavior pattern indicators. The security control engine then uses formulas... The threat index is calculated. ,in, Indicates the first The value of each threat indicator, Indicates the first The weight of each threat indicator; This represents the correction factor for external threat intelligence.

[0035] When the value is less than the first preset threshold, it is in normal mode; When the value is between the first and second preset thresholds, it is in enhanced mode; The highest protection mode is activated when the threshold value exceeds the second preset threshold.

[0036] As a further improvement of the present invention, the specific operation steps of the device integration and dynamic safety control module also include:

[0037] Thresholds are adjusted through supervised learning: the results of security events are recorded after mode switching, and the corresponding thresholds are lowered for security events caused by failure to switch in time.

[0038] Verify through dual-threshold testing: run the dual-threshold strategy in parallel during non-core business periods, and select the optimal threshold after comparison;

[0039] Pre-adjustment based on trend prediction: using formulas The threshold adjustment index is calculated. ,in, Indicates the basic threshold. Indicates the current time. Indicates the forecast period. This indicates the adjustment range coefficient; the first and second preset thresholds are dynamically adjusted in real time based on the threshold adjustment index; mode switching is performed based on hysteresis logic, and the device records complete policy switching logs and security event data.

[0040] A second aspect of this invention provides an SM2 cooperative signature and encryption / decryption method incorporating quantum-resistant properties, comprising the following steps:

[0041] S1. Quantum-resistant algorithm software and hardware enhancement: Without changing the standard server cryptographic machine hardware that only supports Chinese cryptographic algorithms, the client uses software random numbers to generate SM2 sub-private key D1. The server requests hardware random numbers from the standard server cryptographic machine to generate a quantum-resistant key pair with the server's SM2 sub-private key D2 and public key P. The plaintext private key is encrypted with the SM4 key stored in the secure area of ​​the cryptographic machine hardware and stored in an external database. At the same time, the key is rotated according to a predetermined period.

[0042] S2, Quantum-resistant Collaborative Signature: Quantum-resistant security elements are embedded into the SM2 two-party collaborative signature process. The client generates a session key, a temporary public key, and a client signature verification code based on a post-quantum key encapsulation algorithm. After verification by the server, the private key ciphertext is obtained from an external database, decrypted, the signature fragment is calculated, and the server signature verification code is returned. After client verification, the results including traditional SM2 signatures and dual-quantum-resistant signatures are aggregated.

[0043] S3, Quantum-resistant cooperative encryption module: When the client needs to send sensitive data to the target receiver, the client starts the quantum-resistant cooperative encryption process and sends the encryption result to the target receiver;

[0044] S4, Quantum-resistant cooperative decryption: When the target receiver receives the encryption result, it initiates the quantum-resistant cooperative decryption process to decrypt the encryption result and output the plaintext;

[0045] S5. Device Integration and Dynamic Security Control: Used to deploy cryptographic components during the initialization phase, monitor security status during operation, dynamically adjust security policies based on threat index, and achieve intelligent switching between normal mode, enhanced mode and highest protection mode.

[0046] Compared with the prior art, the beneficial effects of the present invention are:

[0047] This invention deeply integrates quantum-resistant cryptography algorithms with the national standard SM2 collaborative computing framework, constructing a system with a standard server cryptographic machine as the hardware security root. The client and server collaboratively generate and securely store keys, and a periodic key rotation mechanism ensures long-term key security. A quantum-resistant verification mechanism is embedded throughout the collaborative signature and encryption / decryption process, performing double quantum-resistant signatures on key interaction parameters and achieving secure data transmission via the national standard TLCP protocol. Simultaneously, security strategies are dynamically adjusted based on a real-time threat index, intelligently switching between normal, enhanced, and highest protection modes to adapt to different security scenarios. This effectively solves the security deficiencies of the traditional SM2 algorithm under quantum computing threats, its vulnerability to man-in-the-middle attacks, and data tampering during collaborative computation. It significantly improves the reliability and response efficiency of the collaborative signature and encryption / decryption processes. Attached Figure Description

[0048] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings;

[0049] Figure 1 This is the overall system block diagram of the present invention. Detailed Implementation

[0050] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] It should be understood that the terms “comprising” and “including” used in this disclosure and claims indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0052] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure. As used in this disclosure and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this disclosure and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.

[0053] like Figure 1 As shown, an SM2 collaborative signature and encryption / decryption system integrating quantum resistance features includes a quantum resistance algorithm software and hardware enhancement module, a quantum resistance collaborative signature module, a quantum resistance collaborative encryption module, a quantum resistance collaborative decryption module, and a device integration and dynamic security control module.

[0054] Quantum-resistant algorithm software and hardware enhancement modules:

[0055] This method aims to ensure that the security of quantum-resistant algorithms implemented at the software layer reaches the hardware level without changing the standard server cryptographic machine hardware that only supports Chinese national cryptographic algorithms. The client is a pure software cryptographic software that works with the server to generate keys. The specific implementation process is as follows:

[0056] When the client software starts, it uses a software random number generator conforming to national cryptographic standards to generate a random number seed with an entropy value of no less than 256 bits, which is used to generate the client's SM2 sub-private key D1; the client software then uses the random number calculation component to compute the SM2 public key. The client then encrypts the sub-private key D1 using the client-derived SM4 key and stores it locally on the client. Simultaneously, the client will... Securely transmitted to the server;

[0057] When the server-side key management service is triggered, the server software sends a request to the standard server cryptographic machine to obtain a random number, requesting the generation of a random seed with an entropy value of not less than 256 bits. This is used for key generation in subsequent quantum-resistant algorithms; simultaneously, another random number is requested to be generated. Used for generating the server terminal private key D2 in SM2 collaborative computing;

[0058] Upon receiving a request, the standard server cryptographic machine generates the required random number based on its internal true random number generator and performs a randomness test. If the test passes, the standard server cryptographic machine distributes a high-quality random seed. and random numbers The data is returned to the server software via a secure internal channel.

[0059] The quantum-resistant algorithm unit of the server software receives a random seed. Then, random seed As the sole seed of a deterministic random bit generator for cryptographic security; enabling all steps requiring randomness within the quantum-resistant algorithm to be driven entirely by the sole seed of the random bit generator, and generating quantum-resistant keys in the server-side software, including key pairs for key exchange and public and private key parameters for digital signatures;

[0060] The server software is based on another random number. Combined with the public key component obtained from the client And introduce quantum-resistant public key Cryptographic binding is performed to establish a connection between traditional cryptosystems and post-quantum cryptosystems; through formulas The hash value of the quantum-resistant public key is calculated. ; where SM3 represents the Chinese cryptographic hash algorithm;

[0061] random numbers Order mapped to SM2 elliptic curve Within the range, make ;

[0062] Through formula The SM2 sub-private key D2 of the server is obtained by calculating mod n; where mod n represents the modulo... ,refer to Divide by The remainder after;

[0063] The server software is based on the client public key component. Calculate the complete public key Through formula The public key is obtained by calculating modulo n. ;

[0064] The client verifies the public key based on the sub-private key D1 and the public key parameters published by the server. The correctness; if If the expected result is met, it is determined that the server holds a legitimate D2. The server and client can then establish trust based on the public key and proceed with subsequent key negotiation; for example, generating a shared session key.

[0065] After the server-side software successfully generates all plaintext private keys in memory, it immediately initiates the secure storage process:

[0066] The server software sends the plaintext private key data as a structured data packet to the standard server cryptographic machine in real time through a pre-established, protected kernel-level communication channel. Upon receiving the plaintext private key, the cryptographic machine performs encryption operations within the isolated environment of its internal secure chip. The encryption operation uses a symmetric key. The symmetric key is generated internally by the cryptographic machine during the initialization phase. Always stored within the hardware security area of ​​the cipher machine; the cipher machine uses Each private key is independently encrypted using the national cryptographic SM4 algorithm;

[0067] After the encryption operation is completed, the cryptographic machine returns the obtained private key ciphertext to the server software through a secure channel;

[0068] Upon receiving the ciphertext of the private key, the server immediately clears the plaintext private key from the server software's memory; and combines the ciphertext of the private key with the relevant metadata into a structured record, which is then written to a large-capacity external database; each record includes the following fields: a unique identifier for the user ID, a identifier for the private key type, the corresponding ciphertext of the private key, the key generation or last update timestamp, and different key components associated with the same user;

[0069] When a key reaches its predetermined cycle, or is manually triggered by an administrator, the key management service automatically initiates the rotation process:

[0070] Upon receiving a rotation command, the standard server cryptographic machine generates a new SM4 master key within its internal hardware security area. The new key has no derivation relationship with the old key and never goes beyond the boundaries of the cryptographic machine.

[0071] The device sequentially reads the private key ciphertext records of all users from an external database and sends them to the cryptographic machine; the cryptographic machine uses the old SM4 master key. Decrypt the ciphertext to recover the plaintext private key;

[0072] Based on the new SM4 master key The decrypted plaintext private key is re-encrypted to generate new ciphertext; the newly generated ciphertext is transmitted to the server software through a secure channel, and the server software writes it back to the external database to update the ciphertext record in the database;

[0073] After all users' private keys have been re-encrypted and updated in storage, the cryptographic machine executes a secure erase command to delete the old SM4 master key from the cryptographic machine's hardware secure area. .

[0074] Quantum-resistant collaborative signature module: This module is used to deeply embed quantum-resistant security elements into the standard SM2 two-party collaborative signature process. The specific implementation process is as follows:

[0075] When a user needs to comment on a message When signing, the client initiates the collaborative signing process first:

[0076] The client uses the post-quantum key encapsulated public key obtained from the server, and generates a secret session key based on the encapsulation function of the post-quantum key encapsulation algorithm. ;

[0077] The client generates a temporary random number. Combining the base points of the SM2 elliptic curve Obtain the client's temporary public key point Based on the user identifier hash value, the original message Generate a message to be signed using the session key. The SM3 hash value of the message to be signed is obtained through a hash algorithm. ;

[0078] Based on its own quantum-resistant digital signature algorithm SPHINCS, the client generates and holds a quantum-resistant digital signature private key and an SM2 sub-private key D1, and points to the client's temporary public key. SM3 hash of the message to be signed The concatenated data is signed to generate a client-side signature verification code;

[0079] The client establishes a secure channel via the Chinese national cryptographic protocol TLCP1.1, and transmits the session key. Hash value of the message to be signed Client temporary public key point The signature verification code is encrypted and transmitted to the server; among them, the TLCP protocol uses the SM4 algorithm to encrypt the data and the SM3 algorithm to perform integrity verification.

[0080] After receiving the client's session key, hash value of the message to be signed, client's temporary public key point, and signature verification code data, the server verifies the validity of the client's signature verification code based on the client's quantum-resistant digital signature public key. If the verification passes, it is determined that the data comes from a legitimate client and the data has not been tampered with. If the verification fails, the server will immediately terminate the signing process and trigger a security alert.

[0081] After successful verification, the server retrieves the corresponding encrypted private key ciphertext from an external database, including the SM2 sub-private key D2 and the quantum-resistant digital signature private key, and sends it to the standard server cryptographic machine; the cryptographic machine uses the internally stored SM4 key. Decryption is performed, and the plaintext private key is temporarily returned to the server software via a secure internal bus;

[0082] The server software requests the random number needed to generate the SM2 co-signature from the cryptographic machine. Based on random numbers The SM2 sub-private key D2 obtained from the cryptographic machine, along with the hash value of the message to be signed sent by the client and the client's temporary public key point, are used to calculate a signature fragment based on the improved SM2 two-party collaborative signature algorithm. This fragment includes a signature random number and a signature component. The specific calculation process includes the following steps:

[0083] (1) Through the formula The server's temporary public key point is obtained through calculation. ;

[0084] (2) Through the formula Calculations are performed to obtain the composite point. ;

[0085] (3) Extraction based on composite points Axis coordinate values, and labeled as Through formula The signature random number is obtained by calculating ) mod n. ;

[0086] If the signature random number is zero, then regenerate the random number. And recalculate the signature random number;

[0087] (4) Through the formula The signature component is obtained by calculating mod n. ;

[0088] (5) Through the formula The signature component is obtained by calculating mod n. ;

[0089] After the calculation is completed, the server signs the concatenated data of the signature fragment based on the quantum-resistant digital signature private key, and generates a server-side signature verification code;

[0090] The server returns the signature fragment to the client via a TLCP secure channel and immediately removes the decrypted SM2 sub-private key D2 and the quantum-resistant digital signature private key from memory;

[0091] After receiving the signature fragment from the server, the client verifies the validity of the server's signature verification code based on the quantum-resistant digital signature public key obtained from the server. If the verification passes, it is determined that the signature fragment comes from a trusted server and has not been tampered with. If the verification fails, the client will immediately terminate the signing process and trigger a security alert.

[0092] After successful verification, the client uses its own SM2 sub-private key D1 and random number... The algorithm aggregates the signature fragment and session key based on the improved SM2 two-party collaborative signature algorithm to generate a complete SM2 signature value, i.e., the aggregated signature value, and outputs a complete signature result including the traditional SM2 signature and the double quantum-resistant signature. The SM2 signature includes the signature random number and the aggregated signature value; the double quantum-resistant signature includes the client signature verification code and the server signature verification code.

[0093] Quantum-resistant cooperative encryption module: When a client needs to send sensitive data to the server, the client first initiates the quantum-resistant cooperative encryption process; the specific operation process is as follows:

[0094] The client, acting as the encryption initiator, uses the target receiver's post-quantum key encapsulation public key to call the encapsulation function of the post-quantum key encapsulation algorithm to generate a temporary session key. The client uses the SM3 and SHA-3 double hash algorithms, combined with a key derivation function, to process the session key. Perform derivation to generate the master session key. and auxiliary key ;

[0095] Simultaneously, the corresponding post-quantum key encapsulated ciphertext is generated. The client preprocesses the raw plaintext data to be encrypted:

[0096] Based on the concatenation of the random parameter L in the post-quantum key encapsulation algorithm with the plaintext, the formula is used... The complete checksum C3 is obtained through calculation; where, Indicates the current timestamp;

[0097] The plaintext, integrity check value C3, and random parameter L are concatenated in a fixed format to obtain the data block SJK to be encrypted.

[0098] The client generates a random number. Combining the base points of the SM2 elliptic curve After normalization, the formula is entered. The calculation yields point C1 on the SM2 elliptic curve.

[0099] Based on the server's public key P, using the formula =( ×SM3( The encryption request parameters are obtained by calculating mod n. ;

[0100] The client uses its own quantum-resistant digital signature private key to encrypt request parameters. Master session key Integrity check value C3 and current timestamp The concatenated data is signed to generate an encrypted signature verification code for the client;

[0101] The client establishes a secure channel through the national cryptographic protocol TLCP1.1 and transmits the following encryption-related data to the server in encryption: post-quantum key encapsulated ciphertext, encryption request parameters, client encryption signature verification code, current timestamp, and random parameters; the data is divided into multiple segments, and each segment is encrypted and transmitted separately using the SM4 algorithm;

[0102] After receiving the encryption-related data from the client, the server first verifies the validity of the timestamp. If the error difference exceeds 3 seconds, the data is rejected. After timestamp verification, the server verifies the validity of the client's encrypted signature verification code based on the client's quantum-resistant digital signature public key. If the verification passes, the server determines that the encryption request source is legitimate and the parameters are complete. If the verification fails, the server immediately terminates the encryption process and triggers a security alert.

[0103] After successful verification, the server queries and reads the corresponding encrypted private key record from the external database, including the ciphertext of the server's SM2 sub-private key D2 encrypted with SM4 and the ciphertext of the private key encapsulated with quantum key. The server sends the obtained private key ciphertext to the standard server cryptographic machine, which decrypts it using the SM4 master key Ksm4 stored in the internal hardware security area to obtain the server's SM2 sub-private key D2 and the private key encapsulated with quantum key in plaintext form, and temporarily returns them to the server software through the secure internal bus.

[0104] The server software encapsulates the private key using the decrypted post-quantum key and processes the post-quantum key encapsulated by the client. Perform the decapsulation operation to obtain the session key. The master session key is derived based on the derived key function. and auxiliary key ;

[0105] At the same time, the server requests the random number required for encryption from the standard server cryptographic machine. Through formula The encrypted response parameters are obtained by calculating modulo n. ;

[0106] The server performs the following encryption operations based on the SM2 elliptic curve public key encryption algorithm:

[0107] (1) Calculate point C1 of the elliptic curve: ;

[0108] (2) Through the formula The derived symmetric key is obtained through calculation, where, This represents the key derivation function. Indicates the key length;

[0109] (3) Through formula C2 The encrypted data C2 is obtained by calculating M⊕t;

[0110] (4) Through the formula The verification value is obtained through calculation. ;

[0111] The server uses its own quantum-resistant digital signature private key to encrypt the response parameters. Elliptic curve point C1 and verification value The concatenated data is signed to generate a server-side encrypted signature verification code; the server immediately removes the decrypted plaintext private key and the post-quantum key encapsulated private key from memory; the complete encryption result is sent to the client via a TLCP1.1 secure channel, including: SM2 elliptic curve point C1, ciphertext data C2, and verification value. Server-side encrypted signature verification code;

[0112] After receiving the encrypted result from the server, the client verifies the validity of the timestamp. If the error difference exceeds 3 seconds, the result is rejected. After timestamp verification, the client verifies the validity of the server's encrypted signature verification code based on the server's quantum-resistant digital signature public key. If the verification passes, the encrypted result is deemed legitimate and tamper-proof. After successful verification, the client then bases the results on the encrypted response parameters. With auxiliary key, through formula The symmetric key is obtained through calculation. Output ciphertext C ;

[0113] If verification fails, the client immediately aborts the encryption process and returns an encryption failure message.

[0114] Quantum-resistant cooperative decryption module: When the target receiver receives the encryption result, it initiates the quantum-resistant cooperative decryption process.

[0115] The client encapsulates the ciphertext with the post-quantum key obtained from the parsed ciphertext using its own post-quantum key encapsulated private key. The ciphertext is decapsulated using the decapsulation function of the post-quantum key encapsulation algorithm, and the session key for the current decryption session is restored. ;

[0116] The client generates a random number. Through formula The random number hash value is obtained through calculation;

[0117] Based on the client's own SM2 sub-private key D1 and the SM2 elliptic curve point C1 of the ciphertext, the formula is used to... Calculations are performed to obtain the decryption request parameters. The client uses a quantum-resistant digital signature private key to decrypt the request parameters. Session key The concatenated data of random number hash values ​​is used to sign the data, generating a client-side decryption signature verification code. This code is then transmitted via a secure channel established using the Chinese national cryptographic protocol TLCP1.1 to the decryption request parameters. Client-side decryption of signature verification code and random number And the current timestamp is encrypted and transmitted to the server;

[0118] When the server receives a decryption request, it first verifies the validity of the timestamp. If the error difference exceeds 3 seconds, the request is rejected. After the timestamp is verified, the server recalculates a new random number hash value based on the received current timestamp and the random number hash value, and compares the results. If the random number hash values ​​are different, the request is rejected.

[0119] After the timestamp and random number hash value are verified, the client's decryption signature verification code is verified based on the client's quantum-resistant digital signature public key. If the verification is successful, the decryption request is deemed to be legitimate and the parameters are complete. If the verification fails, the server will immediately terminate the decryption process and trigger a security alert.

[0120] After successful verification, the server queries and reads the corresponding encrypted private key record from the external database, including the encrypted server SM2 sub-private key D2 ciphertext, the post-quantum key encapsulated private key ciphertext, and the quantum-resistant digital signature private key ciphertext; at the same time, the encrypted private key record is sent to the standard server cryptographic machine, which uses the internal SM4 key to decrypt and temporarily returns the server SM2 sub-private key D2 and the post-quantum key encapsulated private key in plaintext form to the server software;

[0121] The server software encapsulates the private key using the decrypted quantum key, decapsulates the session key sent by the client, and simultaneously requests the cryptographic machine to generate the random number required for decryption. Combining the server-side SM2 sub-private key D2 with the decryption request parameters, using the formula... Calculations are performed to obtain the decryption response parameters. ;

[0122] Server-side extraction of decryption response parameters coordinates Combined with the session key decrypted from the client, a derived symmetric key t is obtained through the national cryptographic key derivation function. The server then performs symmetric decryption on the ciphertext data C2 based on the derived symmetric key to obtain the intermediate plaintext.

[0123] The server uses decryption response parameters coordinates The intermediate plaintext and session key are combined in an ordered manner, and the SM3 hash algorithm is executed on the concatenated data to generate a verification value.

[0124] The decryption process is considered correct and the data is complete only if the verified value is the same as the complete verified value; if the verified value is different from the complete verified value, the server immediately terminates the decryption process and returns a standardized error code.

[0125] After verification, the server signs the decryption response parameters and verification value based on the quantum-resistant digital signature private key, generates a server response signature verification code, and sends it to the client; at the same time, the server software clears the decrypted private key D2 and the post-quantum key encapsulated private key from memory.

[0126] After receiving the server's response signature verification code, the client verifies the validity of the server's response signature verification code based on the server's quantum-resistant digital signature public key; upon successful verification, the client decrypts the response parameters. To perform decryption calculations, the plaintext is calculated and verified through the following steps:

[0127] (1) Through the formula Calculations are performed to obtain the decryption response parameters. The coordinate values;

[0128] (2) Through the formula The derived symmetric key is obtained through calculation, where, This represents the key derivation function. Indicates the key length;

[0129] (3) Through the formula The plaintext M is obtained by calculating ⊕t;

[0130] (4) Through the formula The verification value is obtained through calculation. ;

[0131] (5) When the verification value When =C3, it indicates that the verification is valid and plaintext M is output.

[0132] Equipment integration and dynamic safety control module:

[0133] During the device initialization phase, the deployment of basic cryptographic components and the generation of key materials are completed through the software-based and hardware-enhanced quantum-resistant algorithm module, providing hardware-enhanced secure basic resources for the collaborative computing module; during operation, the quantum-resistant collaborative signature module and the quantum-resistant collaborative decryption module share the same key management system and secure communication channel.

[0134] Based on the device's built-in security situation awareness unit, the operating environment is continuously monitored. By collecting multi-dimensional indicators, including cryptographic operation frequency, network request characteristics, and abnormal behavior patterns, the device's security status is assessed in real time. When a potential threat is detected, the security control engine automatically triggers dynamic adjustments to the protection strategy.

[0135] Under normal security conditions, the device maintains standard collaborative operation mode, and each module performs operations based on the optimized security policy, ensuring optimal device performance while guaranteeing basic quantum-resistant security; when the security sensing unit identifies abnormal signature request frequency, excessive decryption attempt count, or detects suspected cryptanalysis behavior, it immediately activates the threat response mechanism.

[0136] The security control engine assesses the threat level of abnormal behavior based on multi-dimensional indicators and formulas. The threat index is calculated. ;in, Indicates the first The value of a threat indicator, such as the number of abnormal signature requests or the decryption failure rate per unit time; Indicates the first The weights of each threat indicator are determined based on historical data and expert rules; This represents the correction factor for external threat intelligence.

[0137] When the threat index is less than the first preset threshold, it is judged as normal mode, indicating that the current risk level of the device is low; there are no abnormalities in internal monitoring indicators, and no targeted active threats are found in external threat intelligence.

[0138] In normal mode, the device is configured with optimal performance in mind, executes standard collaborative computing processes, post-quantum signatures only verify core parameters, session keys are updated on demand, the frequency of calling cryptographic machine hardware resources is minimized, and the security awareness unit performs normal-level monitoring and sampling.

[0139] When the threat index is between the first and second preset thresholds, it is determined to be in enhanced mode, indicating that the device has detected risk signals, including internal indicators exceeding the standard or receiving medium to low risk external threat intelligence; the device is in a warning state.

[0140] In enhanced mode, the device is configured to balance security and performance; enhanced security policies are activated, and the scope of post-quantum signatures is expanded to all critical interaction parameters. For example, in normal mode, only hash values, elliptic curve points, and decryption request parameters are signed, while in enhanced mode, temporary random numbers and signature fragments are also signed.

[0141] The key derivation function increases the number of iterations or introduces a salt value; for example, the number of iterations calculated in the standard mode is 1,000, which is increased to 10,000 or higher in the enhanced mode, or a random salt value is introduced into the calculation, which is shared by both parties during the key negotiation phase, or generated by one party and transmitted with the data;

[0142] Increase the session key update strategy. For example, in standard mode, a session key remains valid throughout a complete signing or decryption session. In enhanced mode, the session key update strategy changes from updating every session to updating at each critical stage.

[0143] Increased access to cryptographic machine resources, at the expense of some performance loss, is used to achieve higher security. The security awareness unit increases the frequency and granularity of monitoring and begins to record detailed security event context.

[0144] When the threat index exceeds the second preset threshold, it is determined to be in the highest protection mode, indicating that the device is facing a serious security threat, including serious abnormal behavior detected internally, or external intelligence confirming the existence of exploitable high-risk vulnerabilities and active attacks.

[0145] In the highest protection mode, performance and cost are disregarded, and security is the highest priority. The highest security measures are activated: all interactive data must be transmitted through a quantum-resistant session key encryption channel; post-quantum signature verification covers all parameters and is performed at the highest frequency; or backup algorithms and paths are temporarily enabled; cryptographic machine resources are maximized to ensure secure operation; the security awareness unit performs full, real-time monitoring and triggers real-time security alerts to notify security operations personnel to intervene; at the same time, deep auditing is initiated to record the traceability information of all operations.

[0146] The first and second preset thresholds are initially set by security experts based on business tolerance, equipment performance benchmarks and historical attack data during the initial deployment of the equipment.

[0147] After the device is running, the threshold is dynamically adjusted through the following mechanism:

[0148] Supervised learning adjustment: Record the security event results after each mode switching decision. For example, if the threat index is between the first and second preset thresholds and a security event occurs due to failure to switch to enhanced mode in time, the first preset threshold will be automatically lowered.

[0149] Dual threshold test verification: During non-core business periods, a dual threshold strategy is used to run in parallel, and the differences in security effects and performance indicators under different thresholds are compared to select the optimal solution;

[0150] Trend forecasting and pre-adjustment: Based on time series analysis, predict the cyclical patterns of threats using formulas. The threshold adjustment index is calculated. ,in, Indicates the basic threshold. Indicates the current time. Indicates the forecast period. This indicates the adjustment range coefficient; the first and second preset thresholds are dynamically adjusted in real time based on the threshold adjustment index.

[0151] During mode switching, the security control engine uses hysteresis logic to switch. For example, the condition for switching from normal mode to enhanced mode is that the threat index is greater than the first preset threshold, but the condition for downgrading from enhanced mode to normal mode is that the threat index is lower than the difference between the first preset threshold and the preset positive value cache interval.

[0152] At the same time, the device will record complete policy switching logs and security event data, providing a complete source tracing basis for subsequent security audits and threat analysis.

[0153] This invention relates to an SM2 cooperative signature and encryption / decryption method incorporating quantum-resistant properties, comprising:

[0154] S1. Quantum-resistant algorithm software and hardware enhancement: Without changing the standard server cryptographic machine hardware that only supports Chinese cryptographic algorithms, the client generates the SM2 sub-private key D1 using a software random number generator that conforms to the Chinese cryptographic standard, synchronously calculates the public key component P1, and securely transmits it to the server. The server requests hardware random numbers with an entropy value of not less than 256 bits from the cryptographic machine, which are used to generate the quantum-resistant key pair, the SM2 sub-private key D2, and the complete public key P, respectively. The client verifies the correctness of P using D1. The generated plaintext private key is encrypted based on the SM4 key stored in the secure area of ​​the cryptographic machine hardware and then stored in an external database. At the same time, key rotation is initiated according to a predetermined period. The cryptographic machine generates a new SM4 master key, decrypts the old private key ciphertext, re-encrypts it, updates the database record, and securely erases the old key.

[0155] S2, Quantum-Resistant Collaborative Signature: Quantum-resistant security elements are embedded into the SM2 two-party collaborative signature process. The client generates a session key based on the server's quantum-encapsulated public key, generates a temporary public key by combining it with the SM2 elliptic curve base point G, and generates a message to be signed based on the user identifier hash, the original message, and the session key, and calculates the SM3 hash. Simultaneously, the client's signature verification code is generated using the quantum-resistant private key and D1. After the server's verification code is verified, the private key ciphertext is read from an external database, decrypted using a cryptographic machine to obtain the plaintext private key, a random number is generated to calculate the signature fragment, and the server's signature verification code is generated. After the client's verification is successful, the result containing the traditional SM2 signature and the client-server dual quantum-resistant signature is obtained.

[0156] S3, Quantum-resistant Cooperative Encryption: The client encapsulates the public key based on the target receiver's quantum key, generates a session key and encapsulated ciphertext, calculates the plaintext SM3 hash value C3 and concatenates them to generate the data block to be encrypted, generates a random number and combines it with D1 and G to calculate the encryption request parameters, and obtains the client's encrypted signature verification code based on the quantum-resistant private key, which is transmitted to the server via the TLCP1.1 channel; after the server verifies the data, it decrypts the private key to uncapture the session key, generates a random number to calculate the encrypted response parameters, derives the key to encrypt the data to obtain C2, generates C1, signs it to obtain the server's encrypted signature verification code, clears the private key and sends the result back; if the client verifies the data, it sends the encrypted result to the target receiver.

[0157] S4, Quantum-resistant Collaborative Decryption: Implements quantum-enhanced SM2 collaborative decryption. The client receives ciphertext containing C1, C2, and C3, decapsulates the session key based on the post-quantum private key, generates a random number and calculates the decryption request parameters, and simultaneously generates a client decryption signature verification code. After successful verification by the server, the private key is decrypted and decryption is executed to obtain the response parameters and intermediate plaintext. After verifying the integrity of the concatenated data based on SM3, a server response signature verification code is generated. After successful client verification, the final decryption is completed and the plaintext integrity is verified.

[0158] S5. Device Integration and Dynamic Security Control: During the initialization phase, deploy anti-quantum algorithms, national cryptographic algorithms, and TLCP protocol cryptographic components; during the operation phase, monitor the frequency of cryptographic operations, network request characteristics, and abnormal behavior patterns, and calculate the threat index by combining indicator weights and external threat intelligence correction coefficients; based on the threat index, dynamically adjust the security strategy: when the TI is less than the first threshold, it is in normal mode; when it is between the two thresholds, it is in enhanced mode; and when it is greater than the second threshold, it is in the highest protection mode, thus achieving intelligent switching.

[0159] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. An SM2 cooperative signature and encryption / decryption system incorporating quantum-resistant properties, characterized in that, include: Quantum-resistant algorithm software and hardware enhancement: Without changing the standard server cryptographic machine hardware that only supports Chinese cryptographic algorithms, the client uses software random numbers to generate the SM2 sub-private key D1. The server requests hardware random numbers from the standard server cryptographic machine to generate the quantum-resistant key pair, the SM2 sub-private key D2, and the public key P. The plaintext private key is encrypted with the SM4 key stored in the secure area of ​​the cryptographic machine hardware and stored in an external database. At the same time, based on a predetermined periodic cipher, the old ciphertext is decrypted with the old SM4 master key and then re-encrypted with the new SM4 master key, the database record is updated, and the old key is securely erased to achieve key rotation. Quantum-resistant collaborative signature module: This module is used to embed quantum-resistant security elements into the SM2 two-party collaborative signature process. The client generates a random number, calculates the signature fragment and verification code, and sends them to the server. The server verifies the signature fragment, calculates the signature fragment, and returns it. The client then aggregates the results to obtain the complete signature. Quantum-resistant cooperative encryption module: When the client needs to send sensitive data to the target receiver, the client first initiates the quantum-resistant cooperative encryption process; The specific operation steps of the quantum-resistant cooperative encryption module are as follows: The client generates a temporary session key based on the server's post-quantum key encapsulation public key, combined with the post-quantum key encapsulation algorithm, and generates the main session key and auxiliary key based on the double hash algorithm and key derivation function. The client preprocesses the original plaintext data, generating a random parameter L and an integrity check value C3 obtained by combining the timestamp and the plaintext, and concatenates them to form the data block to be encrypted; the client generates random numbers. The system combines the base point G to obtain the SM2 elliptic curve point C1 and the encryption request parameters. It then uses the client's quantum-resistant digital signature private key to sign the concatenated data of the encryption request parameters, master session key, C3, and timestamp, generating a client-side encrypted signature verification code. The client transmits the post-quantum key-encapsulated ciphertext, encryption request parameters, signature verification code, timestamp, and random parameter L in segments to the server via a secure TLCP1.1 channel. The server verifies the timestamp's validity and then verifies the client's signature. After successful verification, the server securely obtains the SM2 sub-private key D2 and the subsequent quantum key encapsulation private key from the cryptographic machine, decapsulates it to obtain the session key, and derives the main session key and auxiliary key. The server generates encrypted response parameters, performs SM2 encryption to generate ciphertext, including C1, C2, and the verification value, and signs it to generate a server-side encrypted signature verification code. The server sends the encryption result to the client. After verifying the timestamp and the server's signature, the client uses the encrypted response parameters and the auxiliary key to generate a symmetric key and outputs the ciphertext. Quantum-resistant collaborative decryption module: When the target receiver receives the encryption result, it initiates the quantum-resistant collaborative decryption process; The specific operation steps of the quantum-resistant cooperative decryption module are as follows: The client, using its own post-quantum key encapsulated private key, decapsulates the parsed post-quantum key encapsulated ciphertext to restore the session key; the client generates random numbers. It calculates the hash value, combines its own SM2 sub-private key D1 and the elliptic curve point C1 in the ciphertext to obtain the decryption request parameters, and uses the quantum-resistant digital signature private key to sign the decryption request parameters, session key and random number hash value to generate the client decryption signature verification code; The client transmits the decryption request parameters, signature verification code, random number, and current timestamp to the server via the national cryptographic TLCP1.1 secure channel. After receiving the data, the server verifies the validity of the timestamp and the consistency of the random number hash value, and also verifies the validity of the client's signature. After successful verification, the server securely obtains the SM2 sub-private key D2 and the post-quantum key encapsulated private key from the cryptographic machine. Based on the post-quantum private key, the server decapsulates the session key, generates decryption response parameters, derives a symmetric key t from the session key, decrypts the ciphertext data C2 to obtain the intermediate plaintext, and calculates the verification value for integrity verification. The server uses a quantum-resistant digital signature private key to sign the decryption response parameters and the verification value, sends the server response signature verification code to the client, and clears the plaintext private key from memory. After the client verifies the server's signature, it performs decryption calculations based on the decryption response parameters, derives the symmetric key t to recover the plaintext M, verifies its integrity, and outputs the plaintext M after verification. Device integration and dynamic security control module: used to deploy cryptographic components during the initialization phase, monitor security status during operation, dynamically adjust security policies based on threat index, and realize intelligent switching between normal mode, enhanced mode and highest protection mode.

2. The SM2 cooperative signature and encryption / decryption system incorporating quantum resistance as described in claim 1, characterized in that, The specific operation steps of the quantum-resistant algorithm software and hardware enhancement module are as follows: When the server-side key management service is triggered, the server software requests the standard server cryptographic machine to generate a random seed with an entropy value of not less than 256 bits. With random numbers The standard server cryptographic machine generates random numbers through an internal true random number generator, tests their randomness, and then returns them through a secure internal channel; the server software uses... To generate a quantum-resistant key pair as the unique seed for a deterministic random bit generator; simultaneously, based on Public key component obtained from the client and quantum-resistant public keys Perform cryptographic binding, through formula Obtain the hash value of the quantum-resistant public key SM3 represents the Chinese cryptographic hash algorithm; Will Mapped to the range of order n of the SM2 elliptic curve ; Through formula mod n yields the server's SM2 sub-private key D2; where mod n represents the modulo operation. ; Server-side software obtains the client's SM2 public key component Through formula The complete public key P is obtained by modulo n, and the client verifies the correctness of the public key based on the sub-private key D1; After the server software successfully generates all plaintext private keys in memory, it encrypts each private key based on the standard server cryptographic machine and returns the resulting ciphertext private key to the server software. When the key reaches the predetermined period, the key management service automatically starts the rotation process, and the rotation objects include the SM4 master key and the associated ciphertext private key.

3. The SM2 cooperative signature and encryption / decryption system incorporating quantum resistance as described in claim 1, characterized in that, The specific operation steps of the quantum-resistant cooperative signature module include: The client software generates a session key by encapsulating the public key with a quantum key in the server-side code. Generate temporary random numbers The temporary public key point is obtained by combining the base point G of the SM2 elliptic curve; a message to be signed is generated based on the user identifier hash value, the original message and the session key; and the SM3 hash value of the message to be signed is obtained through the hash value algorithm. The client, based on its own quantum-resistant digital signature private key and SM2 sub-private key D1, signs the concatenated data of the client's temporary public key point and the hash value of the message to be signed, generates a client signature verification code, and transmits the session key, the hash value of the message to be signed, the client's temporary public key point and the signature verification code to the server through the secure channel of the national cryptographic TLCP1.1 protocol. The server verifies the client's signature verification code based on the client's quantum-resistant digital signature public key; if the verification fails, the signing process is aborted; if the verification is successful, the server reads the corresponding private key ciphertext from the external database, sends it to the standard server cryptographic machine to decrypt and obtain the plaintext private key, and temporarily returns it to the server software.

4. The SM2 cooperative signature and encryption / decryption system incorporating quantum resistance as described in claim 1, characterized in that, The specific operation steps of the quantum-resistant collaborative signature module also include: The server software requests the cipher machine to generate random numbers. Based on random numbers The SM2 sub-private key D2 obtained from the cryptographic machine, the hash value of the message to be signed sent by the client, and the client's temporary public key point are used to calculate the signature fragment based on the improved SM2 two-party collaborative signature algorithm, including the signature random number and signature component. The server signs the concatenated data of the signature fragment based on the quantum-resistant digital signature private key, generates a server-side signature verification code, and returns the signature fragment to the client through a TLCP secure channel, while clearing the private key from memory. The client verifies the server's signature verification code based on the quantum-resistant digital signature public key; if verification fails, the signing process is aborted; if verification succeeds, the client verifies the signature code based on the SM2 sub-private key D1 and a random number. The system uses the signature fragment and session key to obtain the aggregated signature value and outputs the complete signature result.

5. The SM2 cooperative signature and encryption / decryption system incorporating quantum resistance as described in claim 1, characterized in that, The specific operation steps of the device integration and dynamic safety control module include: During the initialization phase, cryptographic components are deployed and key materials are generated through quantum-resistant algorithm software and hardware enhancement modules. During the operational phase, the security situation awareness unit collects cryptographic operation frequency, network request characteristics, and abnormal behavior pattern indicators. The security control engine then uses formulas... The threat index is calculated. ,in, Indicates the first The value of each threat indicator, Indicates the first The weight of each threat indicator; This represents the correction factor for external threat intelligence. When the value is less than the first preset threshold, it is in normal mode; When the value is between the first and second preset thresholds, it is in enhanced mode; The highest protection mode is activated when the threshold value exceeds the second preset threshold.

6. The SM2 cooperative signature and encryption / decryption system incorporating quantum resistance as described in claim 1, characterized in that, The specific operation steps of the device integration and dynamic safety control module also include: Thresholds are adjusted through supervised learning: the results of security events are recorded after mode switching, and the corresponding thresholds are lowered for security events caused by failure to switch in time. Verify through dual-threshold testing: run the dual-threshold strategy in parallel during non-core business periods, and select the optimal threshold after comparison; Pre-adjustment based on trend prediction: using formulas The threshold adjustment index is calculated. ,in, Indicates the basic threshold. Indicates the current time. Indicates the forecast period. This indicates the adjustment range coefficient; the first and second preset thresholds are dynamically adjusted in real time based on the threshold adjustment index; mode switching is performed based on hysteresis logic, and the device records complete policy switching logs and security event data.

7. A method for applying to an SM2 cooperative signature and encryption / decryption system incorporating quantum-resistant properties as described in any one of claims 1-6, comprising the following steps: S1. Quantum-resistant algorithm software and hardware enhancement: Without changing the standard server cryptographic machine hardware that only supports Chinese cryptographic algorithms, the client uses software random numbers to generate SM2 sub-private key D1. The server requests hardware random numbers from the standard server cryptographic machine to generate a quantum-resistant key pair with the server's SM2 sub-private key D2 and public key P. The plaintext private key is encrypted with the SM4 key stored in the secure area of ​​the cryptographic machine hardware and stored in an external database. At the same time, the key is rotated according to a predetermined period. S2, Quantum-resistant Collaborative Signature: Quantum-resistant security elements are embedded into the SM2 two-party collaborative signature process. The client generates a session key, a temporary public key, and a client signature verification code based on a post-quantum key encapsulation algorithm. After verification by the server, the private key ciphertext is obtained from an external database, decrypted, the signature fragment is calculated, and the server signature verification code is returned. After client verification, the results including traditional SM2 signatures and dual-quantum-resistant signatures are aggregated. S3, Quantum-resistant cooperative encryption module: When the client needs to send sensitive data to the target receiver, the client starts the quantum-resistant cooperative encryption process and sends the encryption result to the target receiver; S4, Quantum-resistant cooperative decryption: When the target receiver receives the encryption result, it initiates the quantum-resistant cooperative decryption process to decrypt the encryption result and output the plaintext; S5. Device Integration and Dynamic Security Control: Used to deploy cryptographic components during the initialization phase, monitor security status during operation, dynamically adjust security policies based on threat index, and achieve intelligent switching between normal mode, enhanced mode and highest protection mode.

Citation Information

Patent Citations

  • Handshake protocol method and system based on SM2 algorithm and SM4 algorithm

    CN119544386A

  • Quantum key distribution method based on cryptographic infrastructure system

    CN120896693A