Short message secure transmission method and system based on post-quantum algorithm, and electronic equipment

By adopting a hybrid key encryption method based on post-quantum algorithm in SMS transmission, the problem that SMS transmission in the prior art cannot resist quantum attacks is solved, and higher security and quantum attack resistance are achieved.

CN119766502AActive Publication Date: 2025-04-04ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD

Patent Information

Application Number
CN202411801710.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-04
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The prior art cannot achieve quantum-resistant security protection during SMS transmission, resulting in low security in SMS transmission.

Method used

The SMS secure transmission method based on post-quantum algorithm is adopted. By obtaining SMS data with signatures and performing key encapsulation calculations using a hybrid public key, a key encapsulation ciphertext and a symmetric key are generated, encrypted transmission is performed, and the SMS data plaintext is obtained through hybrid private key decryption.

Benefits of technology

Through the encryption method of hybrid keys, SMS provides quantum security-resistant key negotiation function, preventing information from being intercepted or tampered, and improving the security of SMS transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766502A_ABST
    Figure CN119766502A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of quantum computers, in particular to a short message secure transmission method and system based on a post-quantum algorithm and electronic equipment, and the method comprises the steps: obtaining short message data with a signature, and carrying out secret key packaging calculation through employing a first mixed public key provided by a second terminal, thereby obtaining a secret key packaging ciphertext and a symmetric secret key; encrypting the short message data with the signature by using the symmetric key to obtain a short message data ciphertext; the key packaging ciphertext and the short message data ciphertext are sent to a second terminal, and the second terminal decrypts the short message data ciphertext to obtain a short message data plaintext; according to the method and the device, a quantum security resisting key negotiation function is provided for the short message by adopting a mixed key encryption mode, quantum attack resisting protection is provided for the content of the short message, information is prevented from being intercepted or tampered in combination with a signature verification mode, and the security of short message transmission is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computer technology, and in particular to a method, system and electronic device for secure transmission of short messages based on a post-quantum algorithm. Background Art

[0002] With the rapid development of communication technology, the security of SMS messages during transmission is particularly important. Therefore, SMS services require strong encryption protection during transmission to prevent information from being intercepted or tampered with. However, traditional encryption algorithms (such as RSA and ECC) are becoming less secure in the face of the development of quantum computing. Quantum computing can quickly crack these algorithms through the Shor algorithm, making current SMS messages easy to tamper with.

[0003] The main challenge of SMS data encryption is the need to balance security, performance and network compatibility. The PQC (PostQuantum Cryptography) algorithm may lead to an increase in the size of encryption keys and signatures, but by optimizing computing performance and communication protocols, it has gradually been applied to SMS transmission. Therefore, how to achieve a smooth transition of information security transmission based on post-quantum cryptography combined with traditional encryption to prevent information from being intercepted or tampered with is an urgent problem to be solved. Summary of the invention

[0004] The present invention provides a method, system and electronic device for secure transmission of short messages based on a post-quantum algorithm, which are used to solve the problem in the prior art that short messages have low transmission security due to the inability to achieve anti-quantum security protection during transmission.

[0005] The embodiment of this specification provides a method for secure transmission of short messages based on a post-quantum algorithm, which is applied to a first terminal and includes:

[0006] Acquire the SMS data with the signature, and use the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext and the symmetric key; wherein the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm;

[0007] Using the symmetric key to encrypt the SMS data with the signature to obtain SMS data ciphertext;

[0008] The key encapsulation ciphertext and the SMS data ciphertext are sent to a second terminal; the second terminal uses a first hybrid private key provided by the second terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the first hybrid private key is a hybrid private key generated based on a first national secret algorithm and a first anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated based on a first international algorithm and a first anti-quantum cryptographic encapsulation algorithm.

[0009] Optionally, the first terminal includes a second hybrid public key, and the second terminal includes the first hybrid public key, wherein the second hybrid public key is composed of a public key generated by a second national secret algorithm in the first terminal and a public key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a public key generated by a second international algorithm and a public key generated by a first quantum-resistant cryptographic signature algorithm;

[0010] Before acquiring the SMS data with the signature, the method further includes:

[0011] The first terminal sends a certificate request for the first hybrid public key to a CA organization, and the second terminal sends a certificate request for the second hybrid public key to the CA organization;

[0012] The CA agency issues certificates to the first hybrid public key and the second hybrid public key according to the certificate request of the first hybrid public key and the certificate request of the second hybrid public key to make the first hybrid public key and the second hybrid public key credible.

[0013] Optionally, the acquiring of the SMS data with the signature includes:

[0014] Calculate the SMS data according to a first preset summary algorithm to obtain an information summary of the SMS data;

[0015] The information summary is signed using the second hybrid private key provided by the first terminal to obtain SMS data with a signature; wherein the second hybrid private key is composed of a private key generated by a second national secret algorithm in the first terminal and a private key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a private key generated by a second international algorithm and a private key generated by a first quantum-resistant cryptographic signature algorithm.

[0016] Optionally, the symmetric key is a first symmetric key or a second symmetric key; and the step of performing key encapsulation calculation using the first hybrid public key provided by the second terminal to obtain a key encapsulation ciphertext and a symmetric key includes:

[0017] Calling a first random number generator to generate a first random number, encrypting the first random number according to the public key generated by the first national secret algorithm and the first national secret algorithm, or encrypting the first random number according to the public key generated by the first international algorithm and the first international algorithm to obtain a first encryption key;

[0018] Calling a second random number generator to generate a second random number, generating a subkey according to the second random number and the first quantum-resistant cryptographic encapsulation algorithm, and encrypting the subkey according to the public key generated by the first quantum-resistant cryptographic encapsulation algorithm in the second terminal and the first quantum-resistant cryptographic encapsulation algorithm to obtain a second encryption key; wherein the first encryption key and the second encryption key constitute the key encapsulation ciphertext;

[0019] A first symmetric key is generated according to the subkey, the first random number, and a third national secret algorithm in the first terminal, or a second symmetric key is generated according to the subkey, the first random number, and a third international secret algorithm in the first terminal.

[0020] Optionally, the second terminal uses the first hybrid private key provided by the second terminal to decrypt the key encapsulation ciphertext to obtain the symmetric key, including:

[0021] The second terminal uses a private key generated by a first national secret algorithm and the first national secret algorithm to decrypt the first encryption key, or the second terminal uses a private key generated by a first international algorithm and the first international algorithm to decrypt the first encryption key to obtain the first random number;

[0022] The second terminal decrypts the second encryption key using the private key generated by the first quantum-resistant cryptographic encapsulation algorithm in the second terminal and the first quantum-resistant cryptographic encapsulation algorithm to obtain the subkey;

[0023] The second terminal generates a first symmetric key according to the first random number, the subkey, and the fourth national secret algorithm in the second terminal, or the second terminal generates a second symmetric key according to the first random number, the subkey, and the fourth international algorithm in the second terminal.

[0024] Optionally, decrypting the SMS data ciphertext based on the symmetric key to obtain SMS data plaintext includes:

[0025] The symmetric key and the fifth national secret algorithm in the second terminal are used to decrypt the ciphertext of the SMS data to obtain the plaintext of the SMS data.

[0026] Optionally, after decrypting the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext, the method further includes:

[0027] The second terminal calculates the plain text of the SMS data according to a second preset digest algorithm to obtain an information digest of the plain text of the SMS data;

[0028] The second terminal uses the second hybrid public key to perform signature verification on the information digest of the plaintext SMS data;

[0029] When the signature verification succeeds, the plain text of the SMS data is marked as trusted data.

[0030] Optionally, the first terminal and the second terminal communicate based on a SIM card, and the SIM card is one of a normal SIM card, an ISIM card, an ESIM card, a super SIM card, a TF card, and an NM card.

[0031] The embodiment of this specification provides a method for secure transmission of short messages based on a post-quantum algorithm, which is applied to a second terminal and includes:

[0032] Acquire the SMS data with the signature, and use the third hybrid public key provided by the first terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext and the symmetric key; wherein the third hybrid public key is a hybrid public key generated based on the sixth national secret algorithm and the second anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated based on the sixth international algorithm and the second anti-quantum cryptographic encapsulation algorithm;

[0033] Using the symmetric key to encrypt the SMS data with the signature to obtain SMS data ciphertext;

[0034] The key encapsulation ciphertext and the SMS data ciphertext are sent to the first terminal, and the first terminal uses the third hybrid private key provided by the first terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the third hybrid private key is a hybrid private key generated based on the sixth international secret algorithm and the second anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated based on the fifth international secret algorithm and the second anti-quantum cryptographic encapsulation algorithm.

[0035] The embodiment of this specification also provides a short message secure transmission system based on a post-quantum algorithm, including a first terminal and a second terminal, the system comprising:

[0036] The first terminal obtains the SMS data with the signature, and uses the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain a key encapsulation ciphertext and a symmetric key; wherein the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first quantum-resistant cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first quantum-resistant cryptographic encapsulation algorithm;

[0037] The first terminal encrypts the SMS data with the signature using the symmetric key to obtain a ciphertext of the SMS data;

[0038] The first terminal sends the key encapsulation ciphertext and the SMS data ciphertext to the second terminal;

[0039] The second terminal uses the first hybrid private key provided by the second terminal to decrypt the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the first hybrid private key is a hybrid private key generated based on the first national secret algorithm and the first quantum-resistant cryptographic encapsulation algorithm, or a hybrid private key generated based on the first international algorithm and the first quantum-resistant cryptographic encapsulation algorithm.

[0040] An electronic device comprises a memory and a processor, wherein the memory stores computer instructions, and the processor is configured to run the computer instructions to execute the method described above.

[0041] A storage medium, characterized in that computer instructions are stored in the storage medium, and the computer instructions are configured to execute the above-mentioned method when running.

[0042] Its beneficial effects are as follows: the application first obtains the SMS data with the signature, and uses the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext and the symmetric key; uses the symmetric key to encrypt the SMS data with the signature to obtain the SMS data ciphertext; sends the key encapsulation ciphertext and the SMS data ciphertext to the second terminal, and the second terminal uses the first hybrid private key provided by the second terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; by adopting the hybrid key encryption method, a quantum-safe key negotiation function is provided for the SMS, protection against quantum attacks is provided for the SMS content, and the signature verification method is combined to prevent the information from being intercepted or tampered with, thereby further improving the security of SMS transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 A flowchart of a method for securely transmitting short messages applied to a first terminal provided in an embodiment of this specification;

[0046] Figure 2 A schematic diagram of certificate issuance provided in an embodiment of this specification;

[0047] Figure 3 A schematic diagram of a certificate query provided in an embodiment of this specification;

[0048] Figure 4 A flowchart of a method for securely transmitting short messages applied to a second terminal provided in an embodiment of this specification;

[0049] Figure 5 A schematic diagram of the structure of a secure SMS transmission system based on a post-quantum algorithm provided in an embodiment of this specification;

[0050] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification;

[0051] Figure 7 A schematic diagram of a computer-readable medium provided for an embodiment of this specification. DETAILED DESCRIPTION

[0052] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0053] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0054] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0055] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0056] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0057] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0058] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0059] Reference Figure 1A flow chart of a method for secure transmission of short messages applied to a first terminal provided in an embodiment of the present specification includes: S101: acquiring short message data with a signature, and performing key encapsulation calculation using a first hybrid public key provided by a second terminal to obtain a key encapsulation ciphertext and a symmetric key; wherein the first hybrid public key is a hybrid public key generated based on a first national secret algorithm and a first anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by a first international algorithm and a first anti-quantum cryptographic encapsulation algorithm; S102: encrypting the short message data with a signature using the symmetric key to obtain a short message data ciphertext; S103: sending the key encapsulation ciphertext and the short message data ciphertext to a second terminal, the second terminal decapsulating the key encapsulation ciphertext using a first hybrid private key provided by the second terminal to obtain the symmetric key, and decrypting the short message data ciphertext based on the symmetric key to obtain a short message data plaintext; wherein the first hybrid private key is a hybrid private key generated based on a first national secret algorithm and a first anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated by a first international algorithm and a first anti-quantum cryptographic encapsulation algorithm.

[0060] In an optional embodiment, the first terminal first obtains the SMS data with the signature, and at the same time, uses the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext C and the symmetric key K. Then, the first terminal uses the symmetric key K to encrypt the SMS data with the signature to obtain the SMS data ciphertext, and sends the key encapsulation ciphertext C and the SMS data ciphertext to the second terminal. The second terminal uses the first hybrid private key provided by the second terminal to decrypt the key encapsulation ciphertext C to obtain the symmetric key K. Finally, the second terminal decrypts the SMS data ciphertext based on the symmetric key K to obtain the SMS data plaintext, thereby completing the encrypted transmission of the SMS. The SMS data adopts a hybrid key encryption method, which provides a quantum-safe key negotiation function for the SMS, provides protection against quantum attacks for the SMS content, and improves the security of SMS transmission. It should be noted that the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm, and the first hybrid private key is a hybrid private key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm; taking the first national secret algorithm as the SM2 algorithm and the first anti-quantum cryptographic encapsulation algorithm as the Kyber algorithm as an example, the first hybrid public key includes the public key K1 generated by the SM2 algorithm and the public key K2 generated by the Kyber algorithm, and the first hybrid private key includes the private key S1 generated by the SM2 algorithm and the private key S2 generated by the Kyber algorithm.

[0061] Optionally, the first terminal includes a second hybrid public key, the second terminal includes a first hybrid public key, the second hybrid public key is composed of a public key generated by a second national secret algorithm in the first terminal and a public key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a public key generated by a second international algorithm and a public key generated by a first quantum-resistant cryptographic signature algorithm; before obtaining the SMS data with the signature, the method also includes: the first terminal sends a certificate request for the first hybrid public key to a CA organization, and the second terminal sends a certificate request for the second hybrid public key to the CA organization; the CA organization issues certificates for the first hybrid public key and the second hybrid public key according to the certificate request for the first hybrid public key and the certificate request for the second hybrid public key to make the first hybrid public key and the second hybrid public key credible.

[0062] In an alternative embodiment, Figure 2 As shown, in order to ensure that the first hybrid public key and the second hybrid public key are trustworthy, the first terminal needs to send the second hybrid public key to the CA institution, and the second terminal needs to send the first hybrid public key to the CA institution, so that the CA institution issues certificates for the first hybrid public key and the second hybrid public key, that is, the first terminal receives the certificate of the first hybrid public key returned by the CA institution and the second terminal receives the certificate of the second hybrid public key returned by the CA institution. Only after the certificate is issued, can the first hybrid public key and the second hybrid public key be trusted, so that the first hybrid public key and the second hybrid public key can be used for encryption, signing and other operations in the future, ensuring the security of the use of hybrid secret keys and improving the security of SMS data transmission. It should be noted that the second hybrid public key is composed of the public key generated by the second national secret algorithm in the first terminal and the public key generated by the first anti-quantum cryptographic signature algorithm, or is composed of the public key generated by the second international algorithm and the public key generated by the first anti-quantum cryptographic signature algorithm. The first national secret algorithm is still SM2 algorithm, and the first anti-quantum cryptographic encapsulation algorithm is Kyber algorithm. For example, the second hybrid public key includes the public key K3 generated by the SM2 algorithm and the public key K4 generated by the Kyber algorithm.

[0063] In an optional embodiment, after obtaining the certificate, the first terminal and the second terminal disclose their hybrid public key certificates to the communication server, and the first terminal can obtain the hybrid public key certificate of the second hybrid public key of the second terminal through the communicator. Take the first terminal and the second terminal as user terminal a and user terminal b as an example for explanation, and the communication server selects the SMS center server, such as Figure 3As shown, user terminal a submits its own hybrid public key certificate to the SMS center server, and user terminal b can directly query the hybrid public key certificate provided by user terminal a on the SMS center server through the mobile phone number of user terminal a, so that user terminal b can use the hybrid public key certificate provided by the queried user terminal a to perform corresponding signature verification on the SMS data sent by user terminal a. Similarly, the second terminal can obtain the hybrid public key certificate of the first hybrid public key of the first terminal through the communication server, which will not be repeated here.

[0064] Since the certificate contains the user's mobile phone number, any entity that knows the user's mobile phone number can query the SMS center server for the corresponding hybrid public key certificate, which facilitates the subsequent use of the hybrid public key for signature verification, packaging and other operations.

[0065] Optionally, obtaining the SMS data with a signature includes: calculating the SMS data according to a first preset summary algorithm to obtain an information summary of the SMS data; signing the information summary using a second hybrid private key provided by the first terminal to obtain the SMS data with a signature; wherein the second hybrid private key is composed of a private key generated by a second national secret algorithm in the first terminal and a private key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a private key generated by a second international algorithm and a private key generated by a first quantum-resistant cryptographic signature algorithm.

[0066] In an optional embodiment, the first terminal calculates the SMS data according to the first preset digest algorithm to obtain the information digest of the SMS data, and then the first terminal signs the information digest using the second hybrid private key provided by the first terminal, thereby obtaining the SMS data with the signature. When the SMS data is received and decrypted by the second terminal, the second terminal calculates the decrypted SMS data plaintext according to the second preset digest algorithm to obtain the information digest of the SMS data plaintext; then, the second terminal uses the second hybrid public key to perform signature verification on the information digest of the SMS data plaintext, and when the signature verification succeeds, the SMS data plaintext is marked as trusted data. Among them, the first preset digest algorithm is a hash algorithm, the information digest is a hash value, and the hash value of the SMS data is calculated by the hash algorithm. By using the second hybrid public key and the second hybrid private key to sign and verify the SMS data, it can effectively prevent the information from being tampered with, and ensure that the received SMS data is trusted data. When the signature verification fails, it means that the SMS data has been tampered with, and the SMS data is not trusted. The user can be reminded that the SMS data is a false SMS by a message reminder or the SMS data can be directly shielded by a message shielding method to prevent the user from being deceived. It should be noted that the second hybrid private key is composed of a private key generated by a second national secret algorithm in the first terminal and a private key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a private key generated by a second international algorithm and a private key generated by a first quantum-resistant cryptographic signature algorithm. Taking the second national secret algorithm as the SM2 algorithm and the first quantum-resistant cryptographic signature algorithm as the Di l ith i um algorithm as an example, the second hybrid private key includes a private key S3 generated by the SM2 algorithm and a private key S4 generated by the Di l ith i um algorithm.

[0067] Optionally, the symmetric key is a first symmetric key or a second symmetric key; the using the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain a key encapsulation ciphertext and a symmetric key includes: calling a first random number generator to generate a first random number, encrypting the first random number according to a public key generated by the first national secret algorithm and the first national secret algorithm, or encrypting the first random number according to a public key generated by the first international algorithm and the first international algorithm to obtain a first encryption key; calling a second random number generator to generate a second random number, generating a subkey according to the second random number and the first quantum-resistant cryptographic encapsulation algorithm, and encrypting the subkey according to a public key generated by the first quantum-resistant cryptographic encapsulation algorithm in the second terminal and the first quantum-resistant cryptographic encapsulation algorithm to obtain a second encryption key; wherein the first encryption key and the second encryption key constitute the key encapsulation ciphertext; generating a first symmetric key according to the subkey, the first random number, and a third national secret algorithm in the first terminal, or generating a second symmetric key according to the subkey, the first random number, and a third international algorithm in the first terminal.

[0068] In an optional embodiment, the explanation is made from the perspective of national secret algorithms. Taking the first national secret algorithm as the SM2 algorithm, the first anti-quantum cryptographic encapsulation algorithm as the Kyber algorithm, and the third national secret algorithm as the SM3 hash algorithm as an example, the first terminal calls the first random number generator in the first terminal to generate a first random number 1, and encrypts the first random number 1 according to the public key K1 and the SM2 algorithm in the second terminal to obtain a first encryption key C1; then, the first terminal calls the second random number generator to generate a second random number 2, generates a subkey according to the second random number 2 and the Kyber algorithm in the second terminal, and encrypts the subkey according to the public key K4 and the Kyber algorithm in the second terminal to obtain a second encryption key C2, and the first encryption key C1 and the second encryption key C2 constitute the key encapsulation ciphertext C; finally, the first terminal generates a symmetric key K according to the subkey, the first random number 1, and the SM3 hash algorithm in the first terminal, and provides a quantum-resistant key negotiation function for the SMS by adopting a hybrid key encryption method, provides protection against quantum attacks for the SMS content, and improves the security of SMS data transmission. The first random number generator and the second random number generator may be the same random number generator. The international algorithm and the national secret algorithm are parallel algorithms, so the relevant embodiments from the perspective of the international algorithm will not be described here.

[0069] Optionally, the second terminal uses the first hybrid private key provided by the second terminal to decrypt the key encapsulation ciphertext to obtain the symmetric key, including: the second terminal uses the private key generated by the first national secret algorithm and the first national secret algorithm to decrypt the first encryption key, or the second terminal uses the private key generated by the first international algorithm and the first international algorithm to decrypt the first encryption key to obtain the first random number; the second terminal uses the private key generated by the first quantum-resistant cryptographic encapsulation algorithm in the second terminal and the first quantum-resistant cryptographic encapsulation algorithm to decrypt the second encryption key to obtain the subkey; the second terminal generates a first symmetric key according to the first random number, the subkey, and the fourth national secret algorithm in the second terminal, or the second terminal generates a second symmetric key according to the first random number, the subkey, and the fourth international algorithm in the second terminal.

[0070] In an optional embodiment, still explained from the perspective of the national secret algorithm, taking the first national secret algorithm as the SM2 algorithm, the first anti-quantum cryptographic encapsulation algorithm as the Kyber algorithm, and the fourth national secret algorithm as the SM3 hash algorithm as an example, the second terminal uses the private key S1 generated by the SM2 algorithm in the second terminal and the SM2 algorithm in the second terminal to decrypt the first encryption key C1 to obtain the first random number 1; then, the second terminal uses the private key S2 generated by the Kyber algorithm in the second terminal and the Kyber algorithm in the second terminal to decrypt the second encryption key C2 to obtain the subkey; finally, the second terminal generates the symmetric key K according to the first random number 1, the subkey, and the SM3 hash algorithm in the second terminal. Thus, the decryption process of the SMS data is completed, the same session key is used to realize the encryption and decryption of the SMS message, and the symmetric key K is allowed to be securely transmitted on an insecure channel, thereby ensuring the confidentiality of the SMS message during transmission.

[0071] The decrypting the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext includes: using the symmetric key and the fifth national secret algorithm in the second terminal to decrypt the SMS data ciphertext to obtain the SMS data plaintext.

[0072] Specifically, still from the perspective of the national secret algorithm, in the process of using the symmetric key to encrypt the SMS data with the signature to obtain the SMS data ciphertext, the seventh national secret algorithm provided by the first terminal is used, and the SMS data with the signature is encrypted in combination with the symmetric key to obtain the SMS data ciphertext. Taking the seventh national secret algorithm as the SM4 algorithm as an example, when the SMS data ciphertext is decrypted using the symmetric key and the fifth national secret algorithm in the second terminal, the fifth national secret algorithm should be SM4, and the SMS data ciphertext is decrypted using the symmetric key K and the SM4 algorithm in the second terminal to obtain the SMS data plaintext. The same symmetric key and algorithm are used so that the SMS data ciphertext can be correctly decrypted, avoiding the SMS data from being unable to be received normally due to different algorithms or keys used for encryption and decryption.

[0073] In an optional embodiment, the first terminal and the second terminal communicate based on a SIM card, and the SIM card is one of a normal SIM card, an ISIM card, an ESIM card, a super SIM card, a TF card, and an NM card.

[0074] This application first obtains the SMS data with a signature, and uses the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext and the symmetric key; wherein the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm; the SMS data with a signature is encrypted using the symmetric key to obtain the SMS data ciphertext; the key encapsulation ciphertext and the SMS data ciphertext are sent to the second terminal, and the second terminal uses the first hybrid private key provided by the second terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the first hybrid private key is a hybrid private key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm. By adopting a hybrid key encryption method, a quantum-safe key negotiation function is provided for SMS, protection against quantum attacks is provided for SMS content, and signature verification is combined to prevent information from being intercepted or tampered with, further improving the security of SMS transmission.

[0075] Reference Figure 4 A flow chart of a method for secure transmission of short messages applied to a second terminal provided in an embodiment of the present specification includes: obtaining short message data with a signature, and performing key encapsulation calculation using a third hybrid public key provided by a first terminal to obtain a key encapsulation ciphertext and a symmetric key; wherein the third hybrid public key is a hybrid public key generated based on the sixth national secret algorithm and the second anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by the sixth international algorithm and the second anti-quantum cryptographic encapsulation algorithm; encrypting the short message data with the signature using the symmetric key to obtain a short message data ciphertext; sending the key encapsulation ciphertext and the short message data ciphertext to the first terminal, the first terminal using the third hybrid private key provided by the first terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypting the short message data ciphertext based on the symmetric key to obtain a short message data plaintext; wherein the third hybrid private key is a hybrid private key generated based on the sixth national secret algorithm and the second anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated by the fifth international algorithm and the second anti-quantum cryptographic encapsulation algorithm.

[0076] In an optional embodiment, the second terminal first obtains the SMS data with the signature, and at the same time, uses the third hybrid public key provided by the first terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext C and the symmetric key K. Then, the second terminal uses the symmetric key K to encrypt the SMS data with the signature to obtain the SMS data ciphertext, and sends the key encapsulation ciphertext C and the SMS data ciphertext to the first terminal. The first terminal uses the second hybrid private key provided by the first terminal to decapsulate the key encapsulation ciphertext C to obtain the symmetric key K. Finally, the first terminal decrypts the SMS data ciphertext based on the symmetric key K to obtain the SMS data plaintext, thereby completing the encrypted transmission of the SMS. The SMS data adopts the hybrid key encryption method, which provides a quantum-proof key negotiation function for the SMS, provides quantum-proof protection for the SMS content, and improves the security of SMS transmission. It should be noted that the third hybrid public key is a hybrid public key generated based on the sixth national secret algorithm and the second quantum-proof cryptographic encapsulation algorithm or a hybrid public key generated by the sixth international algorithm and the second quantum-proof cryptographic encapsulation algorithm, and the third hybrid private key is a hybrid private key generated based on the sixth national secret algorithm and the second quantum-proof cryptographic encapsulation algorithm or a hybrid private key generated by the sixth international algorithm and the second quantum-proof cryptographic encapsulation algorithm.

[0077] Reference Figure 5 The embodiment of this specification also provides a text message security transmission system based on a post-quantum algorithm, including a first terminal 1 and a second terminal 2, the system including: the first terminal 1 obtains text message data with a signature, and uses the first hybrid public key provided by the second terminal 2 to perform key encapsulation calculation to obtain a key encapsulation ciphertext and a symmetric key; wherein the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm; the first terminal 1 uses the symmetric key to encrypt the text message data with the signature to obtain a text message data ciphertext; the first terminal 1 sends the key encapsulation ciphertext and the text message data ciphertext to the second terminal 2; the second terminal 2 uses the first hybrid private key provided by the second terminal 2 to decrypt the key encapsulation ciphertext to obtain the symmetric key, and decrypts the text message data ciphertext based on the symmetric key to obtain the text message data plaintext, thereby completing the encrypted transmission of the text message, and the text message data adopts a hybrid key encryption method, which provides a quantum-safe key negotiation function for the text message, provides protection against quantum attacks for the text message content, and improves the security of text message transmission. Among them, the first hybrid private key is a hybrid private key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm.

[0078] Regarding the system in the above embodiment, the process of executing the operation in each step has been described in detail in the embodiment of the method, and will not be elaborated here.

[0079] Based on the same inventive concept, an embodiment of this specification also provides an electronic device.

[0080] The following describes an electronic device embodiment of the present invention, which can be regarded as a specific physical implementation of the method and device embodiments of the present invention. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.

[0081] Reference Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Figure 6 The electronic device 300 according to this embodiment of the present invention is described. Figure 6 The electronic device 300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0082] like Figure 6 As shown, the electronic device 300 is in the form of a general computing device. The components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different device components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.

[0083] The storage unit stores program codes, which can be executed by the processing unit 310, so that the processing unit 310 performs the steps according to various exemplary embodiments of the present invention described in the above processing method section of this specification. For example, the processing unit 310 can perform the following steps: Figure 1 Steps shown.

[0084] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache memory unit 3202 , and may further include a read-only memory unit (ROM) 3203 .

[0085] The storage unit 320 may also include a program / utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: operating means, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0086] Bus 330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0087] The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 300, and / or any device that enables the electronic device 300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 350. Furthermore, the electronic device 300 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 through the bus 330. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices.

[0088] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including a number of instructions to enable a computing device (which can be a personal computer, server, or network device, etc.) to execute the above method according to the present invention. When the computer instructions are executed by a data processing device, the computer-readable medium can implement the above method of the present invention, that is: Figure 1 The method shown.

[0089] Reference Figure 7 A schematic diagram of a computer-readable medium provided for an embodiment of this specification.

[0090] accomplish Figure 1The computer instructions of the method shown can be stored on one or more computer readable media. The computer readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0091] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution device, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0092] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0093] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0094] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0095] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0096] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for secure transmission of short messages based on a post-quantum algorithm, applied to a first terminal, characterized in that: include: Acquire the SMS data with the signature, and use the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext and the symmetric key; wherein the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first anti-quantum cryptographic encapsulation algorithm; Using the symmetric key to encrypt the signed SMS data to obtain a ciphertext of the SMS data; The key encapsulation ciphertext and the SMS data ciphertext are sent to a second terminal; the second terminal uses a first hybrid private key provided by the second terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the first hybrid private key is a hybrid private key generated based on a first national secret algorithm and a first anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated based on a first international algorithm and a first anti-quantum cryptographic encapsulation algorithm.

2. The method according to claim 1, characterized in that The first terminal includes a second hybrid public key, and the second terminal includes a first hybrid public key, wherein the second hybrid public key is composed of a public key generated by a second national secret algorithm in the first terminal and a public key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a public key generated by a second international algorithm and a public key generated by a first quantum-resistant cryptographic signature algorithm; Before acquiring the SMS data with the signature, the method further includes: The first terminal sends a certificate request for the first hybrid public key to a CA organization, and the second terminal sends a certificate request for the second hybrid public key to the CA organization; The CA agency issues certificates to the first hybrid public key and the second hybrid public key according to the certificate request of the first hybrid public key and the certificate request of the second hybrid public key to make the first hybrid public key and the second hybrid public key credible.

3. The method according to claim 1, characterized in that The acquiring of the SMS data with the signature comprises: Calculate the SMS data according to a first preset summary algorithm to obtain an information summary of the SMS data; The information summary is signed using the second hybrid private key provided by the first terminal to obtain SMS data with a signature; wherein the second hybrid private key is composed of a private key generated by a second national secret algorithm in the first terminal and a private key generated by a first quantum-resistant cryptographic signature algorithm, or is composed of a private key generated by a second international algorithm and a private key generated by a first quantum-resistant cryptographic signature algorithm.

4. The method according to claim 1, characterized in that The symmetric key is the first symmetric key or the second symmetric key; The step of performing key encapsulation calculation using the first hybrid public key provided by the second terminal to obtain a key encapsulation ciphertext and a symmetric key includes: Calling a first random number generator to generate a first random number, encrypting the first random number according to the public key generated by the first national secret algorithm and the first national secret algorithm, or encrypting the first random number according to the public key generated by the first international algorithm and the first international algorithm to obtain a first encryption key; Calling a second random number generator to generate a second random number, generating a subkey according to the second random number and the first quantum-resistant cryptographic encapsulation algorithm, and encrypting the subkey according to the public key generated by the first quantum-resistant cryptographic encapsulation algorithm in the second terminal and the first quantum-resistant cryptographic encapsulation algorithm to obtain a second encryption key; wherein the first encryption key and the second encryption key constitute the key encapsulation ciphertext; A first symmetric key is generated according to the subkey, the first random number, and a third national secret algorithm in the first terminal, or a second symmetric key is generated according to the subkey, the first random number, and a third international secret algorithm in the first terminal.

5. The method according to claim 4, characterized in that The second terminal uses the first hybrid private key provided by the second terminal to decrypt the key encapsulation ciphertext to obtain the symmetric key, including: The second terminal uses a private key generated by a first national secret algorithm and the first national secret algorithm to decrypt the first encryption key, or the second terminal uses a private key generated by a first international algorithm and the first international algorithm to decrypt the first encryption key to obtain the first random number; The second terminal decrypts the second encryption key using the private key generated by the first quantum-resistant cryptographic encapsulation algorithm in the second terminal and the first quantum-resistant cryptographic encapsulation algorithm to obtain the subkey; The second terminal generates a first symmetric key according to the first random number, the subkey, and the fourth national secret algorithm in the second terminal, or the second terminal generates a second symmetric key according to the first random number, the subkey, and the fourth international algorithm in the second terminal.

6. The method according to claim 1, characterized in that The decrypting the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext includes: The symmetric key and the fifth national secret algorithm in the second terminal are used to decrypt the ciphertext of the SMS data to obtain the plaintext of the SMS data.

7. The method according to claim 2, characterized in that After decrypting the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext, the method further includes: The second terminal calculates the plain text of the SMS data according to a second preset digest algorithm to obtain an information digest of the plain text of the SMS data; The second terminal uses the second hybrid public key to perform signature verification on the information digest of the plaintext SMS data; When the signature verification succeeds, the plain text of the SMS data is marked as trusted data.

8. The method according to claim 1, characterized in that The first terminal and the second terminal communicate based on a SIM card, and the SIM card is one of a common SIM card, an ISIM card, an ESIM card, a super SIM card, a TF card, and an NM card.

9. A method for secure transmission of short messages based on a post-quantum algorithm, applied to a second terminal, characterized in that: include: Acquire the SMS data with the signature, and use the third hybrid public key provided by the first terminal to perform key encapsulation calculation to obtain the key encapsulation ciphertext and the symmetric key; wherein the third hybrid public key is a hybrid public key generated based on the sixth national secret algorithm and the second anti-quantum cryptographic encapsulation algorithm, or a hybrid public key generated based on the sixth international algorithm and the second anti-quantum cryptographic encapsulation algorithm; Using the symmetric key to encrypt the signed SMS data to obtain a ciphertext of the SMS data; The key encapsulation ciphertext and the SMS data ciphertext are sent to the first terminal, and the first terminal uses the third hybrid private key provided by the first terminal to decapsulate the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the third hybrid private key is a hybrid private key generated based on the sixth international secret algorithm and the second anti-quantum cryptographic encapsulation algorithm, or a hybrid private key generated based on the fifth international secret algorithm and the second anti-quantum cryptographic encapsulation algorithm.

10. A secure SMS transmission system based on post-quantum algorithms, characterized by , comprising a first terminal and a second terminal, the system comprising: The first terminal obtains the SMS data with the signature, and uses the first hybrid public key provided by the second terminal to perform key encapsulation calculation to obtain a key encapsulation ciphertext and a symmetric key; wherein the first hybrid public key is a hybrid public key generated based on the first national secret algorithm and the first quantum-resistant cryptographic encapsulation algorithm, or a hybrid public key generated by the first international algorithm and the first quantum-resistant cryptographic encapsulation algorithm; The first terminal encrypts the SMS data with the signature using the symmetric key to obtain a ciphertext of the SMS data; The first terminal sends the key encapsulation ciphertext and the SMS data ciphertext to the second terminal; The second terminal uses the first hybrid private key provided by the second terminal to decrypt the key encapsulation ciphertext to obtain the symmetric key, and decrypts the SMS data ciphertext based on the symmetric key to obtain the SMS data plaintext; wherein the first hybrid private key is a hybrid private key generated based on the first national secret algorithm and the first quantum-resistant cryptographic encapsulation algorithm, or a hybrid private key generated based on the first international algorithm and the first quantum-resistant cryptographic encapsulation algorithm.

11. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer instructions, and the processor is configured to execute the computer instructions to perform the method according to any one of claims 1 to 9.

12. A storage medium, characterized in that: The storage medium stores computer instructions, and the computer instructions are configured to execute the method according to any one of claims 1 to 9 when executed.

Citation Information

Patent Citations

  • Quantum security data encryption method, encryption device and storage medium

    CN113810432A

  • Quantum computing resistant digital signature method and system based on quantum communication service station

    CN114978518A

  • Anti-quantum computing Internet of Vehicles communication method and system based on CA and national cryptographic algorithm

    CN115001722A

  • Quantum key encryption method, system and device and storage medium

    CN118101185A

  • TLCP communication method and system for resisting quantum attack

    CN118631447A

Cited By

  • Short message sending system capable of preventing data leakage

    CN119946620A

  • Session key generation method and device, electronic equipment and storage medium

    CN120856331A

  • Session key generation method and device, electronic equipment and storage medium

    CN120856331B