WO2023046207A1 - 一种数据传输方法、装置及计算机非易失性可读存储介质 - Google Patents

一种数据传输方法、装置及计算机非易失性可读存储介质 Download PDF

Info

Publication number
WO2023046207A1
WO2023046207A1 PCT/CN2022/121845 CN2022121845W WO2023046207A1 WO 2023046207 A1 WO2023046207 A1 WO 2023046207A1 CN 2022121845 W CN2022121845 W CN 2022121845W WO 2023046207 A1 WO2023046207 A1 WO 2023046207A1
Authority
WO
WIPO (PCT)
Prior art keywords
encrypted
master node
file
communication
encrypted file
Prior art date
Application number
PCT/CN2022/121845
Other languages
English (en)
French (fr)
Inventor
孙莹
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023046207A1 publication Critical patent/WO2023046207A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0478Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key

Definitions

  • the present application relates to the field of storage, in particular to a data transmission method, device and computer non-volatile readable storage medium.
  • the existing method is to directly transmit the key, so that the sending end and the receiving end use the same key to decrypt the encrypted file.
  • the purpose of this application is to provide a data transmission method, device and computer non-volatile readable storage medium, which can effectively prevent attackers from using certain attack methods to obtain keys, resulting in the leakage of transmitted data.
  • the key is encrypted twice, which solves the problem of data transmission security.
  • this application provides a data transmission method, which is applied to the master node, and the method includes:
  • it also includes:
  • the communication certificate file is sent to the slave node, so that the slave node can determine the source of the encrypted file and encrypted data according to the communication certificate file and the locally stored communication certificate file.
  • the present application also provides a data transmission method applied to a slave node, the method comprising:
  • the encrypted file and encrypted data sent by the master node where the encrypted data is the result of encrypting the data to be transmitted by the communication key; the encrypted file is the result of encrypting the communication key by the symmetric encryption key;
  • the encrypted data is decrypted by the communication key.
  • decrypting the encrypted file to obtain the communication key includes:
  • the locally stored symmetric encryption key is obtained, and the encrypted file is decrypted using the locally stored symmetric encryption key;
  • the encrypted file sent by the master node If the encrypted file sent by the master node is inconsistent with the encrypted file stored locally, the encrypted file sent by the master node will overwrite the encrypted file stored locally, and an acquisition request will be sent to the master node to obtain the symmetric encryption key of the master node.
  • the symmetric encryption key decrypts the encrypted file to obtain the communication key.
  • it also includes:
  • obtaining the corresponding symmetric encryption key according to the judgment result includes:
  • the locally stored symmetric encryption key is obtained
  • an acquisition request is sent to the master node to obtain the symmetric encryption key of the master node.
  • the communication certificate file sent by the master node is inconsistent with the locally stored communication certificate file, it also includes:
  • the symmetric encryption key of the master node is set to be available, so as to decrypt the encrypted file sent by the master node.
  • this application also provides a data transmission device, which is applied to the master node, including:
  • An acquisition module configured to acquire a communication key and a symmetric encryption key
  • the first encryption module is used to encrypt the data to be transmitted by the communication key to generate encrypted data
  • the second encryption module is used to encrypt the communication key using a symmetric encryption key to generate an encrypted file
  • the sending module is used to send the encrypted file and encrypted data to the slave node, so that the slave node can decrypt the encrypted data according to the communication key obtained from the encrypted file.
  • it also includes:
  • the second obtaining module is used to obtain the communication certificate file
  • the second sending module is configured to send the communication certificate file to the slave node, so that the slave node can determine the source of the encrypted file and encrypted data according to the communication certificate file and the locally stored communication certificate file.
  • the present application also provides a data transmission device applied to a slave node, including:
  • the third obtaining module is used to obtain the encrypted file and encrypted data sent by the master node, wherein the encrypted data is the result of encrypting the data to be transmitted by the communication key; the encrypted file is the result of encrypting the communication key by the symmetric encryption key;
  • the decryption module is used to decrypt the encrypted file to obtain a communication key, and decrypt the encrypted data through the communication key.
  • it also includes:
  • the fourth obtaining module is used to obtain the communication certificate file sent by the master node
  • the first judging module is used to judge whether the communication certificate file sent by the master node is consistent with the communication certificate file stored locally;
  • the fifth obtaining module is used to obtain the corresponding symmetric encryption key according to the judgment result, so as to decrypt the encrypted file sent by the master node.
  • it also includes:
  • Covering module used for if the communication certificate file sent by the master node is inconsistent with the communication certificate file stored locally, then the communication certificate file sent by the master node is overwritten with the communication certificate file stored locally;
  • the second judging module is used to judge whether the symmetric encryption key of the master node is available
  • the processing module is configured to set the symmetric encryption key of the master node to an available state if the symmetric encryption key of the master node is unavailable, so as to decrypt the encrypted file sent by the master node.
  • the present application also provides a data transmission device, including:
  • the processor is used to realize the above steps of data transmission when executing the computer program.
  • the present application also provides a computer non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above steps of data transmission are realized .
  • the application provides a data transmission method, which uses the obtained communication key and symmetric encryption key.
  • the communication key encrypts the data to be transmitted to generate encrypted data
  • the symmetric encryption key encrypts the communication key to generate an encrypted file
  • Read the encrypted file and encrypted data sent by the master node obtain the communication key by decrypting the encrypted file, and decrypt the encrypted data through the communication key. It can be seen that using the communication key to encrypt the data to be transmitted and the second encryption of the communication key can effectively prevent attackers from attacking the encrypted data, and improve the security and accuracy of the communication key and the security of information. .
  • the present application also provides a data transmission device and a computer non-volatile readable storage medium, and the beneficial effect is the same as above.
  • FIG. 1 is a flowchart of a data transmission method provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a data transmission method provided by another embodiment of the present application.
  • FIG. 3 is a structural diagram of a data transmission device provided in an embodiment of the present application.
  • Fig. 4 is a structural diagram of a data transmission device provided by another embodiment of the present application.
  • the core of the present application is to provide a data transmission method, device and computer non-volatile readable storage medium.
  • the existing technology only the data to be transmitted is encrypted, and the sending end and the receiving end use the same key to decrypt the encrypted file. When the criminal intercepts the key, the transmitted data will be cracked accordingly. This method has very low security.
  • the present application provides a data transmission method, which can effectively prevent an attacker from attacking a key.
  • Figure 1 is a flow chart of a data transmission method provided in the embodiment of the present application, as shown in Figure 1, applied to the master node, the method includes:
  • This application uses a multi-node method to encrypt the key and the data to be transmitted.
  • Two nodes are deployed in a dual-control cluster, called the master node and the slave node, and the open secure socket layer protocol is installed in the master node. (openssl) service; the master node generates the communication key and symmetric encryption key through the openssl command.
  • the communication key is that the sending end (in this application, the sending end is the master node) encrypts the data to be transmitted, and transmits the encrypted data together with the communication key to the receiving end (in this application, the receiving end is the slave node) ), the receiving end uses the communication key transmitted together with the encrypted data from the sending end to decrypt the encrypted data to obtain the transmitted data.
  • the symmetric encryption key is also called the private key, that is, the sending end and the receiving end of the message use the same key to encrypt and decrypt data.
  • the speed of encryption and decryption is its biggest advantage.
  • the symmetric encryption key of this application encrypts the communication key after the data to be transmitted is encrypted by the communication key, and uses secondary encryption to ensure the security and accuracy of the key information.
  • the communication key is obtained first, and the symmetric encryption key is obtained second.
  • S2 Encrypt the data to be transmitted by using the communication key to generate encrypted data.
  • the communication key is a string composed of numbers, letters and special symbols, and the string is used to control the encryption and decryption process of the data to be transmitted, that is, to convert the plaintext of the data to be transmitted into the ciphertext of the encrypted data , thus playing the role of encryption.
  • the encryption method of the communication key for the data to be transmitted may be encrypted by an encryption device or by an encryption algorithm, which is not specifically limited in this application.
  • the hijacker since the decryption and encryption of the encrypted data are completed through the same communication key, if hijacked by others during the transmission, the hijacker can decrypt the encrypted data through the communication key. Therefore, in order to prevent the communication key from being hijacked during the transmission process, after the communication key encrypts the transmission data, the symmetric encryption key encrypts the communication key.
  • This application provides a secondary encryption method to effectively prevent communication After the key is hijacked, the decrypted data is decrypted.
  • the encryption method of the communication key by the symmetric encryption key may be encrypted by an encryption device or by an encryption algorithm, which is not specifically limited in this application.
  • S4 Send the encrypted file and encrypted data to the slave node, so that the slave node can decrypt the encrypted data according to the communication key obtained from the encrypted file.
  • the key to be transmitted is encrypted by the key to be transmitted to generate encrypted data, and after the symmetric encryption key encrypts the communication key to generate an encrypted file, the encrypted data and the encrypted file can be saved to a preset location (preset here The preset location can be called the first preset location), and the slave node goes to the preset location (the preset location here can be called the first preset location) to read; the encrypted data and encrypted files can also be directly sent to the slave node Nodes are not specifically limited in specific implementation. As a preferred embodiment, this application provides sending encrypted data and encrypted files to slave nodes.
  • the method uses the obtained communication key and symmetric encryption key.
  • the communication key encrypts the data to be transmitted to generate encrypted data
  • the symmetric encryption key encrypts the communication key to generate an encrypted file
  • the slave node reads the encrypted file and encrypted data sent by the master node, obtains the communication key by decrypting the encrypted file, and decrypts the encrypted data through the communication key. It can be seen that using the communication key to encrypt the data to be transmitted and the second encryption of the communication key can effectively prevent attackers from attacking the encrypted data, and improve the security and accuracy of the communication key and the security of information. .
  • the obtained communication key and the data to be transmitted are encrypted and then sent to the slave node.
  • the method also includes:
  • the communication certificate file is sent to the slave node, so that the slave node can determine the source of the encrypted file and encrypted data according to the communication certificate file and the locally stored communication certificate file.
  • the slave node obtains the communication certificate file to verify the source of the encrypted file and the encrypted data
  • the master node sends the obtained communication certificate file to the slave node
  • the slave node determines the received encrypted file and encrypted file according to the communication certificate file sent by the master node. Whether the data comes from the master node. If it is determined that the encrypted file and encrypted data are sent from the master node, the encrypted file will be decrypted to obtain the communication key to decrypt the encrypted data; if it is determined that the encrypted file and encrypted data are not sent by the master node, the encrypted file will not be decrypted.
  • this application can directly send the communication certificate file to the slave node, or save the communication certificate file to a preset location (the preset location here can be called the second preset location), and the slave node can Set a location (the preset location here may be referred to as a second preset location) to obtain the communication certificate file, which is not specifically limited here.
  • the source of encrypted files and encrypted data can be judged through the communication certificate file, and the work of data transmission and decryption of encrypted files and decrypted encrypted data can be more accurate, so as to ensure the security and accuracy of data.
  • FIG. 2 is a flow chart of a data transmission method provided by another embodiment of the present application. As shown in FIG. 2, it is applied to a slave node, and the method includes:
  • S5 Obtain the encrypted file and encrypted data sent by the master node, where the encrypted data is the result of encrypting the data to be transmitted by the communication key; the encrypted file is the result of encrypting the communication key by the symmetric encryption key.
  • This application uses a multi-node method to encrypt the key and the data to be transmitted.
  • Two nodes are deployed in a dual-control cluster, called the master node and the slave node respectively.
  • the openssl service is installed on the slave node. If the master node Send the encrypted file and encrypted data directly to the slave node, then the slave node receives the encrypted file and encrypted data sent by the master node; if the master node saves the encrypted file and encrypted data to a preset location (the preset location here can be called first preset location), then the slave node directly reads the encrypted file and encrypted data from the preset location (the preset location here may be referred to as the first preset location).
  • the obtained encrypted file is decrypted to obtain the communication key. Since the communication key is encrypted by the symmetric encryption key, the encrypted file is also decrypted by the symmetric encryption key. First obtain the symmetric encryption key, and secondly determine whether the obtained symmetric encryption key is available. Only when the symmetric encryption key is available can the encrypted file be decrypted to obtain the communication key.
  • the obtained symmetric encryption key is the symmetric encryption key obtained from the master node or the locally stored symmetric encryption key depends on the specific situation in the implementation process.
  • the encrypted data is obtained by encrypting the data to be transmitted with the communication key
  • the encrypted data is decrypted according to the communication key obtained by decrypting the encrypted file to obtain the data to be transmitted.
  • decrypting the encrypted file to obtain the communication key includes:
  • the locally stored symmetric encryption key is obtained, and the encrypted file is decrypted using the locally stored symmetric encryption key;
  • the encrypted file sent by the master node If the encrypted file sent by the master node is inconsistent with the encrypted file stored locally, the encrypted file sent by the master node will overwrite the encrypted file stored locally, and an acquisition request will be sent to the master node to obtain the symmetric encryption key of the master node.
  • the symmetric encryption key decrypts the encrypted file to obtain the communication key.
  • the method of judging whether the encrypted file sent by the master node is consistent with the encrypted file stored locally is not done Specific limits. As a preferred embodiment, this application will judge whether the encrypted file sent by the master node is consistent with the encrypted file stored locally by comparing the order of the character strings.
  • the encrypted file sent by the master node is consistent with the string sequence of the encrypted file stored locally, it is determined that the encrypted file sent by the master node is consistent with the encrypted file stored locally; if the string sequence of the encrypted file sent by the master node If the string sequence of the encrypted file stored locally is inconsistent, it is determined that the encrypted file sent by the master node is inconsistent with the encrypted file stored locally.
  • this embodiment also includes:
  • the source of encrypted files and encrypted data is determined by obtaining the communication certificate file sent by the master node. Only then, the encrypted file will be decrypted to obtain the communication key.
  • the slave node of this application can directly read the communication certificate file sent by the master node, and the slave node can also save it in a preset location by reading the master node (the preset location here can be called the second preset location ) communication certificate file depends on the specific implementation process and is not specifically limited here.
  • the source of encrypted files and encrypted data can be judged through the communication certificate file, and the work of data transmission and decryption of encrypted files and decrypted encrypted data can be more accurate, so as to ensure the security and accuracy of data.
  • the symmetric encryption key obtained through the consistency determination is obtained according to the judgment result
  • the corresponding symmetric encryption keys include:
  • the locally stored symmetric encryption key is obtained
  • this application uses the slave node to send an application for obtaining a symmetric encryption key to the master node through the installed openssl service.
  • the communication certificate file sent by the master node is consistent with the locally stored communication certificate file.
  • the locally stored symmetric encryption key is directly used to decrypt the encrypted file to obtain the communication key; confirm The communication certificate file sent by the master node is inconsistent with the communication certificate file stored locally, and an acquisition request is sent to the master node to read the symmetric encryption key, and the encrypted file is decrypted by the symmetric encryption key of the master node to obtain the communication key. The accuracy of decrypting encrypted files and encrypted data is guaranteed.
  • the communication certificate file sent by the master node is inconsistent with the locally stored communication certificate file, it also includes:
  • the symmetric encryption key of the master node is set to be available, so as to decrypt the encrypted file sent by the master node.
  • the communication certificate file sent by the master node when it is determined that the communication certificate file sent by the master node is inconsistent with the locally stored communication certificate file, the communication certificate file sent by the master node is overwritten with the locally stored communication certificate file, and the update of the locally stored communication certificate file is completed, and sent to
  • the master node obtains the symmetric encryption key and determines whether the symmetric encryption key of the master node is available. Only when the symmetric encryption key of the master node is available can the encrypted file be decrypted to obtain the communication key; if the symmetric encryption key of the master node is If the key is unavailable, set the symmetric encryption key of the master node to the available state, then decrypt the encrypted file to obtain the communication key, and then decrypt the encrypted data to obtain the transmission data after obtaining the communication key. After decrypting the encrypted file and After encrypting the data, feed back the decryption result to the master node.
  • the master node After the source of the encrypted file and encrypted data can be judged through the communication certificate file, it is determined whether the locally stored symmetric encryption key is available. If the locally stored symmetric encryption key is not available, the master node will be issued a symmetric For the application of the encryption key, after obtaining the symmetric encryption key of the master node and decrypting the encrypted file and encrypted data, the decryption result is fed back to the master node. This application can better improve the accuracy of decrypting encrypted files and encrypted data .
  • Fig. 3 is a structural diagram of a data transmission device provided by an embodiment of the present application. As shown in Fig. 3, a data transmission device includes:
  • An acquisition module 16 configured to acquire a communication key and a symmetric encryption key
  • the first encryption module 17 is used to encrypt the data to be transmitted by the communication key to generate encrypted data
  • the second encryption module 18 is used to encrypt the communication key using a symmetric encryption key to generate an encrypted file
  • the sending module 19 is used to send the encrypted file and encrypted data to the slave node, so that the slave node can decrypt the encrypted data by obtaining the communication key according to the encrypted file.
  • the device uses the obtained communication key and symmetric encryption key.
  • the communication key encrypts the data to be transmitted to generate encrypted data
  • the symmetric encryption key encrypts the communication key to generate an encrypted file
  • Read the encrypted file and encrypted data sent by the master node obtain the communication key by decrypting the encrypted file, and decrypt the encrypted data through the communication key. It can be seen that using the communication key to encrypt the data to be transmitted and the second encryption of the communication key can effectively prevent attackers from attacking the encrypted data, and improve the security and accuracy of the communication key and the security of information. .
  • Fig. 4 is a structural diagram of a data transmission device provided by another embodiment of the present application. As shown in Fig. 4, a data transmission device includes:
  • memory 20 for storing computer programs
  • the processor 21 is configured to implement the steps of a data transmission method mentioned in the foregoing embodiments when executing a computer program.
  • a data transmission device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer or a desktop computer, and the like.
  • the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • Processor 21 can adopt at least one hardware form in DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish.
  • Processor 21 may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, also called CPU (Central Processing Unit, central processing unit); the coprocessor is Low-power processor for processing data in standby state.
  • CPU Central Processing Unit
  • the coprocessor Low-power processor for processing data in standby state.
  • the processor 21 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing the content required to be displayed on the display screen.
  • the processor 21 may also include an AI (Artificial Intelligence, artificial intelligence) processor, and the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 20 may include one or more computer non-volatile readable storage media, which may be non-transitory.
  • the memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices.
  • the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, the relevant steps of the data transmission method disclosed in any of the foregoing embodiments can be realized.
  • the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage.
  • Data 203 may include, but is not limited to, data involved in the data transmission process and the like.
  • the data transmission device may further include a display screen 22 , an input/output interface 23 , a communication interface 24 , a power supply 25 and a communication bus 26 .
  • FIG. 4 does not constitute a limitation on the data transmission device, and may include more or less components than those shown in the figure.
  • the data transmission device includes a memory and a processor.
  • the processor executes the program stored in the memory, it can implement the steps of the data transmission method: through the obtained communication key and symmetric encryption key.
  • the communication key encrypts the data to be transmitted to generate encrypted data
  • the symmetric encryption key encrypts the communication key to generate an encrypted file
  • the slave node reads the encrypted file and encrypted data sent by the master node, obtains the communication key by decrypting the encrypted file, and decrypts the encrypted data through the communication key. It can be seen that using the communication key to encrypt the data to be transmitted and the second encryption of the communication key can effectively prevent attackers from attacking the encrypted data, and improve the security and accuracy of the communication key and the security of information. .
  • the present application also provides an embodiment corresponding to a computer non-volatile readable storage medium.
  • a computer program is stored on the computer non-volatile readable storage medium, and when the computer program is executed by the processor, the above-mentioned method embodiment (may be a method corresponding to the master node side, or a method corresponding to the slave node side, or are the steps described in the method corresponding to the master node side and the slave node side).
  • non-volatile readable storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • the computer non-volatile readable storage medium stores a computer program, and when the program is executed by a processor, it can realize the steps of the data transmission method: through the obtained communication key and symmetric encryption key.
  • the communication key encrypts the data to be transmitted to generate encrypted data
  • the symmetric encryption key encrypts the communication key to generate an encrypted file
  • the slave node reads the encrypted file and encrypted data sent by the master node, obtains the communication key by decrypting the encrypted file, and decrypts the encrypted data through the communication key. It can be seen that using the communication key to encrypt the data to be transmitted and the second encryption of the communication key can effectively prevent attackers from attacking the encrypted data, and improve the security and accuracy of the communication key and the security of information. .
  • a data transmission method, device, and computer non-volatile readable storage medium provided by the present application have been introduced in detail above.
  • Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
  • the description is relatively simple, and for the related information, please refer to the description of the method part. It should be pointed out that those skilled in the art can make some improvements and modifications to the application without departing from the principles of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

一种数据传输方法、装置及计算机非易失性可读存储介质,涉及存储领域。本方法包括:获取通信密钥、对称加密密钥;通过通信密钥对待传输数据进行加密生成加密数据,使用对称加密密钥对通信密钥加密生成加密文件,将加密文件与加密数据发送至从节点;读取主节点发送的加密文件与加密数据,通过解密加密文件获取到通信密钥,通过通信密钥解密加密数据。采用通信密钥对待传输数据的加密和对通信密钥的二次加密方式,能有效防止攻击者对加密数据使用的攻击手段,提高了通信密钥的安全性与准确性以及信息的安全性。

Description

一种数据传输方法、装置及计算机非易失性可读存储介质
相关申请的交叉引用
本申请要求于2021年9月27日提交中国专利局,申请号为202111139557.X,申请名称为“一种数据传输方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及存储领域,特别是涉及一种数据传输方法、装置及计算机非易失性可读存储介质。
背景技术
随着存储领域的高速发展,数据的安全越来越重要,随之对于数据保护投入力度也是越来越大。现有的方法是采用直接传输密钥的方式,使发送端与接收端使用相同的密钥进行解密加密文件。
若不能保证在传输的过程中对密钥完全保密,攻击者使用某些攻击手段获取到密钥,那么信息就会完全暴露出来。
发明内容
本申请的目的是提供一种数据传输方法、装置及计算机非易失性可读存储介质,可以有效的防止攻击者使用某些攻击手段获取密钥,导致传输数据的泄漏,该方法通过对密钥进行二次加密,解决了数据的传输安全的问题。
为解决上述技术问题,本申请提供一种数据传输方法,应用于主节点,该方法包括:
获取通信密钥与对称加密密钥;
通过通信密钥对待传输数据进行加密生成加密数据;
使用对称加密密钥对通信密钥加密生成加密文件;
将加密文件与加密数据发送至从节点,以便于从节点根据加密文件得到通信密钥对加密数据进行解密。
优选地,还包括:
获取通信证书文件;
将通信证书文件发送至从节点,以便于从节点根据通信证书文件与本地存储的通信证书文件确定加密文件与加密数据的来源。
为解决上述技术问题,本申请还提供一种数据传输方法,应用于从节点,该方法包括:
获取主节点发送的加密文件与加密数据,其中,加密数据为通信密钥对待传输数据加密的结果;加密文件为对称加密密钥对通信密钥加密的结果;
解密加密文件得到通信密钥;
通过通信密钥对加密数据进行解密。
优选地,解密加密文件得到通信密钥包括:
判断主节点发送的加密文件与本地存储的加密文件是否一致;
若主节点发送的加密文件与本地存储的加密文件一致,则获取本地存储的对称加密密钥,使用本地存储的对称加密密钥对加密文件解密;
若主节点发送的加密文件与本地存储的加密文件不一致,则将主节点发送的加密文件覆盖本地存储的加密文件,并向主节点发送获取请求以获取主节点的对称加密密钥,使用主节点的对称加密密钥对加密文件解密得到通信密钥。
优选地,还包括:
获取主节点发送的通信证书文件;
判断主节点发送的通信证书文件与本地存储的通信证书文件是否一致;
根据判断结果获取相应的对称加密密钥,以便于解密主节点发送的加密文件。
优选地,根据判断结果获取相应的对称加密密钥包括:
若主节点发送的通信证书文件与本地存储的通信证书文件一致,则获取本地存储的对称加密密钥;
若主节点发送的通信证书文件与本地存储的通信证书文件不一致,则向主节点发送获取请求以获取主节点的对称加密密钥。
优选地,若主节点发送的通信证书文件与本地存储的通信证书文件不一致,则还包括:
将主节点发送的通信证书文件覆盖本地存储的通信证书文件;
判断主节点的对称加密密钥是否为可用状态;
若主节点的对称加密密钥为不可用状态,则将主节点的对称加密密钥置为可用状态,以便于解密主节点发送的加密文件。
为解决上述技术问题,本申请还提供一种数据传输装置,应用于主节点,包括:
获取模块,用于获取通信密钥与对称加密密钥;
第一加密模块,用于通过通信密钥对待传输数据进行加密生成加密数据;
第二加密模块,用于使用对称加密密钥对通信密钥加密生成加密文件;
发送模块,用于将加密文件与加密数据发送至从节点,以便于从节点根据加密文件得到 通信密钥对加密数据进行解密。
优选地,还包括:
第二获取模块,用于获取通信证书文件;
第二发送模块,用于将通信证书文件发送至从节点,以便于从节点根据通信证书文件与本地存储的通信证书文件确定加密文件与加密数据的来源。
为解决上述技术问题,本申请还提供一种数据传输装置,应用于从节点,包括:
第三获取模块,用于获取主节点发送的加密文件与加密数据,其中,加密数据为通信密钥对待传输数据加密的结果;加密文件为对称加密密钥对通信密钥加密的结果;
解密模块,用于解密加密文件得到通信密钥,通过通信密钥对加密数据进行解密。
优选地,还包括:
第四获取模块,用于获取主节点发送的通信证书文件;
第一判断模块,用于判断主节点发送的通信证书文件与本地存储的通信证书文件是否一致;
第五获取模块,用于根据判断结果获取相应的对称加密密钥,以便于解密主节点发送的加密文件。
优选地,还包括:
覆盖模块,用于若主节点发送的通信证书文件与本地存储的通信证书文件不一致,则将主节点发送的通信证书文件覆盖本地存储的通信证书文件;
第二判断模块,用于判断主节点的对称加密密钥是否为可用状态;
处理模块,用于若主节点的对称加密密钥为不可用状态,则将主节点的对称加密密钥置为可用状态,以便于解密主节点发送的加密文件。
为解决上述技术问题,本申请还提供一种数据传输装置,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现上述数据传输的步骤。
为解决上述技术问题,本申请还提供一种计算机非易失性可读存储介质,计算机非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述数据传输的步骤。
本申请提供的一种数据传输方法,本方法通过获取的通信密钥、对称加密密钥。通信密钥对待传输数据进行加密生成加密数据,对称加密密钥对通信密钥加密生成加密文件,将加密文件与加密数据发送至从节点。读取主节点发送的加密文件与加密数据,通过解密加密文 件获取到通信密钥,通过通信密钥解密加密数据。可见,采用通信密钥对待传输数据的加密和对通信密钥二次加密方式,能有效防止攻击者对加密数据使用的攻击手段,提高了通信密钥的安全性与准确性以及信息的安全性。
此外,本申请还提供了一种数据传输装置及计算机非易失性可读存储介质,有益效果同上。
附图说明
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种数据传输方法的流程图;
图2为本申请另一实施例提供的一种数据传输方法的流程图;
图3为本申请实施例提供的一种数据传输装置的结构图;
图4为本申请另一实施例提供的一种数据传输装置的结构图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。
本申请的核心是提供一种数据传输方法、装置及计算机非易失性可读存储介质。在现有的技术中,仅是对待传输的数据进行加密,发送端与接收端使用相同的密钥进行解密加密文件,当不法分子将密钥截获时,传输的数据也就随之被破解,此方法的安全性很低。为提高数据传输的安全性,本申请提供一种数据传输方法,能有效防止攻击者对密钥的攻击。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。
图1为本申请实施例提供的一种数据传输方法的流程图,如图1所示,应用于主节点,该方法包括:
S1:获取通信密钥与对称加密密钥。
本申请是采用多节点的方法对密钥及待传输数据加密进行传输,在双控集群中部署连两个节点,分别称为主节点和从节点,在主节点中安装开放式安全套接层协议(openssl)服务;主节点通过openssl命令生成通信密钥和对称加密密钥。在具体实施中,通信密钥是发 送端(本申请中发送端为主节点)将待传输数据进行加密,并将加密数据与通信密钥一起传输给接收端(本申请中接收端为从节点),接收端使用发送端同加密数据一起传输过来的通信密钥对加密数据进行解密得到的传输数据。对称加密密钥又称为私钥,即消息的发送端与接收端使用同一个密钥去加密和解密数据,加密速度与解密速度快是其最大的优势。本申请的对称加密密钥是在通信密钥对待传输数据加密之后,对通信密钥进行加密,使用二次加密的方式保证密钥信息的安全性和准确性。
需要说明的是,对于获取通信密钥与对称密钥的方式不做具体的限定,同时对于获取的顺序也没有具体的限定,通常情况下,首先获取通信密钥,其次获取对称加密密钥。
S2:通过通信密钥对待传输数据进行加密生成加密数据。
在具体实施中,通信密钥是由数字、字母和特殊符号组成的字符串,用字符串控制待传输数据的加密与解密的过程,也就是将待传输数据的明文转变为加密数据的密文,从而起到加密的作用。
需要说明的是,通信密钥对待传输数据的加密方式可以通过加密设备,也可以通过加密算法进行加密,本申请不做具体的限定。
S3:使用对称加密密钥对通信密钥加密生成加密文件。
在具体实施中,由于加密数据的解密和加密都是通过同一个通信密钥进行完成的,但是如果在传输的过程中被别人劫持,那么劫持者就可以通过通信密钥解密加密数据。所以为了防止在传输过程中通信密钥被劫持,所以在通信密钥将带传输数据加密之后,对称加密密钥对通信密钥进行加密,本申请提供的是二次加密的方式,有效防止通信密钥被劫持后将解密数据进行解密。
需要说明的是,对称加密密钥对通信密钥的加密方式可以通过加密设备,也可以通过加密算法进行加密,本申请不做具体的限定。
S4:将加密文件与加密数据发送至从节点,以便于从节点根据加密文件得到通信密钥对加密数据进行解密。
在具体实施中,待通信密钥将待传输密钥加密生成加密数据,对称加密密钥对通信密钥加密生成加密文件后,可以将加密数据和加密文件保存至预设位置(此处的预设位置可以称为第一预设位置),从节点去预设位置(此处的预设位置可以称为第一预设位置)去读取;也可以直接将加密数据与加密文件发送至从节点,在具体实施中不做具体限定,作为优选实施例,本申请提供将加密数据与加密文件发送至从节点。
本申请实施例提供的一种数据传输方法,本方法通过获取的通信密钥、对称加密密钥。 通信密钥对待传输数据进行加密生成加密数据,对称加密密钥对通信密钥加密生成加密文件,将加密文件与加密数据发送至从节点。从节点读取主节点发送的加密文件与加密数据,通过解密加密文件获取到通信密钥,通过通信密钥解密加密数据。可见,采用通信密钥对待传输数据的加密和对通信密钥二次加密方式,能有效防止攻击者对加密数据使用的攻击手段,提高了通信密钥的安全性与准确性以及信息的安全性。
在上述实施例中提到将获取到的通信密钥与待传输数据经过加密后发送至从节点,作为优选实施例,本方法还包括:
获取通信证书文件;
将通信证书文件发送至从节点,以便于从节点根据通信证书文件与本地存储的通信证书文件确定加密文件与加密数据的来源。
在具体实施中,从节点获取通信证书文件以验证加密文件与加密数据来源,主节点将获取的通信证书文件发送至从节点,从节点根据主节点发送的通信证书文件确定接收的加密文件与加密数据是否来自主节点。若确定加密文件与加密数据来自主节点发送的,则进行解密加密文件得到通信密钥解密加密数据;若确定加密文件与加密数据不是主节点发送的,则不进行解密加密文件。
需要说明的是,本申请可以将通信证书文件直接发送至从节点,也可以将通信证书文件保存至预设位置(此处的预设位置可以称为第二预设位置),从节点在预设位置(此处的预设位置可以称为第二预设位置)获取通信证书文件,这里不做具体的限定。
可见,通过通信证书文件可以判断加密文件与加密数据的来源,可以将数据传输以及解密加密文件与解密加密数据的工作更精确,以保证数据的安全性与准确性。
图2为本申请另一实施例提供的一种数据传输方法的流程图,如图2所示,应用于从节点,该方法包括:
S5:获取主节点发送的加密文件与加密数据,其中,加密数据为通信密钥对待传输数据加密的结果;加密文件为对称加密密钥对通信密钥加密的结果。
本申请是采用多节点的方法对密钥及待传输数据加密进行传输,在双控集群中部署连两个节点,分别称为主节点和从节点,在从节点中安装openssl服务,若主节点将加密文件与加密数据直接发送至从节点,则从节点接收主节点发送的加密文件与加密数据;若主节点将加密文件与加密数据保存至预设位置(此处的预设位置可以称为第一预设位置),则从节点直接从预设位置(此处的预设位置可以称为第一预设位置)读取加密文件与加密数据。
S6:解密加密文件得到通信密钥。
在具体实施中,将获取的加密文件进行解密得到通信密钥,由于是通过对称加密密钥对通信密钥进行的加密,那么也是通过对称加密密钥对加密文件解密。首先获取对称加密密钥,其次确定获取的对称加密密钥是否为可用状态,只有在对称加密密钥为可用状态时,才可以对加密文件进行解密获得通信密钥。
需要说明的是,获取的对称加密密钥是向主节点获取的对称加密密钥,还是获取本地存储的对称加密密钥要根据实施过程中的具体情况而定。
S7:通过通信密钥对加密数据进行解密。
在具体实施中,由于加密数据是通过通信密钥对待传输数据加密得到的,那么根据解密加密文件得到的通信密钥对加密数据进行解密得到待传输数据。
可见,通过对待传输数据与通信密钥均进行加密的二次加密方式,可以保证在不法分子截获到加密状态的通信密钥,由于此时的通信密钥为加密状态的加密文件,那么将无法破解传输数据,从而解决了提高数据传输的安全性的问题。
在上述实施例中,从节点获取到了加密文件与加密数据,此时,作为优选实施例,解密加密文件得到通信密钥包括:
判断主节点发送的加密文件与本地存储的加密文件是否一致;
若主节点发送的加密文件与本地存储的加密文件一致,则获取本地存储的对称加密密钥,使用本地存储的对称加密密钥对加密文件解密;
若主节点发送的加密文件与本地存储的加密文件不一致,则将主节点发送的加密文件覆盖本地存储的加密文件,并向主节点发送获取请求以获取主节点的对称加密密钥,使用主节点的对称加密密钥对加密文件解密得到通信密钥。
在具体实施中,由于将通信密钥与数据加密是通过将明文转变为密文,也就是改变字符串的顺序,那么判断主节点发送的加密文件与本地存储的加密文件是否一致的方法不做具体的限定。作为优选实施例,本申请将通过比较字符串的顺序来进行判断主节点发送的加密文件与本地存储的加密文件是否一致。若主节点发送的加密文件的字符串顺序与本地存储的加密文件的字符串顺序一致,则确定主节点发送的加密文件与本地存储的加密文件一致;若主节点发送的加密文件的字符串顺序与本地存储的加密文件的字符串顺序不一致,则确定主节点发送的加密文件与本地存储的加密文件不一致。
当确定加密文件一致时,利用本地存储的对称加密密钥对加密文件进行解密得到通信密钥;当确定加密文件不一致时,使用主节点发送的加密文件覆盖本地存储的加密文件,向主节点发出申请获取对称加密密钥,通过获取对称加密密钥对主节点发送的加密文件进行解密 得到通信密钥,需要说明的是,对于获取主节点的对称加密密钥的方式不做具体的限定,本申请采用从节点通过安装的openssl服务向主节点发出获取对称加密密钥的申请。
可见,通过判断主节点发送的加密文件与本地存储的加密文件是否一致,来确定获取解密加密文件的对称加密密钥,将加密文件进行解密得到通信密钥对加密数据进行解密,提高数据传输的安全性与准确性。
在上述实施例中,在获取加密文件与加密数据后,应该确定加密文件与加密数据的来源,所以作为优选实施例,本实施例还包括:
获取主节点发送的通信证书文件;
判断主节点发送的通信证书文件与本地存储的通信证书文件是否一致;
根据判断结果获取相应的对称加密密钥,以便于解密主节点发送的加密文件。
在具体实施中,由于存在接收到其他人发送的加密文件与加密数据的可能,通过获取主节点发送的通信证书文件确定加密文件与加密数据的来源,在确定加密文件与加密数据为主节点发送的时,才进行解密加密文件获取通信密钥。
将获取主节点发送的通信证书文件与本地存储的通信证书文件比对,判断其是否一致,通过比对结果的一致性确定过去对称加密密钥对加密文件进行解密。
需要说明的是,本申请从节点可以直接读取主节点发送的通信证书文件,从节点也可以通过读取主节点保存在预设位置(此处的预设位置可以称为第二预设位置)的通信证书文件,根据具体实施过程而定,这里不做具体的限定。
可见,通过通信证书文件可以判断加密文件与加密数据的来源,可以将数据传输以及解密加密文件与解密加密数据的工作更精确,以保证数据的安全性与准确性。
根据上述实施例提供的通信证书文件,通过确定主节点发送的通信证书文件与本地存储的通信证书文件的一致性,通过一致性确定获取的对称加密密钥,作为优选实施例,根据判断结果获取相应的对称加密密钥包括:
若主节点发送的通信证书文件与本地存储的通信证书文件一致,则获取本地存储的对称加密密钥;
若主节点发送的通信证书文件与本地存储的通信证书文件不一致,则向主节点发送获取请求以获取主节点的对称加密密钥,需要说明的是,对于获取主节点的对称加密密钥的方式不做具体的限定,本申请采用从节点通过安装的openssl服务向主节点发出获取对称加密密钥的申请。
可见,确定主节点发送的通信证书文件与本地存储的通信证书文件一致,此时不需要更 新本地存储的通信证书文件,就直接用本地存储的对称加密密钥解密加密文件获取通信密钥;确定主节点发送的通信证书文件与本地存储的通信证书文件不一致,向主节点发送获取请求,以读取对称加密密钥,通过主节点的对称加密密钥解密加密文件获取通信密钥。保证了解密加密文件与加密数据的准确性。
作为优选实施例,若主节点发送的通信证书文件与本地存储的通信证书文件不一致,则还包括:
将主节点发送的通信证书文件覆盖本地存储的通信证书文件;
判断主节点的对称加密密钥是否为可用状态;
若主节点的对称加密密钥为不可用状态,则将主节点的对称加密密钥置为可用状态,以便于解密主节点发送的加密文件。
在具体实施中,确定主节点发送的通信证书文件与本地存储的通信证书文件不一致时,将主节点发送的通信证书文件覆盖本地存储的通信证书文件,完成本地存储的通信证书文件的更新,向主节点获取对称加密密钥并确定主节点的对称加密密钥是否可用,只有在主节点的对称加密密钥可用状态下,才可以对加密文件进行解密得到通信密钥;若主节点的对称加密密钥不可用,则将主节点的对称加密密钥置为可用状态后,再对加密文件进行解密得到通信密钥,获取通信密钥后对加密数据进行解密得到传输数据,在解密加密文件与加密数据后,向主节点反馈解密结果。
可见,在通过通信证书文件可以判断加密文件与加密数据的来源后,确定本地存储的对称加密密钥是否可用,若本地存储的对称加密密钥不可用,则向主节点发出获取主节点的对称加密密钥的申请,在获取主节点的对称加密密钥以及解密加密文件和加密数据工作完成之后,将解密结果反馈至主节点,本申请可以更好的提高解密加密文件与加密数据的准确性。
在上述实施例中,对于一种数据传输方法进行了详细描述,本申请还提供一种数据传输装置对应的实施例。需要说明的是,本申请从两个角度对装置部分的实施例进行描述,一种是基于功能模块的角度,另一种是基于硬件的角度。
图3为本申请实施例提供的一种数据传输装置的结构图,如图3所示,一种数据传输装置包括:
获取模块16,用于获取通信密钥与对称加密密钥;
第一加密模块17,用于通过通信密钥对待传输数据进行加密生成加密数据;
第二加密模块18,用于使用对称加密密钥对通信密钥加密生成加密文件;
发送模块19,用于将加密文件与加密数据发送至从节点,以便于从节点根据加密文件得 到通信密钥对加密数据进行解密。
由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。
由此可见,本申请提供的一种数据传输装置,本装置通过获取的通信密钥、对称加密密钥。通信密钥对待传输数据进行加密生成加密数据,对称加密密钥对通信密钥加密生成加密文件,将加密文件与加密数据发送至从节点。读取主节点发送的加密文件与加密数据,通过解密加密文件获取到通信密钥,通过通信密钥解密加密数据。可见,采用通信密钥对待传输数据的加密和对通信密钥二次加密方式,能有效防止攻击者对加密数据使用的攻击手段,提高了通信密钥的安全性与准确性以及信息的安全性。
图4为本申请另一实施例提供的一种数据传输装置的结构图,如图4所示,一种数据传输装置包括:
存储器20,用于存储计算机程序;
处理器21,用于执行计算机程序时实现如上述实施例中所提到的一种数据传输方法的步骤。
本实施例提供的一种数据传输装置可以包括但不限于智能手机、平板电脑、笔记本电脑或台式电脑等。
其中,处理器21可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器21可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器21也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器21可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器21还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器20可以包括一个或多个计算机非易失性可读存储介质,该计算机非易失性可读存储介质可以是非暂态的。存储器20还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。本实施例中,存储器20至少用于存储以下计算机程序201,其中,该计算机程序被处理器21加载并执行之后,能够实现前述任一实施例公 开的数据传输的方法的相关步骤。另外,存储器20所存储的资源还可以包括操作系统202和数据203等,存储方式可以是短暂存储或者永久存储。数据203可以包括但不限于数据传输过程中涉及到的数据等。
在一些实施例中,数据传输装置还可包括有显示屏22、输入输出接口23、通信接口24、电源25以及通信总线26。
本领域技术人员可以理解,图4中示出的结构并不构成对数据传输装置的限定,可以包括比图示更多或更少的组件。
本申请实施例提供的数据传输装置,包括存储器和处理器,处理器在执行存储器存储的程序时,能够实现数据传输方法的步骤:通过获取的通信密钥、对称加密密钥。通信密钥对待传输数据进行加密生成加密数据,对称加密密钥对通信密钥加密生成加密文件,将加密文件与加密数据发送至从节点。从节点读取主节点发送的加密文件与加密数据,通过解密加密文件获取到通信密钥,通过通信密钥解密加密数据。可见,采用通信密钥对待传输数据的加密和对通信密钥二次加密方式,能有效防止攻击者对加密数据使用的攻击手段,提高了通信密钥的安全性与准确性以及信息的安全性。
最后,本申请还提供一种计算机非易失性可读存储介质对应的实施例。计算机非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述方法实施例(可以是主节点侧对应的方法、也可以是从节点侧对应的方法,还可以是主节点侧和从节点侧对应的方法)中记载的步骤。
可以理解的是,如果上述实施例中的方法以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机非易失性可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个非易失性可读存储介质中,执行本申请各个实施例方法的全部或部分步骤。而前述的非易失性可读存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供的计算机非易失性可读存储介质,存储有计算机程序,该程序被处理器执行时,能够实现数据传输方法的步骤:通过获取的通信密钥、对称加密密钥。通信密钥对待传输数据进行加密生成加密数据,对称加密密钥对通信密钥加密生成加密文件,将加密文件与加密数据发送至从节点。从节点读取主节点发送的加密文件与加密数据,通过解密加密文件获取到通信密钥,通过通信密钥解密加密数据。可见,采用通信密钥对待传输数据的 加密和对通信密钥二次加密方式,能有效防止攻击者对加密数据使用的攻击手段,提高了通信密钥的安全性与准确性以及信息的安全性。
以上对本申请所提供的一种数据传输方法、装置及计算机非易失性可读存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (20)

  1. 一种数据传输方法,其特征在于,应用于主节点,该方法包括:
    获取通信密钥与对称加密密钥;
    通过所述通信密钥对待传输数据进行加密生成加密数据;
    使用所述对称加密密钥对所述通信密钥加密生成加密文件;
    将所述加密文件与所述加密数据发送至从节点,以便于所述从节点根据所述加密文件得到所述通信密钥对所述加密数据进行解密。
  2. 根据权利要求1所述的数据传输方法,其特征在于,还包括:
    获取通信证书文件;
    将所述通信证书文件发送至所述从节点,以便于所述从节点根据所述通信证书文件与本地存储的所述通信证书文件确定所述加密文件与所述加密数据的来源。
  3. 根据权利要求2所述的数据传输方法,其特征在于,所述从节点用于根据所述主节点发送的所述通信证书文件确定接收的加密文件与加密数据是否来自所述主节点;若确定加密文件与加密数据来自所述主节点,则解密所述加密文件得到所述通信密钥,利用所述通信密钥解密所述加密数据;若确定加密文件与加密数据不是来自所述主节点,则不执行解密所述加密文件的操作。
  4. 根据权利要求2所述的数据传输方法,其特征在于,所述从节点还用于从第二预设位置获取所述通信证书文件;所述第二预设位置存储有所述主节点保存的所述通信证书文件。
  5. 根据权利要求1所述的数据传输方法,其特征在于,所述从节点用于从第一预设位置读取所述加密数据和所述加密文件;所述第一预设位置存储有所述主节点保存的所述加密数据和所述加密文件。
  6. 一种数据传输方法,其特征在于,应用于从节点,该方法包括:
    获取主节点发送的加密文件与加密数据,其中,所述加密数据为通信密钥对待传输数据加密的结果;所述加密文件为对称加密密钥对所述通信密钥加密的结果;
    解密所述加密文件得到所述通信密钥;
    通过所述通信密钥对所述加密数据进行解密。
  7. 根据权利要求6所述的数据传输方法,其特征在于,获取主节点发送的加密文件与加密数据,包括:
    若所述主节点将所述加密文件与所述加密数据发送至所述从节点,则接收所述主节点发送的所述加密文件与所述加密数据;
    若所述主节点将所述加密文件与所述加密数据保存至第一预设位置,则从所述第一预设位置读取所述加密文件与所述加密数据。
  8. 根据权利要求6所述的数据传输方法,其特征在于,所述解密所述加密文件得到所述通信密钥包括:
    获取所述对称加密密钥,确定获取的所述对称加密密钥是否为可用状态,在所述对称加密密钥为可用状态时,对所述加密文件进行解密获得所述通信密钥。
  9. 根据权利要求6所述的数据传输方法,其特征在于,所述解密所述加密文件得到所述通信密钥包括:
    判断所述主节点发送的所述加密文件与本地存储的所述加密文件是否一致;
    若所述主节点发送的所述加密文件与所述本地存储的所述加密文件一致,则获取所述本地存储的所述对称加密密钥,使用所述本地存储的所述对称加密密钥对所述加密文件解密;
    若所述主节点发送的所述加密文件与所述本地存储的所述加密文件不一致,则将所述主节点发送的所述加密文件覆盖所述本地存储的所述加密文件,并向所述主节点发送获取请求以获取所述主节点的所述对称加密密钥,使用所述主节点的所述对称加密密钥对所述加密文件解密得到所述通信密钥。
  10. 根据权利要求9所述的数据传输方法,其特征在于,所述判断所述主节点发送的所述加密文件与本地存储的所述加密文件是否一致包括:
    通过比较字符串的顺序来进行判断所述主节点发送的所述加密文件与本地存储的所述加密文件是否一致;
    若所述主节点发送的所述加密文件的字符串顺序与本地存储的所述加密文件的字符串顺序一致,则确定所述主节点发送的所述加密文件与本地存储的所述加密文件一致。
  11. 根据权利要求10所述的数据传输方法,其特征在于,所述判断所述主节点发送的所述加密文件与本地存储的所述加密文件是否一致还包括:
    若所述主节点发送的所述加密文件的字符串顺序与本地存储的所述加密文件的字符串顺序不一致,则确定所述主节点发送的所述加密文件与本地存储的所述加密文件不一致。
  12. 根据权利要求6所述的数据传输方法,其特征在于,还包括:
    获取所述主节点发送的通信证书文件;
    判断所述主节点发送的所述通信证书文件与本地存储的所述通信证书文件是否一致;
    根据判断结果获取相应的所述对称加密密钥,以便于解密所述主节点发送的所述加密文件。
  13. 根据权利要求12所述的数据传输方法,其特征在于,所述根据判断结果获取相应的所述对称加密密钥包括:
    若所述主节点发送的所述通信证书文件与所述本地存储的所述通信证书文件一致,则获取所述本地存储的所述对称加密密钥;
    若所述主节点发送的通信证书文件与所述本地存储的所述通信证书文件不一致,则向所述主节点发送获取请求以获取所述主节点的所述对称加密密钥。
  14. 根据权利要求13所述的数据传输方法,其特征在于,若所述主节点发送的通信证书文件与所述本地存储的所述通信证书文件不一致,则还包括:
    将所述主节点发送的通信证书文件覆盖所述本地存储的所述通信证书文件;
    判断所述主节点的所述对称加密密钥是否为可用状态;
    若所述主节点的所述对称加密密钥为不可用状态,则将所述主节点的所述对称加密密钥置为可用状态,以便于解密所述主节点发送的所述加密文件。
  15. 根据权利要求13所述的数据传输方法,其特征在于,若所述主节点发送的所述通信证书文件与所述本地存储的所述通信证书文件一致,则还包括:
    不更新所述本地存储的所述通信证书文件。
  16. 根据权利要求12所述的数据传输方法,其特征在于,所述主节点用于将所述通信证书文件保存在第二预设位置,以便于所述从节点读取所述主节点保存在所述第二预设位置的所述通信证书文件。
  17. 一种数据传输装置,其特征在于,应用于主节点,包括:
    获取模块,用于获取通信密钥与对称加密密钥;
    第一加密模块,用于通过所述通信密钥对待传输数据进行加密生成加密数据;
    第二加密模块,用于使用所述对称加密密钥对所述通信密钥加密生成加密文件;
    发送模块,用于将所述加密文件与所述加密数据发送至从节点,以便于所述从节点根据所述加密文件得到所述通信密钥对所述加密数据进行解密。
  18. 一种数据传输装置,其特征在于,应用于从节点,包括:
    第三获取模块,用于获取主节点发送的加密文件与加密数据,其中,所述加密数据为通信密钥对待传输数据加密的结果;所述加密文件为对称加密密钥对所述通信密钥加密的结果;
    解密模块,用于解密所述加密文件得到所述通信密钥,通过所述通信密钥对所述加 密数据进行解密。
  19. 一种数据传输装置,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至16任一项所述的数据传输方法的步骤。
  20. 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至16任一项所述的数据传输方法的步骤。
PCT/CN2022/121845 2021-09-27 2022-09-27 一种数据传输方法、装置及计算机非易失性可读存储介质 WO2023046207A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111139557.X 2021-09-27
CN202111139557.XA CN114024711A (zh) 2021-09-27 2021-09-27 一种数据传输方法、装置及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2023046207A1 true WO2023046207A1 (zh) 2023-03-30

Family

ID=80055157

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/121845 WO2023046207A1 (zh) 2021-09-27 2022-09-27 一种数据传输方法、装置及计算机非易失性可读存储介质

Country Status (2)

Country Link
CN (1) CN114024711A (zh)
WO (1) WO2023046207A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024711A (zh) * 2021-09-27 2022-02-08 苏州浪潮智能科技有限公司 一种数据传输方法、装置及计算机可读存储介质
CN116684095B (zh) * 2023-08-02 2023-09-29 杭州希智电子有限公司 基于物联网的传感器数据加密方法及系统

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209202A (zh) * 2012-01-16 2013-07-17 联想(北京)有限公司 用于传输数据的方法和设备
CN106789038A (zh) * 2017-01-25 2017-05-31 济南浪潮高新科技投资发展有限公司 一种水下通信的方法及系统、一种水下自由航行器
CN109218451A (zh) * 2018-11-14 2019-01-15 郑州云海信息技术有限公司 一种分布式集群系统的数据传输方法、装置、设备及介质
WO2019037411A1 (zh) * 2017-08-22 2019-02-28 深圳光启智能光子技术有限公司 数据传输方法、装置、存储介质和处理器
CN111460473A (zh) * 2020-03-23 2020-07-28 深圳市中易通安全芯科技有限公司 数据加密和解密方法、插件、数据安全系统及介质
CN111680326A (zh) * 2020-06-09 2020-09-18 联想(北京)有限公司 一种数据处理方法及装置
WO2020237868A1 (zh) * 2019-05-24 2020-12-03 平安科技(深圳)有限公司 数据传输方法、电子设备、服务器及存储介质
CN112653705A (zh) * 2020-12-29 2021-04-13 中国农业银行股份有限公司 一种数据加密传输方法、装置及设备
CN114024711A (zh) * 2021-09-27 2022-02-08 苏州浪潮智能科技有限公司 一种数据传输方法、装置及计算机可读存储介质

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209202A (zh) * 2012-01-16 2013-07-17 联想(北京)有限公司 用于传输数据的方法和设备
CN106789038A (zh) * 2017-01-25 2017-05-31 济南浪潮高新科技投资发展有限公司 一种水下通信的方法及系统、一种水下自由航行器
WO2019037411A1 (zh) * 2017-08-22 2019-02-28 深圳光启智能光子技术有限公司 数据传输方法、装置、存储介质和处理器
CN109218451A (zh) * 2018-11-14 2019-01-15 郑州云海信息技术有限公司 一种分布式集群系统的数据传输方法、装置、设备及介质
WO2020237868A1 (zh) * 2019-05-24 2020-12-03 平安科技(深圳)有限公司 数据传输方法、电子设备、服务器及存储介质
CN111460473A (zh) * 2020-03-23 2020-07-28 深圳市中易通安全芯科技有限公司 数据加密和解密方法、插件、数据安全系统及介质
CN111680326A (zh) * 2020-06-09 2020-09-18 联想(北京)有限公司 一种数据处理方法及装置
CN112653705A (zh) * 2020-12-29 2021-04-13 中国农业银行股份有限公司 一种数据加密传输方法、装置及设备
CN114024711A (zh) * 2021-09-27 2022-02-08 苏州浪潮智能科技有限公司 一种数据传输方法、装置及计算机可读存储介质

Also Published As

Publication number Publication date
CN114024711A (zh) 2022-02-08

Similar Documents

Publication Publication Date Title
WO2023046207A1 (zh) 一种数据传输方法、装置及计算机非易失性可读存储介质
CN108345806B (zh) 一种硬件加密卡和加密方法
US9413754B2 (en) Authenticator device facilitating file security
WO2019218919A1 (zh) 区块链场景下的私钥管理方法、装置及系统
WO2018090763A1 (zh) 一种终端主密钥的设置方法和装置
CN103378971B (zh) 一种数据加密系统及方法
US10887085B2 (en) System and method for controlling usage of cryptographic keys
WO2019109852A1 (zh) 一种数据传输方法及系统
WO2023000502A1 (zh) 虚拟机磁盘数据的加解密方法、装置、设备及存储介质
CN111274611A (zh) 数据脱敏方法、装置及计算机可读存储介质
WO2023274011A1 (zh) 一种otp存储器内数据保护方法、装置、设备及存储介质
CN114186264A (zh) 数据随机加密、解密方法、装置及系统
WO2024087470A1 (zh) 一种区块链交易数据的监管方法、装置、设备和非易失性可读存储介质
JP2004072151A (ja) ファイル暗号化機能を有する端末装置
TW202231014A (zh) 訊息傳輸系統以及應用其中之使用者裝置與資訊安全硬體模組
CN103532712B (zh) 数字媒体文件保护方法、系统及客户端
CN111382451A (zh) 一种密级标识方法、装置、电子设备及存储介质
EP4125236A1 (en) Secret code verification protocol
CN115834192A (zh) 一种文件摆渡方法、装置及计算机可读存储介质
CN108154037B (zh) 进程间的数据传输方法和装置
CN115688165A (zh) 一种节点文件处理方法、装置、设备及存储介质
CN110611674B (zh) 不同计算机系统之间的协议交互方法、系统及存储介质
CN112257092A (zh) 数据传输控制方法、密钥管理方法、配置方法及相关装置
CN109933994B (zh) 数据分级存储方法和装置以及计算设备
CN112350920A (zh) 基于区块链的即时通讯系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22872250

Country of ref document: EP

Kind code of ref document: A1