A data transmission method, apparatus and electronic device

CN115378614BActive Publication Date: 2026-08-14AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明提供一种数据传输方法、装置及电子设备,以解决在进行数据传输时,亟需保证数据传输的安全性和可靠性的问题

Benefits of technology

[0056]本发明提供了一种数据传输方法、装置及电子设备,获取所述数据所有方的待传输数据,使用杂凑算法计算所述待传输数据的杂凑值,并作为完整性校验码,将所述待传输数据与所述完整性校验码进行组合,得到第一数据,获取所述数据所有方的公钥、所述数据提供设备的授权密钥、以及预先基于所述待传输数据的更新周期计算得到的定时跳变密钥,将所述数据提供设备的授权密钥和所述定时跳变密钥连接,并将连接结果转换为二进制序列,生成与所述二进制序列对应、且长度与所述第一数据的长度相同的第一数据序列,将所述第一数据序列与所述第一数据进行按位异或操作,得到第二数据,使用所述数据所有方的公钥对所述第二数据进行加密操作,得到加密数据,并将所述加密数据发送至数据接收设备。本发明中,数据提供设备将需要发送给数据接收设备的待传输数据进行多次复杂加密操作后,才发送至数据接收设备,降低了由于数据被攻击而导致数据泄露的概率,提高数据传输的安全性和可靠性。另外,本发明中,使用了数据所有方的公钥和数据提供设备的授权密钥对数据进行加密,实现了数据所有方的授权许可,保证了数据传输是在数据所有方的授权许可下进行的。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115378614B_ABST
    Figure CN115378614B_ABST
Patent Text Reader

Abstract

This invention provides a data transmission method, apparatus, and electronic device. The method uses a hash algorithm to calculate the hash value of the data to be transmitted, which is then used as an integrity check code. The data to be transmitted is combined with the integrity check code to obtain first data. The method acquires the public key of the data owner, the authorization key of the data providing device, and a timed transition key. The authorization key and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A first data sequence corresponding to the binary sequence and with the same length as the first data is generated. The first data sequence is XORed with the first data to obtain second data. The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to the data receiving device. This invention reduces the probability of data leakage and improves security and reliability by having the data providing device perform multiple complex encryption operations on the data to be transmitted before outputting it to the data receiving device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission, and more specifically, to a data transmission method, apparatus, and electronic device. Background Technology

[0002] Data providers receive and store data from data owners via the network. With the permission of the data owner, they may provide the relevant data to external parties, such as providing the data owner's data to data recipients.

[0003] However, during the process of data providers supplying data to data receivers, the data is vulnerable to attacks, which can lead to the leakage of transmitted data. Therefore, how to ensure the security and reliability of data transmission is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the present invention provides a data transmission method, apparatus and electronic device to solve the problem of ensuring the security and reliability of data transmission during data transmission.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A data transmission method is applied to a data providing device, the data providing device storing data to be transmitted from at least one data owner, the data transmission method comprising:

[0007] Obtain the data to be transmitted from the data owner;

[0008] The hash value of the data to be transmitted is calculated using a hash algorithm and used as an integrity check code;

[0009] The data to be transmitted is combined with the integrity check code to obtain the first data;

[0010] Obtain the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted;

[0011] Connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence;

[0012] Generate a first data sequence that corresponds to the binary sequence and has the same length as the first data;

[0013] Perform a bitwise XOR operation between the first data sequence and the first data to obtain the second data;

[0014] The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to a data receiving device. The data receiving device receives the encrypted data sent by the data providing device, obtains the private key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted. The encrypted data is decrypted using the private key of the data owner to obtain third data. The authorization key of the data providing device and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A second data sequence, corresponding to the binary sequence and having the same length as the third data, is generated. The second data sequence and the third data are XORed bitwise to obtain fourth data. The data to be transmitted and the integrity check code of the data owner are extracted from the fourth data.

[0015] Optionally, generating a first data sequence corresponding to the binary sequence and having the same length as the first data includes:

[0016] The binary sequence is input into a shift register to obtain a first data sequence with the same length as the first data.

[0017] Optionally, it also includes:

[0018] The authorization key of the data providing device is sent to the data owner, so that the data owner sends the authorization key of the data providing device and the private key of the data owner to the data receiving device.

[0019] Optionally, the communication channel through which the data providing device obtains the public key of the data owner and the communication channel through which the encrypted data is sent to the data receiving device are physically isolated.

[0020] A data transmission method, applied to a data receiving device, the data transmission method comprising:

[0021] The encrypted data is received from a data providing device. The process of generating the encrypted data includes: the data providing device acquiring the data to be transmitted from the data owner, calculating the hash value of the data to be transmitted using a hash algorithm, and using it as an integrity check code; combining the data to be transmitted with the integrity check code to obtain first data; acquiring the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted; concatenating the authorization key of the data providing device and the timed transition key; converting the concatenation result into a binary sequence; generating a first data sequence corresponding to the binary sequence and having the same length as the first data; performing a bitwise XOR operation between the first data sequence and the first data to obtain second data; and encrypting the second data using the public key of the data owner to obtain encrypted data.

[0022] Obtain the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted;

[0023] The encrypted data is decrypted using the private key of the data owner to obtain the third data;

[0024] Connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence;

[0025] Generate a second data sequence that corresponds to the binary sequence and has the same length as the third data;

[0026] Perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data;

[0027] Extract the data to be transmitted and the integrity check code of the data owner from the fourth data.

[0028] Optionally, extracting the data to be transmitted and the integrity check code of the data owner from the fourth data includes:

[0029] Extract the specified number of bits of data from the fourth data and use it as an integrity check code;

[0030] The hash algorithm is used to calculate the data with non-specified number of bits in the fourth data to obtain the hash calculation result;

[0031] If the hash calculation result is the same as the integrity check code, then the data with the non-specified number of bits in the fourth data is used as the data to be transmitted to extract the data owner from the fourth data.

[0032] Optionally, it also includes:

[0033] The data owner receives the authorization key of the data providing device and the private key of the data owner after receiving the authorization key of the data providing device;

[0034] The channel for receiving the authorization key of the data providing device and the private key of the data owner, and the communication channel for receiving encrypted data sent by the data providing device are physically isolated.

[0035] A data transmission apparatus is applied to a data providing device, the data providing device storing data to be transmitted from at least one data owner, the data transmission apparatus comprising:

[0036] The data acquisition module is used to acquire the data to be transmitted from the data owner.

[0037] The checksum calculation module is used to calculate the hash value of the data to be transmitted using a hash algorithm, and use it as an integrity checksum.

[0038] A data combination module is used to combine the data to be transmitted with the integrity check code to obtain first data;

[0039] The key acquisition module is used to acquire the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted;

[0040] The result conversion module is used to connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence;

[0041] A sequence generation module is used to generate a first data sequence that corresponds to the binary sequence and has the same length as the first data.

[0042] The XOR operation module is used to perform a bitwise XOR operation between the first data sequence and the first data to obtain the second data.

[0043] The data sending module is used to encrypt the second data using the public key of the data owner to obtain encrypted data, and send the encrypted data to the data receiving device so that the data receiving device receives the encrypted data sent by the data providing device, obtains the private key of the data owner, the authorization key of the data providing device, and a timed transition key calculated in advance based on the update cycle of the data to be transmitted, decrypts the encrypted data using the private key of the data owner to obtain the third data, concatenates the authorization key of the data providing device and the timed transition key, converts the concatenation result into a binary sequence, generates a second data sequence corresponding to the binary sequence and having the same length as the third data, performs a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data, and extracts the data to be transmitted and the integrity check code of the data owner from the fourth data.

[0044] A data transmission device is applied to a data receiving device, the data transmission device comprising:

[0045] A data receiving module is used to receive encrypted data sent by a data providing device. The process of generating the encrypted data includes: the data providing device acquiring the data to be transmitted from the data owner, calculating the hash value of the data to be transmitted using a hash algorithm, and using it as an integrity check code; combining the data to be transmitted with the integrity check code to obtain first data; acquiring the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted; concatenating the authorization key of the data providing device and the timed transition key; converting the concatenation result into a binary sequence; generating a first data sequence corresponding to the binary sequence and having the same length as the first data; performing a bitwise XOR operation between the first data sequence and the first data to obtain second data; and encrypting the second data using the public key of the data owner to obtain encrypted data.

[0046] The information acquisition module is used to acquire the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted.

[0047] The decryption module is used to decrypt the encrypted data using the private key of the data owner to obtain third data;

[0048] The result processing module is used to connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence;

[0049] A sequence processing module is used to generate a second data sequence that corresponds to the binary sequence and has the same length as the third data.

[0050] The data processing module is used to perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data;

[0051] The data extraction module is used to extract the data to be transmitted and the integrity check code of the data owner from the fourth data.

[0052] An electronic device, characterized in that it comprises: a memory and a processor;

[0053] The memory is used to store programs;

[0054] The processor calls the program and executes the data transmission method described above for the data providing device, or executes the data transmission method described above for the data receiving device.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] This invention provides a data transmission method, apparatus, and electronic device. The method involves acquiring data to be transmitted from the data owner, calculating a hash value of the data to be transmitted using a hash algorithm, and using this hash value as an integrity check code. The data to be transmitted is then combined with the integrity check code to obtain first data. Next, the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted are acquired. The authorization key of the data providing device and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A first data sequence corresponding to the binary sequence and having the same length as the first data is generated. The first data sequence is then XORed with the first data to obtain second data. The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to a data receiving device. In this invention, the data providing device performs multiple complex encryption operations on the data to be transmitted before sending it to the data receiving device, reducing the probability of data leakage due to data attacks and improving the security and reliability of data transmission. In addition, this invention uses the public key of the data owner and the authorization key of the data providing device to encrypt the data, thereby realizing the authorization of the data owner and ensuring that the data transmission is carried out under the authorization of the data owner. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0058] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present invention;

[0059] Figure 2 A flowchart illustrating another data transmission method provided in an embodiment of the present invention;

[0060] Figure 3 A flowchart illustrating another data transmission method provided in an embodiment of the present invention;

[0061] Figure 4 This is a schematic diagram of a data transmission device applied to a data providing equipment, provided by an embodiment of the present invention.

[0062] Figure 5 This is a schematic diagram of a data transmission device applied to a data receiving device, provided as an embodiment of the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] Data providers receive and store data from data owners via a network. With the data owner's permission, they can provide the data to external parties, such as providing the data owner's data to data recipients. However, the process of data providers providing data to data recipients is vulnerable to attacks, potentially leading to data leakage. Therefore, ensuring the security and reliability of data transmission is a crucial technical problem that needs to be solved by those skilled in the art.

[0065] In addition, when a data provider sends data to a data recipient, it also needs the permission of the data owner. How to obtain permission is a technical problem that needs to be solved by those skilled in the art.

[0066] To address this issue, this invention provides a data transmission method, apparatus, and electronic device. The method involves acquiring the data to be transmitted from the data owner, calculating the hash value of the data to be transmitted using a hash algorithm, and using this hash as an integrity check code. The data to be transmitted is then combined with the integrity check code to obtain first data. Next, the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted are acquired. The authorization key of the data providing device and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A first data sequence, corresponding to the binary sequence and having the same length as the first data, is generated. The first data sequence is then XORed with the first data to obtain second data. The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to a data receiving device. In this invention, the data providing device performs multiple complex encryption operations on the data to be transmitted before sending it to the data receiving device, reducing the probability of data leakage due to data attacks and improving the security and reliability of data transmission. In addition, this invention uses the public key of the data owner and the authorization key of the data providing device to encrypt the data, thereby realizing the authorization of the data owner and ensuring that the data transmission is carried out under the authorization of the data owner.

[0067] Based on the above, one embodiment of the present invention provides a data transmission method applied to a data providing device, which is also known as a data provider. The data providing device stores data to be transmitted from at least one data owner. In this embodiment, the number of data owners can be set according to the actual scenario, such as one or more.

[0068] Reference Figure 1 The data transmission method may include:

[0069] S11. Obtain the data to be transmitted from the data owner.

[0070] In this embodiment, the data to be transmitted by the data owner can be pre-stored in the data providing device, and the data providing device obtains the data to be transmitted by the data owner locally. The data to be transmitted can be represented by Dn. For data owners S1, ..., Sn, their corresponding data to be transmitted are represented by D1, ..., Dn, respectively, where n is a positive integer.

[0071] S12. Calculate the hash value of the data to be transmitted using a hash algorithm, and use it as an integrity check code.

[0072] In this embodiment, the hash algorithm can be any hash algorithm such as the national cryptographic SM3 hash algorithm. For example, the data to be transmitted, Dn, can be generated into a 256-bit hash value Hn using the national cryptographic SM3 hash algorithm and used as an integrity check code.

[0073] S13. Combine the data to be transmitted with the integrity check code to obtain the first data.

[0074] In this embodiment, the data to be transmitted Dn is combined with the integrity check code Hn. When combining, the data to be transmitted Dn comes first and the integrity check code Hn comes second, thus obtaining the first data An.

[0075] S14. Obtain the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted.

[0076] In this embodiment, the data provider P uses three keys to encrypt the first data An:

[0077] ① The authorization key Kn of the data providing device has been sent to the data owner Sn;

[0078] ② The timed transition key Knt, which is agreed upon by the data provider P and the data receiver R, changes periodically at intervals t.

[0079] ③ The public key Knp of the data owner.

[0080] In practical applications, the data owner can use the Chinese national cryptographic algorithm SM2 (Elliptic Curve Asymmetric Encryption) to generate an asymmetric key, consisting of a public key Knp and a private key Knr. The data provider P can generate multiple authorization keys K1, ..., Kn, each corresponding one-to-one with a data owner S1, ..., Sn. The data provider sends its respective authorization key K1, ..., Kn to the data owners S1, ..., Sn via a communication channel physically isolated from T (used for transmitting encrypted data). After the data providing device sends its authorization key to the data owner, the data owner can send its authorization key K1, ..., Kn and its private key Knr to the data receiving device via a communication channel physically isolated from T. The data owner Sn will also inform the data provider P of its public key Knp via a communication channel physically isolated from T.

[0081] The data to be transmitted, D1, ..., Sn, from data owners S1, ..., Sn, is stored on the server of data provider P. Data provider P centrally stores all data from all data owners Sn, and this data is updated at fixed intervals t. In this embodiment, the timed transition key is calculated based on the update cycle of the data to be transmitted. Specifically, the generation time of the data Dn generated at intervals t is encrypted using the national cryptographic SM3 hash algorithm to obtain a 256-bit timed transition key Knt.

[0082] In this embodiment, the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted can be stored locally in advance, and the data providing device can obtain them from the local storage.

[0083] S15. Connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence.

[0084] Specifically, the authorization key Kn of the data providing device and the timed transition key Knt are concatenated and converted into a binary sequence.

[0085] S16. Generate a first data sequence that corresponds to the binary sequence and has the same length as the first data.

[0086] Specifically, the binary sequence is input into a shift register to obtain a first data sequence with the same length as the first data.

[0087] In detail, the binary sequence is used as the initial value d of the register and fed into the linear feedback shift register sequence (also known as the m sequence) to generate a first data sequence Mn with the same length as the first data An.

[0088] S17. Perform a bitwise XOR operation between the first data sequence and the first data to obtain the second data.

[0089] Specifically, the first data An is then XORed with the first data sequence Mn bitwise to obtain the second data Bn.

[0090] S18. Encrypt the second data using the public key of the data owner to obtain encrypted data, and send the encrypted data to the data receiving device.

[0091] When sending the encrypted data to the data receiving device, a T-channel can be used. This ensures that the communication channel through which the data providing device obtains the public key of the data owner and the communication channel through which the encrypted data is sent to the data receiving device are physically isolated, further preventing data leakage and improving the security and reliability of data transmission.

[0092] Specifically, the second data Bn is encrypted again using the public key Knp of the data owner to obtain encrypted data Cn. The encryption algorithm can be the national standard SM2 (elliptic curve asymmetric encryption) algorithm.

[0093] After obtaining the encrypted data Cn, the encrypted data can be sent to the data receiving device, so that the data receiving device can receive the encrypted data sent by the data providing device, obtain the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted, use the private key of the data owner to decrypt the encrypted data to obtain the third data, connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence to generate a second data sequence corresponding to the binary sequence and having the same length as the third data, perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data, and extract the data to be transmitted from the data owner from the fourth data.

[0094] It should be noted that for the data owners S1, ..., Sn, the corresponding data to be transmitted D1, ..., Dn can be processed sequentially according to the order of the data owners, and steps S11-S18 can be performed on D1, ..., Dn in parallel.

[0095] In this embodiment, the data to be transmitted from the data owner is obtained. A hash algorithm is used to calculate the hash value of the data to be transmitted, which is then used as an integrity check code. The data to be transmitted is combined with the integrity check code to obtain first data. The public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted are obtained. The authorization key of the data providing device and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A first data sequence corresponding to the binary sequence and having the same length as the first data is generated. The first data sequence and the first data are XORed bitwise to obtain second data. The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to the data receiving device. In this invention, the data providing device performs multiple complex encryption operations on the data to be transmitted before sending it to the data receiving device, reducing the probability of data leakage due to data attacks and improving the security and reliability of data transmission.

[0096] In addition, this invention uses the public key of the data owner and the authorization key of the data providing device to encrypt the data, thereby realizing the authorization of the data owner and ensuring that the data transmission is carried out under the authorization of the data owner.

[0097] Based on the above, another embodiment of the present invention provides a data transmission method applied to a data receiving device, wherein the data receiving device is the data receiver. (Refer to...) Figure 2 The data transmission method may include:

[0098] S21. Receive encrypted data sent by the data provider.

[0099] Specifically, encrypted data Cn sent by the data provider can be received via channel T.

[0100] The process of generating the encrypted data includes: the data providing device acquiring the data to be transmitted from the data owner; calculating the hash value of the data to be transmitted using a hash algorithm and using it as an integrity check code; combining the data to be transmitted with the integrity check code to obtain first data; acquiring the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted; concatenating the authorization key of the data providing device and the timed transition key; converting the concatenation result into a binary sequence; generating a first data sequence corresponding to the binary sequence and having the same length as the first data; performing a bitwise XOR operation between the first data sequence and the first data to obtain second data; and encrypting the second data using the public key of the data owner to obtain encrypted data.

[0101] It should be noted that the specific process of generating encrypted data can be found in the above-mentioned explanations.

[0102] S22. Obtain the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted.

[0103] Specifically, the private key of the data owner and the authorization key of the data providing device can be the authorization key of the data providing device and the private key of the data owner sent by the data receiving device after receiving the authorization key of the data providing device. After the data owner Sn sends the authorization key Kn and private key Knr to the data receiver R through a channel physically isolated from T, the data receiver R is authorized to access its data.

[0104] The channel for receiving the authorization key of the data providing device and the private key of the data owner, and the communication channel for receiving encrypted data sent by the data providing device, are physically isolated. For detailed explanations, please refer to the corresponding sections above.

[0105] The process of generating the timed transition key is explained in the corresponding instructions above.

[0106] S23. Use the private key of the data owner to decrypt the encrypted data to obtain the third data.

[0107] Specifically, the data receiver R uses the SM2 national cryptographic algorithm and the private key Knr provided by the data owner Sn to decrypt the encrypted Cn and restore Bn. In this embodiment, since data attacks may occur during data transmission, causing data changes, the encrypted Cn is decrypted using the private key Knr provided by the data owner Sn, and the resulting data is referred to as third-party data.

[0108] S24. Connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence.

[0109] S25. Generate a second data sequence that corresponds to the binary sequence and has the same length as the third data.

[0110] For details on the implementation of steps S24 and S25, please refer to the corresponding explanations above.

[0111] S26. Perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data.

[0112] For a detailed explanation of the implementation of step S26, please refer to step S17 above.

[0113] S27. Extract the data to be transmitted and the integrity check code of the data owner from the fourth data.

[0114] In this embodiment, refer to Figure 3 Step S27 may include:

[0115] S31. Extract the data of a specified number of bits from the fourth data and use it as an integrity check code.

[0116] Specifically, the data receiver R extracts the last 256 bits from the fourth data to obtain the integrity check code, and the rest is the data to be transmitted.

[0117] S32. Use a hash algorithm to calculate the data with non-specified number of bits in the fourth data to obtain the hash calculation result.

[0118] S33. If the hash calculation result is the same as the integrity check code, then the data with non-specified number of bits in the fourth data is used as the data to be transmitted from the fourth data to extract the data owner.

[0119] Specifically, the receiver R uses the national cryptographic SM3 hash algorithm to calculate the 256-bit hash value of the data to be transmitted. If it is equal to the integrity check code, the data to be transmitted is successfully restored; otherwise, the data to be transmitted is invalid.

[0120] In this embodiment, after receiving encrypted data, the data receiving device executes the corresponding decryption process to extract the required data to be transmitted from the encrypted data. This embodiment combines physical isolation of the communication channel, multiple keys, and multiple encryption methods to improve the security of data transmission.

[0121] Optionally, based on the above-described embodiments of the data transmission method applied to a data providing device, another embodiment of the present invention provides a data transmission apparatus applied to a data providing device, wherein the data providing device stores data to be transmitted from at least one data owner, referring to... Figure 4 The data transmission device includes:

[0122] Data acquisition module 11 is used to acquire the data to be transmitted from the data owner;

[0123] The check code calculation module 12 is used to calculate the hash value of the data to be transmitted using a hash algorithm, and use it as an integrity check code;

[0124] Data combination module 13 is used to combine the data to be transmitted with the integrity check code to obtain first data;

[0125] The key acquisition module 14 is used to acquire the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted.

[0126] Result conversion module 15 is used to connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence;

[0127] Sequence generation module 16 is used to generate a first data sequence that corresponds to the binary sequence and has the same length as the first data.

[0128] XOR operation module 17 is used to perform a bitwise XOR operation between the first data sequence and the first data to obtain the second data;

[0129] The data sending module 18 is used to encrypt the second data using the public key of the data owner to obtain encrypted data, and send the encrypted data to the data receiving device so that the data receiving device receives the encrypted data sent by the data providing device, obtains the private key of the data owner, the authorization key of the data providing device, and a timed transition key calculated in advance based on the update cycle of the data to be transmitted, decrypts the encrypted data using the private key of the data owner to obtain the third data, concatenates the authorization key of the data providing device and the timed transition key, converts the concatenation result into a binary sequence, generates a second data sequence corresponding to the binary sequence and having the same length as the third data, performs a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data, and extracts the data to be transmitted and the integrity check code of the data owner from the fourth data.

[0130] Furthermore, the sequence generation module 16 is specifically used for:

[0131] The binary sequence is input into a shift register to obtain a first data sequence with the same length as the first data.

[0132] Furthermore, it also includes:

[0133] A key sending module is used to send the authorization key of the data providing device to the data owner, so that the data owner sends the authorization key of the data providing device and the private key of the data owner to the data receiving device.

[0134] Furthermore, the communication channel through which the data providing device obtains the public key of the data owner and the communication channel through which the encrypted data is sent to the data receiving device are physically isolated.

[0135] In this embodiment, the data to be transmitted from the data owner is obtained. A hash algorithm is used to calculate the hash value of the data to be transmitted, which is then used as an integrity check code. The data to be transmitted is combined with the integrity check code to obtain first data. The public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted are obtained. The authorization key of the data providing device and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A first data sequence corresponding to the binary sequence and having the same length as the first data is generated. The first data sequence and the first data are XORed bitwise to obtain second data. The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to the data receiving device. In this invention, the data providing device performs multiple complex encryption operations on the data to be transmitted before sending it to the data receiving device, reducing the probability of data leakage due to data attacks and improving the security and reliability of data transmission.

[0136] In addition, this invention uses the public key of the data owner and the authorization key of the data providing device to encrypt the data, thereby realizing the authorization of the data owner and ensuring that the data transmission is carried out under the authorization of the data owner.

[0137] It should be noted that the specific working process of each module in this embodiment is described in the corresponding descriptions in the above embodiments, and will not be repeated here.

[0138] Optionally, based on the above-described data transmission method applied to a data receiving device, another embodiment of the present invention provides a data transmission apparatus applied to a data receiving device, referring to... Figure 5 The data transmission device includes:

[0139] The data receiving module 21 is used to receive encrypted data sent by the data providing device. The process of generating the encrypted data includes: the data providing device obtaining the data to be transmitted from the data owner, calculating the hash value of the data to be transmitted using a hash algorithm, and using it as an integrity check code, combining the data to be transmitted with the integrity check code to obtain first data, obtaining the public key of the data owner, the authorization key of the data providing device, and a timed transition key calculated in advance based on the update cycle of the data to be transmitted, connecting the authorization key of the data providing device and the timed transition key, converting the connection result into a binary sequence, generating a first data sequence corresponding to the binary sequence and having the same length as the first data, performing a bitwise XOR operation on the first data sequence and the first data to obtain second data, and encrypting the second data using the public key of the data owner to obtain encrypted data.

[0140] The information acquisition module 22 is used to acquire the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted;

[0141] The decryption module 23 is used to decrypt the encrypted data using the private key of the data owner to obtain the third data;

[0142] Result processing module 24 is used to connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence;

[0143] Sequence processing module 25 is used to generate a second data sequence that corresponds to the binary sequence and has the same length as the third data;

[0144] Data processing module 26 is used to perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data;

[0145] The data extraction module 27 is used to extract the data to be transmitted and the integrity check code of the data owner from the fourth data.

[0146] Furthermore, the data extraction module 27 includes:

[0147] The verification code extraction submodule is used to extract a specified number of digits of data from the fourth data and use it as an integrity verification code.

[0148] The hash calculation submodule is used to calculate the hash result by using a hash algorithm on the data with non-specified number of bits in the fourth data.

[0149] The data extraction submodule is used to extract the non-specified number of bits in the fourth data as the data to be transmitted from the fourth data to extract the data owner if the hash calculation result is the same as the integrity check code.

[0150] Furthermore, it also includes:

[0151] A key receiving module is used to receive the authorization key of the data providing device and the private key of the data owner sent by the data owner after receiving the authorization key of the data providing device;

[0152] The channel for receiving the authorization key of the data providing device and the private key of the data owner, and the communication channel for receiving encrypted data sent by the data providing device are physically isolated.

[0153] In this embodiment, after receiving encrypted data, the data receiving device executes the corresponding decryption process to extract the required data to be transmitted from the encrypted data. This embodiment combines physical isolation of the communication channel, multiple keys, and multiple encryption methods to improve the security of data transmission.

[0154] It should be noted that the specific working process of each module and sub-module in this embodiment is described in the corresponding descriptions in the above embodiments, and will not be repeated here.

[0155] Optionally, based on the embodiments of the above data transmission method and apparatus, another embodiment of the present invention provides an electronic device, including: a memory and a processor;

[0156] The memory is used to store programs;

[0157] The processor calls the program and executes the data transmission method described above for the data providing device, or executes the data transmission method described above for the data receiving device.

[0158] In this embodiment, the data to be transmitted from the data owner is obtained. A hash algorithm is used to calculate the hash value of the data to be transmitted, which is then used as an integrity check code. The data to be transmitted is combined with the integrity check code to obtain first data. The public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted are obtained. The authorization key of the data providing device and the timed transition key are concatenated, and the concatenation result is converted into a binary sequence. A first data sequence corresponding to the binary sequence and having the same length as the first data is generated. The first data sequence and the first data are XORed bitwise to obtain second data. The second data is encrypted using the public key of the data owner to obtain encrypted data, which is then sent to the data receiving device. In this invention, the data providing device performs multiple complex encryption operations on the data to be transmitted before sending it to the data receiving device, reducing the probability of data leakage due to data attacks and improving the security and reliability of data transmission.

[0159] In addition, this invention uses the public key of the data owner and the authorization key of the data providing device to encrypt the data, thereby realizing the authorization of the data owner and ensuring that the data transmission is carried out under the authorization of the data owner.

[0160] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data transmission method, characterized in that, Applied to a data providing device, the data providing device storing data to be transmitted from at least one data owner, the data transmission method includes: Obtain the data to be transmitted from the data owner; The hash value of the data to be transmitted is calculated using a hash algorithm and used as an integrity check code; The data to be transmitted is combined with the integrity check code to obtain the first data; Obtain the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted; wherein, the process of calculating the timed transition key in advance based on the update cycle of the data to be transmitted includes: encrypting the generation time of the data generated periodically using a hash algorithm to obtain the timed transition key; Connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence; Generating a first data sequence that corresponds to the binary sequence and has the same length as the first data includes: feeding the binary sequence as the initial value of the register into a linear feedback shift register sequence to obtain a first data sequence with the same length as the first data; Perform a bitwise XOR operation between the first data sequence and the first data to obtain the second data; The second data is encrypted using the public key of the data owner to obtain encrypted data, and the encrypted data is sent to the data receiving device so that the data receiving device receives the encrypted data sent by the data providing device, obtains the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted, decrypts the encrypted data using the private key of the data owner to obtain the third data, connects the authorization key of the data providing device and the timed transition key, converts the connection result into a binary sequence, generates a second data sequence corresponding to the binary sequence and having the same length as the third data, performs a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data, and extracts the data to be transmitted and the integrity check code of the data owner from the fourth data; The communication channel through which the data providing device obtains the public key of the data owner and the communication channel through which the encrypted data is sent to the data receiving device are physically isolated.

2. The data transmission method according to claim 1, characterized in that, Also includes: The authorization key of the data providing device is sent to the data owner, so that the data owner sends the authorization key of the data providing device and the private key of the data owner to the data receiving device.

3. A data transmission method, characterized in that, The data transmission method, applied to a data receiving device, includes: The encrypted data is received from a data providing device. The process of generating the encrypted data includes: the data providing device acquiring the data to be transmitted from the data owner, calculating the hash value of the data to be transmitted using a hash algorithm, and using it as an integrity check code; combining the data to be transmitted with the integrity check code to obtain first data; acquiring the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted; concatenating the authorization key of the data providing device and the timed transition key; converting the concatenation result into a binary sequence; generating a first data sequence corresponding to the binary sequence and having the same length as the first data; performing a bitwise XOR operation between the first data sequence and the first data to obtain second data; and encrypting the second data using the public key of the data owner to obtain encrypted data. The generation of the first data sequence corresponding to the binary sequence and having the same length as the first data includes: feeding the binary sequence as the initial value of a register into a linear feedback shift register sequence to obtain a first data sequence with the same length as the first data. Obtain the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted; wherein, the process of calculating the timed transition key in advance based on the update cycle of the data to be transmitted includes: encrypting the generation time of the data generated periodically using a hash algorithm to obtain the timed transition key; The encrypted data is decrypted using the private key of the data owner to obtain the third data; Connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence; Generate a second data sequence that corresponds to the binary sequence and has the same length as the third data; Perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data; Extract the data to be transmitted and the integrity check code of the data owner from the fourth data; The channel for receiving the authorization key of the data providing device and the private key of the data owner, and the communication channel for receiving encrypted data sent by the data providing device are physically isolated.

4. The data transmission method according to claim 3, characterized in that, Extracting the data to be transmitted and the integrity check code from the data owner from the fourth data includes: Extract the specified number of bits of data from the fourth data and use it as an integrity check code; The hash algorithm is used to calculate the data with non-specified number of bits in the fourth data to obtain the hash calculation result; If the hash calculation result is the same as the integrity check code, then the data with the non-specified number of bits in the fourth data is used as the data to be transmitted to extract the data owner from the fourth data.

5. The data transmission method according to claim 3, characterized in that, Also includes: The data owner receives the authorization key of the data providing device and the private key of the data owner after receiving the authorization key of the data providing device.

6. A data transmission device, characterized in that, Applied to a data providing device, the data providing device storing data to be transmitted from at least one data owner, the data transmission device includes: The data acquisition module is used to acquire the data to be transmitted from the data owner. The checksum calculation module is used to calculate the hash value of the data to be transmitted using a hash algorithm, and use it as an integrity checksum. A data combination module is used to combine the data to be transmitted with the integrity check code to obtain first data; The key acquisition module is used to acquire the public key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted; wherein, the process of calculating the timed transition key in advance based on the update cycle of the data to be transmitted includes: encrypting the generation time of the data generated periodically using a hash algorithm to obtain the timed transition key. The result conversion module is used to connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence; A sequence generation module is used to generate a first data sequence that corresponds to the binary sequence and has the same length as the first data, including: feeding the binary sequence as the initial value of the register into a linear feedback shift register sequence to obtain a first data sequence with the same length as the first data; The XOR operation module is used to perform a bitwise XOR operation between the first data sequence and the first data to obtain the second data. A data sending module is used to encrypt the second data using the public key of the data owner to obtain encrypted data, and send the encrypted data to a data receiving device so that the data receiving device receives the encrypted data sent by the data providing device, obtains the private key of the data owner, the authorization key of the data providing device, and a timed transition key calculated in advance based on the update cycle of the data to be transmitted, decrypts the encrypted data using the private key of the data owner to obtain third data, concatenates the authorization key of the data providing device and the timed transition key, converts the concatenation result into a binary sequence, generates a second data sequence corresponding to the binary sequence and having the same length as the third data, performs a bitwise XOR operation between the second data sequence and the third data to obtain fourth data, and extracts the data to be transmitted and the integrity check code of the data owner from the fourth data; The communication channel through which the data providing device obtains the public key of the data owner and the communication channel through which the encrypted data is sent to the data receiving device are physically isolated.

7. A data transmission device, characterized in that, The data transmission device is applied to a data receiving device and includes: A data receiving module is used to receive encrypted data sent by a data providing device. The process of generating the encrypted data includes: the data providing device acquiring the data to be transmitted from the data owner, calculating the hash value of the data to be transmitted using a hash algorithm, and using it as an integrity check code; combining the data to be transmitted with the integrity check code to obtain first data; acquiring the public key of the data owner, the authorization key of the data providing device, and a timed transition key pre-calculated based on the update cycle of the data to be transmitted; concatenating the authorization key of the data providing device and the timed transition key; converting the concatenation result into a binary sequence; generating a first data sequence corresponding to the binary sequence and having the same length as the first data; performing a bitwise XOR operation between the first data sequence and the first data to obtain second data; and encrypting the second data using the public key of the data owner to obtain encrypted data. The generation of the first data sequence corresponding to the binary sequence and having the same length as the first data includes: feeding the binary sequence as the initial value of a register into a linear feedback shift register sequence to obtain a first data sequence with the same length as the first data. The information acquisition module is used to acquire the private key of the data owner, the authorization key of the data providing device, and the timed transition key calculated in advance based on the update cycle of the data to be transmitted; wherein, the process of calculating the timed transition key in advance based on the update cycle of the data to be transmitted includes: encrypting the generation time of the data generated periodically using a hash algorithm to obtain the timed transition key; The decryption module is used to decrypt the encrypted data using the private key of the data owner to obtain third data; The result processing module is used to connect the authorization key of the data providing device and the timed transition key, and convert the connection result into a binary sequence; A sequence processing module is used to generate a second data sequence that corresponds to the binary sequence and has the same length as the third data. The data processing module is used to perform a bitwise XOR operation between the second data sequence and the third data to obtain the fourth data; The data extraction module is used to extract the data to be transmitted and the integrity check code of the data owner from the fourth data. The channel for receiving the authorization key of the data providing device and the private key of the data owner, and the communication channel for receiving encrypted data sent by the data providing device are physically isolated.

8. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor calls the program and executes the data transmission method as described in any one of claims 1-2, or executes the data transmission method as described in any one of claims 3-5.

Citation Information

Patent Citations

  • Dynamic data sharing method, terminal device and agent server

    CN109347832A