A data security transmission system based on a bidirectional authentication mechanism

CN120074837BActive Publication Date: 2026-09-11EASTCOMPEACE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510226154.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2026-09-11
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

[0012]本发明提供一种基于双向鉴权机制的数据安全传输系统,通过公私钥对的使用和硬件加密机的保护,有效解决了现有技术中的密钥泄露风险、权限划分不明确以及缺乏身份验证机制等问题

Benefits of technology

[0037]1、提高数据安全性,有效防止密钥泄露:本发明通过采用多种算法,并为不同的持有方分配独立的密钥,确保了密钥的不共用性,从而极大地降低了因单一密钥泄露导致整个系统数据泄露的风险,有效缩小了密钥泄露的影响范围,提高了数据的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120074837B_ABST
    Figure CN120074837B_ABST
Patent Text Reader

Abstract

The application provides a data security transmission system based on a bidirectional authentication mechanism, comprising a data encryption and decryption module, which is used for transmitting information to a hardware encryption machine for encryption processing according to an encryption request and transmitting information to the hardware encryption machine for decryption processing according to a decryption request; a message digest module, which is used for processing encrypted ciphertext data; a signature verification module, which is used for encrypting a message digest by a sender using a private key of the sender to generate a digital signature and verifying the digital signature by a receiver using a public key of the sender; a session key generation module, which is used for transmitting information of the receiver to the hardware encryption machine according to a request of an issuing party, randomly generating a session key by the hardware encryption machine, and exporting the session key after encrypting the session key according to a public key of the receiver; and the hardware encryption machine. The application can effectively solve the problems of key leakage risk, unclear authority division and lack of identity verification mechanism in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and more specifically to a data security transmission system based on a two-way authentication mechanism. Background Technology

[0002] In the field of existing data encryption transmission, symmetric key encryption technology is a widely used encryption method. The core of this scheme lies in using the same symmetric key to encrypt and decrypt plaintext data. During the key negotiation phase, all parties involved synchronize this symmetric key to ensure that in subsequent data transmission, the sender can use this key to encrypt plaintext data, obtain ciphertext data, and transmit the ciphertext data to the receiver; while the receiver can use the pre-negotiated symmetric key to decrypt the received ciphertext data and restore the original plaintext data.

[0003] To enable key storage and retrieval, existing solutions typically offer two methods: software encryption and hardware encryption. Software encryption is flexible and convenient, but may face higher security risks; while hardware encryption provides higher security, ensuring the secure storage and use of keys at the physical level.

[0004] However, although symmetric key encryption technology meets the requirements for encrypted data transmission to a certain extent, it still has many shortcomings and problems in practical applications:

[0005] Risk of leakage due to multiple parties holding symmetric keys:

[0006] In symmetric-key encryption schemes, the key needs to be held by multiple relevant parties to perform data encryption and decryption operations. However, this multi-party holding method greatly increases the risk of key leakage. Once the key is inadvertently leaked, it becomes impossible to quickly locate the specific leaker, making it impossible to effectively trace and handle the leakage incident. Furthermore, key leakage directly and seriously threatens the security of encrypted data.

[0007] Unclear key access control:

[0008] Symmetric keys have dual functions of encryption and decryption, meaning that anyone holding the key can encrypt or decrypt data. This lack of clear authorization leads to excessive flexibility in key usage, but also introduces significant security risks. Once the key is compromised, attackers can use it to arbitrarily decrypt encrypted data, resulting in a complete data breach.

[0009] Lack of authentication mechanism:

[0010] Existing symmetric-key encryption schemes typically lack authentication mechanisms for the communicating parties. This means that during data transmission, it is impossible to effectively determine the true identities of the communicating parties, nor can it prevent attacks by imposters. Attackers may tamper with or steal encrypted data by forging identities or intercepting communication links, thereby seriously threatening the security and integrity of the data.

[0011] In summary, existing symmetric-key encryption schemes have numerous shortcomings and problems in key storage and usage security, key access control, and authentication. Therefore, a new encrypted transmission scheme is urgently needed to address these issues and improve the security and reliability of encrypted data transmission. Summary of the Invention

[0012] This invention provides a data security transmission system based on a two-way authentication mechanism. By using public-private key pairs and hardware encryption, it effectively solves the problems of key leakage risk, unclear permission division, and lack of authentication mechanism in the prior art.

[0013] The present invention achieves the above objectives through the following technical solutions:

[0014] A data security transmission system based on a two-way authentication mechanism includes:

[0015] The data encryption / decryption module is used to transmit plaintext data and information such as key ID and encryption parameters to the corresponding interface of the hardware encryption machine for encryption processing according to the encryption request, and to transmit ciphertext data and information such as key ID and encryption parameters to the corresponding interface of the hardware encryption machine for decryption processing according to the decryption request.

[0016] The message digest module is used to process the encrypted ciphertext data to generate a fixed-length message digest;

[0017] The signature verification module is used by the sender to encrypt the message digest using their private key to generate a digital signature, and by the receiver to verify the digital signature using the sender's public key to confirm the identity of the data sender.

[0018] The session key generation module is used to transmit information such as the recipient's public key ID and encryption parameters to the corresponding interface of the hardware encryption machine according to the request of the issuer. The hardware encryption machine randomly generates a session key and encrypts the session key according to the recipient's public key before exporting it.

[0019] The hardware encryption machine is used for storing and retrieving keys, and for performing data encryption / decryption, message digest generation, signature verification, and random key generation operations according to requests from the data encryption / decryption module, message digest module, signature verification module, and session key generation module.

[0020] In this process, the sender first generates a session key, then uses the session key to encrypt the plaintext data, calculates a digest of the resulting ciphertext data, and then signs the digest using the sender's private key. The receiver verifies the signature using the sender's public key, calculates the digest and compares the digests, then decrypts to obtain the session key, and then uses the session key to decrypt to obtain the plaintext data. This completes the two-way authentication between the sender and receiver, achieving secure data transmission.

[0021] According to the data security transmission system based on a two-way authentication mechanism provided by the present invention, the following steps are performed to complete the key negotiation process before activating the data security transmission system:

[0022] Use a proprietary hardware encryption device to generate a dedicated public-private key pair. The private key is securely stored by the user, while the public key is used for subsequent key negotiation and encrypted data transmission.

[0023] Export the generated public key and provide it to the other user so that the other user can import it into their own encryption machine;

[0024] At the same time, receive the public key provided by the other party and import it into your own encryption machine to establish the basis for key negotiation between the two parties;

[0025] When data transmission involves multiple parties, it is necessary to collect the public keys of all relevant parties and import them into the self-use encryption machine at once to ensure that the key negotiation process can be completed with all relevant parties, thereby achieving secure data transmission between multiple parties;

[0026] After the key negotiation process is completed, the data is encrypted using the negotiated key or a session key generated based on that key to ensure the security of the data during transmission.

[0027] According to the data security transmission system based on a two-way authentication mechanism provided by the present invention, the encryption process for sending specified data from sender A to receiver B includes:

[0028] Sender A imports plaintext data into the secure data transmission system and designates receiver B as the receiver. The secure data transmission system initiates a session key generation request, which includes receiver B's key ID. The system calls the hardware encryption machine's random key generation interface to generate a session key. The hardware encryption machine encrypts the session key according to receiver B's key ID, forming the encrypted session key-packet 1. The generation and encryption processes of the session key are completed independently by the hardware encryption machine to ensure the security and randomness of the session key.

[0029] According to the present invention, a data security transmission system based on a two-way authentication mechanism is provided. The data security transmission system initiates a data encryption request, which includes plaintext data and a session key ID; the system calls the data encryption interface of the hardware encryption machine; the hardware encryption machine encrypts the plaintext data according to the session key ID to obtain ciphertext data; the hardware encryption machine returns ciphertext data - packet 2 to the data security transmission system; wherein, the data encryption process is performed by the hardware encryption machine to ensure that the generation of ciphertext data conforms to a predetermined encryption standard.

[0030] According to the present invention, a data security transmission system based on a two-way authentication mechanism is provided. The data security transmission system initiates a message digest request, which includes packet 2 and algorithm parameters; the system calls the message digest interface of the hardware encryption machine; the hardware encryption machine calculates the message digest based on the ciphertext data; the hardware encryption machine returns the message digest to the data security transmission system; wherein, the calculation process of the message digest is completed by the hardware encryption machine to ensure the accuracy and immutability of the message digest.

[0031] According to the present invention, a data security transmission system based on a two-way authentication mechanism is provided. The data security transmission system initiates a digital signature request, which includes a message digest and a private key ID of sender A. The system calls the digital signature interface of the hardware encryption machine. The hardware encryption machine digitally signs the message digest to generate a digital signature packet 3. The hardware encryption machine returns the digital signature to the data security transmission system. The generation process of the digital signature is executed by the hardware encryption machine to ensure the validity of the digital signature and the authenticity of the sender's identity. Finally, the data security transmission system outputs a complete encrypted data packet to sender A, which includes an encrypted session key packet 1, a ciphertext data packet 2, and a digital signature packet 3.

[0032] According to the present invention, a data security transmission system based on a two-way authentication mechanism includes the following steps in the decryption process when receiver B receives packets 1, 2, and 3 from sender A: After receiving packets 1, 2, and 3, the data security transmission system initiates a signature verification request containing packet 3 and sender A's key ID; the system calls the signature verification interface of the hardware encryption machine; the hardware encryption machine uses sender A's key ID to verify packet 3 and returns the verification result; the data security transmission system analyzes the verification result, and if the verification fails, it determines that the data was not sent by sender A and terminates the decryption process.

[0033] According to the present invention, a data security transmission system based on a two-way authentication mechanism initiates a digest comparison request containing packets 2 and 3 after the signature verification is passed; the system calls the digest comparison interface of the hardware encryption machine; the hardware encryption machine uses a digest algorithm to calculate the message digest of packet 2 and compares it with the message digest in packet 3, and returns the comparison result; the data security transmission system analyzes the comparison result, and if the comparison is inconsistent, it determines that the data is incomplete or has been tampered with, and terminates the decryption process.

[0034] According to the present invention, a data security transmission system based on a two-way authentication mechanism, after the digest comparison is consistent, the data security transmission system initiates a decryption request containing packet 1 and the private key ID of receiver B; the system calls the decryption interface of the hardware encryption machine; the hardware encryption machine uses the private key of receiver B's private key to decrypt packet 1, obtains the session key of the plaintext, stores it in the encryption machine, and outputs the session key ID; the hardware encryption machine returns the decryption result; the data security transmission system analyzes the decryption result, and if the decryption fails, it determines that the data receiver is not B and terminates the decryption process.

[0035] According to the present invention, a data security transmission system based on a two-way authentication mechanism is provided. After successful decryption of the session key, the data security transmission system initiates a decryption request containing packet 2 and the session key ID; the system calls the decryption interface of the hardware encryption machine; the hardware encryption machine uses the session key to decrypt packet 2, obtains plaintext data, and returns the decryption result; the data security transmission system analyzes the decryption result, and if decryption fails, it determines that the session key is abnormal and terminates the decryption process; if decryption is successful, the data security transmission system outputs plaintext data to the receiver B.

[0036] Therefore, compared with the prior art, the present invention has the following beneficial effects:

[0037] 1. Improve data security and effectively prevent key leakage: This invention employs multiple algorithms and assigns independent keys to different holders, ensuring key non-shareability. This greatly reduces the risk of data leakage of the entire system due to the leakage of a single key, effectively narrowing the scope of key leakage and improving data security.

[0038] 2. Achieve two-way authentication to effectively resist spoofing attacks: During data transmission, this invention utilizes public and private key pairs for two-way authentication. The sender uses its private key to sign, and the receiver uses its public key to encrypt, ensuring the sender's identity is authentic and reliable. Simultaneously, the receiver uses its private key to decrypt, and the sender uses its public key to verify the signature, confirming the receiver's identity. This two-way authentication mechanism effectively detects attacks or interception attempts by spoofers, guaranteeing the authenticity of the identities of both parties in data transmission.

[0039] 3. Enhanced Unbreakability of Single Data Transmissions: Before each data transmission, this invention utilizes a hardware encryption machine to randomly generate a session key. This dynamic generation of session keys improves the unbreakability of single data transmissions. Simultaneously, the session key is encrypted and derived from the receiver's public key, making it invisible to the system and further ensuring its security.

[0040] 4. Ensuring the security of keys and data processing: This invention employs a hardware encryption machine to generate, store, and retrieve keys, ensuring that the private key never leaves the encryption machine and that the key is invisible to the system, thus greatly enhancing key security. Simultaneously, the encryption machine is also responsible for data encryption and decryption, session key generation, signature verification, and other operations. These operations are all performed internally within the encryption machine in a black-box manner, effectively avoiding risks related to system data and key processing and ensuring data security.

[0041] In summary, this invention effectively improves data security, prevents key leakage and spoofing attacks, enhances the unbreakability of single data transmission, and ensures the security of key and data processing processes by employing multiple algorithms, two-way authentication mechanisms, dynamically generated session keys, and hardware encryption machines.

[0042] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of an embodiment of a data security transmission system based on a two-way authentication mechanism according to the present invention.

[0044] Figure 2 This is a schematic diagram of the sender encryption process implemented in an embodiment of a data security transmission system based on a two-way authentication mechanism according to the present invention.

[0045] Figure 3 This is a schematic diagram of the receiver decryption process implemented in an embodiment of a data security transmission system based on a two-way authentication mechanism according to the present invention. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0047] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0048] See Figure 1 This embodiment provides a data security transmission system based on a two-way authentication mechanism, including:

[0049] The data encryption / decryption module is used to transmit plaintext data, key ID, encryption parameters, and other information to the corresponding interface of the hardware encryption machine for encryption processing according to the encryption request, and to transmit ciphertext data, key ID, encryption parameters, and other information to the corresponding interface of the hardware encryption machine for decryption processing according to the decryption request, with the hardware encryption machine outputting plaintext data. The data encryption / decryption module is compatible with DES, AES, and SM4 algorithms.

[0050] The message digest module processes encrypted ciphertext data to generate a fixed-length message digest. The data is encrypted before transmission. To ensure data integrity and non-repudiation, an adaptation algorithm is used to process the ciphertext data, generating a fixed-length message digest. The message digest is irreversible; its value will change if the data is altered or incomplete. The message digest module is compatible with MD5, SHA1, and SM3 algorithms.

[0051] The signature verification module is used by the sender to encrypt the message digest using their private key to generate a digital signature, and by the receiver to verify the digital signature using the sender's public key, to confirm the sender's identity. For example, sender A encrypts the message digest using their private key to generate A's digital signature; receiver B receives data claiming to be from A, and first verifies A's digital signature using A's public key. If the verification passes, the data is confirmed to have been transmitted by A. This signature verification module is compatible with RSA and SM2 algorithms.

[0052] The session key generation module is used to transmit information such as the recipient's public key ID and encryption parameters to the corresponding interface of the hardware encryption machine according to the request of the issuer. The hardware encryption machine randomly generates a session key, encrypts the session key according to the recipient's public key, and then exports it.

[0053] The hardware encryption machine is used for storing and retrieving keys, ensuring that the keys do not leave the encryption machine. All data processing is a black box process, which greatly guarantees the security of data and keys. It also performs data encryption and decryption, message digest generation, signature verification, and random key generation operations according to the requests of the data encryption and decryption module, message digest module, signature verification module, and session key generation module.

[0054] In this data transmission process, the sender first generates a session key, then uses it to encrypt the plaintext data, calculates a digest of the resulting ciphertext data, and signs the digest using the sender's private key. The receiver verifies the signature using the sender's public key, calculates the digest, compares the digests, and then decrypts to obtain the session key. The receiver then uses the session key to decrypt the plaintext data, thus completing two-way authentication between the sender and receiver and achieving secure data transmission. This approach offers two advantages: first, the session key is symmetric, ensuring fast encryption and decryption speeds (asymmetric keys are slower for encryption and decryption); second, using an asymmetric key to encrypt the session key guarantees both security and fast encryption / decryption speeds.

[0055] In this embodiment, to be compatible with DES, AES, and SM4 algorithms, the data encryption / decryption module needs to support the following functions:

[0056] Key Management

[0057] Key generation: capable of generating keys that meet the algorithm requirements; Key storage: securely storing and managing keys; Key distribution: securely distributing keys during encryption and decryption.

[0058] Algorithm selection

[0059] Algorithm configuration: Allows users or the system to configure which encryption algorithm (DES, AES, SM4) to use; Algorithm switching: Allows switching between different algorithms as needed during encryption and decryption.

[0060] Data encryption and decryption

[0061] Data segmentation: Divide the data into blocks of fixed length according to the algorithm requirements; Encryption operation: Call the corresponding encryption algorithm to encrypt the segmented data; Decryption operation: Call the corresponding decryption algorithm to decrypt the ciphertext; Padding mode: For data that is not an integer multiple of the block length, select an appropriate padding mode (such as PKCS5Padding, PKCS7Padding, ZeroPadding, etc.).

[0062] Encryption mode

[0063] ECB mode: Electronic ciphertext mode, each data block is encrypted independently, suitable for encrypting small amounts of data; CBC mode: Ciphertext block chaining mode, each data block is XORed with the previous ciphertext block before encryption, suitable for encrypting large amounts of data; Other modes: as needed, CFB, OFB, CTR and other encryption modes can also be supported.

[0064] In this embodiment, to adapt to the MD5, SHA-1, and SM3 algorithms, the message digest module needs to support the following functions:

[0065] Algorithm selection

[0066] Algorithm configuration: Allows users or the system to configure which hash algorithm (MD5, SHA-1, SM3) to use; Algorithm switching: Allows switching between different algorithms as needed during message digest generation.

[0067] Message processing

[0068] Message Input: Receives input messages of arbitrary length; Message Filling: Fills the input messages according to the algorithm requirements to meet the algorithm's processing requirements; Grouping Processing: Divides the filled messages into fixed-length groups and processes them iteratively.

[0069] Hash value generation

[0070] Initialize hash value: Initialize a specific hash value for each algorithm; Iterative calculation: Perform iterative calculation on each group and update the hash value; Output hash value: After the calculation is complete, output a hash value of fixed length.

[0071] Hash value output format

[0072] Hexadecimal representation: Converts hash values ​​into hexadecimal strings for easier reading and storage; Other formats: Supports other output formats as needed, such as Base64 encoding.

[0073] In this embodiment, to adapt to both the RSA and SM2 algorithms, the signature verification module needs to support the following functions:

[0074] Algorithm selection

[0075] Algorithm configuration: Allows users or the system to configure which signature verification algorithm (RSA, SM2) to use; Algorithm switching: Allows switching between different algorithms as needed during the signature verification process.

[0076] Key Management

[0077] Key generation: Provides the function of generating RSA key pairs and SM2 key pairs; Key storage: Supports the secure storage of keys on local or remote servers; Key loading: Supports loading keys from local or remote servers for signature verification operations.

[0078] Signature verification process

[0079] Message Digest: Calculates a digest of the original message, typically using the SHA-256 or SM3 algorithm; Signature: Signs the message digest using the private key; RSA Signature: Encrypts the message digest using the private key; SM2 Signature: Signs the message digest using the elliptic curve signature algorithm; Verification: Verifies the signature using the public key; RSA Verification: Decrypts the signature using the public key and compares it with the calculated message digest; SM2 Verification: Verifies the signature using the public key to ensure the authenticity and integrity of the message.

[0080] Output format

[0081] Signature format: Convert the signature result into a hexadecimal string or a Base64 encoded string for easy storage and transmission; Verification result: Output the verification result, usually a boolean value, indicating whether the signature is valid.

[0082] Before activating the secure data transmission system, perform the following steps to complete the key negotiation process:

[0083] Use a proprietary hardware encryption device to generate a dedicated public-private key pair. The private key is securely stored by the user, while the public key is used for subsequent key negotiation and encrypted data transmission.

[0084] Export the generated public key and provide it to the other user so that the other user can import it into their own encryption machine;

[0085] At the same time, receive the public key provided by the other party and import it into your own encryption machine to establish the basis for key negotiation between the two parties;

[0086] When data transmission involves multiple parties, it is necessary to collect the public keys of all relevant parties and import them into the in-house encryption machine all at once. This ensures that the key negotiation process can be completed with all relevant parties, thereby achieving secure data transmission between multiple parties. After the key negotiation process is completed, the data is encrypted using the negotiated key or a session key generated based on that key to ensure data security during transmission.

[0087] The hardware encryption machine is used to generate and store public and private key pairs, as well as to perform data encryption and decryption operations; the export and import process of the public key must follow a predetermined security protocol to ensure the authenticity and integrity of the public key; the key negotiation process aims to ensure that two or more parties can share a secure key for subsequent encrypted data transmission.

[0088] Therefore, users of the secure data transmission system must be equipped with an encryption device. Before activating the system, they must use their own hardware encryption device to generate a dedicated public-private key pair, export the public key and provide it to the other party, and then import the other party's public key into their own encryption device to complete the key negotiation process. When data transmission involves multiple parties, the public keys of all parties can be collected and imported into the encryption device at once.

[0089] In this embodiment, the encryption process for sending specified data from sender A to receiver B includes:

[0090] Sender A imports plaintext data into the secure data transmission system and designates receiver B as the receiver. The secure data transmission system initiates a session key generation request, which includes receiver B's key ID. The system calls the hardware encryption machine's random key generation interface to generate a session key. The hardware encryption machine encrypts the session key according to receiver B's key ID, forming the encrypted session key-packet 1. The generation and encryption processes of the session key are completed independently by the hardware encryption machine to ensure the security and randomness of the session key.

[0091] The data secure transmission system initiates a data encryption request, which includes plaintext data and a session key ID; the system calls the data encryption interface of the hardware encryption machine; the hardware encryption machine encrypts the plaintext data according to the session key ID to obtain ciphertext data; the hardware encryption machine returns ciphertext data - packet 2 to the data secure transmission system; the data encryption process is performed by the hardware encryption machine to ensure that the generation of ciphertext data conforms to the predetermined encryption standard.

[0092] The data secure transmission system initiates a message digest request, which includes packet 2 and algorithm parameters; the system calls the message digest interface of the hardware encryption machine; the hardware encryption machine calculates the message digest based on the ciphertext data; the hardware encryption machine returns the message digest to the data secure transmission system; the calculation process of the message digest is completed by the hardware encryption machine to ensure the accuracy and immutability of the message digest.

[0093] The secure data transmission system initiates a digital signature request, which includes a message digest and sender A's private key ID. The system calls the digital signature interface of the hardware encryption machine. The hardware encryption machine digitally signs the message digest, generating digital signature packet 3. The hardware encryption machine returns the digital signature to the secure data transmission system. The generation process of the digital signature is executed by the hardware encryption machine to ensure the validity of the digital signature and the authenticity of the sender's identity. Finally, the secure data transmission system outputs a complete encrypted data packet to sender A, containing the encrypted session key packet 1, the ciphertext data packet 2, and the digital signature packet 3.

[0094] Specifically, such as Figure 2 As shown, the sender encryption process in this embodiment includes the following steps:

[0095] 1. Sender A needs to send specified data to receiver B. Sender A imports the plaintext data into the data secure transmission system, designates B as the receiver, and initiates data encryption.

[0096] 2. The data security transmission system initiates a session key generation request, which includes the key ID of the receiver B. At this time, the receiver is specified as B.

[0097] 3. The data security transmission system initiates a request by calling the random key generation interface of the hardware encryption machine;

[0098] 4. The hardware encryption device randomly generates the session key;

[0099] 5. The hardware encryption device encrypts the session key based on the key ID of receiver B;

[0100] 6. The hardware encryption device returns the encrypted session key - packet 1 to the data security transmission system;

[0101] 7. The data security transmission system initiates a data encryption request, which includes plaintext data and session key ID;

[0102] 8. The data security transmission system initiates a request by calling the data encryption interface of the hardware encryption machine;

[0103] 9. The hardware encryption device encrypts the plaintext data based on the session key ID to obtain the ciphertext data;

[0104] 10. The hardware encryption device returns encrypted data - packet 2 to the data security transmission system;

[0105] 11. The data security transmission system initiates a message digest request, which includes packet 2 and algorithm parameters;

[0106] 12. The data security transmission system initiates a request by calling the message digest interface of the hardware encryption machine;

[0107] 13. The hardware encryption machine calculates the message digest based on the ciphertext data;

[0108] 14. The hardware encryption device returns a message digest to the data security transmission system;

[0109] 15. The data security transmission system initiates a digital signature request, which includes a message digest and A's private key ID. At this time, the sender is specified as A.

[0110] 16. The data security transmission system initiates a request by calling the digital signature interface of the hardware encryption machine;

[0111] 17. The hardware encryption device digitally signs the message digest;

[0112] 18. The hardware encryption device returns a digital signature - packet 3 to the data security transmission system;

[0113] 19. The data security transmission system outputs packet 1, packet 2, and packet 3 to sender A.

[0114] In this embodiment, the decryption process of receiver B receiving packets 1, 2, and 3 from sender A includes: after receiving packets 1, 2, and 3, the data secure transmission system initiates a signature verification request containing packet 3 and sender A's key ID; the system calls the signature verification interface of the hardware encryption machine; the hardware encryption machine uses sender A's key ID to verify packet 3 and returns the verification result; the data secure transmission system analyzes the verification result, and if the verification fails, it determines that the data was not sent by sender A and terminates the decryption process.

[0115] After the signature verification is successful, the data security transmission system initiates a digest comparison request containing packets 2 and 3; the system calls the digest comparison interface of the hardware encryption machine; the hardware encryption machine uses a digest algorithm to calculate the message digest of packet 2 and compares it with the message digest in packet 3, and returns the comparison result; the data security transmission system analyzes the comparison result, and if the comparison is inconsistent, it determines that the data is incomplete or has been tampered with, and terminates the decryption process.

[0116] After the digest comparison matches, the secure data transmission system initiates a decryption request containing packet 1 and the receiver B's private key ID; the system calls the decryption interface of the hardware encryption machine; the hardware encryption machine uses the private key of the receiver B's private key to decrypt packet 1, obtains the plaintext session key, stores it in the encryption machine, and outputs the session key ID; the hardware encryption machine returns the decryption result; the secure data transmission system analyzes the decryption result, and if decryption fails, it determines that the data receiver is not B and terminates the decryption process.

[0117] After the session key is successfully decrypted, the secure data transmission system initiates a decryption request containing packet 2 and the session key ID; the system calls the decryption interface of the hardware encryption machine; the hardware encryption machine uses the session key to decrypt packet 2, obtains the plaintext data, and returns the decryption result; the secure data transmission system analyzes the decryption result, and if the decryption fails, it determines that the session key is abnormal and terminates the decryption process; if the decryption is successful, the secure data transmission system outputs the plaintext data to the receiver B.

[0118] Specifically, such as Figure 3 As shown, the receiver's decryption process includes the following steps:

[0119] 1. Receiver B receives packets 1, 2, and 3 from sender A. Receiver B imports packets 1, 2, and 3 into the secure data transmission system, designates sender A as the sender, and initiates data decryption.

[0120] 2. The data security transmission system initiates a signature verification request, which includes packet 3 and the key ID of sender A;

[0121] 3. The data security transmission system initiates a request by calling the signature verification interface of the hardware encryption machine;

[0122] 4. The hardware encryption device uses the sender A's key ID to verify the signature of packet 3;

[0123] 5. The hardware encryption device returns the signature verification result to the data security transmission system;

[0124] 6. The data security transmission system analyzes the signature verification result. If the signature verification fails, it is considered that the data was not sent by sender A, and the process ends; if the signature verification passes, proceed to the next step.

[0125] 7. The data security transmission system initiates a digest comparison request, which includes packets 2 and 3;

[0126] 8. The data security transmission system initiates a request by calling the digest comparison interface of the hardware encryption machine;

[0127] 9. The hardware encryption machine uses a digest algorithm to calculate the message digest of packet 2;

[0128] 10. The hardware encryption machine compares the message digest of packet 2 with the message digest of packet 3;

[0129] 11. The hardware encryption device returns the digest comparison result to the data security transmission system;

[0130] 12. The data security transmission system analyzes and compares the summary results. If the comparison is inconsistent, the data is considered incomplete or tampered with, and the process ends; if the comparison is consistent, proceed to the next step.

[0131] 13. The data security transmission system initiates a decryption request, which includes packet 1 and B's private key ID;

[0132] 14. The data security transmission system initiates a request by calling the decryption interface of the hardware encryption machine;

[0133] 15. The hardware encryption machine uses the private key of B's ​​self-used key to decrypt packet 1 to obtain the session key of the plaintext;

[0134] 16. The hardware encryption device stores the plaintext session key in the encryption device and outputs the session key ID;

[0135] 17. The hardware encryption device returns the decryption result to the data security transmission system;

[0136] 18. The data security transmission system analyzes the decryption results. If decryption fails, it is assumed that the recipient of the data is not B, and the process ends; if decryption is successful, proceed to the next step.

[0137] 19. The data security transmission system initiates a decryption request, which includes packet 2 and the session key ID;

[0138] 20. The data security transmission system initiates a request by calling the decryption interface of the hardware encryption machine;

[0139] 21. The hardware encryption device uses the session key to decrypt packet 2 to obtain the plaintext data;

[0140] 22. The hardware encryption device returns the decryption result to the data security transmission system;

[0141] 23. The data security transmission system analyzes the decryption results. If decryption fails, it is considered that the session key of the data is abnormal, and the process ends; if decryption is successful, proceed to the next step.

[0142] 24. The data security transmission system outputs plaintext data to receiver B, and the process ends.

[0143] In summary, this embodiment effectively improves data security, prevents key leakage and spoofing attacks, enhances the unbreakability of single data transmission, and ensures the security of key and data processing processes by employing multiple algorithms, two-way authentication mechanisms, dynamically generated session keys, and hardware encryption machines.

[0144] Furthermore, this embodiment employs multiple algorithms and assigns independent keys to different holders, ensuring key non-shareability. This significantly reduces the risk of data leakage across the entire system due to the leakage of a single key, effectively narrowing the scope of key leakage and improving data security.

[0145] Furthermore, during data transmission, this embodiment utilizes public and private key pairs for two-way authentication. The sender uses their private key to sign, and the receiver uses their public key to encrypt, ensuring the sender's identity is authentic and reliable. Simultaneously, the receiver uses their private key to decrypt, and the sender uses their public key to verify the signature, confirming the receiver's identity. This two-way authentication mechanism effectively detects attacks or interceptions by imposters, guaranteeing the authenticity of the identities of both parties in data transmission.

[0146] Furthermore, in this embodiment, a session key is randomly generated using a hardware encryption machine before each data transmission. This dynamic generation of session keys improves the unbreakability of a single data transmission. Simultaneously, the session key is encrypted and derived from the receiver's public key, making it invisible to the system and further ensuring its security.

[0147] Furthermore, this embodiment employs a hardware encryption machine to generate, store, and retrieve the key, ensuring that the private key never leaves the encryption machine and that the key remains invisible to the system, thus greatly enhancing key security. Simultaneously, the encryption machine is also responsible for data encryption / decryption, session key generation, and signature verification. These operations are all performed internally within the encryption machine in a black-box manner, effectively avoiding risks related to system data processing and keys, and ensuring data security.

[0148] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0149] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.

Claims

1. A data security transmission system based on a two-way authentication mechanism, characterized in that, include: The data encryption / decryption module is used to transmit information to the corresponding interface of the hardware encryption machine for encryption processing according to the encryption request, and to transmit information to the corresponding interface of the hardware encryption machine for decryption processing according to the decryption request. The message digest module is used to process the encrypted ciphertext data to generate a fixed-length message digest; The signature verification module is used by the sender to encrypt the message digest using their private key to generate a digital signature, and by the receiver to verify the digital signature using the sender's public key to confirm the identity of the data sender. The session key generation module is used to transmit the recipient's information to the corresponding interface of the hardware encryption machine according to the request of the issuer. The hardware encryption machine randomly generates a session key and encrypts the session key according to the recipient's public key before exporting it. The hardware encryption machine is used for storing and retrieving keys, and for performing data encryption / decryption, message digest generation, signature verification, and random key generation operations according to requests from the data encryption / decryption module, message digest module, signature verification module, and session key generation module. In the data transmission process, the sender first needs to generate a session key, then use the session key to encrypt the plaintext data, calculate the digest of the obtained ciphertext data, and then sign the digest using the sender's private key; the receiver uses the sender's public key to verify the signature, then calculates the digest and compares the digests, then decrypts to obtain the session key, and then uses the session key to decrypt to obtain the plaintext data, thereby completing the two-way authentication between the sender and the receiver and realizing secure data transmission. Before activating the secure data transmission system, perform the following steps to complete the key negotiation process: Use a proprietary hardware encryption device to generate a dedicated public-private key pair. The private key is securely stored by the user, while the public key is used for subsequent key negotiation and encrypted data transmission. Export the generated public key and provide it to the other user so that the other user can import it into their own encryption machine; At the same time, receive the public key provided by the other party and import it into your own encryption machine to establish the basis for key negotiation between the two parties; When data transmission involves multiple parties, it is necessary to collect the public keys of all relevant parties and import them into the self-use encryption machine at once to ensure that the key negotiation process can be completed with all relevant parties, thereby achieving secure data transmission between multiple parties; After the key negotiation process is completed, the data is encrypted using the negotiated key or a session key generated based on the key to ensure the security of the data during transmission. The encryption process for sending specified data from sender A to receiver B includes: Sender A imports plaintext data into the secure data transmission system and designates receiver B as the receiver; the secure data transmission system initiates a session key generation request, which includes receiver B's key ID; the system calls the hardware encryption machine's random key generation interface to generate a session key; the hardware encryption machine encrypts the session key according to receiver B's key ID, forming the encrypted session key-packet 1; wherein, the generation and encryption process of the session key is completed independently by the hardware encryption machine to ensure the security and randomness of the session key; The data secure transmission system initiates a data encryption request, which includes plaintext data and a session key ID; the system calls the data encryption interface of the hardware encryption machine; the hardware encryption machine encrypts the plaintext data according to the session key ID to obtain ciphertext data; the hardware encryption machine returns ciphertext data - packet 2 to the data secure transmission system; the data encryption process is performed by the hardware encryption machine to ensure that the generation of ciphertext data conforms to the predetermined encryption standard.

2. The system according to claim 1, characterized in that: The data secure transmission system initiates a message digest request, which includes packet 2 and algorithm parameters; the system calls the message digest interface of the hardware encryption machine; the hardware encryption machine calculates the message digest based on the ciphertext data; the hardware encryption machine returns the message digest to the data secure transmission system; the calculation process of the message digest is completed by the hardware encryption machine to ensure the accuracy and immutability of the message digest.

3. The system according to claim 2, characterized in that: The secure data transmission system initiates a digital signature request, which includes a message digest and sender A's private key ID. The system calls the digital signature interface of the hardware encryption machine. The hardware encryption machine digitally signs the message digest, generating digital signature packet 3. The hardware encryption machine returns the digital signature to the secure data transmission system. The generation process of the digital signature is executed by the hardware encryption machine to ensure the validity of the digital signature and the authenticity of the sender's identity. Finally, the secure data transmission system outputs a complete encrypted data packet to sender A, containing the encrypted session key packet 1, the ciphertext data packet 2, and the digital signature packet 3.

4. The system according to claim 3, characterized in that: The decryption process of packets 1, 2, and 3 received by receiver B from sender A includes the following steps: The process also includes a signature verification step: After receiving packets 1, 2, and 3, the data security transmission system initiates a signature verification request containing packet 3 and the sender A's key ID; the system calls the signature verification interface of the hardware encryption machine; the hardware encryption machine uses the sender A's key ID to verify packet 3 and returns the signature verification result; the data security transmission system analyzes the signature verification result, and if the signature verification fails, it determines that the data was not sent by sender A and terminates the decryption process.

5. The system according to claim 4, characterized in that: After the signature verification is successful, the data security transmission system initiates a digest comparison request containing packets 2 and 3; the system calls the digest comparison interface of the hardware encryption machine; the hardware encryption machine uses a digest algorithm to calculate the message digest of packet 2 and compares it with the message digest in packet 3, and returns the comparison result; the data security transmission system analyzes the comparison result, and if the comparison is inconsistent, it determines that the data is incomplete or has been tampered with, and terminates the decryption process.

6. The system according to claim 5, characterized in that: After the digests match, the data security transmission system initiates a decryption request containing packet 1 and the receiver B's private key ID; the system calls the decryption interface of the hardware encryption machine; the hardware encryption machine uses the private key of the receiver B's private key to decrypt packet 1, obtains the plaintext session key, stores it in the encryption machine, and outputs the session key ID; the hardware encryption machine returns the decryption result. The data security transmission system analyzes the decryption results. If decryption fails, it determines that the data recipient is not B and terminates the decryption process.

7. The system according to claim 6, characterized in that: After the session key is successfully decrypted, the data security transmission system initiates a decryption request containing packet 2 and the session key ID; the system calls the decryption interface of the hardware encryption machine; the hardware encryption machine uses the session key to decrypt packet 2, obtains the plaintext data, and returns the decryption result; The data security transmission system analyzes the decryption results. If decryption fails, it determines that the session key is abnormal and terminates the decryption process. If decryption is successful, the secure data transmission system outputs plaintext data to receiver B.

Citation Information

Patent Citations

  • Data link trusted transmission method and system

    CN114826656A

  • Bidirectional identity authentication and encryption communication method based on HART-IP protocol

    CN119402199A