A hybrid encryption method based on data security and privacy protection

Through the hybrid encryption method of AES and SM2 elliptic curve public key cryptography algorithm, combined with the SM3 hash algorithm, the security and processing speed requirements of communication encryption are solved, and efficient privacy and security protection of big data transmission is achieved.

CN115549987BActive Publication Date: 2024-08-30GUANGZHOU TURING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211133577.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2024-08-30
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

On the premise of ensuring security, how to use hybrid encryption methods to improve communication security while increasing processing speed to meet the needs of big data computing and processing.

Method used

A hybrid encryption method using the AES symmetric cryptography algorithm and the SM2 elliptic curve public key cryptography algorithm is used to generate the session key through a pseudo-random number generator, encrypt it using the recipient's public key, and use the improved AES algorithm to encrypt the message, combined with SM3 The hash algorithm is processed and finally the session key and encrypted message combination are transmitted.

Benefits of technology

It achieves privacy and security protection for big data transmission in a cloud environment, improves the computational efficiency of encryption and decryption, and has the advantages of both symmetric cryptography and public key cryptography.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115549987B
    Figure CN115549987B
Patent Text Reader

Abstract

The present invention discloses a hybrid encryption method based on data security and privacy protection, and relates to the field of communication encryption technology. A hybrid scheme of AES symmetric cryptographic algorithm and SM2 elliptic curve public key cryptographic algorithm is used to protect the security and privacy of big data. The method comprises the following steps: a pseudo-random number generator generates a session key; the session key is encrypted with the public key of the receiver; the message is encrypted with a symmetric cipher; the session key and the encrypted message are combined and sent to the receiver. The present invention improves the anonymity of big data by integrating key symmetry with public key encapsulation mechanism. By utilizing the characteristics of SM2 algorithm, a shorter key and higher encryption efficiency are obtained, and the data summary is encrypted by elliptic encryption algorithm, thereby improving the security of key transmission. At the same time, the AES algorithm, i.e., symmetric cryptographic algorithm, is used to improve the speed of encryption and decryption. The scheme adopted by the present invention uses three cryptographic technologies, namely, pseudo-random number, symmetric cryptography and public key cryptography. By combining these three cryptographic technologies, an encryption scheme with the advantages of both symmetric cryptography and public key cryptography is created, and the computing efficiency of encryption and decryption is improved under the premise of effectively protecting the privacy and security of big data transmission in cloud environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of communication encryption, and in particular to a hybrid encryption method based on data security and privacy protection. Background Art

[0002] With the rapid development of Internet technology, network security has received more and more attention. In the communication process, the confidentiality of the communication content is crucial. In the field of communication encryption technology, cryptographic technology is the basis of information protection and network information system construction, and is the key technology to ensure network security.

[0003] With the continuous development of computer system capabilities, the use of a single algorithm or a certain type of algorithm can no longer meet the needs of actual encryption technology, so hybrid encryption has become one of the current mainstream encryption solutions. Most of the hybrid encryption technologies in China today are a mixture of the symmetric encryption technology AES encryption algorithm and the asymmetric encryption technology RSA encryption algorithm. In addition, a hybrid encryption scheme combining SM2 with SM4 and a hybrid encryption scheme combining ECC with AES are also used to implement applications such as WIFI hotspot management systems, digital signature systems, and encryption systems. The SM2 algorithm is an asymmetric encryption algorithm, which has a shorter key and higher encryption efficiency than the RSA algorithm. The SM4 algorithm is a symmetric encryption algorithm with a key length of only 128 bits, and the AES algorithm has a faster encryption and decryption speed under the same security strength.

[0004] Under the premise of ensuring security, the computational processing of big data requires a fast processing speed. How to use hybrid encryption to improve the security of communication while increasing the processing speed is a problem we need to solve. To this end, the present invention provides a hybrid encryption method using an AES symmetric encryption algorithm and an SM2 elliptic curve public key encryption algorithm. Summary of the invention

[0005] The purpose of the present invention is to provide a hybrid encryption method based on data security and privacy protection to solve the problems raised in the above background technology.

[0006] In order to solve the above technical problems, the present invention aims to provide a hybrid encryption method based on data security and privacy protection, comprising the following steps:

[0007] S1, a pseudo-random number generator generates a session key;

[0008] S2. Encrypt the session key with the recipient's public key;

[0009] S3, encrypt the message using a symmetric cipher;

[0010] S4. Combine the session key and the encrypted message.

[0011] Preferably, a pseudo-random number generator generates a session key, specifically, a sender randomly generates a session key, and the session key is a temporary key.

[0012] Prioritize, the session key is encrypted with the recipient's public key, specifically, the SM2 elliptic curve public key cryptography algorithm is used to encrypt the session key. At the same time, in the encryption and decryption process of the SM2 algorithm, the SM3 algorithm is used. The SM3 hash algorithm requires the input plaintext information length l<264 bits, and then the message is processed through information padding, iterative process, message expansion and compression function, and finally outputs a hash value with a fixed length of 256 bits.

[0013] Preferably, the message is encrypted with a symmetric cipher, and the private data is symmetrically encrypted using an improved AES algorithm. The steps of AES algorithm encryption include:

[0014] The plaintext information is grouped, and the fixed length of each group is 128 bits. If the length is less than 128 bits, the last digits are supplemented, and then the groups are encrypted by AES respectively;

[0015] The 128-bit plaintext and the 128-bit key are placed in two 4*4 square matrices respectively. The key square matrix is ​​expanded into a sequence of 44 bytes by the key scheduling function. The plaintext square matrix and the first four bytes in the sequence are XORed.

[0016] The result obtained in the previous step is encrypted 10 times in the order of byte substitution operation, row shift operation, column mixing operation and round key addition operation, and finally the ciphertext is output. It should be noted that the column mixing operation is not required when performing the 10th encryption.

[0017] Preferably, the session key and the encrypted message are combined and sent to the message recipient together. The content sent includes the message encrypted with the session key and the session key encrypted with the public key.

[0018] In summary, the embodiment of the present invention provides a hybrid encryption method based on data security and privacy protection, the method comprising: generating a session key with a pseudo-random number generator; encrypting the session key with a receiver's public key; encrypting a message with a symmetric cipher; and combining the session key and the encrypted message. An encryption scheme that combines the advantages of symmetric ciphers and public key ciphers is created, which improves the computational efficiency of encryption and decryption while effectively protecting the privacy and security of big data transmission in a cloud environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the present invention.

[0020] Figure 2This is the hybrid encryption flow chart. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0022] Example 1

[0023] like Figure 1-Figure 2 As shown, this embodiment provides a hybrid encryption method based on data security and privacy protection, including the following steps:

[0024] S1, a pseudo-random number generator generates a session key;

[0025] S2. Encrypt the session key with the recipient's public key;

[0026] S3, encrypt the message using a symmetric cipher;

[0027] S4. Combine the session key and the encrypted message.

[0028] In this embodiment, in S1, the specific method for generating a session key by a pseudo-random number generator includes the following steps:

[0029] The message sender A randomly generates a session key. The session key is a temporary key randomly generated for each communication. It is used as the key of the symmetric cipher to encrypt messages and speed up the encryption step.

[0030] In this embodiment, in S2, the specific method of encrypting the session key with the receiver's public key includes the following steps:

[0031] The receiver B generates a pair of public and private keys, and makes the generated public key public to each other, that is, shares the public key with the sender, and then keeps the private key to itself, and encrypts the session key generated in S1 through the SM2 elliptic curve public key cryptography algorithm. That is, the received SM2 public key PublicKey from the cloud is used to encrypt Keys, and the key ciphertext CK is obtained.

[0032] In the encryption and decryption process of the SM2 algorithm, the SM3 algorithm is used. The SM3 hash algorithm requires that the input plaintext information length l is less than 2 64 bits, and then the message is processed through information padding, iterative process, message expansion and compression function, and finally a hash value with a fixed length of 256 bits is output.

[0033] In this embodiment, in S3, the specific method of encrypting the message using a symmetric cipher includes the following steps:

[0034] The message is encrypted with a symmetric cipher. That is, the SM3 algorithm is used to calculate the hash value Z of the private data plaintext M sent by the user in the previous step. The hash value Z and the plaintext M are combined as M / / Z. The improved AES algorithm is used to encrypt M / / Z to obtain the ciphertext CT.

[0035] The improved AES algorithm is used for encryption. First, the plaintext information is divided into groups. The fixed length of each group is 128 bits. If the length is less than 128 bits, the last digit is supplemented, and then the groups are encrypted by AES respectively.

[0036] The 128-bit plaintext and the 128-bit key are placed in two 4*4 square matrices respectively. The key square matrix is ​​expanded into a sequence of 44 bytes by the key scheduling function. The plaintext square matrix and the first four bytes in the sequence are XORed.

[0037] Then, the result obtained in the previous step is encrypted 10 times in the order of byte substitution operation, row shift operation, column mixing operation and round key addition operation, and finally the ciphertext is output. It should be noted that the column mixing operation is not required when performing the 10th encryption.

[0038] In this embodiment, in S4, the specific method of combining the session key and the encrypted message includes the following steps:

[0039] The session key and the encrypted message are combined and sent to the message receiver B, that is, the ciphertext CT / / CK is output to the receiver B. The content sent includes the message encrypted with the session key and the session key encrypted with the public key.

[0040] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit it. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical method of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention. The present invention may also have various changes and improvements, which all fall within the scope of the invention claimed for protection.

Claims

1. A hybrid encryption method based on data security and privacy protection, characterized by: The steps include: S1, a pseudo-random number generator generates a session key; S2. Encrypt the session key with the recipient's public key; S3. Encrypt the message using a symmetric cipher, including: using an improved AES algorithm to symmetrically encrypt the private data; Specifically, the method includes: obtaining a hash value Z obtained by calculating the private data plaintext M sent by the user terminal using the SM3 algorithm, combining the hash value Z with the private data plaintext M as M / / Z, and encrypting M / / Z using the improved AES algorithm to obtain a ciphertext CT; The improved AES algorithm is used to encrypt M / / Z, including: grouping the plaintext information, each group has a fixed length of 128 bits, and if the length is less than 128 bits, the last digit is supplemented, and then the groups are encrypted by AES respectively; S4. Combine the session key and the encrypted message.

2. A hybrid encryption method based on data security and privacy protection according to claim 1, characterized in that : In S1, a temporary key randomly generated for each communication is used as a key for the symmetric cipher to encrypt messages, thereby increasing the speed of the encryption step.

3. A hybrid encryption method based on data security and privacy protection according to claim 2, characterized in that: The temporary key is a session key generated by a pseudo-random number generator.

4. The hybrid encryption method based on data security and privacy protection according to claim 1 is characterized in that: In S2, the national secret SM2 asymmetric encryption algorithm is used for encryption protection, that is, the public key of the message receiver is shared with the message sender, and then the public key cryptography is used to generate a session key as the key of the symmetric cryptography.

5. A hybrid encryption method based on data security and privacy protection according to claim 4, characterized in that: During the encryption and decryption process of the SM2 algorithm, in order to prevent attackers from tampering with the ciphertext during data transmission, the national secret SM3 hash algorithm is used to calculate the hash value of the data to be transmitted, and the hash value is verified at the data receiving end. If the verification passes, the private data will be stored in the cloud in the form of ciphertext.

6. The hybrid encryption method based on data security and privacy protection according to claim 1 is characterized in that: In S4, the session key encrypted with the public key and the encrypted message are combined and sent to the recipient.

Citation Information

Patent Citations

  • Electric power data privacy communication method based on hybrid encryption algorithm

    CN112511304A