A data security interaction method, device and program product based on privacy computing
By adopting a method based on privacy computing in data transmission, generating a unique encryption key for each data block, and performing encryption processing in conjunction with historical interaction data, the problem of low data transmission security in the existing technology is solved and a higher level of security is achieved. Data transmission security and integrity.
Patent Information
- Application Number
- CN202410982169.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-07-22
AI Technical Summary
The prior art uses fixed key encryption in data transmission, which has low security problems, and independent encryption makes data packets susceptible to stealing and cracking, reducing the security of transmission.
A method based on privacy computation is used to determine the initial key by obtaining the initial key sequence of the data to be transmitted, dividing the data into blocks and generating unique key index parameters for each data block. Generate privacy encryption keys based on historical interaction data, and perform privacy encryption on data blocks.
By generating different encryption keys for each data block, the low security problem of fixed-key encryption is avoided and the security of data transmission is improved. At the same time, the encryption key correlation of historical interaction data is introduced to increase the difficulty for criminals to crack the data and ensure the integrity and security of the data.
Smart Images

Figure CN118839356B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data security technology, and specifically relates to a data security interaction method, device and program product based on privacy computing. Background Art
[0002] In recent years, with the rise of the Internet of Things, people's lives and the Internet have become closer. The core and foundation of the Internet of Things is still the Internet. It is an extension and expansion of the Internet. It refers to connecting any object to the network through information sensing devices in accordance with the agreed protocol. Objects exchange and communicate information through information transmission media to achieve intelligent identification, positioning, tracking and supervision functions; and with the widespread application of the Internet of Things, the amount of data interaction between terminals and servers has become increasingly large; therefore, the security of information transmission has also become a focus of attention.
[0003] In actual application, most of the technical solutions of encrypted transmission are used to ensure the security of data transmission; however, the existing method usually uses a fixed key encryption method to encrypt data packets, which is easy to be cracked and has the problem of low security. In addition, the independent encryption principle is used to encrypt data packets. Therefore, the sent data packets can be stolen and cracked individually, which further reduces the security of transmission; based on this, how to provide a highly secure data security interaction method has become a problem to be solved urgently. Summary of the invention
[0004] The purpose of the present invention is to provide a data security interaction method, device and program product based on privacy computing to solve the problem of low transmission security in the prior art.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, a data security interaction method based on privacy computing is provided, comprising:
[0007] Acquire data to be transmitted and an initial key sequence of the data to be transmitted;
[0008] Processing the data to be transmitted in blocks to obtain a plurality of data blocks;
[0009] For an i-th data block among the plurality of data blocks, generate a key index parameter of the i-th data block, and determine an initial key of the i-th data block from the initial key sequence based on the key index parameter;
[0010] Acquire historical interaction data, wherein the historical interaction data is interaction data of the sending node during the last data security interaction before the current data security interaction, and the current data security interaction is the security interaction of the i-th data block;
[0011] Based on the historical interaction data and the initial key, generate a privacy encryption key for the i-th data block;
[0012] Using the privacy encryption key, perform privacy encryption processing on the i-th data block to obtain the encrypted i-th data block, and transmit the encrypted i-th data block to the receiving node, so as to complete the secure interaction of the i-th data block after the transmission;
[0013] Increment i by 1 and regenerate the key index parameter of the i-th data block until i is equal to n, thereby completing the secure interaction of the data to be transmitted, wherein the initial value of i is 1, n is the total number of data blocks, and the key index parameters of each data block are different.
[0014] Based on the above disclosed content, the present invention first generates an initial key sequence of the data to be transmitted before data transmission; then, the data to be transmitted is divided into several data blocks; then, based on the aforementioned initial key sequence, each data block can be encrypted and transmitted according to the order of data block division; specifically, for the i-th data block, the present invention first generates a key index parameter of the i-th data block, and based on this, determines the initial key of the i-th data block from the initial key sequence; then, the interaction data of the last data security interaction before the transmission of the i-th data block is obtained, and combined with the aforementioned initial key, the privacy encryption key of the i-th data block is generated; finally, the i-th data block is privacy encrypted using the privacy encryption key, and the encrypted data block is sent to the receiving node, so that the security interaction of the i-th data block can be completed; in this way, according to the aforementioned principle, the remaining data blocks are encrypted and transmitted until all data blocks are transmitted, and the security interaction of the entire data to be transmitted can be completed.
[0015] Through the above design, the present invention generates different key index parameters for each data block. Therefore, the initial keys obtained based on different key index parameters and the privacy encryption keys generated according to the initial keys are different from each other. In this way, each data block is encrypted with a different encryption key, which can avoid the low security problem of using a fixed key to encrypt a data packet in the traditional technology. At the same time, when generating the encryption key of each data block, the previous data block of the current data block is introduced. Based on this, the encryption key of the data block to be transmitted can be associated with the last interactive data. Therefore, if criminals want to crack a complete transmission data, they must monitor the entire transmission process and intercept all data blocks. This increases the difficulty of data monitoring and interception, and as long as any data block is tampered with, it is impossible to decrypt and obtain the complete transmission data. Therefore, this further improves the security of transmission. Based on this, the present invention is very suitable for large-scale application and promotion.
[0016] In one possible design, obtaining the initial key sequence of the data to be transmitted includes:
[0017] Obtain a first key iteration function and a second key iteration function;
[0018] generating a first key sequence based on the first key iteration function, and generating a second key sequence based on the second key iteration function;
[0019] The initial key sequence is generated according to the first key sequence and the second key sequence.
[0020] In one possible design, the first key iteration function is:
[0021]
[0022] In formula (1), is the first key iteration function and represents the first key value at the t+1th iteration, represents the first key value of the first key iteration function at the tth iteration, θ represents the iteration parameter, when t is 1, Among them, r0 is the initial value, λ is the control parameter, and r0∈(0,1), λ∈(0,4];
[0023] Wherein, the second key iteration function is:
[0024]
[0025] In formula (2), represents the second key iteration function, and represents the second key value at the t+1th iteration, Denote the second key value of the second key iteration function at the t-th iteration, Denote the second key value of the second key iteration function at the (t - 1)-th iteration, R is an iteration constant, mod represents the modulo operation, and when t is 1, and are initial values;
[0026] Correspondingly, generating the initial key sequence according to the first key sequence and the second key sequence includes:
[0027] Generating an initial key sequence based on the first key sequence and the second key sequence according to the following formula (3);
[0028]
[0029] In the above formula (3), k z Denote the z-th initial key in the initial key sequence, Denote the (z + 1)-th first key value in the first key sequence, Denote the z-th second key value in the second key sequence, where z = 1, 2,..., Z, Z < T, and Z represents the maximum length of the initial key sequence, and T represents the length of the first key sequence.
[0030] In a possible design, generating the key index parameter for the i-th data block includes:
[0031] Obtain the node identifier of the sending node;
[0032] Generate a timestamp and a random integer for the i-th data block;
[0033] Concatenate the timestamp and the node identifier to obtain a concatenation parameter after concatenation processing;
[0034] Perform a hash operation on the concatenation parameter to obtain a bit index parameter;
[0035] Use the random integer and the bit index parameter to form the key index parameter;
[0036] Correspondingly, determining the initial key of the i-th data block from the initial key sequence based on the key index parameter includes:
[0037] Determine a key truncation bit from the initial key sequence according to the bit index parameter;
[0038] Taking the key interception bit as the starting point, an initial key of length p is intercepted from the initial key sequence, and the intercepted initial key is used as the initial key of the i-th data block, wherein p is the random integer.
[0039] In a possible design, the historical interaction data includes: plaintext data and ciphertext data of the sending node during the last data security interaction before the current data security interaction;
[0040] The step of generating a privacy encryption key for the i-th data block based on the historical interaction data and the initial key includes:
[0041] Performing an XOR operation on the initial key and the plaintext data in the historical interaction data to obtain an intermediate key parameter, wherein when i is 1, the plaintext data is the initial data, and the initial data is obtained by performing an XOR operation on the hash value of the node identifier of the sending node and the hash value of the node identification code;
[0042] Performing a hash operation on the intermediate key parameter to obtain a hash value of the intermediate key parameter;
[0043] Performing an XOR operation on the hash value of the intermediate key parameter and the ciphertext data in the historical interaction data, so as to obtain the privacy encryption key of the i-th data block after the XOR operation, wherein when i is 1, the ciphertext data is the hash value of the initial data;
[0044] Correspondingly, using the privacy encryption key to perform privacy encryption processing on the i-th data block includes:
[0045] Using the privacy encryption key and the following formula (4), the i-th data block is subjected to privacy encryption processing;
[0046]
[0047] In the above formula (4), F i represents the encrypted i-th data block, D i represents the i-th data block, K i represents the privacy encryption key of the i-th data block, Hash() represents the hash function, Represents the exclusive-or operation.
[0048] In one possible design, before the data to be transmitted is processed in blocks, the method further includes:
[0049] Acquire all communication paths between the sending node and the receiving node to form a communication path set;
[0050] Constructing a stability probability model for each communication path in the communication path set, and based on the stability probability model for each communication path, obtaining a transmission stability probability value for each communication path in the communication path set;
[0051] Calculating the total transmission delay of each communication path in the communication path set and the transmission interference degree of each communication path;
[0052] According to the total transmission delay and the transmission stability probability value of each communication path, and the transmission interference degree of each communication path, determine the optimal communication path of the data to be transmitted from the communication path set, so as to complete the secure interaction of the data to be transmitted based on the optimal communication path;
[0053] Accordingly, transmitting the encrypted i-th data block to the receiving node includes:
[0054] The encrypted i-th data block is transmitted from the optimal communication path to the receiving node.
[0055] In a possible design, constructing a stability probability model of each communication path in the communication path set includes:
[0056] For any communication path in the communication path set, count the number of paths between the bth node and the cth node in the any communication path that meet the constraint condition, wherein the constraint condition is that the path length is equal to the shortest length and b≠c;
[0057] Calculate the transmission stability equivalent value between the b-th node and the c-th node based on the number of paths between the b-th node and the c-th node that meet the constraint condition;
[0058] Add 1 to c, and recount the number of paths that meet the constraint conditions between the bth node and the cth node in any communication path until c is equal to X, and obtain the transmission stability equivalent value between the bth node and the remaining nodes in any communication path, where the initial value of c is 2, and X is the total number of nodes in any communication path;
[0059] b is incremented by 1, and the number of paths between the bth node and the cth node in any communication path that meet the constraint condition is recounted until b is equal to X-1, and a number of transmission stability equivalent values are obtained, wherein the initial value of b is 1;
[0060] A stability probability model of any communication path is constructed according to a number of transmission stability equivalent values and the total number of nodes in any communication path.
[0061] In a second aspect, a data security interaction device based on privacy computing is provided, taking a sending node as an example, including:
[0062] An acquisition unit, used to acquire data to be transmitted and an initial key sequence of the data to be transmitted;
[0063] A block division unit, used for performing block processing on the data to be transmitted to obtain a plurality of data blocks;
[0064] a key generating unit, configured to generate a key index parameter of the i-th data block for the i-th data block among the plurality of data blocks, and determine an initial key of the i-th data block from the initial key sequence based on the key index parameter;
[0065] A key generation unit, configured to obtain historical interaction data, wherein the historical interaction data is interaction data of the sending node during the last data security interaction before the current data security interaction, and the current data security interaction is the security interaction of the i-th data block;
[0066] The key generation unit is further used to generate a privacy encryption key of the i-th data block based on the historical interaction data and the initial key;
[0067] An encryption unit, configured to perform privacy encryption processing on the ith data block using the privacy encryption key to obtain the encrypted ith data block, and transmit the encrypted ith data block to a receiving node, so as to complete the secure interaction of the ith data block after the transmission;
[0068] The encryption unit is also used to add 1 to i and regenerate the key index parameter of the i-th data block until i is equal to n, thereby completing the secure interaction of the data to be transmitted, wherein the initial value of i is 1, n is the total number of data blocks, and the key index parameters of each data block are different.
[0069] According to the third aspect, another data security interaction device based on privacy computing is provided. Taking the device as an electronic device as an example, the device includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the data security interaction method based on privacy computing as described in the first aspect or any one of the possible designs in the first aspect.
[0070] In a fourth aspect, a storage medium is provided, on which instructions are stored. When the instructions are run on a computer, the data security interaction method based on privacy computing as described in the first aspect or any possible design of the first aspect is executed.
[0071] In a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed on a computer, the computer executes the data security interaction method based on privacy computing as described in the first aspect or any possible design of the first aspect.
[0072] Beneficial effects:
[0073] (1) The present invention generates different key index parameters for each data block. Therefore, the initial keys obtained based on different key index parameters and the privacy encryption keys generated based on the initial keys are different from each other. In this way, each data block is encrypted using a different encryption key, which can avoid the low security problem of using a fixed key to encrypt a data packet in the traditional technology. At the same time, when generating the encryption key of each data block, the previous data block of the current data block is introduced. Based on this, the encryption key of the data block to be transmitted can be associated with the last interactive data. Therefore, if criminals want to crack a complete transmission data, they must monitor the entire transmission process and intercept all data blocks. This increases the difficulty of data monitoring and interception. If any data block is tampered with, it is impossible to decrypt the complete transmission data. Therefore, this further improves the security of transmission. Based on this, the present invention is very suitable for large-scale application and promotion.
[0074] (2) After completing the encryption of the data block, the present invention also uses the three indicators of transmission stability, total transmission delay and path transmission interference to select the optimal communication path from the various communication paths between the sending node and the receiving node to transmit the encrypted data block; in this way, through the above-mentioned design, the speed and stability of the encrypted database during transmission can be guaranteed, thereby further improving the reliability of the encrypted data block during transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 A schematic diagram of the steps of a data security interaction method based on privacy computing provided in an embodiment of the present invention;
[0076] Figure 2 A schematic diagram of the structure of a data security interaction device based on privacy computing provided in an embodiment of the present invention;
[0077] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0079] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present invention.
[0080] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0081] Example:
[0082] See also Figure 1As shown, the data security interaction method based on privacy computing provided in this embodiment generates different encryption keys for each data block in a data to be transmitted. In this way, different encryption keys are used for encryption processing to improve the security of encryption. At the same time, for any data block, when generating the encryption key of any data block, the previous data block of any data block is introduced. Based on this, the encryption key of the current data block to be transmitted can be associated with the last interaction data, so that in order to decrypt and obtain the complete data, all data blocks need to be intercepted, and once any data block is tampered with, the complete transmission data cannot be obtained. Therefore, this further improves the security of data transmission. Therefore, this method is very suitable for large-scale promotion and application in the field of data security technology. Among them, for example, this method can be but not limited to running on the sending node side. Optionally, the sending node can be but not limited to a personal computer (PC), a tablet computer or a smart phone. It can be understood that the aforementioned execution subject does not constitute a limitation on the embodiments of the present application. Accordingly, the running steps of the method can be but not limited to the following steps S1 to S7.
[0083] S1. Obtain the data to be transmitted and the initial key sequence of the data to be transmitted; in this embodiment, the initial key sequence is generated by using two key iteration functions, and the process can be but is not limited to the following steps S11 to S13.
[0084] S11. Obtain a first key iteration function and a second key iteration function. In a specific implementation, the first key iteration function and the second key iteration function may be, but are not limited to, respectively as shown in the following formulas (1) and (2).
[0085]
[0086] In formula (1), is the first key iteration function and represents the first key value at the t+1th iteration, represents the first key value of the first key iteration function at the tth iteration, θ represents the iteration parameter, when t is 1, Wherein, r0 is the initial value, λ is the control parameter, and r0∈(0,1), λ∈(0,4]; in this embodiment, θ, r0 and λ can be specifically set according to actual use and are not specifically limited here.
[0087] Similarly, the second key iteration function can be expressed as but not limited to:
[0088]
[0089] In formula (2), represents the second key iteration function, and represents the second key value at the t+1th iteration, represents the second key value of the second key iteration function at the tth iteration, represents the second key value of the second key iteration function at the t-1th iteration, R is an iteration constant (which can be specifically set according to actual use and is not specifically limited here), mod represents a remainder operation, and when t is 1, and is the initial value.
[0090] In this way, the corresponding key sequence can be generated through the above formulas (1) and (2), so as to facilitate the subsequent generation of the initial key sequence based on the two key sequences; wherein, the generation process of the key sequence corresponding to the two key iterative functions can be but is not limited to as shown in the following step S12.
[0091] S12. Based on the first key iteration function, a first key sequence is generated, and based on the second key iteration function, a second key sequence is generated. In this embodiment, the first key iteration function is taken as an example to illustrate the generation process of the first key sequence, that is, from the above formula (1), when t is 1, Calculated by r0 and λ, at this time, according to The interval to which it belongs is calculated by selecting one of the formulas in formula (1) In calculating After that, the next iteration can be carried out, that is, when t is 2, according to The interval to which it belongs is selected in formula (1) and the formula associated with the corresponding interval is calculated to obtain In this way, by continuously iterating according to this principle, the first key values in the iterative process can be obtained; finally, the first key sequence can be formed using the first key values; of course, the generation principle of the second key sequence is the same as that of the first key sequence, and will not be elaborated here.
[0092] After the first key sequence and the second key sequence are obtained, an initial key sequence may be determined based on them, and the process may be but is not limited to that shown in the following step S13.
[0093] S13. Generate the initial key sequence according to the first key sequence and the second key sequence; in a specific implementation, the distance can be, but is not limited to, based on the first key sequence and the second key sequence, and the initial key sequence is generated according to the following formula (3).
[0094]
[0095] In the above formula (3), k zrepresents the z-th initial key in the initial key sequence, represents the (z + 1)-th first key value in the first key sequence, represents the z-th second key value in the second key sequence, where z = 1, 2,..., Z, Z < T, and Z represents the maximum length of the initial key sequence, and T represents the length of the first key sequence.
[0096] Based on the foregoing formula (3), it can be seen that it is equivalent to using each key value in the first key sequence and the second key sequence to generate the initial key sequence; for example, using the second first key value in the first key sequence and the first second key value in the second key sequence to generate the first initial key in the initial key sequence; similarly, using the third first key value in the first key sequence and the second second key value in the second key sequence to generate the second initial key; thus, multiple initial keys can be generated based on this principle; finally, based on each initial key, an initial key sequence is formed.
[0097] Thus, through the foregoing steps S11 to S13, an initial key sequence of the data to be transmitted can be generated; then, based on this initial key sequence, the data to be transmitted can be encrypted; specifically, in this embodiment, the data to be transmitted is first divided, and then each data block is encrypted and transmitted in the division order; among them, the division process of the data to be transmitted can be but is not limited to the following steps shown in S2.
[0098] S2. Perform a block processing on the data to be transmitted to obtain a plurality of data blocks; in this embodiment, for example, it can be but is not limited to first dividing the data to be transmitted according to a fixed length to obtain a plurality of initial data blocks; then, converting each initial data block into a binary plaintext bit string; thus, after the conversion is completed, a plurality of data blocks can be obtained.
[0099] After the data to be transmitted is divided into blocks, the initial key of each divided data block can be determined based on the foregoing initial key sequence, so as to generate a privacy encryption key for each data block based on the initial key in the subsequent process; specifically, in this embodiment, the data blocks are encrypted and transmitted in the division order; among them, the determination process of the initial key can be but is not limited to the following steps shown in S3.
[0100] S3. For the ith data block among the several data blocks, generate a key index parameter of the ith data block, and based on the key index parameter, determine the initial key of the ith data block from the initial key sequence; in specific applications, this embodiment generates a corresponding key index parameter based on the node identifier of the sending node and the timestamp of the ith data block, and then determines the initial key of the ith data block based on the generated key index parameter; wherein the aforementioned process can be but is not limited to the following steps S31 to S37.
[0101] S31. Obtain the node identifier of the sending node; in this embodiment, the node identifier can be, but is not limited to, the device identifier of the transmitting node, such as a unique device identifier; of course, the node identifier is pre-set in the sending node and can be read when used; at the same time, other identification codes can also be used as node identifiers (such as setting a different node identification code for each sending node), and the specific identification code can be set according to actual use, and is not limited to the aforementioned example.
[0102] After obtaining the node identifier, a corresponding timestamp and random integer can be generated for the i-th data block, so as to subsequently combine the node identifier to generate a key index parameter, wherein the timestamp and random integer generation process can be but is not limited to as shown in the following step S32.
[0103] S32. Generate a timestamp and a random integer for the i-th data block; in this embodiment, for example, it can be but not limited to taking the 12-digit decimal number determined by the Greenwich Mean Time when the encryption event of the i-th data block occurs as its corresponding timestamp (the encryption event can be the event for entering the key index parameter generation process, that is, the time when the node identifier is obtained, as the timestamp); and the random integer can be generated by a random number library, and its value can be limited to 20; in this way, after generating the timestamp and random integer of the i-th data block, it can be combined with the aforementioned node identifier to generate the key index parameter of the i-th data block, and the process can be but not limited to the following steps S33 to S35.
[0104] S33. Concatenate the timestamp and the node identifier to obtain concatenation parameters after the concatenation. In a specific implementation, if the node identifier contains letters, the node identifier can be converted into a binary code, for example. Similarly, the timestamp can also be converted into a binary code and then concatenated. At the same time, if the node identifier is a number, then it can be directly concatenated with the timestamp to obtain the concatenation parameters.
[0105] After the splicing parameters are obtained, the bit index parameters can be obtained based on the splicing parameters, and the process is shown in the following step S34.
[0106] S34. Perform a hash operation on the concatenated parameters to obtain a bit index parameter; in a specific application, the concatenated parameters may be hashed using, for example but not limited to, the SHA256 hash function to obtain a 64-bit hexadecimal string; then, a number, two consecutive numbers, or three consecutive numbers may be randomly selected from the aforementioned hexadecimal string as the bit index parameter; at the same time, if the obtained hexadecimal string is entirely letters, a letter or two consecutive letters may be converted into decimal to obtain a bit index parameter; in this way, after obtaining the bit index parameter, it may be combined with a random integer to form a key index parameter, and the process may be, but not limited to, as shown in the following step S35.
[0107] S35. Utilize the random integer and the bit index parameter to form the key index parameter; in the present embodiment, the bit index parameter is used to determine the starting point of the initial key in the initial key sequence, and the random integer is used to determine the length of the initial key; thus, based on the aforementioned random integer and bit index parameter, the initial key corresponding to the aforementioned i-th data block can be intercepted in the initial key sequence, and the process can be but is not limited to as shown in the following steps S36 and S37.
[0108] S36. Determine a key truncation bit from the initial key sequence according to the bit index parameter.
[0109] S37. Taking the key interception bit as the starting point, an initial key of length p is intercepted from the initial key sequence, and the intercepted initial key is used as the initial key of the i-th data block, wherein p is the random integer; in the specific implementation, an example is used to illustrate the initial key interception process, wherein, assuming that the bit index parameter is 43 and the random integer is 10, then the 43rd bit of the initial key sequence is taken as the starting point (that is, the 43rd initial key is the starting point), and then an initial key string of length 10 is intercepted to serve as the initial key of the i-th data block (that is, the initial key between the 43rd and 53rd bits is used as the initial key of the i-th data block); of course, the length of the initial key sequence should be greater than the bit index parameter.
[0110] In this way, through the aforementioned steps S31 to S37, the key index parameter of the i-th data block can be used to determine its corresponding initial key; then, in order to improve the security of encryption, this embodiment also obtains the historical interaction data used in the previous encryption process of the current encryption, so as to subsequently generate the privacy encryption key of the i-th data block based on the historical interaction data and the initial key; wherein, the process of obtaining the historical interaction data can be but is not limited to as shown in the following step S4.
[0111] S4. Obtain historical interaction data, wherein the historical interaction data is the interaction data of the sending node during the last data security interaction of the current data security interaction, and the current data security interaction is the security interaction of the i-th data block; in specific applications, the historical interaction data may include, but is not limited to: the plaintext data and ciphertext data of the sending node during the last data security interaction of the current data security interaction; if i is assumed to be 2, then the interaction data used in the previous encryption process of encrypting the second data block is obtained, that is, the first data block (i.e., plaintext data) and the first encrypted data block (i.e., ciphertext data) are obtained; at the same time, when i is 1 (i.e., at the initial encryption), the plaintext data is the initial data, and the initial data is obtained by performing an XOR operation on the hash value of the node identifier of the sending node and the hash value of the node identification code; at the same time, the ciphertext data is the hash value of the initial data; in addition, the node identification code may be, but is not limited to, a code uniquely generated by the communication server for each node in the communication network and sent to each node.
[0112] In this way, after obtaining the historical interaction data, the initial key of the i-th data block can be combined to generate the corresponding privacy encryption key; wherein, the generation process of the privacy encryption key can be but is not limited to as shown in the following step S5.
[0113] S5. Generate a privacy encryption key for the i-th data block based on the historical interaction data and the initial key. In this embodiment, the initial key and the plaintext data in the historical interaction data are first subjected to an XOR operation (bitwise XOR operation) to obtain an intermediate key parameter. Then, the intermediate key parameter is subjected to a hash operation to obtain a hash value of the intermediate key parameter. Finally, the hash value of the intermediate key parameter is subjected to an XOR operation with the ciphertext data in the historical interaction data, thereby obtaining the privacy encryption key for the i-th data block after the XOR operation.
[0114] After the privacy encryption key of the i-th data block is obtained based on the aforementioned step S5, the i-th data block can be encrypted based on it, and the process can be but not limited to as shown in the following step S6.
[0115] S6. Use the privacy encryption key to perform privacy encryption processing on the i-th data block to obtain the encrypted i-th data block, and transmit the encrypted i-th data block to the receiving node to complete the secure interaction of the i-th data block after transmission; in specific applications, for example, but not limited to, the following formula (4) can be used to perform privacy encryption processing on the i-th data block.
[0116]
[0117] In the above formula (4), F i represents the encrypted i-th data block, D i represents the i-th data block, K i represents the privacy encryption key of the i-th data block, Hash() represents the hash function, represents an XOR operation; in this embodiment, an XOR operation is performed bit by bit to obtain the encrypted i-th data block.
[0118] Thus, through the aforementioned formula (4), the encryption processing of the i-th data block can be completed to obtain the encrypted i-th data block; then, the encrypted i-th data block can be sent to the receiving node, thereby completing the encrypted transmission of the i-th data block; in this way, after completing the encrypted transmission of the first data block, the encrypted transmission of the next data block can be carried out according to this principle, until all data blocks are polled, the encrypted transmission of the entire data to be transmitted can be completed; wherein, the encrypted transmission cycle process can be but is not limited to as shown in the following step S7.
[0119] S7. Increment i by 1 and regenerate the key index parameter of the i-th data block until i is equal to n, completing the secure interaction of the data to be transmitted, wherein the initial value of i is 1, n is the total number of data blocks, and the key index parameters of each data block are different.
[0120] In this way, the encrypted transmission of the data to be transmitted can be completed through the aforementioned steps S1 to S7; at the same time, when the receiving node needs to decrypt, it first authenticates the identity of the sending node. After the identity authentication is passed, the sending node will send the initial key of each data block to the receiving node (that is, it is equivalent to a symmetric key); then, the receiving node, for any encrypted data block received, performs an operation on the initial key of any encrypted data block with the ciphertext received last time and the plaintext obtained by decryption (that is, first use the plaintext obtained by the last decryption and the initial key of any encrypted data block to perform an XOR operation, and then calculate the hash value of the XOR operation result; then, perform an XOR operation on the hash value and the ciphertext received last time to obtain the privacy encryption key of any encrypted data block); finally, perform an XOR operation on any encrypted data block and its corresponding privacy encryption key, so as to decrypt and obtain the plaintext data; of course, the decryption process of the remaining encrypted data blocks is the same as the aforementioned example, and will not be repeated here; based on this, after decrypting each encrypted data block, splicing them in the order of reception can obtain the data to be transmitted.
[0121] Therefore, through the data security interaction method based on privacy computing described in detail in the aforementioned steps S1 to S7, the present invention generates different encryption keys for each data block in a data to be transmitted. In this way, the use of different encryption keys for encryption processing can improve the security of encryption; at the same time, for any data block, when generating the encryption key of any data block, the previous data block of any data block is introduced. Based on this, the encryption key of the current data block to be transmitted can be associated with the last interaction data, so that in order to decrypt and obtain the complete data, all data blocks need to be intercepted, and once any data block is tampered with, the complete transmission data cannot be obtained; therefore, this further improves the security of data transmission; therefore, the method is very suitable for large-scale promotion and application in the field of data security technology.
[0122] In a possible design, the second aspect of this embodiment provides a transmission optimization scheme for encrypted data blocks based on the first aspect of the embodiment; specifically, the optimal communication path is selected from all communication paths between the sending node and the receiving node to transmit each encrypted data block to ensure the reliability of the transmission; wherein, the transmission path selection process may be before the data to be transmitted is segmented, and the process may be but is not limited to as shown in the following steps A to D.
[0123] A. Obtain all communication paths between the sending node and the receiving node to form a communication path set; in this embodiment, all communication paths between the sending node and the receiving node are determined from the communication network where the sending node and the receiving node are located, so as to use all the determined communication paths to form a communication path set; then, this embodiment selects the optimal communication path from the communication path set from three aspects: transmission stability, transmission delay, and path transmission interference; specifically, the process of determining the optimal communication path can be but is not limited to the following steps B to D.
[0124] B. Construct a stability probability model for each communication path in the communication path set, and based on the stability probability model of each communication path, obtain the transmission stability probability value of each communication path in the communication path set; in specific applications, this embodiment takes any communication path as an example to illustrate the construction process of the stability probability model, and its specific implementation method can be but is not limited to the following steps B1 to B5.
[0125] B1. For any communication path in the communication path set, count the number of paths between the bth node and the cth node in any communication path that meet the constraint conditions, wherein the constraint conditions are that the path length is equal to the shortest length, and b≠c; in this embodiment, it is possible but not limited to first obtaining all the nodes in any of the aforementioned communication paths, and then, according to the transmission direction (i.e., the direction from the sending node to the receiving node), sorting all the nodes in the any of the communication paths to obtain a node sequence; at this time, the number of paths between the bth node and the cth node in the node sequence that meet the constraint conditions can be obtained; further, the number of paths with the shortest length in the path from the bth node to the cth node is counted; of course, the shortest length is a preset value, which can be specifically set according to actual use.
[0126] After obtaining the number of paths between the bth node and the cth node that meet the constraint conditions, the transmission stability equivalent value between the bth node and the cth node can be calculated based on this; the process can be but is not limited to as shown in the following step B2.
[0127] B2. Based on the number of paths between the b-th node and the c-th node that meet the constraint conditions, the transmission stability equivalent value between the b-th node and the c-th node is calculated; in this embodiment, it is possible but not limited to obtaining the number of paths whose length is less than or equal to the aforementioned shortest length in the paths formed by all nodes in any of the aforementioned communication paths (hereinafter referred to as the target path number); if it is assumed that there are 4 nodes, namely node 1, node 2, node 3 and node 4, then it is the path formed by all two of the 4 nodes, such as the path between node 1 and node, the path between node 1 and node 3, the path between node 1 and node 4, the path between node 2 and node 3, etc., in this way, the number of paths whose length is less than or equal to the aforementioned shortest length is selected from the aforementioned paths; then, the number of paths that meet the constraint conditions between the b-th node and the c-th node can be used, divided by the aforementioned target path number, to obtain the transmission stability equivalent value between the b-th node and the c-th node.
[0128] In this embodiment, the transmission stability equivalent value is used to standardize the stability between two nodes, wherein the transmission stability equivalent value is less than or equal to 1. When it is equal to 1, it indicates that there is a directly connected edge between the two nodes, and the two nodes constitute a fully connected network at this time. In the communication network, the transmission stability of the fully connected network is the highest. Therefore, when the difference between a network structure composed of X nodes and the structure of the fully connected network is greater, its stability is worse, and when the difference is smaller, the stability is higher. Therefore, this embodiment uses the aforementioned transmission stability equivalent value to measure the network structure difference. Based on this, starting from the first node of any communication path, extending to the next node in sequence, to obtain the transmission stability equivalent value between the corresponding nodes, until it is extended to the receiving node, a round of structural difference judgment is completed. At this time, it can be started from the second node and extended again until all nodes in all the communication paths are polled. Then, the transmission stability equivalent value between each node can be used to construct a corresponding stability probability model, wherein the aforementioned process can be but not limited to the following steps B3 to B5.
[0129] B3. Add 1 to c and recount the number of paths that meet the constraints between the bth node and the cth node in any communication path until c is equal to X, and obtain the transmission stability equivalent value between the bth node and the remaining nodes in any communication path, where the initial value of c is 2 and X is the total number of nodes in any communication path.
[0130] B4. Add 1 to b and recount the number of paths between the bth node and the cth node in any communication path that meet the constraint conditions until b is equal to X-1, and obtain several transmission stability equivalent values, where the initial value of b is 1.
[0131] B5. Construct a stability probability model of any communication path based on a number of transmission stability equivalent values and the total number of nodes in any communication path.
[0132] In this embodiment, the stability probability model of any of the aforementioned communication paths is described by a formula, which may be, but is not limited to, the following formula (5).
[0133]
[0134] In the above formula (5), W represents the stability probability model of any of the above communication paths, w bc represents the transmission stability equivalent value between the bth node and the cth node in any one of the communication paths, and X represents the total number of nodes in any one of the communication paths.
[0135] In this way, through the aforementioned B1~B5, the stability probability model of each communication path can be obtained; based on this, the aforementioned model can be used to calculate the transmission stability probability value of each communication path; among them, the larger the transmission stability probability value, the smaller the structural difference between the network composed of all nodes in the path and the fully connected network, and the higher the path transmission stability.
[0136] After the transmission stability probability value of each communication path is obtained, the total transmission delay and transmission interference degree of each communication path can be calculated, and the process is shown in the following step C.
[0137] C. Calculate the total transmission delay of each communication path in the communication path set and the transmission interference degree of each communication path; in this embodiment, any communication path set is taken as an example to illustrate the calculation process of the above-mentioned total transmission delay and transmission interference degree; among which, the example can be but is not limited to using the following formula (6) to calculate the total transmission delay of any communication path.
[0138]
[0139] In the above formula (6), Y represents the total transmission delay of any communication path, η b,b+1 represents the link length between the bth node and the b+1th node in any communication path, ν represents the link transmission rate, t1 represents the node switching delay, and t2 represents the random jitter delay in the transmission process.
[0140] Similarly, the calculation process of the transmission interference degree of any communication path is as follows: first, the transmission interference degree between any communication path and the remaining communication paths is calculated; then, the transmission interference degree of any communication path is calculated based on the transmission interference degree between any communication path and the remaining communication paths; wherein the following formula (7) can be used to calculate the transmission interference degree of any of the aforementioned communication paths.
[0141]
[0142] In the above formula (7), S l represents the transmission interference degree of any communication path, σ lq represents the number of common nodes between any communication path and the qth target communication path in the target path set, ψ l , ψ q They respectively represent the intersection threshold of any communication path and the intersection threshold of the qth target communication path (which is a preset value), L represents the total number of target communication paths in the target path set, and the target path set includes all communication paths in the path communication set except any communication path.
[0143] Thus, it can be known from the above formula (7) that the present embodiment evaluates the transmission interference of the path by the number of common nodes between the paths, wherein the more common nodes between the paths (i.e., the more intersecting nodes) the paths have, the greater the probability of path congestion caused when the data converges to the common nodes, and therefore, the greater the transmission interference of other paths to the path; based on this, the fewer common nodes a path has with the other paths, the smaller the probability of path congestion, and the smaller the transmission interference of the other paths to the path.
[0144] Therefore, based on the above formulas (6) and (7), the total transmission delay and transmission interference of each communication path can be calculated; finally, the above transmission stability probability value can be combined to screen out the optimal communication path from the communication path set, and the screening process can be but is not limited to the following step D.
[0145] D. According to the total transmission delay and transmission stability probability value of each communication path, as well as the transmission interference degree of each communication path, determine the optimal communication path for the data to be transmitted from the communication path set, so as to complete the secure interaction of the data to be transmitted based on the optimal communication path; in this embodiment, for example, but not limited to, first screen out communication paths whose transmission stability probability values are greater than or equal to the stability threshold from the communication path set, and then, among the screened communication paths, use a weighted summation method to calculate the weighted values of the transmission interference degree and the total transmission delay, and finally, use the communication path with the smallest weighted value as the optimal communication path.
[0146] Therefore, through the above-mentioned design, the encrypted i-th data block can be transmitted from the optimal communication path to the receiving node, thereby ensuring the speed and stability of the encrypted data block during transmission, thereby further improving the reliability of the encrypted data block during transmission.
[0147] like Figure 2 As shown, the third aspect of this embodiment provides a hardware device for implementing the data security interaction method based on privacy computing described in the first aspect and the second aspect of the embodiment, including:
[0148] The acquisition unit is used to acquire the data to be transmitted and the initial key sequence of the data to be transmitted.
[0149] The block division unit is used to perform block processing on the data to be transmitted to obtain a plurality of data blocks.
[0150] The key generation unit is used to generate a key index parameter of the i-th data block among the plurality of data blocks, and determine an initial key of the i-th data block from the initial key sequence based on the key index parameter.
[0151] A key generation unit is used to obtain historical interaction data, wherein the historical interaction data is the interaction data of the sending node during the last data security interaction before the current data security interaction, and the current data security interaction is the security interaction of the i-th data block.
[0152] The key generation unit is further used to generate a privacy encryption key for the i-th data block based on the historical interaction data and the initial key.
[0153] The encryption unit is used to use the privacy encryption key to perform privacy encryption processing on the i-th data block to obtain the encrypted i-th data block, and transmit the encrypted i-th data block to the receiving node to complete the security interaction of the i-th data block after the transmission.
[0154] The encryption unit is also used to add 1 to i and regenerate the key index parameter of the i-th data block until i is equal to n, thereby completing the secure interaction of the data to be transmitted, wherein the initial value of i is 1, n is the total number of data blocks, and the key index parameters of each data block are different.
[0155] The working process, working details and technical effects of the device provided in this embodiment can be found in the first and second aspects of the embodiments, and will not be described in detail here.
[0156] like Figure 3 As shown, the fourth aspect of this embodiment provides another data security interaction device based on privacy computing. Taking the device as an electronic device as an example, it includes: a memory, a processor and a transceiver that are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the data security interaction method based on privacy computing as described in the first and second aspects of the embodiments.
[0157] For example, the memory may include, but is not limited to, random access memory (RAM), read only memory (ROM), flash memory, first input first output (FIFO) and / or first in last out (FILO), etc. Specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). At the same time, the processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake-up state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
[0158] In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. For example, the processor may not be limited to a microprocessor of the STM32F105 series, a reduced instruction set computer (RISC) microprocessor, an X86 or other architecture processor, or a processor with an integrated embedded neural network processor (NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a Bluetooth wireless transceiver, a general packet radio service technology (General Packet Radio Service, GPRS) wireless transceiver, a ZigBee protocol (a low-power LAN protocol based on the IEEE 802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver and / or a 5G transceiver, etc. In addition, the device may also include, but is not limited to, a power module, a display screen and other necessary components.
[0159] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first and second aspects of the embodiment, and will not be described in detail here.
[0160] The fifth aspect of this embodiment provides a storage medium that stores instructions for the data security interaction method based on privacy computing as described in the first and second aspects of the embodiment, that is, the storage medium stores instructions, and when the instructions are run on a computer, the data security interaction method based on privacy computing as described in the first and second aspects of the embodiment is executed.
[0161] The storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, a CD, a hard disk, a flash memory, a USB flash drive and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0162] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first and second aspects of the embodiments, and will not be described in detail here.
[0163] The sixth aspect of this embodiment provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the data security interaction method based on privacy computing as described in the first and second aspects of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0164] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data security interaction method based on privacy computing, characterized in that: Applicable to the sending node, including: Acquire data to be transmitted and an initial key sequence of the data to be transmitted; Processing the data to be transmitted in blocks to obtain a plurality of data blocks; For an i-th data block among the plurality of data blocks, generate a key index parameter of the i-th data block, and determine an initial key of the i-th data block from the initial key sequence based on the key index parameter; Acquire historical interaction data, wherein the historical interaction data is interaction data of the sending node during the last data security interaction before the current data security interaction, and the current data security interaction is the security interaction of the i-th data block; Based on the historical interaction data and the initial key, generate a privacy encryption key for the i-th data block; Using the privacy encryption key, perform privacy encryption processing on the i-th data block to obtain the encrypted i-th data block, and transmit the encrypted i-th data block to the receiving node, so as to complete the secure interaction of the i-th data block after the transmission; Increment i by 1 and regenerate the key index parameter of the i-th data block until i is equal to n, thereby completing the secure interaction of the data to be transmitted, wherein the initial value of i is 1, n is the total number of data blocks, and the key index parameters of each data block are different.
2. The method according to claim 1, characterized in that Obtaining an initial key sequence of the data to be transmitted, including: Obtain a first key iteration function and a second key iteration function; generating a first key sequence based on the first key iteration function, and generating a second key sequence based on the second key iteration function; The initial key sequence is generated according to the first key sequence and the second key sequence.
3. The method according to claim 2, characterized in that The first key iteration function is: In formula (1), is the first key iteration function and represents the first key value at the t+1th iteration, represents the first key value of the first key iteration function at the tth iteration, θ represents the iteration parameter, when t is 1, Among them, r0 is the initial value, λ is the control parameter, and r0∈(0,1), λ∈(0,4]; Wherein, the second key iteration function is: In formula (2), represents the second key iteration function, and represents the second key value at the t+1th iteration, represents the second key value of the second key iteration function at the tth iteration, represents the second key value of the second key iteration function at the t-1th iteration, R is an iteration constant, mod represents a remainder operation, and when t is 1, and is the initial value; Correspondingly, generating the initial key sequence according to the first key sequence and the second key sequence includes: Based on the first key sequence and the second key sequence, and according to the following formula (3), an initial key sequence is generated; In the above formula (3), k z represents the z-th initial key in the initial key sequence, represents the (z + 1)-th first key value in the first key sequence, represents the z-th second key value in the second key sequence, where z = 1, 2,..., Z, Z < T, and Z represents the maximum length of the initial key sequence, and T represents the length of the first key sequence.
4. The method according to claim 1, characterized in that Generate the key index parameters of the i-th data block, including: Obtaining a node identifier of the sending node; Generate a timestamp and a random integer for the i-th data block; Concatenating the timestamp and the node identifier to obtain concatenated parameters after the concatenation; Performing a hash operation on the splicing parameter to obtain a bit index parameter; Using the random integer and the bit index parameter, compose the key index parameter; Correspondingly, determining the initial key of the i-th data block from the initial key sequence based on the key index parameter includes: Determining a key truncation bit from the initial key sequence according to the bit index parameter; Taking the key interception bit as the starting point, an initial key of length p is intercepted from the initial key sequence, and the intercepted initial key is used as the initial key of the i-th data block, wherein p is the random integer.
5. The method according to claim 1, characterized in that The historical interaction data includes: the plaintext data and the ciphertext data of the sending node during the last data security interaction before the current data security interaction; The step of generating a privacy encryption key for the i-th data block based on the historical interaction data and the initial key includes: Performing an XOR operation on the initial key and the plaintext data in the historical interaction data to obtain an intermediate key parameter, wherein when i is 1, the plaintext data is the initial data, and the initial data is obtained by performing an XOR operation on the hash value of the node identifier of the sending node and the hash value of the node identification code; Performing a hash operation on the intermediate key parameter to obtain a hash value of the intermediate key parameter; Performing an XOR operation on the hash value of the intermediate key parameter and the ciphertext data in the historical interaction data, so as to obtain the privacy encryption key of the i-th data block after the XOR operation, wherein when i is 1, the ciphertext data is the hash value of the initial data; Correspondingly, using the privacy encryption key to perform privacy encryption processing on the i-th data block includes: Using the privacy encryption key and the following formula (4), the i-th data block is subjected to privacy encryption processing; F i =Hash(K i )⊕D i (4) In the above formula (4), F i represents the encrypted i-th data block, D i represents the i-th data block, K i represents the privacy encryption key of the i-th data block, Hash() represents a hash function, and ⊕ represents an exclusive-OR operation.
6. The method according to claim 1, characterized in that Before the data to be transmitted is processed in blocks, the method further includes: Acquire all communication paths between the sending node and the receiving node to form a communication path set; Constructing a stability probability model for each communication path in the communication path set, and based on the stability probability model for each communication path, obtaining a transmission stability probability value for each communication path in the communication path set; Calculating the total transmission delay of each communication path in the communication path set and the transmission interference degree of each communication path; According to the total transmission delay and the transmission stability probability value of each communication path, and the transmission interference degree of each communication path, determine the optimal communication path of the data to be transmitted from the communication path set, so as to complete the secure interaction of the data to be transmitted based on the optimal communication path; Accordingly, transmitting the encrypted i-th data block to the receiving node includes: The encrypted i-th data block is transmitted from the optimal communication path to the receiving node.
7. The method according to claim 6, characterized in that Constructing a stability probability model of each communication path in the communication path set, including: For any communication path in the communication path set, count the number of paths between the bth node and the cth node in the any communication path that meet the constraint condition, wherein the constraint condition is that the path length is equal to the shortest length and b≠c; Calculate the transmission stability equivalent value between the b-th node and the c-th node based on the number of paths between the b-th node and the c-th node that meet the constraint condition; Add 1 to c, and recount the number of paths that meet the constraint conditions between the bth node and the cth node in any communication path until c is equal to X, and obtain the transmission stability equivalent value between the bth node and the remaining nodes in any communication path, where the initial value of c is 2, and X is the total number of nodes in any communication path; b is incremented by 1, and the number of paths between the bth node and the cth node in any communication path that meet the constraint condition is recounted until b is equal to X-1, and a number of transmission stability equivalent values are obtained, wherein the initial value of b is 1; A stability probability model of any communication path is constructed according to a number of transmission stability equivalent values and the total number of nodes in any communication path.
8. A data security interaction device based on privacy computing, characterized in that: Applicable to the sending node, including: An acquisition unit, used to acquire data to be transmitted and an initial key sequence of the data to be transmitted; A block division unit, used for performing block processing on the data to be transmitted to obtain a plurality of data blocks; a key generating unit, configured to generate a key index parameter of the i-th data block for the i-th data block among the plurality of data blocks, and determine an initial key of the i-th data block from the initial key sequence based on the key index parameter; A key generation unit, configured to obtain historical interaction data, wherein the historical interaction data is interaction data of the sending node during the last data security interaction before the current data security interaction, and the current data security interaction is the security interaction of the i-th data block; The key generation unit is further used to generate a privacy encryption key of the i-th data block based on the historical interaction data and the initial key; An encryption unit, configured to perform privacy encryption processing on the ith data block using the privacy encryption key to obtain the encrypted ith data block, and transmit the encrypted ith data block to a receiving node, so as to complete the secure interaction of the ith data block after the transmission; The encryption unit is also used to add 1 to i and regenerate the key index parameter of the i-th data block until i is equal to n, thereby completing the secure interaction of the data to be transmitted, wherein the initial value of i is 1, n is the total number of data blocks, and the key index parameters of each data block are different.
9. A data security interaction device based on privacy computing, characterized in that: include: A memory, a processor and a transceiver that are sequentially connected in communication, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read computer programs, and execute the data security interaction method based on privacy computing as described in any one of claims 1 to 7.
10. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is enabled to execute the data security interaction method based on privacy computing as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Medical data management method and device, electronic equipment and storage medium
CN117633898A
Data encryption method of wireless network card, recommendation device and storage medium
CN117640256A