An instant communication message protection system and method based on hardware cryptographic device

Through an encryption method that combines software and hardware, instant messaging information is encrypted multiple times, and hardware encryption devices are used to encrypt local data and add session keys. This solves the problem of insufficient information transmission security in the existing technology and achieves high efficiency and low cost. information security protection.

CN114006736BActive Publication Date: 2024-08-27ZHONGYITONG TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202111234494.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-22
Publication Date
2024-08-27
Estimated Expiration
2041-10-22

AI Technical Summary

Technical Problem

Existing instant messaging systems are prone to the risk of information being stolen during the information transmission process. Traditional encryption methods are costly and easy to crack, and cannot effectively ensure data security.

Method used

Using an encryption method that combines software and hardware, different message contents are encrypted multiple times, hardware cryptographic devices are used to encrypt local data, and session keys are added during the transmission process, which not only encrypts the information content, but also encrypts the information channel. Encryption to improve security and efficiency.

Benefits of technology

It effectively improves the security and efficiency of instant messaging information, prevents keys from being stolen, enhances confidentiality and security levels, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114006736B
    Figure CN114006736B
Patent Text Reader

Abstract

The present invention provides an instant messaging message protection system and method based on a hardware cryptographic device, the system comprising: a first client, a second client and a server, the server providing a signature verification channel for two-way authentication between the client and the server, wherein the first client and the second client are each connected to a hardware cryptographic device for opening a private space, obtaining encryption keys and session keys, and encrypting and decrypting instant messaging messages, wherein the hardware cryptographic device comprises a true random number generator, a key management module, a data storage module and an authentication module. The beneficial effect of the present invention is that the patent solves the problem of information leakage during the transmission of instant messaging messages of smart terminals, the encryption process adopts an encryption mode of a free combination of software and hardware, enhances the confidentiality of instant messaging messages, ensures the security of instant messaging message transmission, and improves the security level of session information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of instant information security protection for mobile intelligent terminals, and in particular to an instant communication message protection system and method based on hardware cryptographic equipment. Background Art

[0002] Instant Messaging is the most popular communication method on the Internet. It uses Internet lines to exchange and interact with text, voice, video, and files, effectively saving the time and economic costs of both parties. At present, various instant messaging software has emerged in an endless stream; however, most instant messaging systems are public, so it is easy for information to be stolen during the information transmission process and at the information receiving terminal. Usually, there are two ways to protect instant messaging: communication channel encryption, such as VPN dedicated channel encryption, and information source encryption, which converts instant messages into ciphertext before sending them out.

[0003] Existing instant messaging encryption technologies generally solve the risk of instant messaging theft from the signal source or information transmission channel. From the signal source, the signal is generally converted into ciphertext and sent out, but this form is also very easy to be stolen. Once the spies master the method of cracking the ciphertext, such as decrypting the symmetric key, the protection of the message is meaningless because the decryption key is the same. From the perspective of the information transmission channel, establishing an information encryption security channel can achieve the purpose of sending messages safely, but the cost is high. At the same time, once the encrypted transmission channel is cracked, the secure transmission of data cannot be guaranteed. Summary of the invention

[0004] According to the characteristics of the prior art, the technical solution of the present invention combines the efficiency of software encryption files and the security of hardware encryption, encrypts different message contents by combining different software and hardware, and encrypts the message contents multiple times, effectively improving the security of the message transmission process. This is achieved through the following technical solution.

[0005] The present invention provides an instant messaging message protection method based on a hardware cryptographic device. First, local data is encrypted. For text data with a small transmission volume, the hardware cryptographic device is directly used for encryption, which not only ensures security but also does not delay the encryption rate. For pictures, voices or videos with a large transmission volume, the key parts are first encrypted by hardware, and then the remaining files are encrypted in a free combination manner mainly by software and a combination of software and hardware; after completing the local encryption, a session key is added to the channel of both parties, and the encrypted message content is encrypted again before it is transmitted. The present invention uses the method of software and hardware encryption to process instant messages, encrypts both the information content and the information channel, thereby effectively saving costs and improving the efficiency and security of instant messaging information.

[0006] The beneficial effects of the present invention are as follows: the protection of instant messaging messages provided by the present invention is based on hardware cryptographic devices, which solves the problem of information leakage during the transmission of instant messaging messages on smart terminals, and the key generated by the hardware cryptographic device cannot be copied out of the hardware device, preventing the key from being stolen.

[0007] In addition, the present invention adopts a software and hardware freestyle combination encryption mode for the encryption process of instant messages, and adopts hardware encryption for key parts, which enhances the confidentiality of instant communication messages, ensures the security of instant communication message transmission, and improves the security level of session information.

[0008] In addition, the software and hardware encryption keys in the file encryption process are different, which improves the security of the ciphertext. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 The system structure diagram of an instant messaging server and client based on hardware cryptographic devices.

[0010] Figure 2 It is a two-way authentication diagram between the instant messaging client and the background server based on hardware password devices.

[0011] Figure 3 The invention discloses a flow chart of establishing a session through an instant messaging message based on a hardware cryptographic device.

[0012] Figure 4 The invention discloses a flowchart of an instant messaging message forwarding method based on a hardware cryptographic device.

[0013] Figure 5 The invention discloses a flowchart of logging in to an instant messaging message and sending a message based on a hardware password device.

[0014] Figure 6 The invention is a flowchart of instant messaging that is read and destroyed based on hardware cryptographic devices. DETAILED DESCRIPTION

[0015] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0016] like Figure 1 The present invention relates to a system structure diagram of an instant messaging server and a client based on a hardware cryptographic device; its components include three categories: a first client (client A), a second client (client B) and a server.

[0017] Each client will be connected to a hardware password device, which is used to open the private space, obtain encryption keys and session keys, and encrypt and decrypt instant messaging messages. In addition, it also provides a signature verification channel for two-way authentication between the client and the server.

[0018] The server includes a forwarding server and an application background server; the forwarding server is used to forward encrypted messages, and the background server is used to authenticate the identity of the client and the identity of the hardware cryptographic device bound to the client to ensure the reliability of the inserted hardware cryptographic device.

[0019] The hardware cryptographic device includes a true random number generator, a key management module, a data storage module and an authentication module.

[0020] The true random number generator is used to generate random numbers for forming dynamic factors in conversation packets in instant messages.

[0021] The key management module is used to generate various encryption keys, which are inspired by the client's derived factors, including software encryption keys, hardware encryption keys, and session keys.

[0022] The data storage module is used to store various encrypted files, videos, etc. to provide a safe protection area.

[0023] The authentication module is used to provide encryption information for two-way authentication between the client and the server to ensure the security of the authentication information.

[0024] like Figure 2 It is a flowchart about the key negotiation and two-way authentication between an instant messaging client and a server based on a hardware cryptographic device; when the mobile phone security chip is inserted, the client (i.e. the mobile phone) with the security chip will perform two-way authentication with the server, using the national secret SM2 algorithm.

[0025] The client and server will first exchange public keys with each other, and then each will save the other party's public key and its own private key in a hardware cryptographic device to ensure that the signature verification or encryption and decryption process is in a physically isolated environment.

[0026] The interaction process between the client and the server is as follows:

[0027] The client first encrypts the business data (including APP loading identifier serialNo, type serialType, login username userName, version number versionName) using the symmetric key temporarily generated by the system to form dataEncrypt; then uses the client's private key to sign dataEncrypt and timestamp to form authCode; finally, uses the server's public key to encrypt the temporarily generated symmetric key to form keyEncrypt, and sends it to the server.

[0028] The server will first receive the authCode and keyEncrypt sent by the client. Use the client's public key to verify the authCode to confirm the integrity and reliability of the received data. If the verification is successful, the server's private key is used to decrypt keyEncrypt to obtain the symmetric key, and then the symmetric key is used to decrypt the business data. After the business processing is successful, it enters the server's authentication phase. Similarly, the server's business data (APP loading identifier serialNo, type serialType, sessionKey, login user name, Token, and sessionOutTime) is first encrypted with the server's temporarily generated symmetric key to form dataEncrypt; then the server's private key is used to sign dataEncrypt and timestamp to form authCode; finally, the client's public key is used to encrypt the temporarily generated symmetric key to form keyEncrypt. And send it to the client.

[0029] Similarly, after receiving the authCode and keyEncrypt sent by the server, the client will first use the server's public key to verify the authCode to confirm the integrity and reliability of the received data. If passed, it will use the client's private key to decrypt keyEncrypt to obtain the symmetric key, and then use the symmetric key to decrypt the business data from the server.

[0030] It should be added that if there is no verification or verification fails within the validity period, the sessionKeytoken needs to be refreshed for authentication.

[0031] like Figure 3The flowchart is a process of establishing a session based on an instant messaging message of a hardware cryptographic device. First, when the two parties establish a session window, they create a session handle, and form a session package with the registration codes of both parties, the unique code of the server account, the hardware SN number, and a random factor randomly generated in the sender's hardware, and then generate a derived factor S1, which is exchanged with the hardware cryptographic device to obtain the key for encrypting and decrypting instant messages and the session key for encrypting the session content.

[0032] The keys derived by the hardware cryptographic device are not the same. For local file encryption, the system will derive different keys according to the different file types. For messages, such as voice, SMS and other small text data (less than 32K, 32K by default, which can be customized by the user), the key management module derives the hardware encryption key, completes the encryption process in the hardware, and then forwards it; if it is a medium or large message text such as video or document, the hardware cryptographic device will also generate a software encryption key. In order to ensure the security of the software encryption key, it will be forwarded to the client after asymmetric encryption in the hardware cryptographic device, and the client will decrypt it to obtain the software encryption key. Then the hardware cryptographic device will perform hardware encryption on the key information in the file header.

[0033] For files, the format header is encrypted by default, and for videos, the key frame is encrypted by default. The remaining parts are generally encrypted by software, a combination of software and hardware encryption. The hardware cryptographic device integrates the encryption soft algorithm. At this time, software encryption and hardware encryption are both performed in the hardware cryptographic device to ensure the independence of the encryption space. In addition, software encryption and hardware encryption are mainly used for different scenarios. The main reason is that the key derivation method is inconsistent. Therefore, the ciphertexts obtained by the two are different, and they cannot be encrypted and decrypted with each other, ensuring the security of the message. After the encryption of the message is completed, the hardware cryptographic device will derive the window session key to re-encrypt the encrypted message, and then send the information after completion.

[0034] like Figure 4 The invention is a flowchart of an instant messaging message forwarding message based on a hardware password device. Assume that the user of the first client is user A, the user of the second client is user B, and the user of the third client is user C.

[0035] When user A is communicating with user B, if a message needs to be forwarded to user C, user B needs to exit the conversation window with user A and establish a conversation window with user C first.

[0036] Due to the change of users in the session window, the session package will change with the change of random numbers, the session IDs of both parties, the background unique code, etc., which will lead to different derived factors, and the keys used to encrypt files and encrypt window information will also change accordingly. Therefore, the ciphertext message in the session window between user A and user B cannot be decrypted by user C. Therefore, user B first needs to use his own session key to decrypt S2 sent by user A to obtain S1, and then use the file software and hardware decryption key to decrypt the message content. After completion, it is necessary to re-establish the session window with user C.

[0037] First, both parties create a session handle, and obtain the registration code of user C and user B, the hardware SN number, the unique code in the server account, and the newly generated random number of both parties to package, and generate a new derivative factor, interact with the hardware password device to obtain the hardware encryption key and the software encryption key. Similarly, for small files (less than 32K, the default is 32K, which can be customized by the user), pure hardware encryption is performed to protect security; for larger files (greater than or equal to 32K), the file format header or video key frame is encrypted by hardware by default, and the remaining bytes are freely combined with software and hardware encryption to obtain the ciphertext S3, and then S3 is encrypted with the session key to obtain S4, which is then forwarded by the server to user C.

[0038] Similarly, if user A forwards a message to user C, steps such as re-establishing the session window are also required.

[0039] like Figure 5 The figure shows a flowchart of logging in to an instant messaging message and sending a message based on a hardware password device. The specific process is:

[0040] First, after the user logs in, he will obtain the authorization code from the authorization module. If the authorization is successful, jwt will be returned. After receiving jwt, the user will connect to the access module in the form of jwttoken. At the same time, the authorization module will authenticate the connected user to see if he is the authorized user. If so, the authorization is successful and a message can be sent to the connection access module. The connection access module returns an ack confirmation character to the user, indicating that the data has been received.

[0041] The connection access module forwards the message to the routing module. The routing module transfers the data to the database module (DB module) according to whether it is persisted. If the persistence is successful, the message of successful persistence is returned to the routing module. The routing module will then search for the user's dispatch information (dispatch) online. After finding the dispatch information, it will forward the message sent by the sender to the user module.

[0042] like Figure 6 This is a flowchart of instant messaging messages that are automatically destroyed after reading based on hardware encryption devices. The specific process is:

[0043] User A of the first client can edit various types of message content, including videos, audios, pictures, documents, emoticons and other files, and assign a self-destructing time to different files according to the file types. The client then transmits various messages to the hardware password device, which encrypts the message content and returns it to the client. The client then packages the message recipient, the self-destructing suffix destruct and the message content, and forwards the message to the server.

[0044] After receiving the message, the server will search for user B of the second client and determine whether user B of the second client is online. If so, the server will directly forward the message to user B of the second client. If not, the server will send a push message to user B of the second client. User B of the second client will receive the offline message after logging in.

[0045] After receiving the message, user B of the second client will first check the message suffix to identify the self-destructing time after the message is viewed, and then the hardware cryptographic device will decrypt the message content. After viewing, user B of the second client will send the viewed event to user A of the first client and delete the message content after the countdown of the self-destructing time ends.

[0046] After receiving the message forwarded by user B of the second client, user A of the first client immediately deletes the source file of the message.

[0047] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An instant messaging message protection system based on hardware cryptographic equipment, characterized in that: The system comprises: a first client, a second client and a server, wherein the server is used for providing a channel for signature verification for two-way authentication between the client and the server, wherein the first client and the second client are each connected to a hardware cryptographic device for opening a private space, obtaining encryption keys and session keys, and encrypting and decrypting instant messaging messages; the hardware cryptographic device comprises a true random number generator, a key management module, a data storage module and an authentication module; wherein: the true random number generator is used to generate random numbers for forming dynamic factors in a session packet in an instant message; the key management module is used to generate various encryption keys, which are stimulated by the derived factors of the client, and the generated keys include: software encryption keys, hardware encryption keys and session keys; the data storage module is used to store various encrypted files and videos, and is used to provide a safe protection area; the authentication module is used to provide encryption information for two-way authentication between the client and the server, so as to ensure the security of the authentication information; the server comprises a forwarding server and an application background server, wherein the forwarding server is used for forwarding encrypted messages, and the background server is used for authenticating the identity of the client and the identity of the hardware cryptographic device bound to the client, so as to ensure the reliability of the inserted hardware cryptographic device; the instant messaging message protection system is used to implement an instant messaging message protection method; The instant messaging message protection method includes a client with a security chip that performs two-way authentication with a server. Specifically, the client and the server first exchange public keys with each other, and then each stores the other party's public key and its own private key in a hardware cryptographic device to ensure that the signature verification or encryption and decryption process is in a physically isolated environment. In this environment, the instant messaging message is protected, including the following steps: The client first encrypts the business data using the symmetric key temporarily generated by the system to form dataEncrypt; then uses the client's private key to sign dataEncrypt and timestamp to form authCode; finally, uses the server's public key to encrypt the temporarily generated symmetric key to form keyEncrypt, and sends it to the server; The server will first receive the authCode and keyEncrypt sent by the client, and use the client's public key to verify the signature of the authCode to confirm the integrity and reliability of the received data. If the verification is successful, the server's private key will be used to decrypt the keyEncrypt to obtain the symmetric key, and then the symmetric key will be used to decrypt the business data. After the business processing is successful, it will enter the server's authentication stage; The business data on the server side is encrypted with the symmetric key temporarily generated by the server to form dataEncrypt; then the dataEncrypt and timestamp are signed with the private key on the server to form authCode; finally, the temporarily generated symmetric key is encrypted with the public key of the client to form keyEncrypt, and sent to the client; Similarly, after receiving the authCode and keyEncrypt sent by the server, the client will first use the server's public key to verify the authCode to confirm the integrity and reliability of the received data. If passed, it will use the client's private key to decrypt keyEncrypt to obtain the symmetric key, and then use the symmetric key to decrypt the business data from the server.

2. The instant messaging protection system according to claim 1, characterized in that: When verifying the authCode, if it is not verified within the validity period or the verification fails, you need to refresh the sessionKey token for authentication.

3. The instant messaging protection system according to claim 1, characterized in that: The method also includes establishing a session through instant messaging, which is to establish a session between two clients, the steps comprising: When the session window of the first client is established, a session handle is created, a random factor is generated to form a session package, and then a first derived factor is generated, and the first derived factor is exchanged with the hardware cryptographic device to obtain a key for encrypting and decrypting instant messages and a session key for encrypting session content; The hardware cryptographic device performs hardware encryption on the file; After the encryption of the file is completed, the hardware cryptographic device derives a window session key, and re-encrypts the encrypted file using the window session key, and sends the information after the re-encryption is completed.

4. The instant messaging protection system according to claim 3, characterized in that: The keys derived from the hardware cryptographic device are processed separately according to the files: For local file encryption, the system will derive different keys based on the file type; For small text data, the key management module derives the hardware encryption key and completes the encryption process in the hardware before forwarding it; For medium and large message texts, the hardware cryptographic device will also generate a software encryption key. To ensure the security of the software encryption key, it will be forwarded to the client after asymmetric encryption is used in the hardware cryptographic device. The client will decrypt it and obtain the software encryption key.

5. The instant messaging protection system according to claim 4, characterized in that: Also included is a software-hardware combined encryption method, comprising the following steps: First, the format header of the file or the key frame of the video is encrypted, and the remaining parts are mainly encrypted by software. The encryption soft algorithm is integrated in the hardware cryptographic device. At this time, both software encryption and hardware encryption are performed in the hardware cryptographic device to ensure the independence of the encryption space.

6. The instant messaging protection system according to claim 3, characterized in that: Also included is a method for forwarding instant messaging messages, the steps of which include: if the first client or the second client needs to forward the message to the third client, the second client first needs to exit the session window with the first client and establish a session window with the third client; The second client uses its own session key to decrypt the second ciphertext sent by the first client to obtain the first ciphertext, and then uses the software and hardware decryption keys to decrypt the message content. After completion, it needs to re-establish a session window with the third client.

7. The instant messaging protection system according to claim 3, characterized in that: It also includes a method for deleting messages after reading them. The steps are as follows: When the first client edits the message content, a self-destructing time is assigned; The first client transmits the message to the hardware cryptographic device, which encrypts the message content and returns it to the first client. The first client assembles the message recipient, the self-destructing suffix destruct and the message content, and forwards the message to the server. After receiving the message, the server will search for the second client and determine whether the user of the second client is online. If online, the server will directly forward the message to the second client. If not online, the server will send a push message to the second client. The user of the second client will receive the offline message after logging in.

8. The instant messaging protection system according to claim 7, characterized in that: After receiving the message, the second client first checks the message suffix to identify the self-destructing time after the message is viewed, and then decrypts the message content by the hardware cryptographic device. After viewing the message, the second client sends the viewed event to the first client and deletes the message content after the countdown of the self-destructing time ends.

Citation Information

Patent Citations

  • Group key server based key management method in sharing encryption file system

    CN101159556A

  • Equipment and method for protecting session key of secure socket layer

    CN104702611A

  • Authentication method based on public key encryption system

    CN108400867A

  • Secret key negotiation method and device

    CN111030814A

  • Secure communication method and system based on software password module

    CN111614637A