Data transmission protection method and computer device

By initializing the secure communication channel in data transmission and configuring differential privacy and zero-knowledge proof systems, the problem of difficult to balance data transmission security and efficiency in the prior art is solved, and efficient and secure data transmission is achieved.

CN119089460BActive Publication Date: 2025-04-08FUTURE GENE (BEIJING) ARTIFICIAL INTELLIGENCE RES INST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411070897.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2025-04-08
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

The prior art is difficult to balance the security and efficiency of data transmission, cannot meet the requirements of high-demand application scenarios, and has shortcomings in privacy protection and key management.

Method used

By initializing the target system, establishing a secure communication channel, and configuring a preset differential privacy mechanism and a zero-knowledge proof system, a temporary key pair is generated, public key disturbance and verification is performed, a shared key and session key is calculated, and a data packet is encrypted using the session key.

Benefits of technology

It achieves the ability to provide stronger privacy protection and security while ensuring transmission efficiency, prevent information leakage, enhance the security of the key exchange process, reduce the risk of key reuse, and improve the security of encrypted data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089460B_ABST
    Figure CN119089460B_ABST
Patent Text Reader

Abstract

The present application discloses a data transmission protection method and a computer device. The method includes: initializing the target system; disturbing the initial public key in the generated temporary key pair based on the preset differential privacy mechanism in the initialization to obtain the first public key; the temporary key pair includes the private key of the party and the initial public key; exchanging the first public key through the secure communication channel in the initialization to generate zero-knowledge proof information; verifying the received first public key based on the preset zero-knowledge proof system and zero-knowledge proof information in the initialization, if the verification is passed, calculating the shared key based on the private key of the party and the received first public key, and obtaining the session key based on the key derivation function and the shared key; encrypting the original data to be transmitted based on the session key to obtain an encrypted data packet, and sending the encrypted data packet to the receiving end through a secure communication channel. The method can ensure high efficiency, high security and high privacy of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data transmission protection, and in particular to a data transmission protection method and a computer device. Background Art

[0002] With the rapid development of the digital age, the security and privacy protection of data transmission have become increasingly important issues, but existing technologies have many problems in these aspects, as follows:

[0003] 1) Traditional encryption methods are usually symmetric encryption and asymmetric encryption. The key management of symmetric encryption is complex. If the key is leaked, the security of the data will also be threatened. The encryption and decryption speed of asymmetric encryption is slow and is not suitable for processing large amounts of data. That is, the encryption methods disclosed in the prior art are difficult to balance security and efficiency.

[0004] 2) Most existing data transmission protection methods only focus on the confidentiality of data, but lack protection for user privacy, especially the correlation between data and statistical information, which makes them vulnerable to privacy leakage risks such as differential attacks.

[0005] 3) In a distributed environment, it is difficult to ensure that the authenticity of the input provided by all parties involved in the calculation cannot be effectively verified, resulting in a decrease in the credibility of the data source, thus affecting the overall security of the system.

[0006] 4) Traditional key distribution and management methods face huge challenges in large-scale distributed systems. It is difficult to achieve efficient and secure key update and distribution. Key leakage, loss or improper management may threaten the security of the system. Traditional key management methods usually require a lot of computing and communication overhead and are difficult to adapt to rapidly changing needs.

[0007] 5) When processing large-scale data, existing security transmission protocols often encounter performance bottlenecks. For example, the encryption and decryption process will cause delays. Especially in application scenarios with high real-time requirements (such as video streaming, real-time communication, etc.), this delay will significantly affect the user experience. The security protocol needs to handle a large number of concurrent data transmission tasks while ensuring data security. However, existing technologies often show insufficient performance in this regard, making it difficult to meet the needs of application scenarios with high real-time requirements. Summary of the invention

[0008] In view of this, the embodiments of the present disclosure provide a data transmission protection method and a computer device, which can solve the problems existing in the prior art such as difficulty in ensuring high security and high efficiency of data transmission and inability to meet the requirements of high-demand application scenarios.

[0009] In a first aspect, an embodiment of the present disclosure provides a data transmission protection method, the method specifically comprising:

[0010] Initializing a target system; the initialization includes establishing a secure communication channel of the target system, configuring a preset differential privacy mechanism, and configuring a preset zero-knowledge proof system, wherein the target system includes one or more sending ends and one or more receiving ends;

[0011] The generated temporary key pair is perturbed based on the preset differential privacy mechanism on the initial public key in the temporary key pair to obtain a first public key; the temporary key pair includes the own private key and the initial public key;

[0012] Exchanging the first public key through the secure communication channel to generate zero-knowledge proof information;

[0013] Verifying the received first public key based on the preset zero-knowledge proof system and the zero-knowledge proof information, and if the verification is successful, calculating a shared key based on the private key of the party and the received first public key;

[0014] Obtaining a session key based on a key derivation function and the shared key;

[0015] The original data to be transmitted is encrypted based on the session key to obtain an encrypted data packet, and the encrypted data packet is sent to the receiving end through the secure communication channel.

[0016] Optionally, the method for establishing the secure communication channel includes:

[0017] Establishing an initial secure connection;

[0018] Based on the initial secure connection, the sending end sends a connection request to the receiving end, where the connection request includes an encryption suite, a protocol version, and a first random number supported by the sending end;

[0019] The receiving end sends a reply message to the sending end in response to the connection request, wherein the reply message includes the encryption suite, protocol version, second random number and certificate chain information supported by the receiving end;

[0020] The sending end verifies the identity of the receiving end based on the reply information. If the identity of the receiving end is verified, the sending end generates a first Finished message and sends it to the receiving end for handshake security confirmation. The receiving end generates a second Finished message and sends it to the sending end for handshake security confirmation.

[0021] If both the first Finished message and the second Finished message pass the security verification, the secure communication channel is established.

[0022] Optionally, the configuration presets the differential privacy mechanism including a privacy budget parameter, a failure probability parameter, and configurations of several noise mechanisms;

[0023] Several of the noise mechanisms described correspond to different types of queries.

[0024] Optionally, the configuration presets a zero-knowledge proof system, including:

[0025] Determine a preset zero-knowledge proof system based on data verification information of the target system; the data verification information includes proof size information, proof generation time information, and proof verification time information;

[0026] Generate several public parameters required by the preset zero-knowledge proof system based on a trusted setup process;

[0027] Sending a plurality of the common parameters to the corresponding receiving ends respectively.

[0028] Optionally, the method for generating the zero-knowledge proof information includes:

[0029] Configure preset circuits;

[0030] Obtaining private input information based on the temporary key pair and a preset disturbance parameter;

[0031] Obtaining public input information based on the first public key, the privacy budget parameter, and the failure probability parameter;

[0032] The zero-knowledge proof information is generated based on the preset circuit, the private input information, the public input information, and a zero-knowledge proof algorithm.

[0033] Optionally, encrypting the original data to be transmitted based on the session key to obtain an encrypted data packet includes:

[0034] Divide the original data to be transmitted into blocks to obtain a plurality of data blocks, and generate a unique block identifier for each of the data blocks;

[0035] Encrypting each of the data blocks based on the session key and a preset encryption algorithm, and generating an authentication tag for each encrypted data block;

[0036] The encrypted data blocks, the block identifiers, and the authentication tags are packaged to obtain an encrypted data packet.

[0037] Optionally, the method further includes: after packaging the encrypted data blocks, the block identifiers, and the authentication tags, adding a serial number and a timestamp to obtain the encrypted data.

[0038] Optionally, also include:

[0039] Generate a cryptographic commitment based on the original data to be transmitted;

[0040] Encapsulating the cryptographic commitment, and signing the encapsulated cryptographic commitment based on the private key of the sender;

[0041] Sending the signed cryptographic commitment to the receiving end based on the secure communication channel and a preset broadcast mechanism;

[0042] The sending end generates an initial proof based on the original data to be transmitted, and the receiving end verifies the authenticity of the initial proof based on a preset zero-knowledge proof system. If it is authentic, the receiving end processes the received encrypted data packet to generate a new commitment;

[0043] Determine whether the new commitment is consistent with the cryptographic commitment, and if so, call the encrypted data packet.

[0044] Optionally, generating the cryptographic commitment based on the original data to be transmitted includes: processing the original data to be transmitted based on a preset cryptographic hash function to generate the cryptographic commitment;

[0045] The method for generating the new commitment is consistent with the method for generating the cryptographic commitment.

[0046] In a second aspect, the embodiment of the present disclosure further provides a data transmission protection system, including:

[0047] An initialization module, used to initialize a target system; the initialization includes establishing a secure communication channel of the target system, configuring a preset differential privacy mechanism, and configuring a preset zero-knowledge proof system, wherein the target system includes one or more sending ends and one or more receiving ends;

[0048] A perturbation module, configured to perturb the initial public key in the generated temporary key pair based on the preset differential privacy mechanism to obtain a first public key; the temporary key pair includes the own private key and the initial public key;

[0049] A generating module, configured to exchange a first public key through the secure communication channel and generate zero-knowledge proof information;

[0050] A verification module, configured to verify the received first public key based on the preset zero-knowledge proof system and the zero-knowledge proof information, and if the verification is successful, calculate a shared key based on the party's private key and the received first public key, and obtain a session key based on a key derivation function and the shared key;

[0051] The encryption module is used to encrypt the original data to be transmitted based on the session key to obtain an encrypted data packet, and send the encrypted data packet to the receiving end through the secure communication channel.

[0052] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:

[0053] The computer device comprises:

[0054] at least one processor; and,

[0055] a memory communicatively connected to the at least one processor; wherein,

[0056] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform any of the above-mentioned data transmission protection methods.

[0057] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned data transmission protection methods.

[0058] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.

[0059] The data transmission protection method disclosed in the present application can provide stronger privacy protection and security while ensuring transmission efficiency. Specifically, when generating a temporary key pair, the initial public key is disturbed by using a differential privacy mechanism, which can hide sensitive information of individual data. Even if an attacker obtains the disturbed public key, it is difficult to infer the original information from it, which can effectively prevent information leakage. The disturbed public key is verified by a zero-knowledge proof system, which can ensure its authenticity and validity without revealing the public key itself, enhance the security of the key exchange process, and avoid the risk of the public key being forged or tampered with. The session key is generated based on the shared key and the key derivation function, so that each session has an independent key, reducing the risk of the key being reused, and the use of the session key improves the security of the encrypted data. The original data to be transmitted is encrypted using the session key to ensure that the data will not be eavesdropped or tampered with during the transmission process. The encrypted data packet is sent through a secure communication channel, which can not only ensure the high efficiency of data transmission, but also further improve the security of data transmission.

[0060] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0062] Figure 1 A flowchart of a data transmission protection method provided in an embodiment of the present disclosure.

[0063] Figure 2 A flowchart of a method for establishing a secure communication channel provided in an embodiment of the present disclosure.

[0064] Figure 3 A flowchart of a configuration method for a preset zero-knowledge proof system provided in an embodiment of the present disclosure.

[0065] Figure 4 A flowchart of a method for generating zero-knowledge proof information provided in an embodiment of the present disclosure.

[0066] Figure 5 A flowchart of a method for obtaining an encrypted data packet provided in an embodiment of the present disclosure.

[0067] Figure 6 A flowchart of a method for determining the authenticity of an encrypted data packet provided in an embodiment of the present disclosure.

[0068] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0069] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0070] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0071] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0072] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0073] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0074] Reference Figure 1 The present application discloses a data transmission protection method, which specifically includes the following steps:

[0075] S100, initializing the target system; the initialization includes establishing a secure communication channel of the target system, configuring a preset differential privacy mechanism, and configuring a preset zero-knowledge proof system. The target system includes one or more sending ends and one or more receiving ends.

[0076] In the target system, data is transmitted between a sending end and a receiving end, usually the sending end sends data and the receiving end receives data.

[0077] Specifically, the TLS protocol or the SSL protocol is used to establish an initial secure connection.

[0078] Among them, configuring a preset zero-knowledge proof system can also be called preparing a verifiable computing environment, which specifically includes the selection of a zero-knowledge proof system and the generation, distribution and management of related parameters.

[0079] In this step, the secure communication channel established can protect data from eavesdropping and tampering during transmission; the configured preset differential privacy mechanism can ensure that the public key in the generated temporary key pair has privacy protection to prevent the leakage of sensitive information; the configured preset zero-knowledge proof system allows the data exchange in the verification process to be legal without exposing specific information.

[0080] S200, based on a preset differential privacy mechanism, the initial public key in the generated temporary key pair is disturbed to obtain a first public key; the temporary key pair includes the own private key and the initial public key.

[0081] The initial public key in the generated temporary key pair is perturbed based on the preset differential privacy mechanism, that is, the differential privacy technology is applied to the public key to add an additional layer of privacy protection.

[0082] Specifically, based on the preset differential privacy mechanism, the initial public key in the temporary key pair generated in the sending end is perturbed to obtain the first public key of the sending end; based on the preset differential privacy mechanism, the initial public key in the temporary key pair generated in the receiving end is perturbed to obtain the first public key of the receiving end.

[0083] In this step, by perturbing the initial public key, the privacy of the key can be effectively protected. Even if the attacker obtains the perturbed public key, it is difficult to infer the true initial public key, thereby improving the security of the key.

[0084] S300, exchanging a first public key through a secure communication channel to generate zero-knowledge proof information.

[0085] Specifically, through the established secure communication channel, the sending end sends the disturbed first public key to the receiving end, and the receiving end sends its own disturbed first public key to the sending end.

[0086] In this embodiment, the sending end is preferably considered. Therefore, at the sending end, zero-knowledge proof information is generated based on the first public key received from the receiving end through exchange, which can prove the legitimacy of the disturbed first public key without leaking the actual content, that is, there is no need to expose additional information.

[0087] S400, verify the received first public key based on the preset zero-knowledge proof system and zero-knowledge proof information. If the verification is successful, calculate the shared key based on the private key and the received first public key, and obtain the session key based on the key derivation function and the shared key.

[0088] Specifically, at the sending end, the method for calculating the shared key includes: calculating according to the sending end's own private key and the other party's public key (ie, the received first public key).

[0089] In this step, the calculated shared key itself is not sufficient to be used directly for encryption or authentication. The session key obtained based on the key derivation function and the shared key makes the generated session key sufficiently secure.

[0090] In this step, the shared key is calculated to ensure that both parties use the same key for encryption and decryption, thereby ensuring the confidentiality of the communication; the session key generates a unique key for each session, enhancing security and avoiding the risks of repeated key use.

[0091] S500, encrypting the original data to be transmitted based on the session key to obtain an encrypted data packet, and sending the encrypted data packet to a receiving end through a secure communication channel.

[0092] In this step, the data is encrypted to protect the confidentiality of the data, ensuring that only authorized recipients can decrypt and read the data; data packets are sent using a secure communication channel to ensure that the data is not eavesdropped or tampered with during transmission, further protecting the confidentiality and integrity of the data.

[0093] The data transmission protection method disclosed in the present application can provide stronger privacy protection and security while ensuring transmission efficiency. Specifically, when generating a temporary key pair, the initial public key is disturbed by using a differential privacy mechanism, which can hide sensitive information of individual data. Even if an attacker obtains the disturbed public key, it is difficult to infer the original information from it, which can effectively prevent information leakage. The disturbed public key is verified by a zero-knowledge proof system, which can ensure its authenticity and validity without revealing the public key itself, enhance the security of the key exchange process, and avoid the risk of the public key being forged or tampered with. The session key is generated based on the shared key and the key derivation function, so that each session has an independent key, reducing the risk of the key being reused, and the use of the session key improves the security of the encrypted data. The original data to be transmitted is encrypted using the session key to ensure that the data will not be eavesdropped or tampered with during the transmission process. The encrypted data packet is sent through a secure communication channel, which can not only ensure the high efficiency of data transmission, but also further improve the security of data transmission.

[0094] The data transmission protection method disclosed in this application can make the system more capable of resisting various attacks through differential privacy, zero-knowledge proof, etc.; in addition, the method allows different differential privacy mechanisms and zero-knowledge proof systems to be configured according to actual needs, so that protection measures can be adjusted according to specific application scenarios to adapt to different security needs.

[0095] It should be noted that the sending end may refer to a client, and the receiving end may refer to a server.

[0096] Reference Figure 2, taking the TLS protocol as an example, the method for establishing a secure communication channel is described in detail, including:

[0097] A100, establish an initial secure connection.

[0098] Specifically, an initial secure connection is established between the sender and the receiver using the TLS protocol, and this connection can be used to transmit subsequent encrypted data and handshake information.

[0099] In this step, the initial secure connection provides a basic network connection, establishing a stable foundation for subsequent secure communications, while ensuring the reliability of the connection during data transmission and avoiding connection failures due to network instability.

[0100] Furthermore, the TLS 1.3 protocol may be preferred.

[0101] A200, based on the initial secure connection, the sender sends a connection request to the receiver, where the connection request includes an encryption suite, a protocol version, and a first random number supported by the sender.

[0102] Specifically, the connection request may be a ClientHello message. By sending a connection request to the receiving end, the receiving end may be informed of the encryption algorithm, protocol version, and a random number supported by the sending end. At the same time, the connection request may also include other contents such as a compression method and certificate chain information.

[0103] The encryption suite may be a combination of encryption algorithms.

[0104] A300, the receiving end sends a reply message to the sending end in response to the connection request, and the reply message includes the encryption suite, protocol version, second random number and certificate chain information supported by the receiving end.

[0105] The reply information may be a ServerHello message.

[0106] In this step, the receiver responds to the sender's request, selects an encryption algorithm and protocol version supported by both parties, and sends its own random number to the sender.

[0107] The certificate chain information includes the data certificate and / or intermediate certificate of the receiving end, which is used to prove the identity of the receiving end.

[0108] A400, the sending end verifies the identity of the receiving end based on the reply information. If the identity of the receiving end passes the verification, execute A500.

[0109] Specifically, the sender checks whether the receiver's certificate is valid, including the certificate's signature, validity period, integrity of the certificate chain, etc.; specifically, the receiver's identity can be confirmed by verifying the certificate's public key signature and other information.

[0110] In addition, if temporary DH parameters are required, that is, if Diffie-Hellman key exchange (DH) is used, the receiver will also send temporary DH parameters to the sender for key negotiation.

[0111] A500, the sending end generates a first Finished message and sends it to the receiving end for handshake security confirmation, and the receiving end generates a second Finished message and sends it to the sending end for handshake security confirmation;

[0112] If both the first Finished message and the second Finished message pass the security verification, a secure communication channel is established.

[0113] In this step, the sender and the receiver each send a Finished message to the other party. Specifically, the sender generates and sends an encrypted handshake message, and the receiver generates and sends a confirmation message to verify the sender's handshake message. The two Finished messages ensure that the handshake process of both parties is correct and verify the integrity and correctness of the communication link. If both pass the security verification, that is, confirm that all steps of the handshake process have been completed correctly, and confirm that the keys and encryption algorithms used by both parties are consistent, the security of data transmission can be ensured.

[0114] Furthermore, this embodiment also includes: obtaining a session key based on the connection request and reply information.

[0115] To obtain the session key, the sender and the receiver use the previously exchanged information (such as the first random number, the second random number, the certificate, the public key, etc.) to generate a symmetric session key. This key can be used to encrypt and decrypt the data exchanged between the two parties in the session. Specifically, the two parties first negotiate the encryption algorithm and key exchange method to be used, and then calculate a common session key through the encryption algorithm and key exchange algorithm (such as RSA, Diffie-Hellman, etc.) to ensure the confidentiality of the communication.

[0116] A symmetric session key is a key used to encrypt and decrypt data in encrypted communications. It is "symmetric", meaning that the same key is used for encryption and decryption. This key is used to encrypt the communication data between the two parties to ensure that the data is kept confidential during transmission.

[0117] If RSA key exchange is used, the sender generates a random "pre-master key" and encrypts the pre-master key using the server's public key; the receiver decrypts the pre-master key using its own private key, and both parties use the pre-master key and other parameters to calculate the symmetric session key.

[0118] If Diffie-Hellman key exchange is used, the sender and receiver each generate a temporary key pair and exchange public parameters. Both parties use these public parameters and their own private keys to calculate a shared symmetric session key.

[0119] In this step, identity authentication can ensure that the identity of the receiving end is legitimate and prevent forgery or deception; the session key generated by the key exchange algorithm is only known to the two parties in the conversation, which enhances the confidentiality of the communication.

[0120] The Finished message is a message that encrypts the hash value of the previously exchanged data to ensure that no intermediate steps are tampered with, thereby ensuring that the generated session key can be safely used for subsequent encrypted communications.

[0121] The method for establishing a secure communication channel disclosed in this embodiment constructs a multi-level security mechanism. Specifically, a multi-level mechanism is formed through identity authentication, encryption algorithm negotiation, random number generation, message integrity verification, forward secrecy, and prevention of replay attacks, thereby ensuring the privacy, integrity, and reliability of the data transmission process. It is suitable for various scenarios where communication security needs to be protected.

[0122] Among them, identity authentication, that is, through the exchange of certificate chain information, both parties can verify each other's identity, which can effectively prevent man-in-the-middle attacks and ensure that both parties in communication are the people or devices they claim to be; encryption algorithm negotiation, that is, by exchanging the supported encryption suites and protocol versions, both parties can negotiate the most suitable encryption algorithm and protocol version, which ensures that the data encryption strength during the communication process can meet the security requirements of both parties; random number generation, that is, the exchanged random numbers are used to generate session keys. This method makes the encryption key of each session unique, increases security, and prevents potential risks caused by key reuse; message integrity verification, that is, by sending and verifying the Finished message, both parties can confirm whether the message in the entire handshake process has been tampered with, so as to ensure that the integrity of the data is not affected from the beginning of the handshake to the final establishment of a secure communication channel; forward secrecy, that is, since the session key is generated based on a random number, even if the future key is leaked, the past communication content cannot be decrypted. This feature is called forward secrecy, which improves the security of historical data; prevention of replay attacks, that is, the random number and the session key generated during the handshake process can effectively prevent replay attacks, that is, attackers cannot reuse previous messages for illegal operations.

[0123] Through this method, a secure encrypted channel can be established before communication to protect the confidentiality and integrity of the data.

[0124] Furthermore, the data transmission protection method disclosed in the present application also includes: determining whether two-way authentication is required, and if so, triggering the sender to provide a certificate chain to the receiver, the receiver verifies the identity of the sender based on the certificate chain provided by the sender, and if the identity of the sender is verified, the establishment of a secure communication channel is completed.

[0125] Among them, identity authentication may include checking certificate signature, verifying certificate chain, checking whether the certificate is expired, checking certificate revocation status, etc.

[0126] In this embodiment, configuring the preset differential privacy mechanism includes configuring a privacy budget parameter, a failure probability parameter, and several noise mechanisms, wherein the several noise mechanisms correspond to different types of queries.

[0127] Specifically, the privacy budget parameter is ε, which determines the strength of privacy protection. A smaller ε value indicates higher privacy protection, but at the same time may reduce the practicality of the data. A larger ε value indicates weaker privacy protection but higher data practicality. In this embodiment, a suitable ε value can be selected according to the application scenario and data sensitivity. For example, medical data may require a very small ε value to ensure privacy, while statistical data applications may accept a slightly larger ε value.

[0128] The failure probability parameter is δ, which represents the probability of privacy protection. It is usually used to describe the probability that the amount of leaked information may exceed the allowed range in the ε-differential privacy model; the δ value is usually set very small, much smaller than 1 / n, where n is the size of the data set, to ensure the strictness of privacy protection.

[0129] Furthermore, when setting the δ value, a very small value is usually chosen, such as 10 -5 or 10 -6 , to ensure that differential privacy protection is effective in most cases.

[0130] For numerical queries, the noise mechanism can preferably use the Laplace mechanism, that is, adding noise based on the Laplace distribution, and the scale of the noise is related to the sensitivity of the query; for more complex queries, the Gaussian mechanism can be preferred, that is, adding noise based on the Gaussian distribution, which can provide stronger privacy protection, but usually requires more complex mathematical calculations to determine the scale of the noise.

[0131] The noise scale can also be adjusted based on the query sensitivity, where query sensitivity refers to the maximum impact of a single data point on the query result. The sensitivity may vary for different types of queries, and high-sensitivity queries require more noise to ensure privacy protection. The noise scale should match the query sensitivity to ensure the level of protection of differential privacy. For example, for queries with higher sensitivity (i.e., a single data point has a greater impact on the result), a larger noise scale is required to ensure privacy protection.

[0132] Reference Figure 3 , the configuration method of the preset zero-knowledge proof system specifically includes:

[0133] B100, determine the preset zero-knowledge proof system based on the data verification information of the target system; the data verification information includes the size information of the proof, the time information of the proof generation, and the time information of the proof verification.

[0134] Among them, the preset zero-knowledge proof system can preferably be zkSNARKs, Bulletproofs or PLONK, which is a technology used to ensure the correctness of calculation results without disclosing the specific details of the calculation process.

[0135] In this embodiment, the proof size information refers to the size of the generated proof. Smaller proofs are beneficial to improving the efficiency of the system, but may require a more complex proof generation process.

[0136] The proof generation time information refers to the time when the proof is generated, that is, the time required to generate the proof after the calculation is completed. A shorter generation time can improve the response speed of the system.

[0137] The time information of the verification proof refers to the time of the verification proof, that is, the time to verify whether the system performs the calculation correctly. A shorter verification time helps to improve the overall performance of the system.

[0138] In this step, the zero-knowledge proof system is customized according to specific needs to ensure that it can meet the performance and security requirements of the target system; by understanding the size, generation time, and verification time of the proof, the system configuration can be optimized to improve overall efficiency.

[0139] B200 generates several public parameters required for a preset zero-knowledge proof system based on a trusted setup process; the public parameters include a public reference string.

[0140] Specifically, public parameters are generated by executing a trusted setup process (e.g., using tools or algorithms to generate public parameters) so that all parties in the system can effectively and securely use these parameters in zero-knowledge proofs. For zk-SNARKs, steps such as the Setup Phase for generating public parameters are usually included, which may involve multi-party computations or other methods for generating trusted parameters.

[0141] Among them, public parameters are the basis for the operation of the preset zero-knowledge proof system, including the reference data required for proof generation and verification.

[0142] The Public Reference String (CRS) is a public parameter used by the zero-knowledge proof system. These parameters usually include data generated during the trusted setup process and are used for proof generation and verification. CRS is a core component of the zero-knowledge proof system and its correctness and security must be ensured.

[0143] In this step, the trusted setup process ensures that the generated public parameters are secure, preventing subsequent attacks or security vulnerabilities. The generated public parameters can be used by multiple parties to ensure the consistency and interoperability of the system.

[0144] B300, respectively sends several public parameters to the corresponding receiving end.

[0145] The generated CRS is distributed to parties who need to use these parameters, and it is usually necessary to ensure the security of the distribution process to prevent the parameters from being tampered with or leaked.

[0146] Furthermore, the secure storage and distribution of parameters must be ensured. Specifically, public parameters need to be securely stored to prevent unauthorized access or tampering, and the storage solution should include encryption and access control measures. During the distribution process, measures can be taken to prevent parameters from being tampered with or leaked, such as using encrypted transmission and verification mechanisms to ensure the integrity and confidentiality of parameters.

[0147] The configuration method of the preset zero-knowledge proof system disclosed in this embodiment includes the selection of the zero-knowledge proof system and the generation and distribution management of relevant parameters. The zero-knowledge proof can ensure that the prover can prove the authenticity of its statement without leaking sensitive information, thereby improving the security of the system; the preset zero-knowledge proof system can optimize the efficiency of proof generation and verification and reduce the system burden through reasonable configuration and parameter generation; the zero-knowledge proof system can be adjusted according to different data verification requirements (such as the size of the proof and the verification time) to adapt to various application scenarios; the generation and distribution of public parameters ensures the unity and compatibility of the system, so that different systems or modules can work together seamlessly. Through this method, the security of the system can be effectively ensured and the efficiency and adaptability of the target system can be improved.

[0148] If the target system is a smart grid data acquisition system, the initialization of the smart grid data acquisition system is taken as an example for explanation below.

[0149] In the smart grid data acquisition system, the system initialization process is as follows:

[0150] 1) Establish a secure communication channel; specifically, the smart meter (client) and the power company's central server (server) first establish a TLS 1.3 secure connection. The meter initiates a connection request, and the two parties negotiate to use a strong encryption suite such as TLS_AES_256_GCM_SHA384. The server provides an X.509 certificate issued by a trusted CA, and the meter verifies the validity of the certificate, including checking the signature, certificate chain, validity period, and revocation status. After completing identity authentication, the two parties generate a session key and establish an encrypted channel.

[0151] 2) Initialize differential privacy parameters; Specifically, considering the sensitivity of electricity usage data, the system administrator carefully selects the differential privacy parameters. They set the ε value to 0.1, which is a small value that provides strong privacy protection. The δ value is set to 10 6 , which is much smaller than the inverse of the number of system users. The system chooses the Laplace mechanism to add noise to the aggregated power consumption data. For every 15-minute power consumption reading, the system calculates the query sensitivity and adjusts the noise scale accordingly to ensure that the usefulness of the data is maintained while protecting privacy.

[0152] 3) Prepare a verifiable computing environment (i.e., configure a preset zero-knowledge proof system); specifically, the power company chose zkSNARKs as the zero-knowledge proof system because of its compact proof size and fast verification time. In a controlled environment, the company performs a trusted setup process to generate the public parameters required for zkSNARKs. These parameters are distributed to all smart meters through a secure channel, and each meter stores these parameters securely. These parameters will be used to generate proofs that prove the authenticity and integrity of the reported electricity consumption data without revealing specific electricity consumption information.

[0153] Through this initialization process, the smart grid system establishes a secure communication foundation, implements a strong privacy protection mechanism, and prepares for subsequent verifiable computation. This ensures the security of data transmission, the protection of user privacy, and the verifiability of data integrity, while not affecting the system's ability to collect necessary electricity consumption data.

[0154] In this embodiment, an elliptic curve cryptography algorithm (ECDH) may be used to generate a temporary key pair (ie, a temporary public-private key pair).

[0155] Specifically, 1) First, select a secure elliptic curve. Commonly used curves include NIST P256, Curve25519, etc. The curve definition includes the base point G and the curve parameters. 2) Generate a private key: Randomly select a large integer k as the private key. The range of k is usually between 1 and the curve order n1. 3) Calculate the public key: Use scalar multiplication to calculate the public key: P = k*G, where G is the base point of the curve, and * represents the point multiplication operation on the elliptic curve. 4) Key representation: The private key k is usually represented as a large integer, and the public key P is represented as a point on the curve, usually represented by x and y coordinates.

[0156] These key pairs are temporarily generated and are only used for the current session. A new key pair is generated for each new session to increase security.

[0157] The security of ECDH is based on the difficulty of the Elliptic Curve Discrete Logarithm Problem (ECDLP). A 256-bit elliptic curve key provides security strength equivalent to a 3072-bit RSA key.

[0158] The initial public key in the generated temporary key pair is perturbed based on the preset differential privacy mechanism. The preset differential privacy mechanism can protect individual privacy while allowing meaningful analysis of the overall data. In the public key context, this means slightly changing the public key so that the original public key cannot be accurately inferred.

[0159] Among them, commonly used perturbation mechanisms include Laplace mechanism or Gaussian mechanism; for public key perturbation, specially designed mechanisms can also be used to maintain the properties of elliptic curve points.

[0160] Determine the maximum impact of the public key change on the final result, which determines the amount of noise that needs to be added. In the context of elliptic curves, this may involve a small movement of the point. Specifically, noise can be generated according to the privacy budget parameter and the failure probability parameter, and then the noise is added to the coordinates of the public key. The perturbed point must still be a valid point on the selected elliptic curve.

[0161] Furthermore, the privacy budget used for public key perturbations can be tracked to ensure that the privacy limit of the overall system is not exceeded and that the perturbed public key can still be used for valid key exchange.

[0162] Furthermore, the impact of the disturbance on the overall system security can also be evaluated to ensure that the disturbance does not significantly reduce the security strength of the key exchange.

[0163] In this way, we add a layer of differential privacy to the standard ECDH key generation process, which not only protects the privacy of individual users but also increases resistance to certain side-channel attacks.

[0164] For exchanging the first public key through a secure communication channel, it specifically includes: 1) converting the perturbed elliptic curve point (public key) into a format suitable for transmission. Common formats include compressed format (transmitting only the x coordinate and a bit representing the parity of the y coordinate) or uncompressed format (transmitting the x and y coordinates at the same time); 2) attaching necessary metadata, such as the type of elliptic curve used, differential privacy parameters, etc., which are crucial for the recipient to correctly interpret and use the public key; 3) using a predefined protocol format to encapsulate the public key and related information, specifically including additional fields such as version number and timestamp to enhance security; 4) configuring a robust error detection and handling mechanism to ensure that there is a clear retry or abort process in the event of transmission failure or data corruption; 5) the recipient sends a confirmation message indicating that the public key has been successfully received and parsed. This confirmation may include a hash value of the received public key to verify the integrity of the transmission.

[0165] Reference Figure 4 , the method for generating zero-knowledge proof information specifically includes:

[0166] C100, configure the preset circuit.

[0167] Specifically, a circuit (logical or Boolean) is designed to describe the computation or statement to be proved; for example, in zk-SNARKs, the circuit can be a set of mathematical equations that describe the solution to a problem. For example, if you want to prove that a number is the solution to an equation, then the circuit is the mathematical expression that describes the equation.

[0168] The assertion requirements of the preset circuit include: the public key is a valid elliptic curve point, the public key is generated by a valid private key, and the differential privacy perturbation is applied correctly and within the allowed range.

[0169] By configuring the circuit, the computational problem or statement to be proved can be accurately described to ensure the correctness of the proof process; the preset circuit can be reused and adjusted to improve the flexibility and maintainability of the design.

[0170] C200 obtains private input information based on the temporary key pair and the preset perturbation parameters.

[0171] Specifically, the private key of the party, the initial public key, and the preset disturbance parameter in the temporary key pair are used as private inputs.

[0172] C300 obtains public input information based on the first public key, privacy budget parameter, and failure probability parameter.

[0173] Specifically, the first public key, elliptic curve parameters, privacy budget parameters, and failure probability parameters are used as public inputs.

[0174] C400,generates zero-knowledge proof information based on preset circuit, private input information, public input information, and zero-knowledge proof algorithm.

[0175] Specifically, based on preset circuits, private inputs and public inputs, a zero-knowledge proof algorithm is used to generate zero-knowledge proof information, which can be used to verify the authenticity of a statement without exposing private data. Zero-knowledge proof information allows the prover to prove the authenticity of his statement without leaking actual data. At the same time, zero-knowledge proof information is usually smaller and has a faster verification speed, making it suitable for use in application scenarios that require efficient verification.

[0176] Among them, zero-knowledge proof information should confirm the following points without leaking specific information, including: a) the prover knows the private key corresponding to the public perturbation public key; b) the perturbation process strictly follows the predefined differential privacy mechanism; c) the amplitude of the perturbation is within the preset privacy budget.

[0177] The method for generating zero-knowledge proof information disclosed in this embodiment aims to prove the validity of the public key and the correctness of the disturbance process. The zero-knowledge proof technology ensures that no private data is leaked during the proof process and only verifies the authenticity of the statement, thereby protecting user privacy. By configuring the circuit and selecting different proof algorithms, the system can be adjusted and expanded according to specific needs to adapt to different application scenarios. The generated zero-knowledge proof information is usually small in size and has a fast verification speed, which is suitable for systems that require efficient processing and verification. By effectively generating and managing zero-knowledge proof information, not only data privacy is guaranteed, but also the security and efficiency of the system are improved, providing strong support for various applications that require privacy protection and efficient verification.

[0178] Furthermore, for resource-constrained devices, pre-computation technology can also be used to accelerate the generation of zero-knowledge proof information.

[0179] The zero-knowledge proof information is a compact proof that can minimize communication overhead.

[0180] It should be noted that the order of steps C100, C200, and C300 can be swapped, all within the protection scope of the present application.

[0181] In this embodiment, the received first public key is verified based on the preset zero-knowledge proof system and zero-knowledge proof information, specifically including: based on the first public key, extracting the proof data related to it from the zero-knowledge proof information; based on the preset zero-knowledge proof system and verification algorithm, verifying the validity of the proof data. If the proof data is valid, the authenticity of the first public key is confirmed.

[0182] In this embodiment, the method for calculating the shared key includes: 1) determining input parameters, including one's own private key (i.e., a large integer k) and the other party's public key (i.e., a point Q on an elliptic curve); 2) performing scalar multiplication: R = k*Q, where R is a point on the elliptic curve, usually expressed as (x, y) coordinates; 3) usually using the x coordinate of R as the shared key.

[0183] In addition, some protocols may use a combination of x and y coordinates. If a different coordinate system is used (such as Jacobian coordinates or projective coordinates), it is necessary to convert back to affine coordinates. For the sender and receiver, ensure that both parties use the same method to derive the shared key from point R. The shared key itself is usually not used directly for encryption, but as input to generate the actual encryption key.

[0184] In this embodiment, a session key is obtained based on a key derivation function and a shared key, specifically including: 1) determining a key derivation function (KDF), which may be HKDF (i.e., a KDF based on HMAC) or a KDF defined in NIST SP 80056C rev1, wherein the KDF based on HMAC may provide good security and standardization, and the KDF defined in NIST SP 80056C rev1 is a KDF defined by the National Institute of Standards and Technology (NIST) of the United States, and is applicable to a variety of encryption applications. 2) determining the input parameters of the key derivation function, specifically including: a shared key, a salt (i.e., a high entropy random number), and an information string. 3) extracting key material from the input parameters, specifically using a verified pseudo-random function (such as HMAC) to process the input to generate an intermediate key of a fixed length. 4) extending the key material to the required key length to obtain the session key.

[0185] Reference Figure 5 , the method for obtaining the encrypted data packet specifically includes:

[0186] D100 divides the original data to be transmitted into blocks, obtains a number of data blocks, and generates a unique block identifier for each data block.

[0187] In this step, the original data to be transmitted is divided into smaller blocks so that they can be processed and transmitted block by block. Block division can improve transmission efficiency, facilitate parallel processing, and reduce the risk of data loss due to transmission errors. Block division can also make the data encryption and decryption process more efficient and reduce the demand for system resources when processing large files.

[0188] A unique identifier is generated for each data block so that the data block can be accurately identified and reassembled in subsequent steps. The identifier helps ensure that each data block can be correctly sequenced and reassembled at the receiving end to restore the original data.

[0189] For example, if the original data is a large file, it can be split into data blocks of 1 MB each; the block division can be implemented programmatically, such as using the `split` method in Python to cut the data.

[0190] Specifically, a unique identifier is generated for each data block, which may be an incremental serial number, a UUID (universally unique identifier), or a unique identifier based on a hash value. For example, the first data block may be identified as "block 1", the second data block as "block 2", and so on.

[0191] In this step, data segmentation makes data processing, transmission, and encryption more efficient, especially when dealing with large amounts of data; if a data block is lost or damaged during transmission, only the lost block can be retransmitted instead of retransmitting the entire data.

[0192] D200,encrypts each data block based on the session key and the preset encryption algorithm, and generates an,authentication tag for each encrypted data block.

[0193] Specifically, the preset encryption algorithm may preferably be an efficient symmetric encryption algorithm (such as AESGCM).

[0194] Assuming that AES (Advanced Encryption Standard) is used as the encryption algorithm, it can be implemented in Python using the `pycryptodome` library. Each data block will use the same session key when encrypted, but the encrypted result will be different.

[0195] An authentication tag is generated for each encrypted data block to verify the integrity and authenticity of the data block; for example, a tag is generated using HMAC (Hash Message Authentication Code), and the tag can be attached to the encrypted data block. The authentication tag can be used to verify whether the data block has been tampered with or damaged during transmission, thereby ensuring the integrity and authenticity of the data.

[0196] D300 packages the encrypted data blocks, the block identifiers, and the authentication tags to obtain an encrypted data packet.

[0197] By packaging the encrypted data block, authentication tag, and unique identifier together into a transmission packet, it is ensured that all necessary information is included in the transmission packet so that it can be decrypted and verified at the receiving end.

[0198] The method for obtaining an encrypted data packet disclosed in this embodiment uses a session key and an encryption algorithm to encrypt data, thereby protecting the confidentiality of the data during transmission and preventing the data from being stolen or leaked; the authentication tag can detect whether the data has been tampered with, thereby ensuring the integrity and authenticity of the data; data segmentation improves processing efficiency, allows parallel processing and transmission of large amounts of data, and supports retransmission of lost or damaged data blocks; the structured data packet format makes data transmission and parsing more efficient and consistent, and the overall solution can effectively protect the confidentiality, integrity and authenticity of the data during transmission, while improving the processing efficiency and flexibility of the system.

[0199] Furthermore, after packaging the encrypted data blocks, block identifiers, and authentication tags, a serial number and a timestamp are added to obtain the encrypted data. The added serial number can be used to track and distinguish different data packets, and replay attacks can be prevented, that is, the attacker repeatedly sends previous data packets. The added timestamp can record the creation time of the data packet, which helps prevent old data packets from being maliciously replayed. The receiver can check the timestamp to ensure that the data packet is sent within a valid time window.

[0200] Reference Figure 6 The data transmission protection method disclosed in the present application also includes: determining the authenticity of the encrypted data packet, specifically including:

[0201] E100, generates a cryptographic commitment based on the original data to be transmitted.

[0202] The original data to be transmitted is processed based on the preset cryptographic hash function to generate a cryptographic commitment.

[0203] Specifically, a secure hash algorithm (such as SHA-256) is used to hash the original data to be transmitted to generate a hash value of the data. This hash value is the commitment value of the data, which uniquely represents the original data and remains unchanged if the data is not modified.

[0204] The hash value is encrypted using a commitment scheme (such as Pedersen commitment) to generate a cryptographic commitment. Commitment schemes usually involve generating a commitment value that can be used to prove the integrity of the original data without revealing the actual data content. That is, the cryptographic commitment is generated by a hash function and can uniquely represent the original data. Any change in the data will result in a change in the commitment value, ensuring that the commitment cannot be tampered with.

[0205] In this step, cryptographic commitment ensures that the original data has not been tampered with during transmission. The design of the commitment scheme makes the data content cannot be directly inferred, thereby protecting data privacy.

[0206] E200 encapsulates the cryptographic commitment and signs the encapsulated cryptographic commitment based on the sender's own private key.

[0207] Specifically, encapsulating the cryptographic commitment usually includes encapsulating the commitment value and additional information (such as a timestamp) into a data packet, that is, encapsulating the generated cryptographic commitment value (such as adding metadata, formatting it into a specific structure, etc.) for easy transmission; using the sender's private key to sign the encapsulated cryptographic commitment; and using a digital signature algorithm (such as RSA or ECDSA) to ensure that the data has not been tampered with and to verify the identity of the signer.

[0208] In this step, the digital signature ensures that the data packet is sent by a legitimate sender to prevent forgery, and the signature ensures that the data packet has not been tampered with during transmission.

[0209] E300, based on a secure communication channel and a preset broadcast mechanism, sends the signed cryptographic commitment to the receiving end.

[0210] Sending signed cryptographic commitments through secure communication channels ensures that data will not be stolen or tampered with by third parties during transmission, thereby ensuring the confidentiality and integrity of data transmission; the preset broadcast mechanism can prevent information from being received by unauthorized third parties, ensuring that data will not be tampered with or forged during transmission.

[0211] E400, the sender generates an initial proof based on the original data to be transmitted, and the receiver verifies the authenticity of the initial proof based on a preset zero-knowledge proof system. If it is authentic, the received encrypted data packet is processed to generate a new commitment.

[0212] Among them, the method of generating new commitments is consistent with the method of generating cryptographic commitments.

[0213] In this step, the sender generates an initial proof (such as a zero-knowledge proof) based on the original data to be transmitted. This proof can be used to verify the authenticity of the original data without revealing the content of the data itself; the receiver uses a preset zero-knowledge proof system to verify the initial proof to ensure that the proof is valid and that the data has not been tampered with or forged. After processing the received data, the receiver generates a new cryptographic commitment. By generating a new commitment, the receiver can further verify the data and enhance the security of the overall data verification.

[0214] E500, determines whether the new commitment is consistent with the cryptographic commitment. If so, determines that the encrypted data packet is authentic, and the receiving end can directly call the encrypted data packet.

[0215] In this step, the receiver compares the generated new commitment with the received cryptographic commitment. If the new commitment is consistent with the cryptographic commitment, the encrypted data packet is considered valid and authentic. The receiver can further use or process the data packet to ensure that the data packet has not been tampered with during transmission and is consistent with the data committed by the sender, thereby ensuring that the received data is authentic and reliable, reducing potential risks caused by data tampering.

[0216] The method disclosed in this embodiment ensures that data has not been tampered with during transmission and that the source is authentic and trustworthy through cryptographic commitments and digital signatures; uses cryptographic commitments and zero-knowledge proofs to protect data privacy and prevent data from being read or speculated by unauthorized parties; digital signatures and zero-knowledge proofs ensure that only legitimate senders can generate valid data packets, thereby preventing data forgery; and multi-level verification mechanisms (including generating and verifying commitments, signatures, zero-knowledge proofs, etc.) enhance the security of data transmission.

[0217] Furthermore, the data transmission protection method disclosed in the present application also includes: dynamic update of session keys, which means updating the keys regularly or as needed according to actual conditions during the use of the keys to enhance security and prevent the keys from being cracked by attackers.

[0218] Specifically, the dynamic update of the session key includes: monitoring the key usage, triggering the key update, and executing a new round of key negotiation, wherein monitoring the key usage is to track the key usage status and evaluate the key validity.

[0219] In this embodiment, monitoring the key usage specifically includes: 1) tracking the number of times and time the key is used; specifically, recording the number of times each key is used. Generally, as the number of times a key is used increases, the risk that the key may face will also increase. By monitoring the number of times a key is used, it can be determined whether the key needs to be updated; because the key may increase the risk of being cracked if it is used for too long, it can be determined whether the key needs to be updated by monitoring the time. 2) Evaluating the key strength and potential risks; checking whether the key still has sufficient security, for example, analyzing whether the key can still resist current attack techniques and computing power, and considering factors that may affect the security of the key, such as discovering that the key may have been leaked or that there are vulnerabilities in the key management system.

[0220] In this embodiment, triggering key update specifically includes: 1) triggering update based on predefined policies or risk assessment results; specifically, triggering key update according to the set policy (such as automatic update after the number of key usage reaches a certain threshold), for example, automatically updating the key every 1,000 times the key is used or every 6 months; determining whether to update based on the evaluation result of key security, if it is found that the key strength is insufficient or there is a potential risk, the key update can be triggered. 2) Sending an update request to the communication partner, which is usually carried out through a secure communication channel to ensure the security and effectiveness of the update request.

[0221] In this embodiment, executing a new round of key negotiation specifically includes: 1) generating a new key pair according to the previously defined key negotiation process (such as using a key exchange protocol to generate a new session key), and the new key will replace the old key for data encryption and authentication; 2) ensuring a smooth transition between the old and new keys to avoid data transmission interruption. Specifically, during the update process, ensuring seamless switching of the old and new keys. For example, the old and new keys can be used for parallel processing during the key update to ensure uninterrupted data transmission; during the key update, ensuring that the communication session can continue and that data transmission will not be interrupted or lost due to key switching.

[0222] Dynamic key update is a mechanism to ensure the continuous security of keys. It ensures that keys are always kept in a secure state by monitoring key usage, triggering key updates and performing a new round of key negotiation. This not only improves the security of data transmission, but also reduces potential security risks. The specific implementation of each step is aimed at improving the efficiency of key management and ensuring the stability of the system and the confidentiality of data.

[0223] Furthermore, the data transmission protection method disclosed in the present application also includes: exception handling and recovery, which is specifically a key part of the data transmission and encryption system for dealing with abnormal situations, attacks or system failures. Its goal is to quickly respond to and handle exceptions to maximize the protection of system security and data integrity, and ensure that the system can quickly and effectively resume normal operation when encountering abnormal situations.

[0224] Specifically, it includes three main steps: detecting abnormal situations, implementing emergency measures, and system recovery. Detecting abnormal situations refers to monitoring and identifying abnormal patterns and potential attacks or failures during system operation so as to be able to respond and handle them in a timely manner; implementing emergency measures is emergency actions taken in response to detected abnormal situations to prevent or reduce damage; system recovery refers to the process of restoring the system to normal operating status after the abnormality is handled.

[0225] In this embodiment, detecting abnormal situations specifically includes: 1) monitoring abnormal patterns in the data transmission process, that is, monitoring each link of the data transmission in real time, detecting whether there are abnormal transmission patterns or data characteristics, such as data packet loss, abnormal transmission delay, data tampering, etc., and identifying possible abnormal patterns by analyzing data traffic, transmission frequency, data content, etc. These patterns may indicate unauthorized access, data tampering, or problems in transmission; 2) identifying potential attacks or system failures, that is, using a security detection system or an intrusion detection system (IDS) to identify whether there are attack behaviors, such as man-in-the-middle attacks, replay attacks, or denial of service attacks (DoS), monitoring the health status of system components, and identifying possible failures or performance issues, such as hardware failures, software crashes, or configuration errors.

[0226] In this embodiment, the implementation of emergency measures specifically includes: 1) immediately interrupting the current session when an abnormality is detected, that is, immediately terminating the current communication session when an abnormal situation is found, which helps prevent attackers from further exploiting vulnerabilities or faults to perform malicious operations and protect the security of the system; 2) isolating the affected system components, that is, isolating the system components with abnormalities or faults from the network to prevent them from affecting other components or systems that are working normally, which can prevent the spread of abnormal situations and protect the security of the overall system.

[0227] In this embodiment, system recovery specifically includes: 1) starting a secure system reset process, that is, executing a system reset process according to the system's security recovery strategy, which may include operations such as restarting the system, restoring backups, repairing faults, or reconfiguring the system. During the reset process, ensure that the system will not be affected again, and perform comprehensive security checks and repairs to prevent the problem from recurring; 2) re-establishing secure communications and negotiating new keys, that is, ensuring that after the system is restored, a secure communication channel is re-established, and verified security protocols and measures are used for communication to ensure the security of data transmission, perform key negotiation, generate and distribute new session keys, and the new keys will replace the old keys to ensure that the system still has high security in communications after recovery.

[0228] Exception handling and recovery are key steps to ensure that the system remains secure and stable when facing exceptions, attacks or failures. By detecting abnormal situations in real time, quickly implementing emergency measures and effectively recovering the system, data security and system reliability can be protected to the greatest extent. The implementation of each step helps to respond quickly, reduce risks and restore normal system operations, thereby ensuring the long-term stability and security of the system.

[0229] Furthermore, the data transmission protection method disclosed in the present application also includes: performance optimization processing, which aims to improve the system processing efficiency, making operations such as encryption and decryption, and data verification more efficient, thereby reducing delays and improving the system's responsiveness.

[0230] Performance optimization processing specifically includes: 1) Implementing parallel processing, which means accelerating the data processing process by executing multiple processing tasks simultaneously, which is especially important for processing large-scale data and complex calculations; 2) Using adaptive algorithms that can dynamically adjust the system's operating mode according to current environmental conditions to optimize performance; 3) Using pre-computation technology, that is, improving the system's response speed by pre-computing and caching some calculation results, thereby reducing the burden of real-time calculations.

[0231] The implementation of parallel processing specifically includes: 1) Implementing parallel encryption and decryption of large-scale data, that is, dividing large-scale data into multiple small blocks, encrypting and decrypting these small blocks separately, and using multi-core processors or multiple processing units to perform these operations simultaneously, thereby significantly improving the processing speed. Through parallel processing, large amounts of data can be processed faster and the overall encryption and decryption time can be reduced. 2) Using multi-core processors to optimize the generation and verification of zero-knowledge proofs. Specifically, the generation and verification process of zero-knowledge proofs is usually computationally intensive. By distributing these operations to multiple processing cores for parallel computing, the processing speed can be greatly improved. This method can significantly reduce the time overhead of zero-knowledge proof operations and improve the overall performance of the system.

[0232] The use of adaptive algorithms specifically includes: 1) Dynamically adjust the size of data packets according to network conditions, that is, dynamically adjust the size of data packets according to network conditions such as network bandwidth, delay and packet loss rate. For example, when the network conditions are good, send larger data packets to reduce protocol overhead; when the network is unstable, send smaller data packets to reduce the risk of packet loss. This can improve the efficiency and reliability of data transmission and reduce transmission delays. 2) Automatically select the optimal encryption and proof algorithm, that is, automatically select the most appropriate encryption algorithm and proof algorithm according to system load, data type and security requirements. For example, select an algorithm with lower computational overhead to increase processing speed, or select an algorithm with higher security to ensure data security. Automatically selecting the optimal algorithm can maximize system performance while ensuring security.

[0233] The use of pre-computation technology specifically includes: 1) pre-computing some zero-knowledge proof components. Specifically, when the system is idle, some intermediate results or commonly used components in the zero-knowledge proof process are calculated in advance. These results can be quickly called during actual verification instead of being recalculated each time. By reducing the complexity of real-time calculations, the generation and verification of zero-knowledge proofs can be accelerated. 2) Cache frequently used intermediate results, that is, cache frequently used intermediate calculation results for quick access during subsequent use. For example, cache the intermediate values ​​in certain encryption algorithms to avoid repeated calculations. The caching mechanism can significantly improve the system's response speed, reduce the overhead of repeated calculations, and improve overall processing efficiency.

[0234] In this embodiment, the performance optimization steps include implementing parallel processing, adaptive algorithms and pre-computation technology. Through these optimization measures, the efficiency and response speed of the system when processing encryption and decryption, data verification and other operations can be significantly improved. These optimization measures work together to improve processing efficiency and user experience while ensuring system security.

[0235] The following is a detailed explanation using a secure telemedicine data transmission system as an example.

[0236] In telemedicine scenarios, the patient's health data needs to be securely transmitted from the wearable device to the hospital's server for analysis. Using the method disclosed in this application, the following process can be implemented:

[0237] 1) System initialization: The patient’s wearable device and hospital server pre-install the necessary cryptographic components and system parameters; set differential privacy parameters, such as ε = 0.1, δ = 10 5 , to protect the privacy of patients and ensure that the privacy of patients is fully protected during data transmission and analysis.

[0238] 2) Session key negotiation: The wearable device generates a temporary ECDH key pair and applies Laplace noise to the public key; the device sends the perturbed public key and the corresponding zero-knowledge proof to the hospital server; the server verifies the proof and sends back its own perturbed public key and proof; both parties calculate the shared key and derive the session key.

[0239] 3) Data transmission protection: The device encrypts the collected heart rate, blood pressure and other data using AESGCM and session keys; constructs a data packet containing the encrypted data, authentication tag and timestamp; and sends the data packet to the server through a secure communication channel.

[0240] 4) Input authenticity verification: The device generates a cryptographic commitment for the original health data; constructs a zero-knowledge proof that proves the authenticity of the data and the correctness of the differential privacy operation; the server verifies the received proof to ensure the authenticity of the data and the correct implementation of privacy protection.

[0241] 5) Dynamic key update: The system automatically triggers a key update every time 1GB of data is transferred or every 24 hours; the negotiation of the new key is completed without interrupting data transmission.

[0242] In this way, the telemedicine system can ensure the security, privacy and authenticity of patient data while maintaining efficient data transmission, that is, it realizes efficient and secure medical data transmission and ensures the security and privacy of patient data in telemedicine scenarios.

[0243] The following is a detailed explanation using the secure communication of a distributed financial transaction system as an example.

[0244] In a distributed financial transaction system, multiple transaction nodes need to exchange sensitive transaction information securely. Using this technical solution, the following process can be implemented:

[0245] 1) System initialization: All transaction nodes pre-configure system parameters and initial trust relationships; set differential privacy parameters, such as ε = 0.05, δ = 10 6 , to protect transaction details.

[0246] 2) Session key negotiation: Each pair of nodes that need to communicate executes a key exchange protocol based on elliptic curves; uses a Gaussian noise mechanism to perturb the exchanged public keys; and uses Bulletproofs to generate zero-knowledge proofs to prove the correctness of the perturbation process.

[0247] 3) Data transmission protection: Transaction data is encrypted using the ChaCha20Poly1305 algorithm and the negotiated session key; a unique nonce is generated for each transaction to ensure the uniqueness of the encryption; a secure data packet is constructed containing the encrypted transaction data, authentication tag, and transaction ID.

[0248] 4) Input authenticity verification: The transaction initiator generates a Merkle tree commitment for the transaction data; uses zkSNARKs to build proofs to prove the validity of the transaction input and the adequacy of the balance; the recipient verifies these proofs before executing the transaction.

[0249] 5) Dynamic key update: The system dynamically adjusts the key update frequency based on transaction volume and risk assessment; during peak trading periods, the key may be updated once an hour.

[0250] 6) Exception handling: Continuously monitor network traffic and transaction patterns to detect potential attacks; once an anomaly is detected, immediately isolate the affected nodes and initiate recovery procedures.

[0251] 7) Performance optimization: implement parallel verification and processing of transactions; use pre-computation technology to accelerate frequent cryptographic operations.

[0252] In this way, distributed financial transaction systems can achieve fast and reliable transaction processing while ensuring high security and privacy protection.

[0253] The second aspect of the present application discloses a data transmission protection system, which specifically includes:

[0254] An initialization module is used to initialize the target system; the initialization includes establishing a secure communication channel of the target system, configuring a preset differential privacy mechanism, and configuring a preset zero-knowledge proof system. The target system includes one or more sending ends and one or more receiving ends;

[0255] A perturbation module, used to perturb the initial public key in the generated temporary key pair based on a preset differential privacy mechanism to obtain a first public key; the temporary key pair includes the private key and the initial public key;

[0256] A generating module, used for exchanging a first public key through a secure communication channel to generate zero-knowledge proof information;

[0257] A verification module, used to verify the received first public key based on a preset zero-knowledge proof system and zero-knowledge proof information. If the verification is successful, a shared key is calculated based on the private key of the party and the received first public key, and a session key is obtained based on a key derivation function and the shared key.

[0258] The encryption module is used to encrypt the original data to be transmitted based on the session key, obtain the encrypted data packet, and send the encrypted data packet to the receiving end through the secure communication channel.

[0259] It should be noted that the solutions in the data transmission protection method disclosed in the first aspect of the present application are all applicable to the data transmission protection system disclosed in the second aspect of the present application, so they will not be repeated here.

[0260] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.

[0261] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device performs all or part of the steps of the data transmission protection method of each embodiment of the present disclosure.

[0262] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.

[0263] like Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 7 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0264] like Figure 7 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0265] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 7 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0266] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the data transmission protection method of the embodiment of the present disclosure are executed.

[0267] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0268] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the data transmission protection method of each embodiment of the present disclosure are executed.

[0269] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).

[0270] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0271] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0272] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0273] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0274] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0275] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0276] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0277] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A data transmission protection method, characterized in that: include: Initializing a target system; the initialization includes establishing a secure communication channel of the target system, configuring a preset differential privacy mechanism, and configuring a preset zero-knowledge proof system, wherein the target system includes one or more sending ends and one or more receiving ends; The generated temporary key pair is perturbed based on the preset differential privacy mechanism on the initial public key in the temporary key pair to obtain a first public key; The temporary key pair includes the own private key and the initial public key; Exchanging the first public key through the secure communication channel to generate zero-knowledge proof information; Verifying the received first public key based on the preset zero-knowledge proof system and the zero-knowledge proof information, and if the verification is successful, calculating a shared key based on the private key of the party and the received first public key; Obtaining a session key based on a key derivation function and the shared key; Encrypting the original data to be transmitted based on the session key to obtain an encrypted data packet, and sending the encrypted data packet to a receiving end through the secure communication channel; The configuration presets the differential privacy mechanism including a privacy budget parameter, a failure probability parameter, and configurations of several noise mechanisms; Several of the noise mechanisms correspond to different types of queries; The method for generating zero-knowledge proof information includes: configuring a preset circuit; obtaining private input information based on the temporary key pair and a preset disturbance parameter; obtaining public input information based on the first public key, the privacy budget parameter, and the failure probability parameter; and generating the zero-knowledge proof information based on the preset circuit, the private input information, the public input information, and a zero-knowledge proof algorithm.

2. The data transmission protection method according to claim 1, characterized in that: The method for establishing the secure communication channel comprises: Establishing an initial secure connection; Based on the initial secure connection, the sending end sends a connection request to the receiving end, where the connection request includes an encryption suite, a protocol version, and a first random number supported by the sending end; The receiving end sends a reply message to the sending end in response to the connection request, wherein the reply message includes the encryption suite, protocol version, second random number and certificate chain information supported by the receiving end; The sending end verifies the identity of the receiving end based on the reply information. If the identity of the receiving end is verified, the sending end generates a first Finished message and sends it to the receiving end for handshake security confirmation. The receiving end generates a second Finished message and sends it to the sending end for handshake security confirmation. If both the first Finished message and the second Finished message pass the security verification, the secure communication channel is established.

3. The data transmission protection method according to claim 1, characterized in that: The configuration presets a zero-knowledge proof system, including: Determine a preset zero-knowledge proof system based on data verification information of the target system; the data verification information includes proof size information, proof generation time information, and proof verification time information; Generate several public parameters required by the preset zero-knowledge proof system based on a trusted setup process; Sending a plurality of the common parameters to the corresponding receiving ends respectively.

4. The data transmission protection method according to claim 1, characterized in that: The step of encrypting the original data to be transmitted based on the session key to obtain an encrypted data packet includes: Divide the original data to be transmitted into blocks to obtain a plurality of data blocks, and generate a unique block identifier for each of the data blocks; Encrypting each of the data blocks based on the session key and a preset encryption algorithm, and generating an authentication tag for each encrypted data block; The encrypted data blocks, the block identifiers, and the authentication tags are packaged to obtain an encrypted data packet.

5. The data transmission protection method according to claim 4, characterized in that: Also includes: After the encrypted data blocks, the block identifiers, and the authentication tags are packaged, a serial number and a timestamp are added to obtain the encrypted data.

6. The data transmission protection method according to claim 5, characterized in that: Also includes: Generate a cryptographic commitment based on the original data to be transmitted; Encapsulating the cryptographic commitment, and signing the encapsulated cryptographic commitment based on the private key of the sender; Sending the signed cryptographic commitment to the receiving end based on the secure communication channel and a preset broadcast mechanism; The sending end generates an initial proof based on the original data to be transmitted, and the receiving end verifies the authenticity of the initial proof based on a preset zero-knowledge proof system. If it is authentic, the receiving end processes the received encrypted data packet to generate a new commitment; Determine whether the new commitment is consistent with the cryptographic commitment, and if so, call the encrypted data packet.

7. The data transmission protection method according to claim 6, characterized in that: The generating of the cryptographic commitment based on the original data to be transmitted includes: processing the original data to be transmitted based on a preset cryptographic hash function to generate the cryptographic commitment; The method for generating the new commitment is consistent with the method for generating the cryptographic commitment.

8. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transmission protection method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Network data secure transmission method

    CN106506470A

  • Data encryption transmission method and system based on transport layer security protocol

    CN117879873A

  • Verifiable privacy protection federal learning method based on block chain

    CN118400087A