Data encryption transmission method and system
Through the terminal transmitting encryption capabilities to the server and dynamically matching encryption algorithms and keys, the problems of low data encryption transmission efficiency and poor adaptability in the prior art are solved, and efficient and secure data transmission is achieved.
Patent Information
- Application Number
- CN202410432439.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2024-11-29
AI Technical Summary
The existing data encryption transmission methods are inefficient and cannot be adapted to more types of terminals, resulting in low encryption efficiency and insufficient security.
The terminal applies for an encryption key to the server and transmits its own encryption capabilities. The server determines the appropriate encryption algorithm and key based on the encryption capabilities, and performs dynamic matching and verification to ensure the security and efficiency of data transmission.
It improves the efficiency and security of data encryption transmission, adapts to more types of terminals, reduces the risks of terminal identity forgery and illegal access, and enhances the reliability and stability of communication.
Smart Images

Figure CN119051878A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and more specifically, to a method and system for data encryption transmission. Background Art
[0002] For example, in the patent with application number 201710067971.1, the server generates a public key and a private key corresponding to the public key, and makes the public key public so that the client can obtain it; the client generates an encryption key through the initialization key, and the encryption key encrypts the plaintext data to be sent to form encrypted data; the client encrypts the encrypted data through the obtained public key to form an encrypted message, and sends it to the server; the server decrypts the encrypted message through the private key to obtain the encrypted data; the server generates a decryption key corresponding to the encryption key through the initialization key, and the decryption key decrypts the encrypted data to obtain the plaintext data. This method encrypts the data transmitted by the data through symmetrical encryption, and then uses an asymmetric method to encrypt the encrypted data again. This method requires the data to be encrypted twice, and also needs to be decrypted twice when decrypting. Although security is guaranteed, it also affects the encryption efficiency. Although asymmetric encryption can provide stronger security, its computational complexity is also higher. This may cause the encryption and decryption process to slow down, thereby affecting the user experience.
[0003] For example, the patent with application number 202110348957.5 relates to a secure transmission method and system based on the SM2 key negotiation mechanism. The method includes: the IoT terminal and the IoT server negotiate a session key; the IoT terminal generates business reporting data, encrypts the data, and reports the encrypted business reporting data ciphertext to the IoT server, the IoT server decrypts the reporting data ciphertext, and performs business processing; after the IoT server performs business processing, it generates business delivery data, encrypts the data, and sends the encrypted business delivery data ciphertext to the IoT terminal, the IoT terminal decrypts the business delivery data ciphertext to obtain the business delivery data plaintext. Although the patent has a negotiation process with the server and the terminal, it does not perform personalized key negotiation for different types of terminals, so that the encryption method adopted by the server cannot be adapted to more types of terminals.
[0004] Therefore, the existing methods have problems such as low encryption efficiency and inability to adapt to more types of terminals. It is necessary to find new methods to solve these problems. Summary of the invention
[0005] The present invention provides a method and system for data encryption transmission, which improves the encryption efficiency of data and makes the encryption method suitable for more types of terminals.
[0006] In a first aspect, the present invention provides a method for encrypting and transmitting data, the method comprising: The terminal applies for an encryption key from the server and transmits the terminal's own encryption capabilities to the server; The server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The server transmits the encryption algorithm and the encryption key to the terminal; The terminal and the server use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
[0007] In a second aspect, the present invention further provides a method for encrypted data transmission, the method comprising: Multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals; Each terminal stores and maintains the server public keys received from different servers locally; The first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal itself to the first server; The first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The first server transmits the encryption algorithm and the first encryption key to the first terminal; The first terminal verifies, based on a server public key of the first server, whether the received data comes from the first server; If the data comes from the first server, the first terminal and the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
[0008] In a third aspect, the present invention provides a system for encrypted transmission of data, the system comprising a terminal and a server; The terminal includes an application module and a terminal encryption and decryption module; The server includes a forwarding module, a key module and a server encryption and decryption module; The application module of the terminal applies for an encryption key from the server, and transmits the encryption capability of the terminal itself to the forwarding module of the server; The forwarding module receives the encryption capability and forwards it to the key module; The key module determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The forwarding module transmits the encryption algorithm and the encryption key to the terminal; The terminal encryption and decryption module and the server encryption and decryption module use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
[0009] In a fourth aspect, the present invention provides a system for data encryption transmission, comprising a plurality of servers and a plurality of terminals; Each terminal includes an application module, a verification module, and a terminal encryption and decryption module; Each server includes a forwarding module, a key module and a server encryption and decryption module; The key modules of multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals through the forwarding module; Each terminal stores and maintains the server public keys received from different servers locally; The application module of the first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal itself to the forwarding module of the first server; The forwarding module of the first server forwards the encryption capability to the key module of the first server; The key module of the first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The forwarding module of the first server transmits the encryption algorithm and the first encryption key to the first terminal; The verification module of the first terminal verifies whether the received data comes from the first server based on the server public key of the first server; If the data comes from the first server, the terminal encryption and decryption module of the first terminal and the server encryption and decryption module of the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
[0010] The scheme provided by the present invention has multiple advantages and technical effects: first, by adopting a multi-layer encryption and identity authentication mechanism, including an asymmetric encryption algorithm, an encryption token, a digital signature, etc., the security of communication is effectively enhanced, and data leakage, tampering and illegal access are prevented. Secondly, the method that the terminal first applies for an encryption algorithm and a key from the server, and then securely transmits the key is adopted, which reduces the encryption and decryption operations and improves the efficiency of encrypted transmission. At the same time, the present invention allows the terminal and the server to dynamically select appropriate encryption algorithms and parameters according to their own encryption capabilities and requirements, adapts to a wider range of terminal types, and improves the flexibility and adaptability of the system. In addition, through the verification of the terminal identity and validity period by the server, the risk of terminal identity forgery and illegal access is reduced, and the security of communication is enhanced. Most importantly, a multi-server multi-terminal communication mode is adopted, and the source of the encryption key is ensured to be credible through the verification of the server public key, and the integrity of data transmission is guaranteed through mechanisms such as encryption tokens and digital signatures, which improves the reliability and stability of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0012] Figure 1 A flow chart of a method for data encryption transmission provided in Embodiment 1 of the present invention; Figure 2 A flow chart of a method for data encryption transmission provided in Embodiment 2 of the present invention; Figure 3-4 A schematic diagram of a data encryption transmission system according to an embodiment of the present invention; DETAILED DESCRIPTION The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. SUMMARY OF THE INVENTION The present invention relates to a data encryption transmission method, which is applicable to secure communication between a terminal (such as a browser) and a server.
[0014] First, the terminal applies for an encryption key from the server, and before that generates its own public key and private key. The terminal transmits its own public key and encryption capability to the server. After receiving the public key and encryption capability of the terminal, the server verifies whether the terminal user is within the validity period. If the user is valid, the server generates its own public key and private key, and uses the terminal public key and the server private key to calculate the response key for the encryption key. The server also determines the appropriate encryption algorithm based on the encryption capability of the terminal and generates the corresponding encryption key. The server sends the generated public key to the terminal.
[0015] Secondly, the server transmits the selected encryption algorithm and encryption key to the terminal. The server encrypts the encryption key using the response key and transmits the encrypted key and encryption token to the terminal.
[0016] Then, after receiving the encryption algorithm, encryption key and encryption token transmitted by the server, the terminal uses the server public key and the terminal private key to calculate the response key, and decrypts it to obtain the encryption key and encryption token. The terminal and the server use the same encryption algorithm and decrypted encryption key to encrypt and decrypt the data transmitted between each other.
[0017] Finally, when the terminal sends the encrypted data, it also sends the encryption token to the server. After receiving the encrypted data and the encryption token, the server verifies whether the encryption token is valid. If it is valid, it uses the encryption key and encryption algorithm to decrypt the encrypted data and obtain the data to be sent to the terminal. Then the server uses the encryption key and encryption algorithm to encrypt the data again and sends it to the terminal.
[0018] The present invention can better ensure the security and efficiency of data transmission by dynamically selecting a suitable encryption algorithm, ensuring the secure transmission of encryption keys, and improving encryption efficiency. The prior art may use a fixed encryption algorithm to encrypt data without considering the encryption capability of the terminal and the current security requirements. This may result in the selected encryption algorithm being not secure or efficient enough in some cases. Therefore, the present invention matches the appropriate encryption algorithm to different terminals according to their encryption capabilities to encrypt data.
[0019] Exemplary Methods Embodiment 1 Figure 1 A flow chart of a method for data encryption transmission provided by an embodiment of the present invention is shown.
[0020] S101: The terminal applies for an encryption key from the server, and transmits the encryption capability of the terminal itself to the server.
[0021] The encryption capability of a terminal refers to the encryption-related functions and performance that a terminal device (such as a computer, mobile phone, etc.) has when performing encrypted communications. Due to the different computing performance and resource limitations of different terminals, the encryption capabilities of different terminals vary. For example, terminal devices equipped with high-performance CPUs, large memories, and hardware accelerators usually have stronger encryption capabilities. Specifically, the differences in encryption capabilities between terminals include the following aspects: Supported encryption algorithms: Some terminal devices may have strong computing power and large memory, and can support more complex and more secure encryption algorithms, while other terminals with limited resources may only support simple encryption algorithms. Therefore, different terminals can support different encryption algorithms, including symmetric encryption algorithms (such as AES), asymmetric encryption algorithms (such as RSA), hash algorithms (such as SHA-256), etc.
[0022] Encryption strength: Because the terminal hardware performance is different, the encryption strength supported by each terminal is also different. The encryption strength is the level of security that the encryption algorithm can provide. The encryption strength is usually related to the length of the key. For example, the longer the number of bits of the key in a symmetric encryption algorithm, the higher the encryption strength.
[0023] Specifically, the encryption capability sent by the terminal to the server is specifically a hardware indicator that can reflect the encryption capability of the terminal, and the server matches a suitable encryption algorithm for the terminal based on these hardware indicators. The hardware indicator can be: 1. CPU model, main frequency, and number of cores: The CPU performance of the terminal directly affects the speed at which the terminal device performs encryption algorithm operations. A stronger CPU can perform encryption and decryption operations faster. If the terminal device is equipped with a high-performance multi-core processor, the server may choose to use a symmetric encryption algorithm such as AES because it has a higher encryption speed and is suitable for encrypting large amounts of data.
[0024] 2. Memory capacity and memory frequency: Memory capacity and frequency also affect the efficiency of the encryption algorithm. Larger memory can alleviate the encryption algorithm's need for temporary storage, while faster memory speed can speed up the encryption process. If the terminal device has large-capacity and high-speed memory, the server may choose to use the AES algorithm because it has relatively low memory requirements, but can use high-speed memory to improve encryption efficiency.
[0025] 3. Whether hardware accelerators are supported and the type of hardware accelerators: Some terminal devices may be equipped with hardware accelerators, such as encryption engines or security coprocessors, which are specifically used to accelerate the operation of encryption algorithms. These hardware accelerators can perform encryption operations without consuming too many CPU resources, improving encryption capabilities and efficiency. If the terminal device supports hardware accelerators (such as the AES-NI instruction set), the server may choose to use the AES algorithm that supports hardware accelerators to improve encryption efficiency and reduce CPU load.
[0026] 4. Whether the security module is integrated and the performance of the security module: Some terminal devices may have integrated security modules for storing keys and performing encryption operations. These security modules usually have higher security and faster encryption speeds, and can provide stronger encryption capabilities. If the terminal device has an integrated security module, the server may choose to use the RSA algorithm because the security module can provide higher security and faster encryption speeds, thereby ensuring the security of communications.
[0027] Before implementing step S101, the terminal generates its own public key and private key, which are respectively called the terminal public key and the terminal private key. Then, when the terminal implements step S101, the terminal sends the encryption capability together with the terminal public key to the server for use.
[0028] After receiving the public key and encryption capability of the terminal, the server first verifies whether the terminal user is valid. If the user is valid, it means that the user has been legally authorized to communicate with the server, and the server can perform the next step. If the user is invalid, it means that the user is an illegal user or no longer has legal authority. The server terminates the transmission with the terminal, prevents illegal users from accessing, and avoids data leakage and security vulnerabilities.
[0029] If the user is within the validity period, the server will generate a public key and a private key once, which are called the server public key and the server private key. The server will then combine the terminal public key and the server private key to calculate the response key. In this step, the server does not need to generate the server public key and the server private key in real time, but uses the terminal public key and the server's inherent server private key to calculate the response key, which can simplify the server's key management.
[0030] The server then executes step S102.
[0031] S102: The server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm.
[0032] After the server has determined the hardware indicators that reflect the encryption capabilities of the terminal, it can select the most appropriate encryption algorithm. The following are some examples of possible encryption algorithm selections: 1. If the terminal has a high-performance CPU and large memory capacity, the server may choose to use a more complex and more secure encryption algorithm, such as: Symmetric encryption algorithm: Advanced Encryption Standard (AES) with 256-bit key length.
[0033] Asymmetric encryption algorithm: RSA with 4096-bit key length.
[0034] Hash algorithm: Secure Hash Algorithm 256 (SHA-256).
[0035] 2. If the terminal has limited performance but supports hardware accelerators, the server may choose an encryption algorithm that relies on the hardware accelerator, such as: The AES algorithm is accelerated using the AES instruction set, and a 128-bit key length is usually selected.
[0036] If the terminal supports hardware RSA acceleration, a higher RSA key size may be selected.
[0037] 3. If the terminal has weak performance but has large memory capacity and fast memory speed, the server may choose a memory-intensive encryption algorithm, such as: Symmetric encryption algorithm: AES with 128-bit key length.
[0038] Asymmetric encryption algorithm: Elliptic Curve Cryptography (ECC) with 256-bit key length.
[0039] Hash algorithm: SHA-256.
[0040] 4. If the terminal is limited in hardware and performance, the server may choose a lighter encryption algorithm, such as: Symmetric encryption algorithm: AES with 128-bit key length.
[0041] Asymmetric encryption algorithm: RSA with 2048-bit key length.
[0042] Hash algorithm: SHA-256.
[0043] By comprehensively considering the hardware and performance of the terminal, the server can select the most suitable encryption algorithm to ensure the security and efficiency of encrypted communication. How to dynamically select the encryption algorithm can make full use of the encryption capabilities of the terminal and adjust the algorithm and parameters according to the actual situation and the needs of the communicating parties. There are no excessive restrictions here.
[0044] After the server matches the appropriate encryption algorithm for the terminal, it generates the corresponding encryption key according to the selected encryption algorithm and parameters, and generates an encryption token to verify whether the encryption key is still valid to ensure communication security. The following is the specific process: 1. Generate an encryption key. According to the selected encryption algorithm and parameters, the server randomly generates an encryption key that meets the requirements. For a symmetric encryption algorithm, this process usually generates a random key. The encryption key described in the present invention generally refers to the encryption key of a symmetric encryption algorithm, which is more efficient and faster than an asymmetric encryption algorithm and is suitable for the field of real-time video communication.
[0045] 2. Generate an encryption token. An encryption token is a token or identifier used to verify whether the encryption key is still valid. The server generates an encryption token that corresponds to the encryption key according to its own security policies and requirements. This encryption token may include some encryption signatures or other specific identification information to ensure its uniqueness and security.
[0046] 3. Associate the encryption key with the encryption token. The server associates the generated encryption key with the corresponding encryption token. Usually, the server stores or transmits the encryption key and encryption token in a one-to-one correspondence to ensure the association between them.
[0047] Afterwards, the server executes step S103.
[0048] S103: The server transmits the encryption algorithm and the encryption key to the terminal, and also transmits the encryption token corresponding to the encryption key.
[0049] The server uses the response key to encrypt the encryption token and encryption key, and then sends it together with the selected encryption algorithm and server public key to the corresponding terminal.
[0050] At this point, step S103 is completed.
[0051] After receiving the encryption algorithm, encrypted encryption key and encryption token, and server public key from the server, the terminal uses the terminal private key and server public key to calculate the response key. The calculated response key is then used to decrypt the encryption key and encryption token.
[0052] As mentioned above, the server calculates the response key based on the terminal public key and the server private key, and the terminal can also calculate the response key based on the terminal private key and the server public key. These are two different processes. This process usually involves the use of an asymmetric encryption algorithm. Common asymmetric encryption algorithms include RSA, DSA, ECC, etc. In this case, the response key generated between the server and the terminal is calculated through an encryption key exchange protocol (such as Diffie-Hellman). Take the RSA algorithm as an example to illustrate how the above two processes calculate the response key. The RSA algorithm is an asymmetric encryption algorithm based on the difficulty of factoring large prime numbers, as follows: 1. The server and terminal generate their own RSA key pairs, including public key and private key.
[0053] During the key pair generation process, two unequal large prime numbers p and q are first selected, and their product n is calculated, that is, n = p * q.
[0054] Then calculate the Euler function φ(n), that is, φ(n) = (p-1)(q-1).
[0055] Select an integer e that is coprime with φ(n) as the exponent of the public key to ensure that the encryption process of the public key is reversible.
[0056] Calculate the exponent d of the private key so that (e * d) % φ(n) = 1.
[0057] Ultimately, the public key is a public key pair containing (e, n), and the private key is a private key pair containing (d, n).
[0058] 2. Response key calculation: The terminal sends its public key (eT, nT) to the server.
[0059] After receiving the public key of the terminal, the server uses its own private key (dS, nS) to calculate: Calculate the shared key K: K = (eT^dS) mod nS.
[0060] The server returns the calculated shared key K to the terminal.
[0061] After receiving the shared key K returned by the server, the terminal uses its own private key (dT, nT) to calculate: Calculate the shared key K: K = (eS^dT) mod nT.
[0062] In this way, the server and the terminal use the other party's public key and their own private key to perform operations, and finally obtain the same shared key K. This shared key K can be used as a key in a symmetric encryption algorithm to encrypt communication data.
[0063] Here is a simple example: Assume that the public key of the terminal is (eT, nT) = (3, 35) and the private key of the server is (dS, nS) = (27,35).
[0064] The server calculates the shared key K: K = (eT^dS) mod nS = (3^27) mod 35 ≈ 13 The server returns the calculated shared key K (13) to the terminal.
[0065] After receiving the shared key K returned by the server, the terminal calculates the shared key: K = (eS^dT) mod nT = (27^3) mod 35 ≈ 13 Finally, the server and the terminal both calculate the same shared key K (13).
[0066] S104: The terminal and the server use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
[0067] Based on the instructions of the encryption algorithm, the terminal and the server both use the encryption key to encrypt the data sent to the other party and decrypt the data received from the other party. Based on the instructions of the encryption algorithm, it means that the encryption and decryption operations are performed according to the rules and steps of the selected encryption algorithm. Different encryption algorithms may have different encryption and decryption processes. Therefore, when performing encrypted communication, both parties need to perform the corresponding encryption and decryption steps according to the instructions of the selected encryption algorithm.
[0068] When the terminal sends data to the server, the encryption key is used to encrypt the data to be sent, and then the encrypted data and the encryption token are sent to the server. After receiving the data, the server first verifies whether the encryption token is valid. If the encryption token is valid, the server uses the encryption key and the encryption algorithm to decrypt the received encrypted data; the server obtains the data to be sent to the terminal based on the decrypted data. The encryption key and the encryption algorithm are used to encrypt the data to be sent to the terminal and send it to the terminal. After receiving the data from the server, the terminal uses the encryption key and the encryption algorithm to decrypt it.
[0069] If the encryption token is invalid, the server discards and destroys the received encrypted data and the encryption key corresponding to the expired encryption token. The server notifies the corresponding terminal of the expiration of the encryption key. After receiving the message, the terminal retransmits its own encryption capability to the server to re-apply for a new encryption key from the server, that is, re-execute steps S101-S104.
[0070] Embodiment 1 is applied to the data transmission scenario between a server and multiple terminals. In this case, the key is to ensure that the encryption key and encryption token generated by the server can be securely transmitted to the terminal. However, when the application scenario involves multiple servers and multiple terminals, in addition to requiring the encryption key and encryption token to be securely transmitted to the terminal, it is also necessary to ensure that the encryption key received by the terminal comes from the correct server to prevent the terminal from confusing the source of the encryption key, thereby ensuring the security of the data. For example, terminal A originally needs to receive the encryption key generated from server B, but if during the process of server B transmitting the encryption key to terminal A, it is maliciously intercepted by other server D and tampered with into the encryption key generated by server D and then sent to terminal A, then terminal A will mistakenly think that the encryption key it received is from server B, but in fact it is from server D. If terminal A does not perform message source and integrity verification after receiving the message, this will pose a threat to data security, because server D can take advantage of this opportunity to crack the encrypted data. Therefore, in response to such defects of embodiment 1, the present invention also provides embodiment 2 to solve the problems existing in embodiment 1.
[0071] Embodiment 2 Figure 2 A flow chart of a method for data encryption transmission according to the second embodiment of the present invention is shown.
[0072] S201: Multiple servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals.
[0073] S202: Each terminal stores and maintains the server public keys received from different servers locally.
[0074] S203: The first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal to the first server. Before the first terminal transmits its encryption capability to the first server, the first terminal generates a first terminal private key and a first terminal public key. The first terminal transmits the first terminal public key and the encryption capability to the first server.
[0075] S204: The first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm.
[0076] After receiving the first terminal public key and the encryption capability, the first server verifies whether the first terminal user is within the validity period. If the user is within the validity period, the first server determines an encryption algorithm that matches the encryption capability and generates a first encryption key corresponding to the encryption algorithm. The first server also generates a first encryption token for verifying whether the first encryption key is valid, and the first encryption key corresponds to the first encryption token.
[0077] S205: The first server transmits the encryption algorithm and the first encryption key to the first terminal.
[0078] The first server uses the first terminal public key to encrypt the first encryption key and the first encryption token, and uses its own server private key to encrypt the digest (i.e., hash value) of the first encryption key and the first encryption token to generate a "signature". The first server then attaches the signature to the encrypted information (the encrypted information is the encrypted first encryption key and the first encryption token).
[0079] The first server then transmits the encrypted information to the first terminal.
[0080] S206: The first terminal verifies whether the received data comes from the first server based on the server public key of the first server.
[0081] After the first terminal receives the encrypted information sent by the first server, it first uses its own first terminal private key to decrypt the encrypted information, obtains the first encryption key and the first encryption token after decryption, and obtains the summary of these two data (i.e., hash value). Then the first terminal uses the server public key corresponding to the first server to decrypt the "signature" attached to the encrypted information to obtain the summary. The first terminal compares the decrypted summary with the summary obtained from the first encryption token and the first encryption key. If the two match, then it means that the first terminal can determine that the first encryption token and the first encryption key have not been tampered with, and that the encrypted information is sent by the first server.
[0082] Based on this, each terminal can ensure that the encryption key comes from the correct server and that the encryption key and encryption token have not been tampered with based on the corresponding server public key. This is because the terminal uses the server public key to verify the encrypted information, ensuring that the source of the encrypted information is credible. At the same time, by verifying the digests of the encryption key and encryption token, the terminal can determine that they have not been tampered with, thereby ensuring the security and integrity of data transmission.
[0083] S207: If the data comes from the first server, the first terminal and the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other. This step is the same as the technical solution of embodiment 1, and will not be described in detail here.
[0084] The first embodiment is aimed at the scenario where a single server transmits data with multiple terminals, and the secure transmission of encryption keys is mainly guaranteed by calculating the response key. The second embodiment is applicable to the situation where multiple servers correspond to multiple terminals. The terminals save and maintain the public keys from different servers, and verify the identity of the server and the integrity of the encrypted data during the data transmission process, thereby further improving the security and reliability of communication.
[0085] The embodiments of the present invention all adopt a method of first applying for an encryption algorithm and a key from a server, and then securely transmitting the key. Only one encryption and decryption operation is required between the terminal and the server, avoiding the data from undergoing two encryption and decryption processes, thereby improving encryption efficiency. In addition, the present invention fully considers the encryption capability of the terminal, can flexibly match a suitable encryption algorithm and generate a corresponding encryption key, reduces the requirements for the terminal, and enables the server to perform encrypted communication with various types of terminals. Therefore, the present invention not only ensures security, but also expands its scope of application, and improves flexibility and versatility.
[0086] Exemplary Devices Accordingly, the embodiment of the present invention also provides a data encryption transmission system 300, such as Figure 3 The system includes a terminal 301 and a server 302; the terminal 301 includes an application module 301-1 and a terminal encryption and decryption module 301-2; the server 302 includes a forwarding module 302-1, a key module 302-2 and a server encryption and decryption module 302-3; The application module 301-1 of the terminal 301 applies for an encryption key from the server 302, and transmits the encryption capability of the terminal 301 itself to the forwarding module 302-1 of the server 302; the forwarding module 302-1 receives the encryption capability and forwards it to the key module 302-2; the key module 302-2 determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; the forwarding module 302-1 transmits the encryption algorithm and the encryption key to the terminal 301.
[0087] The terminal encryption and decryption module 301 - 2 and the server encryption and decryption module 302 - 3 use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
[0088] Before the terminal 301 transmits its encryption capability to the server 302, the terminal 301 generates a terminal private key and a terminal public key; when the application module 301-1 of the terminal 301 applies for an encryption key from the server 302, it transmits the terminal public key and the encryption capability to the forwarding module 302-1 of the server 302.
[0089] After receiving the terminal public key and the encryption capability, the forwarding module 302-1 verifies whether the terminal 301 user is within the validity period; if the user is within the validity period, the forwarding module 302-1 passes the encryption capability and the terminal public key to the key module 302-2.
[0090] The key module 302-2 includes a public-private key unit 302-2-1, a calculation unit 302-2-2, a generation unit 302-2-3 and an encryption unit 302-2-4; after receiving the information, the public-private key unit 302-2-1 of the key module 302-2 starts to generate a server public key and a server private key; the calculation unit 302-2-2 calculates a response key for encrypting the encryption key based on the terminal public key and the server private key; the generation unit 302-2-3 determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; the generation unit 302-2-3 also generates an encryption token for verifying whether the encryption key is valid, and the encryption key corresponds to the encryption token one by one; the encryption unit 302-2-4 uses the response key to encrypt the encryption key and the encryption token; and transmits the server public key and the encrypted encryption key and the encryption token to the forwarding module 302-1.
[0091] The operation of the forwarding module 302 - 1 transmitting the encryption algorithm and the encryption key to the terminal 301 specifically includes: transmitting the server public key, the encrypted encryption key and the encryption token to the terminal 301 .
[0092] The terminal 301 also includes a calculation module 301-3; after receiving the server public key and the encrypted encryption key and encryption token, the calculation module 301-3 uses the server public key and the terminal private key to calculate the response key; and uses the calculated response key to decrypt and obtain the encryption key and encryption token.
[0093] The operation of the terminal encryption and decryption module 301-2 and the server encryption and decryption module 302-3 using the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other also includes: the terminal encryption and decryption module 301-2 and the server encryption and decryption module 302-3 use the encryption key to encrypt data sent to the other party and decrypt data received from the other party based on the instructions of the encryption algorithm.
[0094] When the terminal 301 sends the encrypted data to the server 302, the encryption token is also sent to the server 302; the forwarding module 302-1 of the server 302 receives the data from the terminal 301 and verifies whether the encryption token is valid; if the encryption token is valid, the forwarding module 302-1 passes the encrypted data to the server encryption and decryption module 302-3; the server encryption and decryption module 302-3 uses the encryption key and the encryption algorithm to decrypt the received encrypted data; the server 302 obtains the data to be sent to the terminal 301 based on the decrypted data; the server encryption and decryption module 302-3 uses the encryption key and the encryption algorithm to encrypt the data to be sent to the terminal 301 and sends it to the terminal 301; after the terminal 301 receives the data from the server 302, the terminal encryption and decryption module 301-2 uses the encryption key and the encryption algorithm to decrypt it.
[0095] If the encryption token is invalid, the forwarding module 302-1 of the server 302 will discard and destroy the received encrypted data and the encryption key corresponding to the expired encryption token; the server 302 will notify the corresponding terminal 301 of the expiration of the encryption key; after the terminal 301 receives the message, the application module 301-1 will retransmit the encryption capability of the terminal 301 to the server 302 to reapply for a new encryption key.
[0096] The embodiment of the present invention also provides a data encryption transmission system 400, such as Figure 4 It includes multiple servers and multiple terminals; each terminal includes an application module, a verification module and a terminal encryption and decryption module; each server includes a forwarding module, a key module and a server encryption and decryption module.
[0097] The key modules of multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals through the forwarding module; each terminal saves and maintains the server public keys received from different servers locally; the application module 401-1 of the first terminal 401 applies for an encryption key from the first server 402, and transmits the encryption capability of the first terminal 401 itself to the forwarding module 402-1 of the first server 402; the forwarding module 402-1 of the first server 402 forwards the encryption capability to the key module 402-2 of the first server 402; the key module 402-2 of the first server 402 determines an encryption algorithm that matches it based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; the forwarding module 402-1 of the first server 402 transmits the encryption algorithm and the first encryption key to the first terminal 401; the verification module 401-2 of the first terminal 401 verifies whether the received data comes from the first server 402 based on the server public key of the first server 402.
[0098] If the data comes from the first server 402, the terminal encryption and decryption module 401-3 of the first terminal 401 and the server encryption and decryption module 402-3 of the first server 402 use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
[0099] Before the first terminal 401 transmits its own encryption capability to the forwarding module 402-1 of the first server 402, the first terminal 401 generates a first terminal private key and a first terminal public key; the application module 401-1 of the first terminal 401 transmits the first terminal public key and the encryption capability to the forwarding module 402-1 of the first server 402.
[0100] The key module 402-2 of the first server 402 determines the encryption algorithm that matches it based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm. The operation also includes: after the forwarding module 402-1 of the first server 402 receives the first terminal public key and the encryption capability, it verifies whether the user of the first terminal 401 is within the validity period; if the user is within the validity period, the key module 402-2 of the first server 402 determines the encryption algorithm that matches it based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; the key module 402-2 of the first server 402 also generates a first encryption token for verifying whether the first encryption key is valid, and the first encryption key corresponds to the first encryption token.
[0101] The forwarding module 402-1 of the first server 402 transmits the encryption algorithm and the first encryption key to the first terminal 401. The operation also includes: the key module 402-2 of the first server 402 uses the first terminal public key to encrypt the first encryption key and the first encryption token to generate encrypted information; the key module 402-2 of the first server 402 uses the server private key of the first server 402 to encrypt the digest of the first encryption key and the first encryption token to generate a signature; the key module 402-2 of the first server 402 attaches the signature to the encrypted information; transmits the encrypted information with the attached signature to the forwarding module 402-1 of the first server 402; the forwarding module 402-1 of the first server 402 transmits the encrypted information with the attached signature to the verification module 401-2 of the first terminal 401.
[0102] The operation of the verification module 401-2 of the first terminal 401 verifying whether the received data comes from the first server 402 based on the server public key of the first server 402 also includes: after the verification module 401-2 of the first terminal 401 receives the encrypted information sent by the first server 402, it first uses the first terminal private key to decrypt the encrypted information and obtains the summary of the first encryption key and the first encryption token; uses the server public key corresponding to the first server 402 to decrypt the signature attached to the encrypted information to obtain a summary; compares the decrypted summary with the summary obtained from the first encryption token and the first encryption key to see if they are consistent; if the comparison is consistent, it is determined that the encrypted information is sent by the first server 402.
[0103] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
[0104] The present invention provides: 1. A method for encrypted data transmission, the method comprising: The terminal applies for an encryption key from the server and transmits the terminal's own encryption capabilities to the server; The server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The server transmits the encryption algorithm and the encryption key to the terminal; The terminal and the server use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
[0105] 2. The method according to item 1, wherein before the terminal transmits its encryption capability to the server, the terminal generates a terminal private key and a terminal public key; When the terminal applies for an encryption key from the server, the terminal transmits the terminal public key together with the encryption capability to the server.
[0106] 3. The method according to item 2, wherein after receiving the terminal public key and the encryption capability, the server verifies whether the terminal user is within the validity period; If the user is within the validity period, the server generates a server public key and a server private key; The server calculates a response key for encrypting the encryption key based on the terminal public key and the server private key.
[0107] 4. According to the method described in item 3, the server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm, further comprising the following steps: The server generates an encryption token for verifying whether the encryption key is valid, and the encryption key corresponds to the encryption token one by one; The server transmitting the encryption algorithm and the encryption key to the terminal further comprises the following steps: The server encrypts the encryption key and the encryption token using the response key; The server transmits the encrypted encryption key and encryption token to the terminal.
[0108] 5. According to the method described in item 4, the server also transmits the server public key to the terminal.
[0109] 6. According to the method described in item 5, the terminal and the server use the encryption key to encrypt and decrypt data transmitted between each other, which further includes the following steps: The terminal uses the server public key and the terminal private key to calculate the response key; Decrypt using the calculated response key to obtain the encryption key and encryption token; Based on the instruction of the encryption algorithm, the terminal and the server both use the encryption key to encrypt data sent to the other party and decrypt data received from the other party.
[0110] 7. The method according to item 6, wherein when the terminal sends the encrypted data to the server, the terminal also sends the encryption token to the server; After receiving the data from the terminal, the server first verifies whether the encrypted token is valid; If the encryption token is valid, the server decrypts the received encrypted data using the encryption key and the encryption algorithm; The server obtains the data to be sent to the terminal based on the decrypted data; The server encrypts the data to be sent to the terminal using the encryption key and the encryption algorithm and sends the data to the terminal; After receiving the data from the server, the terminal uses the encryption key and the encryption algorithm to decrypt the data.
[0111] 8. The method according to item 7, wherein if the encryption token is invalid, the server discards and destroys the received encrypted data and the encryption key corresponding to the expired encryption token; The server notifies the corresponding terminal of the expiration of the encryption key; After receiving the message, the terminal retransmits its own encryption capability to the server to reapply for a new encryption key.
[0112] 9. A method for encrypted data transmission, the method comprising: Multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals; Each terminal stores and maintains the server public keys received from different servers locally; The first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal itself to the first server; The first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The first server transmits the encryption algorithm and the first encryption key to the first terminal; The first terminal verifies, based on a server public key of the first server, whether the received data comes from the first server; If the data comes from the first server, the first terminal and the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
[0113] 10. The method according to claim 9, wherein before the first terminal transmits its encryption capability to the first server, the first terminal generates a first terminal private key and a first terminal public key; The first terminal transmits the first terminal public key together with the encryption capability to the first server.
[0114] 11. The method according to claim 10, wherein the first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm, further comprising the following steps: After receiving the first terminal public key and the encryption capability, the first server verifies whether the user of the first terminal is within the validity period; If the user is within the validity period, the first server determines an encryption algorithm that matches the user based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The first server also generates a first encryption token for verifying whether the first encryption key is valid, and the first encryption key corresponds to the first encryption token.
[0115] 12. The method according to item 11, wherein the first server transmits the encryption algorithm and the first encryption key to the first terminal further comprising the following steps: The first server encrypts the first encryption key and the first encryption token using the first terminal public key to generate encrypted information; Encrypt the digest of the first encryption key and the first encryption token using its own server private key to generate a signature; appending the signature to the encrypted information; The encrypted information with the additional signature is transmitted to the first terminal.
[0116] 13. The method according to item 12, wherein the first terminal verifies whether the received data is from the first server based on the server public key of the first server further comprises the following steps: After receiving the encrypted information sent by the first server, the first terminal first decrypts the encrypted information using its own first terminal private key, and obtains the digest of the first encryption key and the first encryption token; Decrypting the signature attached to the encrypted information using the server public key corresponding to the first server to obtain a digest; comparing the decrypted digest with the digest obtained from the first encryption token and the first encryption key to see if they are consistent; If the comparison is consistent, it is determined that the encrypted information is sent by the first server.
[0117] 15. A system for encrypted data transmission, the system comprising a terminal and a server; The terminal includes an application module and a terminal encryption and decryption module; The server includes a forwarding module, a key module and a server encryption and decryption module; The application module of the terminal applies for an encryption key from the server, and transmits the encryption capability of the terminal itself to the forwarding module of the server; The forwarding module receives the encryption capability and forwards it to the key module; The key module determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The forwarding module transmits the encryption algorithm and the encryption key to the terminal; The terminal encryption and decryption module and the server encryption and decryption module use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
[0118] 15. The system according to item 14, wherein before the terminal transmits its encryption capability to the server, the terminal generates a terminal private key and a terminal public key; When applying for an encryption key from the server, the application module of the terminal transmits the terminal public key together with the encryption capability to the forwarding module of the server.
[0119] 16. The system according to item 15, wherein after receiving the terminal public key and the encryption capability, the forwarding module verifies whether the terminal user is within the validity period; If the user is within the validity period, the forwarding module transmits the encryption capability and the terminal public key to the key module.
[0120] 17. The system according to item 16, wherein the key module comprises a public and private key unit, a calculation unit, a generation unit and an encryption unit; After the key module receives the information, the public and private key unit starts to generate a server public key and a server private key; The calculation unit calculates a response key for encrypting the encryption key based on the terminal public key and the server private key; The generating unit determines an encryption algorithm matching the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The generating unit further generates an encryption token for verifying whether the encryption key is valid, wherein the encryption key corresponds to the encryption token one by one; The encryption unit encrypts the encryption key and encryption token using the response key; and transmits the server public key and the encrypted encryption key and encryption token to the forwarding module.
[0121] 18. According to the system of item 17, the operation of the forwarding module transmitting the encryption algorithm and the encryption key to the terminal specifically includes: The server public key, the encrypted encryption key and the encryption token are transmitted to the terminal.
[0122] 19. The system according to item 18, wherein the terminal further comprises a computing module; After receiving the server public key and the encrypted encryption key and encryption token, the computing module uses the server public key and the terminal private key to calculate the response key; and uses the calculated response key to decrypt and obtain the encryption key and encryption token; The operation of the terminal encryption and decryption module and the server encryption and decryption module using the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other also includes: The terminal encryption / decryption module and the server encryption / decryption module both use the encryption key to encrypt data sent to the other party and decrypt data received from the other party based on the instruction of the encryption algorithm.
[0123] 20. The system according to item 19, wherein when the terminal sends the encrypted data to the server, the terminal also sends the encryption token to the server; The forwarding module of the server receives the data sent by the terminal and verifies whether the encrypted token is valid; If the encryption token is valid, the forwarding module passes the encrypted data to the server encryption and decryption module; The server encryption and decryption module uses the encryption key and the encryption algorithm to decrypt the received encrypted data; The server obtains the data to be sent to the terminal based on the decrypted data; The server encryption and decryption module encrypts the data sent to the terminal using the encryption key and the encryption algorithm and sends the data to the terminal; After the terminal receives the data from the server, the terminal encryption and decryption module uses the encryption key and the encryption algorithm to perform decryption.
[0124] 21. The system according to item 20, wherein if the encryption token is invalid, the forwarding module of the server discards and destroys the received encrypted data and the encryption key corresponding to the expired encryption token; The server notifies the corresponding terminal of the expiration of the encryption key; After the terminal receives the message, the application module retransmits the encryption capability of the terminal itself to the server to reapply for a new encryption key.
[0125] 23. A data encryption transmission system, comprising a plurality of servers and a plurality of terminals; Each terminal includes an application module, a verification module, and a terminal encryption and decryption module; Each server includes a forwarding module, a key module and a server encryption and decryption module; The key modules of multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals through the forwarding module; Each terminal stores and maintains the server public keys received from different servers locally; The application module of the first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal itself to the forwarding module of the first server; The forwarding module of the first server forwards the encryption capability to the key module of the first server; The key module of the first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The forwarding module of the first server transmits the encryption algorithm and the first encryption key to the first terminal; The verification module of the first terminal verifies whether the received data comes from the first server based on the server public key of the first server; If the data comes from the first server, the terminal encryption and decryption module of the first terminal and the server encryption and decryption module of the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
[0126] 23. The system according to item 22, wherein before the first terminal transmits its encryption capability to the forwarding module of the first server, the first terminal generates a first terminal private key and a first terminal public key; The application module of the first terminal transmits the first terminal public key and the encryption capability to the forwarding module of the first server.
[0127] 24. According to the system of item 23, the key module of the first server determines the encryption algorithm matching the encryption capability based on the encryption capability, and generates the first encryption key corresponding to the encryption algorithm further comprising: After receiving the first terminal public key and the encryption capability, the forwarding module of the first server verifies whether the user of the first terminal is within the validity period; If the user is within the validity period, the key module of the first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The key module of the first server further generates a first encryption token for verifying whether the first encryption key is valid, and the first encryption key corresponds to the first encryption token.
[0128] 25. According to the system of item 24, the forwarding module of the first server transmits the encryption algorithm and the first encryption key to the first terminal further including: The key module of the first server encrypts the first encryption key and the first encryption token using the first terminal public key to generate encryption information; The key module of the first server encrypts the first encryption key and the digest of the first encryption token using the server private key of the first server to generate a signature; The key module of the first server appends the signature to the encrypted information; Transmitting the encrypted information with the additional signature to the forwarding module of the first server; The forwarding module of the first server transmits the encrypted information with the additional signature to the verification module of the first terminal.
[0129] 26. The system according to item 25, wherein the operation of the verification module of the first terminal verifying whether the received data is from the first server based on the server public key of the first server further comprises: After receiving the encrypted information sent by the first server, the verification module of the first terminal first decrypts the encrypted information using the first terminal private key and obtains the digest of the first encryption key and the first encryption token; Decrypting the signature attached to the encrypted information using the server public key corresponding to the first server to obtain a digest; comparing the decrypted digest with the digest obtained from the first encryption token and the first encryption key to see if they are consistent; If the comparison is consistent, it is determined that the encrypted information is sent by the first server.
Claims
1. A method for encrypted data transmission, the method comprising: The terminal applies for an encryption key from the server and transmits the terminal's own encryption capabilities to the server; The server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The server transmits the encryption algorithm and the encryption key to the terminal; The terminal and the server use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
2. The method according to claim 1, wherein before the terminal transmits its encryption capability to the server, the terminal generates a terminal private key and a terminal public key; When the terminal applies for an encryption key from the server, the terminal transmits the terminal public key together with the encryption capability to the server.
3. The method according to claim 2, wherein after receiving the terminal public key and the encryption capability, the server verifies whether the terminal user is within the validity period; If the user is within the validity period, the server generates a server public key and a server private key; The server calculates a response key for encrypting the encryption key based on the terminal public key and the server private key.
4. The method according to claim 3, wherein the server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm, further comprising the following steps: The server generates an encryption token for verifying whether the encryption key is valid, and the encryption key corresponds to the encryption token one by one; The server transmitting the encryption algorithm and the encryption key to the terminal further comprises the following steps: The server encrypts the encryption key and the encryption token using the response key; The server transmits the encrypted encryption key and encryption token to the terminal.
5. The method according to claim 4, wherein the server further transmits a server public key to the terminal.
6. The method according to claim 5, wherein the terminal and the server use the encryption key to encrypt and decrypt data transmitted between each other, further comprising the following steps: The terminal uses the server public key and the terminal private key to calculate the response key; Decrypt using the calculated response key to obtain the encryption key and encryption token; Based on the instruction of the encryption algorithm, the terminal and the server both use the encryption key to encrypt data sent to the other party and decrypt data received from the other party.
7. The method according to claim 6, wherein when the terminal sends the encrypted data to the server, the terminal also sends the encryption token to the server; After receiving the data from the terminal, the server first verifies whether the encrypted token is valid; If the encryption token is valid, the server decrypts the received encrypted data using the encryption key and the encryption algorithm; The server obtains the data to be sent to the terminal based on the decrypted data; The server encrypts the data to be sent to the terminal using the encryption key and the encryption algorithm and sends the data to the terminal; After receiving the data from the server, the terminal uses the encryption key and the encryption algorithm to decrypt the data.
8. A method for encrypted data transmission, the method comprising: Multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals; Each terminal stores and maintains the server public keys received from different servers locally; The first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal itself to the first server; The first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The first server transmits the encryption algorithm and the first encryption key to the first terminal; The first terminal verifies, based on a server public key of the first server, whether the received data comes from the first server; If the data comes from the first server, the first terminal and the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
9. A system for encrypted data transmission, the system comprising a terminal and a server; The terminal includes an application module and a terminal encryption and decryption module; The server includes a forwarding module, a key module and a server encryption and decryption module; The application module of the terminal applies for an encryption key from the server, and transmits the encryption capability of the terminal itself to the forwarding module of the server; The forwarding module receives the encryption capability and forwards it to the key module; The key module determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates an encryption key corresponding to the encryption algorithm; The forwarding module transmits the encryption algorithm and the encryption key to the terminal; The terminal encryption and decryption module and the server encryption and decryption module use the encryption algorithm and the encryption key to encrypt and decrypt data transmitted between each other.
10. A data encryption transmission system, comprising a plurality of servers and a plurality of terminals; Each terminal includes an application module, a verification module, and a terminal encryption and decryption module; Each server includes a forwarding module, a key module and a server encryption and decryption module; The key modules of multiple different servers generate their own server public keys and server private keys, and transmit their own server public keys to multiple different terminals through the forwarding module; Each terminal stores and maintains the server public keys received from different servers locally; The application module of the first terminal applies for an encryption key from the first server, and transmits the encryption capability of the first terminal itself to the forwarding module of the first server; The forwarding module of the first server forwards the encryption capability to the key module of the first server; The key module of the first server determines an encryption algorithm that matches the encryption capability based on the encryption capability, and generates a first encryption key corresponding to the encryption algorithm; The forwarding module of the first server transmits the encryption algorithm and the first encryption key to the first terminal; The verification module of the first terminal verifies whether the received data comes from the first server based on the server public key of the first server; If the data comes from the first server, the terminal encryption and decryption module of the first terminal and the server encryption and decryption module of the first server use the encryption algorithm and the first encryption key to encrypt and decrypt the data transmitted between each other.
Citation Information
Cited By
Data transmission method and data transmission encryption and decryption system
CN119921983A
Data transmission and storage method and device, electronic equipment and computer readable medium
CN120018122A
