[go: up one dir, main page]

CN118101298A - Data encryption transmission method, device, computer equipment, medium and program product - Google Patents

Data encryption transmission method, device, computer equipment, medium and program product Download PDF

Info

Publication number
CN118101298A
CN118101298A CN202410293802.XA CN202410293802A CN118101298A CN 118101298 A CN118101298 A CN 118101298A CN 202410293802 A CN202410293802 A CN 202410293802A CN 118101298 A CN118101298 A CN 118101298A
Authority
CN
China
Prior art keywords
key
application
security
data
ciphertext
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202410293802.XA
Other languages
Chinese (zh)
Other versions
CN118101298B (en
Inventor
陈培安
黄宜婕
吕振林
董晓龙
曹蕾
杨境
聂德印
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Digital Soft Technology Co ltd
Original Assignee
Beijing Digital Soft Technology Co ltd
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 Beijing Digital Soft Technology Co ltd filed Critical Beijing Digital Soft Technology Co ltd
Priority to CN202410293802.XA priority Critical patent/CN118101298B/en
Publication of CN118101298A publication Critical patent/CN118101298A/en
Application granted granted Critical
Publication of CN118101298B publication Critical patent/CN118101298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0442Network 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 wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/062Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying encryption of the keys

Landscapes

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

Abstract

本申请涉及分布式数据管理技术领域,公开了数据加密传输方法、装置、计算机设备、介质及程序产品,该方法包括接收第一应用发送的待解密密文;根据预设密文传输协议解析协议头,并将解析出的协议头发送至安全中心,以便安全中心基于自身的私钥解密出协议头中的第一原始密钥,并利用第一设备公钥加密第一原始密钥,并返回加密后第一原始密钥;根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥;根据第一原始密钥以及预设密文传输协议,解密加密数据,得到明文数据,并将明文数据传输至第一应用。实现密钥协商交换,加大密钥破译难度,保障分布式管理体系中数据传输的安全性以及可靠性。

The present application relates to the field of distributed data management technology, and discloses a data encryption transmission method, device, computer equipment, medium and program product, the method comprising receiving a ciphertext to be decrypted sent by a first application; parsing a protocol header according to a preset ciphertext transmission protocol, and sending the parsed protocol header to a security center, so that the security center decrypts the first original key in the protocol header based on its own private key, and encrypts the first original key using a first device public key, and returns the encrypted first original key; decrypting the encrypted first original key according to a device private key corresponding to the first device public key to obtain the first original key; decrypting the encrypted data according to the first original key and a preset ciphertext transmission protocol to obtain plaintext data, and transmitting the plaintext data to the first application. Realize key negotiation exchange, increase the difficulty of key deciphering, and ensure the security and reliability of data transmission in a distributed management system.

Description

数据加密传输方法、装置、计算机设备、介质及程序产品Data encryption transmission method, device, computer equipment, medium and program product

技术领域Technical Field

本申请涉及分布式数据管理技术领域,具体涉及数据加密传输方法、装置、计算机设备、介质及程序产品。The present application relates to the field of distributed data management technology, and specifically to data encryption transmission methods, devices, computer equipment, media and program products.

背景技术Background technique

高速公路行业作为现代交通的动脉,承担着连接城市以及促进经济发展等的重要使命。该行业使用分布式管理体系对各管理层的数据进行管理,其中从收费站管理层到路段管理层、省级管理层和或国家级管理层之间数据的传输和共享至关重要。As the artery of modern transportation, the highway industry undertakes the important mission of connecting cities and promoting economic development. The industry uses a distributed management system to manage data at various management levels, among which the transmission and sharing of data from the toll station management level to the road section management level, provincial management level and/or national management level is crucial.

现有的数据加密传输方法往往缺乏统一的标准和规范,各个管理层和应用系统之间可能存在不同的加密技术和标准,一旦某个环节出现差错,就可能导致整个数据传输链的破裂,从而危及整个系统的安全性。而且,现有的数据加密传输方法中的密钥的极易被第三方篡改或截取,从而影响整个高速公路行业中数据的安全性与可靠性。Existing data encryption transmission methods often lack unified standards and specifications. Different encryption technologies and standards may exist between various management levels and application systems. Once an error occurs in a certain link, it may lead to the breakdown of the entire data transmission chain, thereby endangering the security of the entire system. Moreover, the keys in the existing data encryption transmission methods are easily tampered or intercepted by a third party, thus affecting the security and reliability of data in the entire highway industry.

因此,如何保障分布式管理体系中数据传输的安全性以及可靠性,已成为目前亟需解决的技术问题。Therefore, how to ensure the security and reliability of data transmission in a distributed management system has become a technical problem that needs to be solved urgently.

发明内容Summary of the invention

有鉴于此,本申请提供了一种数据加密传输方法、装置、计算机设备、介质及程序产品,以解决如何保障分布式管理体系中数据传输的安全性以及可靠性的问题。In view of this, the present application provides a data encryption transmission method, apparatus, computer equipment, medium and program product to solve the problem of how to ensure the security and reliability of data transmission in a distributed management system.

第一方面,本申请提供了一种数据加密传输方法,应用于分布式数据安全系统,系统包括安全中心以及多个安全设备,该方法由第一安全设备执行,该方法包括:In a first aspect, the present application provides a data encryption transmission method, which is applied to a distributed data security system, the system comprising a security center and a plurality of security devices, the method being executed by a first security device, the method comprising:

接收第一应用发送的待解密密文,待解密密文为第二应用向第一应用发送的密文,待解密密文包括协议头和加密数据,第一安全设备为多个安全设备中任一个,第一应用为第一安全设备所绑定的应用,第二应用为多个安全设备中除第一安全设备以外的任一安全设备所绑定的应用;receiving a ciphertext to be decrypted sent by a first application, the ciphertext to be decrypted is a ciphertext sent by a second application to the first application, the ciphertext to be decrypted includes a protocol header and encrypted data, the first security device is any one of a plurality of security devices, the first application is an application bound to the first security device, and the second application is an application bound to any security device among the plurality of security devices except the first security device;

根据预设密文传输协议解析协议头,并将解析出的协议头发送至安全中心,以便安全中心基于自身的私钥解密出协议头中的第一原始密钥,并利用第一设备公钥加密第一原始密钥,并返回加密后第一原始密钥,第一设备公钥为第一安全设备生成的公钥,第一原始密钥为第二应用对应安全设备生成的对称密钥;Parse the protocol header according to the preset ciphertext transmission protocol, and send the parsed protocol header to the security center, so that the security center can decrypt the first original key in the protocol header based on its own private key, encrypt the first original key with the first device public key, and return the encrypted first original key, where the first device public key is the public key generated by the first security device, and the first original key is the symmetric key generated by the security device corresponding to the second application;

根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥;Decrypting the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key;

根据第一原始密钥以及预设密文传输协议,解密加密数据,得到明文数据,并将明文数据传输至第一应用。According to the first original key and the preset ciphertext transmission protocol, the encrypted data is decrypted to obtain the plaintext data, and the plaintext data is transmitted to the first application.

上述技术方案中,第一应用对应安全设备在基于预设密文传输协议解析出待解密密文中的协议头后,安全中心会基于自身的公钥解密出协议头中的第一原始密钥,并基于第一设备公钥加密解密得到的第一原始密钥,以将加密后的第一原始密钥返回给该安全设备,使原始密钥在从应用端以及安全中心端传输至该安全设备时都是加密后的数据,而且原始密钥在经由安全中心改变了加密的公钥,实现数据加密传输过程中的密钥协商交换,加大密钥破译难度,从而保障分布式管理体系中数据传输的安全性以及可靠性。另外,该安全设备在接收到加密后第一原始密钥并将其解密为第一原始密钥后根据预设密文传输协议解密待解密密文中的加密数据,以将解密得到的明文数据传输至第一应用,完成第一应用与第二应用之间的数据加密传输的同时,还利用预设密文传输协议规定数据传输的标准与规范,提高整个数据传输链的健壮性,从而保障分布式管理体系中数据传输的安全性以及可靠性。In the above technical solution, after the first application corresponding security device parses the protocol header in the ciphertext to be decrypted based on the preset ciphertext transmission protocol, the security center will decrypt the first original key in the protocol header based on its own public key, and encrypt and decrypt the first original key based on the first device public key, so as to return the encrypted first original key to the security device, so that the original key is encrypted data when it is transmitted from the application end and the security center end to the security device, and the original key changes the encrypted public key through the security center, so as to realize the key negotiation exchange in the process of data encryption transmission, increase the difficulty of key decryption, and thus ensure the security and reliability of data transmission in the distributed management system. In addition, after receiving the encrypted first original key and decrypting it into the first original key, the security device decrypts the encrypted data in the ciphertext to be decrypted according to the preset ciphertext transmission protocol, so as to transmit the decrypted plaintext data to the first application, complete the data encryption transmission between the first application and the second application, and also use the preset ciphertext transmission protocol to stipulate the standards and specifications of data transmission, improve the robustness of the entire data transmission chain, and thus ensure the security and reliability of data transmission in the distributed management system.

在一些可选的实施中,根据预设密文传输协议解析协议头,包括:In some optional implementations, parsing the protocol header according to a preset ciphertext transmission protocol includes:

根据预获取的访问关系配置信息确定第二应用与第一应用之间是否存在访问关系;Determining whether there is an access relationship between the second application and the first application according to the pre-acquired access relationship configuration information;

若存在访问关系,则在待解密密文中查找与预设密文传输协议中预设协议头地址相同的地址,并将查找出的地址中记载的内容确定为协议头;If there is an access relationship, the address that is the same as the preset protocol header address in the preset ciphertext transmission protocol is searched in the ciphertext to be decrypted, and the content recorded in the found address is determined as the protocol header;

若不存在访问关系,则确定协议头解析失败结束数据加密传输流程。If there is no access relationship, it is determined that the protocol header parsing has failed and the data encryption transmission process ends.

具体的,对系统中需进行数据传输的应用之间的访问关系做出限定,从而使安全设备仅能解析的其绑定的且具有访问关系的应用所发送的密文,避免安全设备对其绑定的所有应用发送的密文进行解析以泄露重要数据。Specifically, the access relationship between applications that need to transmit data in the system is limited so that the security device can only parse the ciphertext sent by the applications that are bound to it and have an access relationship, thereby preventing the security device from parsing the ciphertext sent by all the applications bound to it to leak important data.

在一些可选的实施中,该方法还包括:In some optional implementations, the method further includes:

接收第三应用发送的待发送明文数据,第三应用为第一安全设备绑定的任一个应用;receiving plaintext data to be sent sent by a third application, where the third application is any application bound to the first security device;

基于预生成的第二原始密钥,加密待发送明文数据,得到待发送加密数据;Encrypting the plaintext data to be sent based on the pre-generated second original key to obtain encrypted data to be sent;

基于安全中心的公钥加密第二原始密钥,得到加密后密钥;Encrypting the second original key based on the public key of the security center to obtain an encrypted key;

根据预设密文传输协议,将待发送加密数据以及加密后密钥组装为密文;According to the preset ciphertext transmission protocol, the encrypted data to be sent and the encrypted key are assembled into ciphertext;

将密文发送至第三应用,以便第三应用将组装的密文作为待解密密文传输至其他应用。The ciphertext is sent to a third application so that the third application transmits the assembled ciphertext to other applications as ciphertext to be decrypted.

具体的,当有应用需要发送数据给其他应用时,该应用会将要发送的明文数据发送至其绑定的安全设备,该安全设备利用自身生成的原始密钥将明文数据加密,并利用安全中心的公钥加密原始密钥。同时还基于预设密文传输协议将加密后的明文数据以及原始密钥组成为密文返回至该应用以便该应用将密文发送出去,如此,将数据加密操作集中在安全设备中,实现数据加密传输的同时还节约应用所在设备的算力资源,便于应用所在设备执行其他任务,进而提高业务处理效率。而且安全设备生成的原始密钥为对称密钥,但安全中心的公钥实则是一种非对称密钥,实现了结合对称加密以及非对称加密算法的数据双重加密操作,提高数据破译的难度,从而保证数据传输的安全性与可靠性。Specifically, when an application needs to send data to other applications, the application will send the plaintext data to be sent to the security device to which it is bound. The security device uses the original key generated by itself to encrypt the plaintext data, and uses the public key of the security center to encrypt the original key. At the same time, based on the preset ciphertext transmission protocol, the encrypted plaintext data and the original key are combined into ciphertext and returned to the application so that the application can send the ciphertext out. In this way, the data encryption operation is concentrated in the security device, which not only realizes data encryption transmission but also saves the computing power resources of the device where the application is located, making it easier for the device where the application is located to perform other tasks, thereby improving business processing efficiency. Moreover, the original key generated by the security device is a symmetric key, but the public key of the security center is actually an asymmetric key, which realizes the double encryption operation of data combined with symmetric encryption and asymmetric encryption algorithms, increases the difficulty of data decryption, and thus ensures the security and reliability of data transmission.

在一些可选的实施例中,在将明文数据发送至第一应用之前,方法还包括:In some optional embodiments, before sending the plaintext data to the first application, the method further includes:

基于明文数据生成第一待验证签名;Generate a first signature to be verified based on the plaintext data;

将第一待验证签名发送至第一应用,以便第一应用基于第一待验证签名验证明文数据的合法性与有效性。The first signature to be verified is sent to the first application, so that the first application verifies the legality and validity of the plaintext data based on the first signature to be verified.

第二方面,本申请提供了一种数据加密传输方法,应用于分布式数据安全系统,系统包括安全中心以及多个安全设备,方法由安全中心执行,方法包括:In a second aspect, the present application provides a data encryption transmission method, which is applied to a distributed data security system. The system includes a security center and multiple security devices. The method is executed by the security center. The method includes:

接收第一安全设备发送的待解密密文中的协议头,从协议头中解析出第一密钥,第一密钥为经由安全中心的公钥加密后的第一原始密钥,第一原始密钥为第二应用对应安全设备生成的对称密钥,第二应用为向第一应用发送待解密密文的应用,第一应用为第一安全设备绑定的应用,第一安全设备为多个安全设备中的任一个,待解密密文包括协议头以及加密数据;Receive a protocol header in the ciphertext to be decrypted sent by the first security device, parse a first key from the protocol header, the first key is a first original key encrypted by a public key of the security center, the first original key is a symmetric key generated by a security device corresponding to the second application, the second application is an application that sends the ciphertext to be decrypted to the first application, the first application is an application bound to the first security device, the first security device is any one of multiple security devices, and the ciphertext to be decrypted includes a protocol header and encrypted data;

基于自身的私钥解密第一密钥,得到第一原始密钥;Decrypt the first key based on its own private key to obtain a first original key;

根据第一安全设备上传的第一设备公钥加密第一原始密钥,并将加密后第一原始密钥发送至第一安全设备,以便第一安全设备根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥,并根据第一原始密钥解密加密数据,得到明文数据,并将明文数据传输至第一应用。The first original key is encrypted according to the first device public key uploaded by the first security device, and the encrypted first original key is sent to the first security device, so that the first security device can decrypt the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key, and decrypt the encrypted data according to the first original key to obtain plaintext data, and transmit the plaintext data to the first application.

第三方面,本申请提供了一种分布式数据安全系统,该系统包括安全中心、第一安全设备以及第二安全设备,第一安全设备绑定有第一应用,第二安全设备绑定有第二应用;In a third aspect, the present application provides a distributed data security system, the system comprising a security center, a first security device and a second security device, the first security device being bound to a first application, and the second security device being bound to a second application;

第一应用用于将接收的待解密密文发送至第一安全设备;The first application is used to send the received ciphertext to be decrypted to the first security device;

第一安全设备用于根据预设密文传输协议解析待解密密文中的协议头,并将解析出的协议头发送至安全中心,接收安全中心发送的加密后第一原始密钥,根据自身的设备私钥解密加密后第一原始密钥,得到第一原始密钥,根据第一原始密钥解密加密数据,得到明文数据,并将明文数据传输至第一应用;以及将预生成的第一设备公钥发送至安全中心;第一原始密钥为第二安全设备生成的对称密钥,待解密密文包括协议头以及加密数据;The first security device is used to parse the protocol header in the ciphertext to be decrypted according to the preset ciphertext transmission protocol, and send the parsed protocol header to the security center, receive the encrypted first original key sent by the security center, decrypt the encrypted first original key according to its own device private key to obtain the first original key, decrypt the encrypted data according to the first original key to obtain the plaintext data, and transmit the plaintext data to the first application; and send the pre-generated first device public key to the security center; the first original key is a symmetric key generated by the second security device, and the ciphertext to be decrypted includes the protocol header and the encrypted data;

第二安全设备用于根据安全中心的公钥加密第一原始密钥,得到第一密钥,并根据第一原始密钥加密第二应用发送的明文数据,得到加密数据,以及基于预设密文传输协议,将加密数据以及第一密钥组装为待解密密文,将待解密密文发送至第二应用;The second security device is used to encrypt the first original key according to the public key of the security center to obtain the first key, and encrypt the plaintext data sent by the second application according to the first original key to obtain encrypted data, and assemble the encrypted data and the first key into a ciphertext to be decrypted based on a preset ciphertext transmission protocol, and send the ciphertext to be decrypted to the second application;

第二应用用于将待解密密文发送至第一应用以及将明文数据发送至第二安全设备;The second application is used to send the ciphertext to be decrypted to the first application and to send the plaintext data to the second security device;

安全中心用于根据自身的私钥将协议头中的第一密钥解密为第一原始密钥,并利用第一设备公钥加密第一原始密钥,并将第一加密后原始密钥发送中第一安全设备,以及将自身的公钥发送至第二安全设备。The security center is used to decrypt the first key in the protocol header into a first original key according to its own private key, encrypt the first original key using the first device public key, send the first encrypted original key to the first security device, and send its own public key to the second security device.

第四方面,本申请提供了一种数据加密传输装置,应用于分布式数据安全系统,系统包括安全中心以及多个安全设备,装置由第一安全设备执行,装置包括:In a fourth aspect, the present application provides a data encryption transmission device, which is applied to a distributed data security system. The system includes a security center and multiple security devices. The device is executed by a first security device, and the device includes:

第一接收模块,用于接收第一应用发送的待解密密文,待解密密文为第二应用向第一应用发送的密文,待解密密文包括协议头和加密数据,第一安全设备为多个安全设备中任一个,第一应用为第一安全设备所绑定的应用,第二应用为多个安全设备中除第一安全设备以外的任一安全设备所绑定的应用;A first receiving module is used to receive a ciphertext to be decrypted sent by a first application, the ciphertext to be decrypted is a ciphertext sent by a second application to the first application, the ciphertext to be decrypted includes a protocol header and encrypted data, the first security device is any one of a plurality of security devices, the first application is an application bound to the first security device, and the second application is an application bound to any security device among the plurality of security devices except the first security device;

解析模块,用于根据预设密文传输协议解析协议头,并将解析出的协议头发送至安全中心,以便安全中心基于自身的私钥解密出协议头中的第一原始密钥,并利用第一设备公钥加密第一原始密钥,并返回加密后第一原始密钥,第一设备公钥为第一安全设备生成的公钥,第一原始密钥为第二应用对应安全设备生成的对称密钥;A parsing module, used to parse the protocol header according to a preset ciphertext transmission protocol, and send the parsed protocol header to the security center, so that the security center can decrypt the first original key in the protocol header based on its own private key, encrypt the first original key with the first device public key, and return the encrypted first original key, where the first device public key is a public key generated by the first security device, and the first original key is a symmetric key generated by the security device corresponding to the second application;

第一解密模块,用于根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥;A first decryption module, used to decrypt the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key;

第二解密模块,用于根据第一原始密钥以及预设密文传输协议,解密加密数据,得到明文数据,并将明文数据传输至第一应用。The second decryption module is used to decrypt the encrypted data according to the first original key and the preset ciphertext transmission protocol to obtain the plaintext data, and transmit the plaintext data to the first application.

第五方面,本申请提供了一种数据加密传输装置,应用于分布式数据安全系统,系统包括安全中心以及多个安全设备,装置由安全中心执行,装置包括:In a fifth aspect, the present application provides a data encryption transmission device, which is applied to a distributed data security system. The system includes a security center and multiple security devices. The device is executed by the security center, and the device includes:

第二接收模块,用于接收第一安全设备发送的待解密密文中的协议头,从协议头中解析出第一密钥,第一密钥为经由安全中心的公钥加密后的第一原始密钥,第一原始密钥为第二应用对应安全设备生成的对称密钥,第二应用为向第一应用发送待解密密文的应用,第一应用为第一安全设备绑定的应用,第一安全设备为多个安全设备中的任一个,待解密密文包括协议头以及加密数据;A second receiving module is used to receive a protocol header in the ciphertext to be decrypted sent by the first security device, and parse a first key from the protocol header, where the first key is a first original key encrypted by a public key of a security center, and the first original key is a symmetric key generated by a security device corresponding to a second application, the second application is an application that sends the ciphertext to be decrypted to the first application, the first application is an application bound to the first security device, and the first security device is any one of a plurality of security devices, and the ciphertext to be decrypted includes a protocol header and encrypted data;

第三解密模块,用于基于自身的私钥解密第一密钥,得到第一原始密钥;A third decryption module, used to decrypt the first key based on its own private key to obtain a first original key;

加密模块,用于根据第一安全设备上传的第一设备公钥加密第一原始密钥,并将加密后第一原始密钥发送至第一安全设备,以便第一安全设备根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥,并根据第一原始密钥解密加密数据,得到明文数据,并将明文数据传输至第一应用。An encryption module is used to encrypt a first original key according to a first device public key uploaded by a first security device, and send the encrypted first original key to the first security device, so that the first security device can decrypt the encrypted first original key according to a device private key corresponding to the first device public key to obtain the first original key, and decrypt the encrypted data according to the first original key to obtain plaintext data, and transmit the plaintext data to the first application.

第六方面,本申请提供了一种计算机设备,包括:存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行计算机指令,从而执行上述第一方面或第二方面的任一实施例的数据加密传输方法。In a sixth aspect, the present application provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the data encryption transmission method of any embodiment of the first or second aspect above by executing the computer instructions.

第七方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机指令,计算机指令用于使计算机执行上述第一方面或第二方面的任一实施例的数据加密传输方法。In a seventh aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data encryption transmission method of any one of the embodiments of the first aspect or the second aspect above.

第八方面,本申请提供了一种计算机程序产品,包括计算机指令,计算机指令用于使计算机执行上述第一方面或第二方面的任一实施例的数据加密传输方法。In an eighth aspect, the present application provides a computer program product, comprising computer instructions, and the computer instructions are used to enable a computer to execute the data encryption transmission method of any embodiment of the first aspect or the second aspect above.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

图1是本申请实施例的一种分布式数据安全系统的结构示意图;FIG1 is a schematic diagram of the structure of a distributed data security system according to an embodiment of the present application;

图2是根据本申请实施例的一种数据加密传输方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a data encryption transmission method according to an embodiment of the present application;

图3是根据本申请实施例的又一种数据加密传输方法的流程示意图;FIG3 is a schematic diagram of a flow chart of another data encryption transmission method according to an embodiment of the present application;

图4是根据本申请实施例的再一种数据加密传输方法的流程示意图;FIG4 is a schematic diagram of a flow chart of another data encryption transmission method according to an embodiment of the present application;

图5是根据本申请实施例的另一种数据加密传输方法的流程示意图;FIG5 is a schematic diagram of a flow chart of another data encryption transmission method according to an embodiment of the present application;

图6是一种应用场景中数据加密传输的时序图;FIG6 is a timing diagram of data encryption transmission in an application scenario;

图7是根据本申请实施例的一种数据加密传输装置的结构框图;FIG7 is a structural block diagram of a data encryption transmission device according to an embodiment of the present application;

图8是本申请实施例的计算机设备的硬件结构示意图。FIG8 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present application.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

高速公路行业,是指以高速公路为资产,向社会提供高效、快捷、舒适、经济、安全的通行服务的经济活动的集合,总体上包括建设、经营、养护三大环节,各环节又包含许多经济活动,如建设环节包括线路建设、沿线林木种植等,经营环节包括道路运输、服务区其他服务提供等。The highway industry refers to a collection of economic activities that use highways as assets to provide society with efficient, fast, comfortable, economical and safe travel services. It generally includes three major links: construction, operation and maintenance. Each link contains many economic activities. For example, the construction link includes line construction, tree planting along the line, etc., and the operation link includes road transportation and provision of other services in service areas.

通常高速公路行业的运营管理架构为分层级的架构,主要分为部中心(国家级管理层)-省中心(省级管理层)-收费站和门架(收费站管理层和路段管理层),部中心是行业中心,适合承担应用安全中心职能,形成行业的可信任中心。高速公路行业的数据流向由低到高,从收费站上传至省以及部中心,也有信息事件从省以及部中心发布到高速公路门架。Generally, the operation and management structure of the highway industry is a hierarchical structure, which is mainly divided into the department center (national management level) - provincial center (provincial management level) - toll stations and gantries (toll station management level and road section management level). The department center is the industry center, which is suitable for assuming the functions of the application security center and forming a trusted center for the industry. The data flow of the highway industry is from low to high, from toll stations to provincial and department centers, and there are also information events released from provincial and department centers to highway gantries.

为了保证数据安全同时高速公路行业还能正常运转,需要在各管理层共享以及传输数据时进行数据加密传输,但是目前还没有一个统一的适合面向高速公路行业应用的数据加密传输体系,以保障数据传输的安全性与可靠性。In order to ensure data security while the highway industry can operate normally, data encryption transmission is required when sharing and transmitting data at various management levels. However, there is currently no unified data encryption transmission system suitable for highway industry applications to ensure the security and reliability of data transmission.

为解决上述问题,本申请实施例提出一种数据加密传输方法,应用于分布式数据安全系统,通过安全设备解析其对应应用发送的由其他应用传输的待解密密文,将解析出的包括加密后原始密钥的协议头发送至安全中心,以在安全中心中将该加密后的原始密钥解密再加密,实现在不同应用对应不同安全设备之间的密钥协商交换,加大密钥破译难度,保障数据传输的安全性。并制定预设密文传输协议统一数据加密传输过程中密文的传输规范与标准,保证只有符合预设密文传输协议的密文才能被安全设备解析,保障数据传输的可靠性。下面详细介绍本申请提出的数据加密传输方法以及分布式数据安全系统。To solve the above problems, the embodiment of the present application proposes a data encryption transmission method, which is applied to a distributed data security system. The security device parses the ciphertext to be decrypted sent by its corresponding application and transmitted by other applications, and sends the parsed protocol header including the encrypted original key to the security center, so that the encrypted original key can be decrypted and then encrypted in the security center, so as to realize the key negotiation and exchange between different applications and different security devices, increase the difficulty of key decryption, and ensure the security of data transmission. And formulate a preset ciphertext transmission protocol to unify the transmission specifications and standards of ciphertext in the process of data encryption transmission, to ensure that only ciphertext that complies with the preset ciphertext transmission protocol can be parsed by the security device, and ensure the reliability of data transmission. The data encryption transmission method and distributed data security system proposed in this application are introduced in detail below.

图1是本申请实施例的一种分布式数据安全系统的结构示意图,如图1所示,该系统包括安全中心、第一安全设备以及第二安全设备,第一安全设备绑定有第一应用,第二安全设备绑定有第二应用。Figure 1 is a structural diagram of a distributed data security system of an embodiment of the present application. As shown in Figure 1, the system includes a security center, a first security device and a second security device. The first security device is bound to a first application, and the second security device is bound to a second application.

其中,安全中心分别与第一安全设备以及第二安全设备通信连接。第一安全设备以及第二安全设备分别隶属于不同的局域网,图1中以局域网1以及局域网2示出。第一应用以及第二应用为该分布式数据安全系统中两不同的应用程序,第一应用以及第二应用之间被配置了访问关系也即第一应用以及第二应用之间可以进行数据交互。安全中心为第三方安全认证平台,例如高速公路行业中的路网业务智慧安全中心,第一安全设备以及第二安全设备可以是具有数据传输以及解析功能的计算机设备,例如服务器、台式电脑或笔记本电脑等。可以理解的是,第一安全设备以及第二安全设备均可绑定多个应用。Among them, the security center is communicated with the first security device and the second security device respectively. The first security device and the second security device belong to different local area networks respectively, which are shown as local area network 1 and local area network 2 in Figure 1. The first application and the second application are two different application programs in the distributed data security system. An access relationship is configured between the first application and the second application, that is, data can be exchanged between the first application and the second application. The security center is a third-party security authentication platform, such as the road network business smart security center in the highway industry. The first security device and the second security device can be computer devices with data transmission and analysis functions, such as servers, desktop computers or laptops. It can be understood that the first security device and the second security device can be bound to multiple applications.

结合图2所示的一种数据加密传输方法的示意流程图,第一应用用于将接收的待解密密文发送至第一安全设备。With reference to the schematic flow chart of a data encryption transmission method shown in FIG2 , the first application is used to send the received ciphertext to be decrypted to the first security device.

第一安全设备用于根据预设密文传输协议解析待解密密文中的协议头,并将解析出的协议头发送至安全中心,接收安全中心发送的加密后第一原始密钥,根据自身的设备私钥解密加密后第一原始密钥,得到第一原始密钥,根据第一原始密钥解密加密数据,得到明文数据,并将明文数据传输至第一应用;以及将预生成的第一设备公钥发送至安全中心;第一原始密钥为第二安全设备生成的对称密钥,待解密密文包括协议头以及加密数据。The first security device is used to parse the protocol header in the ciphertext to be decrypted according to the preset ciphertext transmission protocol, and send the parsed protocol header to the security center, receive the encrypted first original key sent by the security center, decrypt the encrypted first original key according to its own device private key to obtain the first original key, decrypt the encrypted data according to the first original key to obtain the plaintext data, and transmit the plaintext data to the first application; and send the pre-generated first device public key to the security center; the first original key is a symmetric key generated by the second security device, and the ciphertext to be decrypted includes the protocol header and the encrypted data.

第二安全设备用于根据安全中心的公钥加密第一原始密钥,得到第一密钥,并根据第一原始密钥加密第二应用发送的明文数据,得到加密数据,以及基于预设密文传输协议,将加密数据以及第一密钥组装为待解密密文,将待解密密文发送至第二应用。The second security device is used to encrypt the first original key according to the public key of the security center to obtain the first key, and to encrypt the plaintext data sent by the second application according to the first original key to obtain encrypted data, and based on a preset ciphertext transmission protocol, assemble the encrypted data and the first key into ciphertext to be decrypted, and send the ciphertext to be decrypted to the second application.

第二应用用于将待解密密文发送至第一应用以及将明文数据发送至第二安全设备。The second application is used to send the ciphertext to be decrypted to the first application and to send the plaintext data to the second security device.

安全中心用于根据自身的私钥将协议头中的第一密钥解密为第一原始密钥,并利用第一设备公钥加密第一原始密钥,并将第一加密后原始密钥发送中第一安全设备,以及将自身的公钥发送至第二安全设备。The security center is used to decrypt the first key in the protocol header into a first original key according to its own private key, encrypt the first original key using the first device public key, send the first encrypted original key to the first security device, and send its own public key to the second security device.

可选的,该系统可以包括两个以上的多个安全设备,多个安全设备均与安全中心通信连接,每个安全设备可绑定多个应用,第一安全设备为多个安全设备中的任一个,第一应用为第一安全设备所绑定的多个应用中的任一个应用,第二安全设备为绑定有第二应用的安全设备。Optionally, the system may include more than two security devices, all of which are communicatively connected to the security center, each security device can be bound to multiple applications, the first security device is any one of the multiple security devices, the first application is any one of the multiple applications bound to the first security device, and the second security device is a security device bound to the second application.

可选的,为了提高密钥交换的安全性,安全中心还用于响应于目标安全设备的上线指令,解析该上线指令中目标安全设备的身份验证信息,并基于解析出的身份验证信息对目标安全设备进行身份验证;若目标安全设备的身份验证结果为通过,则确定目标安全设备上线至安全中心,将安全中心自身的公钥发送至目标安全设备,并接收目标安全设备上传的自身的设备公钥。若目标安全设备的身份验证结果为不通过,则向预设用户终端返回用于指示身份验证结果为不通过的提示信息。Optionally, in order to improve the security of key exchange, the security center is also used to respond to the online instruction of the target security device, parse the identity authentication information of the target security device in the online instruction, and authenticate the target security device based on the parsed identity authentication information; if the identity authentication result of the target security device is passed, it is determined that the target security device is online to the security center, the security center's own public key is sent to the target security device, and the target security device uploads its own device public key. If the identity authentication result of the target security device is not passed, a prompt message indicating that the identity authentication result is not passed is returned to the preset user terminal.

其中,预设用户终端可以是与安全中心通信连接的手机、平板以及电脑等电子设备,本申请实施例不做具体限制。身份验证信息可以是安全设备的设备ID或设备标识符。在安全中心中对安全设备进行身份验证,仅有通过身份验证的安全设备才能与安全中心交换公钥,以在后续实现安全中心基于安全设备上传的设备公钥解密协议头中的密钥以及安全设备基于安全中心的公钥加密原始密钥,完成不同安全设备之间的密钥交换操作。对于未通过身份验证的安全设备会向预设用户终端返回提示信息便于用户核查避免其他未通过安全中心的身份验证的设备非法盗取安全中心的存储的数据,提高了密钥交换的安全性。Among them, the preset user terminal can be an electronic device such as a mobile phone, tablet, and computer that is connected to the security center for communication, and the embodiments of the present application do not impose specific restrictions. The identity verification information can be the device ID or device identifier of the security device. The security device is authenticated in the security center, and only the security device that has passed the identity verification can exchange public keys with the security center, so that the security center can subsequently decrypt the key in the protocol header based on the device public key uploaded by the security device and the security device can encrypt the original key based on the public key of the security center, thereby completing the key exchange operation between different security devices. For security devices that have not passed the identity verification, a prompt message will be returned to the preset user terminal for user verification to prevent other devices that have not passed the identity verification of the security center from illegally stealing the stored data of the security center, thereby improving the security of key exchange.

可以理解的是,第一安全设备以及第二安全设备均已上线至安全中心。It is understandable that both the first security device and the second security device have been online to the security center.

可选的,安全中心还用于响应于目标安全设备的注册指令,解析注册指令中的目标安全设备的身份验证信息,并将目标安全设备的身份验证信息记录在已注册安全设备列表中,以便于后续目标安全设备的上线,。Optionally, the security center is further configured to respond to a registration instruction of a target security device, parse the identity authentication information of the target security device in the registration instruction, and record the identity authentication information of the target security device in a list of registered security devices to facilitate subsequent on-line of the target security device.

可选的,第二安全设备还用于将第一密钥传输至安全中心,以在安全中心备份密钥,在第二安全设备遭受攻击后,可利用安全中心中的第一密钥恢复加密数据,提高系统数据容灾的能力。Optionally, the second security device is also used to transmit the first key to the security center to back up the key in the security center. After the second security device is attacked, the first key in the security center can be used to restore the encrypted data, thereby improving the system's data disaster recovery capabilities.

可选的,第二安全设备还用于定期更新第一原始密钥,将更新后的第一原始密钥作为第一原始密钥,实现对原始密钥的定时更新,加强密钥的安全性从而提高数据加密传输的安全性以及可靠性。Optionally, the second security device is also used to periodically update the first original key, and use the updated first original key as the first original key to achieve regular updating of the original key, thereby enhancing the security of the key and thus improving the security and reliability of data encryption transmission.

可选的,安全中心与安全设备以及预设用户终端之间可通过4G(FourthGeneration,第四代移动通信技术)或5G(Fifth Generation,第五代移动通信技术)等通信技术进行有线通信或无线通信。Optionally, wired or wireless communication can be performed between the security center and the security device and the preset user terminal through communication technologies such as 4G (Fourth Generation, fourth generation mobile communication technology) or 5G (Fifth Generation, fifth generation mobile communication technology).

可选的,第一安全设备可基于解密出的明文数据生成数字签名,并将生成的数字签名发送至第一应用,以便第一应用验证明文数据的合法性与有效性。第二安全设备也可以基于明文数据生成数字签名,并将生成的数字签名发送至第二应用,以便第二应用验证基于明文数据生成的待解秘密文的合法性与有效性。Optionally, the first security device may generate a digital signature based on the decrypted plaintext data, and send the generated digital signature to the first application so that the first application can verify the legitimacy and validity of the plaintext data. The second security device may also generate a digital signature based on the plaintext data, and send the generated digital signature to the second application so that the second application can verify the legitimacy and validity of the secret text to be decrypted generated based on the plaintext data.

本申请实施例中的分布式数据安全系统,在第二应用与第一应用之间进行数据传输时,第二应用会先将要发送给第一应用的明文数据发送至第二安全设备,第二安全设备会利用自身生成的对称密钥也即第一原始密钥加密将该明文数据得到加密数据,并利用安全中心的公钥加密第一原始密钥第一密钥,最终生成包括加密数据以及第一密钥在内的协议头的待解密密文并将待解密密文返回至第二应用,第二应用就可以向第一应用发送加密后的密文,实现利用安全设备生成的对称密钥以及非对称的安全中心的公钥对需传输数据的加密,并保证第二应用向第一应用传输的数据中不仅包括加密数据还包括加密后的对称密钥,加大数据破译的难度,保证分布式管理体系中数据传输的可靠性以及安全性。In the distributed data security system in the embodiment of the present application, when data is transmitted between the second application and the first application, the second application will first send the plaintext data to be sent to the first application to the second security device, and the second security device will use the symmetric key generated by itself, that is, the first original key to encrypt the plaintext data to obtain encrypted data, and use the public key of the security center to encrypt the first original key and the first key, and finally generate a protocol header including the encrypted data and the first key. The ciphertext to be decrypted is returned to the second application. The second application can then send the encrypted ciphertext to the first application, and realize the encryption of the data to be transmitted using the symmetric key generated by the security device and the asymmetric public key of the security center, and ensure that the data transmitted from the second application to the first application includes not only the encrypted data but also the encrypted symmetric key, thereby increasing the difficulty of data decryption and ensuring the reliability and security of data transmission in the distributed management system.

在第一应用接收到待解密密文后,第一应用将该密文发送至第一安全设备,由第一安全设备进行密文的解析以及解密操作,且第一安全设备对密文的解密操作是先将包括第一密钥在内的协议头发送至安全中心,使安全中心基于自身的公钥解密协议头中的第一密钥,并基于第一安全设备上传的第一设备公钥加密解密后的第一密钥也即加密第一原始密钥,并将加密后第一原始密钥返回至第一安全设备,便于第一安全设备基于自身的设备私钥解密返回的密钥从而解密加密数据。实现在出安全设备以及应用之外的第三方安全中心完成密钥协商交换,支撑后续加密数据的解密实现数据加密传输的同时,还可以在第一安全设备被攻击时,尽可能保证设备内仅有经过安全中心并返回的密钥能够被破译,其余密钥的破译难度则较高,降低分布式管理体系中可以被盗取的数据量,进一步保障分布式管理体系中数据传输的可靠性以及安全性。After the first application receives the ciphertext to be decrypted, the first application sends the ciphertext to the first security device, which performs the parsing and decryption operations on the ciphertext. The first security device performs the decryption operation on the ciphertext by first sending the protocol header including the first key to the security center, so that the security center decrypts the first key in the protocol header based on its own public key, and encrypts the first key after decryption based on the first device public key uploaded by the first security device, that is, encrypts the first original key, and returns the encrypted first original key to the first security device, so that the first security device can decrypt the returned key based on its own device private key to decrypt the encrypted data. The key negotiation exchange is completed in the third-party security center outside the security device and application, and the subsequent decryption of encrypted data is supported to realize data encryption transmission. At the same time, when the first security device is attacked, it can also ensure that only the key that passes through the security center and returns in the device can be deciphered as much as possible, and the deciphering difficulty of the remaining keys is higher, which reduces the amount of data that can be stolen in the distributed management system and further ensures the reliability and security of data transmission in the distributed management system.

下面详细介绍本申请提供的一种数据加密传输方法,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。A data encryption transmission method provided by the present application is described in detail below. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

在本申请实施例中提供了一种数据加密传输方法,可用于图1所述实施例中的分布式数据安全系统,该系统包括安全中心以及多个安全设备,该方法由第一安全设备执行,图2是根据本申请实施例的一种数据加密传输方法的流程图,如图2所示,该流程包括如下步骤:In an embodiment of the present application, a data encryption transmission method is provided, which can be used in the distributed data security system in the embodiment described in FIG. 1. The system includes a security center and multiple security devices. The method is executed by a first security device. FIG. 2 is a flow chart of a data encryption transmission method according to an embodiment of the present application. As shown in FIG. 2, the process includes the following steps:

步骤S201,接收第一应用发送的待解密密文。Step S201, receiving a ciphertext to be decrypted sent by a first application.

其中,待解密密文为第二应用向第一应用发送的密文,待解密密文包括协议头和加密数据,第一安全设备为多个安全设备中任一个,第一应用为第一安全设备所绑定的应用,第二应用为多个安全设备中除第一安全设备以外的任一安全设备所绑定的应用,第一应用以及第二应用分别对应的安全设备所隶属的局域网不同。绑定有第二应用的安全设备即为图1所示实施例中的第二安全设备。第一应用在接收第二应用发送的待解密密文后会将该待解密密文发送至第一安全设备,如此接收到待解密密文。Among them, the ciphertext to be decrypted is the ciphertext sent by the second application to the first application, the ciphertext to be decrypted includes a protocol header and encrypted data, the first security device is any one of multiple security devices, the first application is an application bound to the first security device, the second application is an application bound to any security device other than the first security device among the multiple security devices, and the local area networks to which the security devices corresponding to the first application and the second application belong are different. The security device bound to the second application is the second security device in the embodiment shown in Figure 1. After receiving the ciphertext to be decrypted sent by the second application, the first application will send the ciphertext to be decrypted to the first security device, thereby receiving the ciphertext to be decrypted.

步骤S202,根据预设密文传输协议解析协议头,并将解析出的协议头发送至安全中心,以便安全中心基于自身的私钥解密出协议头中的第一原始密钥,并利用第一设备公钥加密第一原始密钥,并返回加密后第一原始密钥。Step S202, parse the protocol header according to the preset ciphertext transmission protocol, and send the parsed protocol header to the security center, so that the security center can decrypt the first original key in the protocol header based on its own private key, encrypt the first original key using the first device public key, and return the encrypted first original key.

其中,第一设备公钥为第一安全设备生成的公钥,第一原始密钥为第二应用对应安全设备生成的对称密钥,协议头中包括基于安全中心的公钥加密的第一原始密钥。第一安全设备会预先将第一设备公钥发送至安全中心。预设密文传输协议中规定了密文中协议头应当包括的内容以及密文中协议头所在的地址范围,因此第一安全设备可以基于基于预设密文传输协议中规定的协议头所在的地址范围,从待解密密文提取该地址范围中记录内容,并将提取出的内容确定为协议头,发送至安全中心。Among them, the first device public key is the public key generated by the first security device, the first original key is the symmetric key generated by the security device corresponding to the second application, and the protocol header includes the first original key encrypted based on the public key of the security center. The first security device will send the first device public key to the security center in advance. The preset ciphertext transmission protocol specifies the content that the protocol header in the ciphertext should include and the address range where the protocol header in the ciphertext is located. Therefore, the first security device can extract the content recorded in the address range from the ciphertext to be decrypted based on the address range of the protocol header specified in the preset ciphertext transmission protocol, and determine the extracted content as the protocol header and send it to the security center.

安全中心在接收到协议头后,就会利用与预设非对称加密算法以及自身的私钥将协议头中基于安全中心的公钥加密的第一原始密钥解密,得到第一原始密钥,并利用预设非对称加密算法基于第一设备公钥对第一原始密钥进行加密,并将加密后第一原始密钥返回至第一安全设备。预设非对称加密算法用于分别生成安全中心的公钥和私钥以及安全设备的设备公钥以及设备私钥,预设非对称加密算法可以是国密算法中用于非对称加密的算法,例如SM2算法。After receiving the protocol header, the security center will use the preset asymmetric encryption algorithm and its own private key to decrypt the first original key encrypted based on the public key of the security center in the protocol header, obtain the first original key, and use the preset asymmetric encryption algorithm to encrypt the first original key based on the first device public key, and return the encrypted first original key to the first security device. The preset asymmetric encryption algorithm is used to generate the public key and private key of the security center and the device public key and device private key of the security device respectively. The preset asymmetric encryption algorithm can be an algorithm used for asymmetric encryption in the national secret algorithm, such as the SM2 algorithm.

步骤S203,根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥。Step S203: decrypt the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key.

第一安全设备会利用预设非对称加密算法以及第一设备公钥对应的设备私钥,对加密后第一原始密钥进行解密操作,解密得到第一原始密钥。The first security device will use a preset asymmetric encryption algorithm and a device private key corresponding to the first device public key to perform a decryption operation on the encrypted first original key to obtain the first original key.

步骤S204,根据第一原始密钥以及预设密文传输协议,解密加密数据,得到明文数据,并将明文数据传输至第一应用。Step S204: decrypt the encrypted data according to the first original key and the preset ciphertext transmission protocol to obtain plaintext data, and transmit the plaintext data to the first application.

预设密文传输协议中规定了加密数据应当位于的地址范围,第一安全设备会从待解密密文中提取出该地址范围内的内容将其作为加密数据,并利用预设对称加密算法以及第一原始密钥对加密数据进行解密操作,得到明文数据将明文数据书传输至第一应用,由此完成第二应用与第一应用之间的数据加密传输流程。预设对称加密算法可以是国密算法中用于对称加密的算法,例如,SM1或SM4。The preset ciphertext transmission protocol specifies the address range where the encrypted data should be located. The first security device extracts the content within the address range from the ciphertext to be decrypted as the encrypted data, and uses the preset symmetric encryption algorithm and the first original key to decrypt the encrypted data, obtains the plaintext data, and transmits the plaintext data to the first application, thereby completing the data encryption transmission process between the second application and the first application. The preset symmetric encryption algorithm can be an algorithm used for symmetric encryption in the national secret algorithm, for example, SM1 or SM4.

需要说明的是,第一安全设备无法解析遵循其他密文传输协议的密文,这样一来只有加密数据以及基于安全中心的公钥加密后的第一原始密钥按照预设密文协议进行组装才能被解析。结合安全中心与多个安全设备的密钥管理体系,实现将密钥加密协商交换与私有密文传输协议向结合,从两种技术维度进行数据传输约束,适合例如高速公路行业这类应用分布式管理体系的行业中的信息系统密码应用改造以及数据加密传输,并提高数据传输的安全性与可靠性。It should be noted that the first security device cannot parse ciphertexts that follow other ciphertext transmission protocols. In this way, only encrypted data and the first original key encrypted based on the public key of the security center can be assembled according to the preset ciphertext protocol to be parsed. Combining the key management system of the security center and multiple security devices, the key encryption negotiation exchange and the private ciphertext transmission protocol are combined to constrain data transmission from two technical dimensions. It is suitable for information system cryptographic application transformation and data encryption transmission in industries such as the highway industry that apply distributed management systems, and improves the security and reliability of data transmission.

本申请实施例中,第一应用对应安全设备在基于预设密文传输协议解析出待解密密文中的协议头后,安全中心会基于自身的公钥解密出协议头中的第一原始密钥,并基于第一设备公钥加密解密得到的第一原始密钥,以将加密后的第一原始密钥返回给该安全设备,使原始密钥在从应用端以及安全中心端传输至该安全设备时都是加密后的数据,而且原始密钥在经由安全中心改变了加密的公钥,实现数据加密传输过程中的密钥协商交换,加大密钥破译难度,从而保障分布式管理体系中数据传输的安全性以及可靠性。另外,该安全设备在接收到加密后第一原始密钥并将其解密为第一原始密钥后根据预设密文传输协议解密待解密密文中的加密数据,以将解密得到的明文数据传输至第一应用,完成第一应用与第二应用之间的数据加密传输的同时,还利用预设密文传输协议规定数据传输的标准与规范,提高整个数据传输链的健壮性,从而保障分布式管理体系中数据传输的安全性以及可靠性。In the embodiment of the present application, after the first application corresponding security device parses the protocol header in the ciphertext to be decrypted based on the preset ciphertext transmission protocol, the security center will decrypt the first original key in the protocol header based on its own public key, and encrypt and decrypt the first original key based on the first device public key, so as to return the encrypted first original key to the security device, so that the original key is encrypted data when it is transmitted from the application end and the security center end to the security device, and the original key changes the encrypted public key through the security center, so as to realize the key negotiation exchange in the process of data encryption transmission, increase the difficulty of key decryption, and thus ensure the security and reliability of data transmission in the distributed management system. In addition, after receiving the encrypted first original key and decrypting it into the first original key, the security device decrypts the encrypted data in the ciphertext to be decrypted according to the preset ciphertext transmission protocol, so as to transmit the decrypted plaintext data to the first application, complete the data encryption transmission between the first application and the second application, and also use the preset ciphertext transmission protocol to stipulate the standards and specifications of data transmission, improve the robustness of the entire data transmission chain, and thus ensure the security and reliability of data transmission in the distributed management system.

图3所示的本申请实施例的又一种数据加密传输方法的流程示意图,可用于图1所示实施例中的分布式数据安全系统,该系统包括安全中心以及多个安全设备,该方法由第一安全设备执行,如图3所示,该流程包括如下步骤:FIG3 is a flow chart of another method for data encryption transmission according to an embodiment of the present application, which can be used in the distributed data security system in the embodiment shown in FIG1 . The system includes a security center and multiple security devices. The method is executed by a first security device. As shown in FIG3 , the process includes the following steps:

步骤S301,接收第一应用发送的待解密密文。Step S301: receiving a ciphertext to be decrypted sent by a first application.

步骤S301详细参见图2所示实施例中的步骤S201,在此不做赘述。The details of step S301 refer to step S201 in the embodiment shown in FIG. 2 , and are not described in detail here.

步骤S302,根据预获取的访问关系配置信息确定第二应用与第一应用之间是否存在访问关系。Step S302: Determine whether there is an access relationship between the second application and the first application according to the pre-acquired access relationship configuration information.

访问关系配置信息用于指示分布式数据安全系统中各应用之间是否可以进行数据交互,若该访问关系配置信息中指明某两个应用之间具有访问关系,则这两个应用之无法进行数据传输。访问关系配置信息中包括应用标识对,每个应用标识对指示两个具有访问关系的应用。访问关系配置信息可以预先配置在各安全设备中。第二应用在向第一应用发送待解密密文时还会发送自身的应用标识(下文成为第二应用标识),第一应用会将自身的应用标识以及第二应用的应用标识发送至第一安全设备,第一安全设备会在访问关系配置信息中查找第二应用的应用标识对应的应用标识对,并在查找出的应用标识对中查找第一应用的应用标识,如果查找到则确定第二应用与第一应用之间存在访问关系,如果没有查找到则确定第二应用与第一应用之间不存在访问关系。The access relationship configuration information is used to indicate whether data can be exchanged between applications in a distributed data security system. If the access relationship configuration information indicates that there is an access relationship between two applications, the two applications cannot transmit data. The access relationship configuration information includes application identification pairs, and each application identification pair indicates two applications with an access relationship. The access relationship configuration information can be pre-configured in each security device. When the second application sends the ciphertext to be decrypted to the first application, it will also send its own application identification (hereinafter referred to as the second application identification). The first application will send its own application identification and the application identification of the second application to the first security device. The first security device will search for the application identification pair corresponding to the application identification of the second application in the access relationship configuration information, and search for the application identification of the first application in the found application identification pair. If it is found, it is determined that there is an access relationship between the second application and the first application. If it is not found, it is determined that there is no access relationship between the second application and the first application.

步骤S303,若存在访问关系,则在待解密密文中查找与预设密文传输协议中预设协议头地址相同的地址,并将查找出的地址中记载的内容确定为协议头,并进入步骤S304;若不存在访问关系,则确定协议头解析失败结束数据加密传输流程。Step S303, if there is an access relationship, search the ciphertext to be decrypted for an address that is the same as the preset protocol header address in the preset ciphertext transmission protocol, and determine the content recorded in the found address as the protocol header, and enter step S304; if there is no access relationship, determine that the protocol header parsing has failed and end the data encryption transmission process.

预设协议头地址即为预设密文传输协议中规定的协议头所在的地址范围。The preset protocol header address is the address range of the protocol header specified in the preset ciphertext transmission protocol.

步骤S304,将确定的协议头发送至安全中心,以便安全中心基于自身的私钥解密出协议头中的第一原始密钥,并利用第一设备公钥加密第一原始密钥,并返回加密后第一原始密钥。Step S304, sending the determined protocol header to the security center, so that the security center decrypts the first original key in the protocol header based on its own private key, encrypts the first original key using the first device public key, and returns the encrypted first original key.

步骤S304详细参见图2所示实施例中的步骤S202,在此不做赘述Step S304 is detailed in step S202 in the embodiment shown in FIG. 2 , and will not be described in detail here.

步骤S305,根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥。Step S305: decrypt the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key.

步骤S306,根据第一原始密钥以及预设密文传输协议,解密加密数据,得到明文数据。Step S306: decrypt the encrypted data according to the first original key and the preset ciphertext transmission protocol to obtain plaintext data.

步骤S304至步骤S306详细参见图2所示实施例中的步骤S202至步骤S204,在此不做赘述。Steps S304 to S306 are described in detail with reference to steps S202 to S204 in the embodiment shown in FIG. 2 , and are not described in detail here.

步骤S307,基于明文数据生成第一待验证签名。Step S307: Generate a first signature to be verified based on the plaintext data.

第一安全设备可以利用预设非对称加密算法将明文数据生成数字签名,将生成的数字签名作为第一待验证签名。The first security device may generate a digital signature from the plaintext data using a preset asymmetric encryption algorithm, and use the generated digital signature as the first signature to be verified.

步骤S308,将第一待验证签名发送至第一应用,并将明文数据传输至第一应用,以便第一应用基于第一待验证签名验证明文数据的合法性与有效性。Step S308: Send the first signature to be verified to the first application, and transmit the plaintext data to the first application, so that the first application verifies the legality and validity of the plaintext data based on the first signature to be verified.

第一应用可以基于预设非对称加密算法和接收的明文数据验证第一待验证签名,若第一待验证签名的验证结果为通过,则第一应用确认明文数据的合法且有效;若第一待验证签名的验证结果为失败,则将接收的明文数据确定为无效数据。The first application can verify the first signature to be verified based on a preset asymmetric encryption algorithm and the received plaintext data. If the verification result of the first signature to be verified is passed, the first application confirms that the plaintext data is legal and valid; if the verification result of the first signature to be verified is failed, the received plaintext data is determined to be invalid data.

本申请实施例中,对系统中需进行数据传输的应用之间的访问关系做出限定,从而使安全设备仅能解析的其绑定的且具有访问关系的应用所发送的密文,避免安全设备对其绑定的所有应用发送的密文进行解析以泄露重要数据。并将待解密密文的解密操作设置在安全设备中,在安全设备向应用发送解密后的明文数据时,还将基于该明文数据生成的待验证签名发送至第一应用以确定明文数据的合法性以及有效性,避免应用接收到假冒伪造的设备发送的数据,并确定来自安全中心设备的数据是安全数据,有效降低数据被窃取的风险,进一步提高了数据传输的安全性与可靠性。In the embodiment of the present application, the access relationship between applications that need to transmit data in the system is limited, so that the security device can only parse the ciphertext sent by the application that is bound to it and has an access relationship, avoiding the security device from parsing the ciphertext sent by all the applications bound to it to leak important data. The decryption operation of the ciphertext to be decrypted is set in the security device. When the security device sends the decrypted plaintext data to the application, the signature to be verified generated based on the plaintext data is also sent to the first application to determine the legitimacy and validity of the plaintext data, avoiding the application from receiving data sent by a counterfeit and forged device, and determining that the data from the security center device is safe data, effectively reducing the risk of data theft, and further improving the security and reliability of data transmission.

图2以及图3介绍了分布式数据安全系统中的安全设备所绑定的应用接收到已加密的密文后对密文的具体解密操作,下面结合图4介绍分布式数据安全系统中安全设备所绑定的应用发送数据的具体方法。Figures 2 and 3 introduce the specific decryption operation of the ciphertext after the application bound to the security device in the distributed data security system receives the encrypted ciphertext. The following is combined with Figure 4 to introduce the specific method of sending data by the application bound to the security device in the distributed data security system.

图4所示的本申请实施例的再一种数据加密传输方法的流程示意图,可用于图1所示实施例中的分布式数据安全系统,该系统包括安全中心以及多个安全设备,该方法由第一安全设备执行,如图4所示,该流程包括如下步骤:FIG4 is a flow chart of another method for data encryption transmission according to an embodiment of the present application, which can be used in the distributed data security system in the embodiment shown in FIG1 . The system includes a security center and multiple security devices. The method is executed by a first security device. As shown in FIG4 , the process includes the following steps:

步骤S401,接收第三应用发送的待发送明文数据。Step S401: receiving plaintext data to be sent from a third application.

其中,第三应用为第一安全设备绑定的任一个应用。当第三应用需要发送数据至其他应用时,第三应用会将要发送的明文数据以及待发送明文数据发送至第一安全设备。The third application is any application bound to the first security device. When the third application needs to send data to other applications, the third application sends the plaintext data to be sent and the plaintext data to be sent to the first security device.

步骤S402,基于预生成的第二原始密钥,加密待发送明文数据,得到待发送加密数据。Step S402: Encrypt the plaintext data to be sent based on the pre-generated second original key to obtain encrypted data to be sent.

第二原始密钥为第一安全设备基于预设对称加密算法生成的对称密钥。第一安全设备利用预设对称加密算法基于第二原始密钥加密待发送明文数据,加密后的待发送明文数据即为待发送加密数据。The second original key is a symmetric key generated by the first security device based on a preset symmetric encryption algorithm. The first security device encrypts the plaintext data to be sent based on the second original key using the preset symmetric encryption algorithm, and the encrypted plaintext data to be sent is the encrypted data to be sent.

可选的,为了进一步加强数据传输的安全性,第一安全设备还可以定期更新第二原始密钥。第一安全设备还可以将基于安全中心加密后的第二原始密钥上传至安全中心,以备份原始密钥可以方便数据容灾恢复。Optionally, in order to further enhance the security of data transmission, the first security device may also periodically update the second original key. The first security device may also upload the second original key encrypted by the security center to the security center to back up the original key to facilitate data disaster recovery.

步骤S403,基于安全中心的公钥加密第二原始密钥,得到加密后密钥。Step S403: encrypt the second original key based on the public key of the security center to obtain an encrypted key.

可以预先将安全中心会的公钥配置在第一安全设备中。第一安全设备利用预设非对称加密算法基于安全中心的公钥加密加密第二原始密钥,加密后的第二原始密钥即为加密后密钥。The public key of the security center can be configured in advance in the first security device. The first security device encrypts the second original key based on the public key of the security center using a preset asymmetric encryption algorithm, and the encrypted second original key is the encrypted key.

可以理解的是,第一安全设备在安全中心中是已注册且上线的安全设备,可以在已注册安全设备列表中的各个安全设备中预先配置安全中心的公钥。It can be understood that the first security device is a registered and online security device in the security center, and the public key of the security center can be pre-configured in each security device in the registered security device list.

步骤S404,根据预设密文传输协议,将待发送加密数据以及加密后密钥组装为密文。Step S404: assemble the encrypted data to be sent and the encrypted key into ciphertext according to the preset ciphertext transmission protocol.

第一安全设备会基于预设密文传输协议规定的协议头应当包括的内容、密文中协议头所在的地址范围以及密文中加密数据所在的地址范围,将待发送加密数据以及加密后密钥填充在相对应的位置,得到密文。The first security device will fill the encrypted data to be sent and the encrypted key in the corresponding positions based on the content that the protocol header should include as specified in the preset ciphertext transmission protocol, the address range where the protocol header in the ciphertext is located, and the address range where the encrypted data in the ciphertext is located to obtain the ciphertext.

步骤S405,将组装的密文发送至第三应用,以便第三应用将组装的密文作为待解密密文传输至其他应用。Step S405: Send the assembled ciphertext to the third application so that the third application transmits the assembled ciphertext as the ciphertext to be decrypted to other applications.

可选的,在步骤S405之前,第一安全设备还可以基于待发送明文数据生成第二待验证签名,并将第二待验证签名发送至第三应用,以便第三应用基于第二待验证签名验证密文的有效性与合法性。第三应用可以基于预设非对称算法以及待发送明文数据验证第二待验证签名,若第二待验证签名的验证结果为通过,则第三应用确定接收的密文包括基于合法有效的明文数据加密的加密数据,从而确定接收的密文是有效且合法的。若第二待验证签名的验证结果为失败,则确定接收的密文是无效的。Optionally, before step S405, the first security device may also generate a second signature to be verified based on the plaintext data to be sent, and send the second signature to be verified to the third application, so that the third application verifies the validity and legality of the ciphertext based on the second signature to be verified. The third application may verify the second signature to be verified based on a preset asymmetric algorithm and the plaintext data to be sent. If the verification result of the second signature to be verified is passed, the third application determines that the received ciphertext includes encrypted data encrypted based on legal and valid plaintext data, thereby determining that the received ciphertext is valid and legal. If the verification result of the second signature to be verified is failed, it is determined that the received ciphertext is invalid.

本申请实施例中,当有应用需要发送数据给其他应用时,该应用会将要发送的明文数据发送至其绑定的安全设备,该安全设备利用自身生成的原始密钥将明文数据加密,并利用安全中心的公钥加密原始密钥。同时还基于预设密文传输协议将加密后的明文数据以及原始密钥组成为密文返回至该应用以便该应用将密文发送出去,如此,将数据加密操作集中在安全设备中,实现数据加密传输的同时还节约应用所在设备的算力资源,便于应用所在设备执行其他任务,进而提高业务处理效率。而且安全设备生成的原始密钥为对称密钥,但安全中心的公钥实则是一种非对称密钥,实现了结合对称加密以及非对称加密算法的数据双重加密操作,提高数据破译的难度,从而保证数据传输的安全性与可靠性。In the embodiment of the present application, when an application needs to send data to other applications, the application will send the plaintext data to be sent to the security device to which it is bound. The security device uses the original key generated by itself to encrypt the plaintext data, and uses the public key of the security center to encrypt the original key. At the same time, based on the preset ciphertext transmission protocol, the encrypted plaintext data and the original key are combined into a ciphertext and returned to the application so that the application can send the ciphertext out. In this way, the data encryption operation is concentrated in the security device, and while realizing data encryption transmission, it also saves the computing power resources of the device where the application is located, which is convenient for the device where the application is located to perform other tasks, thereby improving business processing efficiency. Moreover, the original key generated by the security device is a symmetric key, but the public key of the security center is actually an asymmetric key, which realizes the double encryption operation of data combined with symmetric encryption and asymmetric encryption algorithms, increases the difficulty of data decryption, and thus ensures the security and reliability of data transmission.

图2至图4介绍了分布式数据安全系统中的数据加密传输过程中安全设备侧的具体操作流程,下面介绍安全中心侧的操作流程,具体如图5所示的本申请实施例的另一种数据加密传输方法的流程示意图,可用于图1所示实施例中的分布式数据安全系统,该系统包括安全中心以及多个安全设备,该方法由安全设备执行,如图5所示,该流程包括如下步骤:2 to 4 introduce the specific operation process of the security device side during the data encryption transmission process in the distributed data security system. The operation process of the security center side is introduced below. Specifically, a flow chart of another data encryption transmission method according to an embodiment of the present application as shown in FIG5 can be used for the distributed data security system in the embodiment shown in FIG1. The system includes a security center and multiple security devices. The method is executed by the security device. As shown in FIG5, the process includes the following steps:

步骤S501,接收第一安全设备发送的待解密密文中的协议头,从协议头中解析出第一密钥。Step S501: receiving a protocol header in a ciphertext to be decrypted sent by a first security device, and parsing a first key from the protocol header.

其中,第一密钥为经由安全中心的公钥加密后的第一原始密钥,第一原始密钥为第二应用对应安全设备生成的对称密钥,第二应用为向第一应用发送待解密密文的应用,第一应用为第一安全设备绑定的应用,第一安全设备为多个安全设备中的任一个,待解密密文包括协议头以及加密数据。第二应用对应安全设备即为图1所示实施例中第二安全设备。Among them, the first key is the first original key encrypted by the public key of the security center, the first original key is the symmetric key generated by the security device corresponding to the second application, the second application is the application that sends the ciphertext to be decrypted to the first application, the first application is the application bound to the first security device, the first security device is any one of the multiple security devices, and the ciphertext to be decrypted includes the protocol header and the encrypted data. The security device corresponding to the second application is the second security device in the embodiment shown in Figure 1.

步骤S502,基于自身的私钥解密第一密钥,得到第一原始密钥。Step S502: decrypt the first key based on its own private key to obtain a first original key.

步骤S503,根据第一安全设备上传的第一设备公钥加密第一原始密钥,并将加密后第一原始密钥发送至第一安全设备,以便第一安全设备根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥,并根据第一原始密钥解密加密数据,得到明文数据,并将明文数据传输至第一应用。Step S503, encrypt the first original key according to the first device public key uploaded by the first security device, and send the encrypted first original key to the first security device, so that the first security device can decrypt the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key, and decrypt the encrypted data according to the first original key to obtain plaintext data, and transmit the plaintext data to the first application.

步骤S501至步骤S503可参见图2至图4所示实施例中介绍的安全中心所执行的流程,在此不做赘述。For steps S501 to S503, reference may be made to the process executed by the security center in the embodiments shown in FIGS. 2 to 4 , and no further description will be given here.

在一种应用场景中,对高速公路行业的分布式管理体系中的数据进行加密传输,分布式管理体系中各管理层的应用之间传输的明文数据需要通过在安全中心已经注册上线的安全设备进行加密,通过安全中心完成密钥协商交换。安全设备会生成对应的对称密钥、非对称的公钥和非对称的私钥(也即设备公钥与设备私钥),并且可以使用安全中心的公钥。In one application scenario, the data in the distributed management system of the highway industry is encrypted for transmission. The plaintext data transmitted between the applications at each management level in the distributed management system needs to be encrypted by the security devices that have been registered and online in the security center, and the key negotiation exchange is completed through the security center. The security device will generate the corresponding symmetric key, asymmetric public key and asymmetric private key (that is, the device public key and device private key), and can use the public key of the security center.

具体数据加密传输的工作流程可如图6所示,以应用A为第二应用、应用B为第一应用、安全设备A为第二安全设备、安全设备B为第一安全设备、路网业务智慧安全中心为安全中心、公钥PKA为第二安全设备的设备公钥、公钥PKB为第一设备公钥、对称密钥KEY1为第一原始密钥、数据信息为明文数据、密文A’为待解密密文、公钥PK为安全中心的公钥、PK加密的KEY1为基于安全中心的公钥加密的第一原始密钥也即第一密钥、PKB加密的KEY1为加密后第一原始密钥、密文数据A为加密数据为例。The specific data encryption transmission workflow can be shown in Figure 6, taking application A as the second application, application B as the first application, security device A as the second security device, security device B as the first security device, the road network business intelligent security center as the security center, the public key PKA as the device public key of the second security device, the public key PKB as the first device public key, the symmetric key KEY1 as the first original key, the data information as plain text data, the ciphertext A' as the ciphertext to be decrypted, the public key PK as the public key of the security center, the PK-encrypted KEY1 as the first original key encrypted based on the public key of the security center, that is, the first key, the PKB-encrypted KEY1 as the encrypted first original key, and the ciphertext data A as the encrypted data as an example.

安全设备A与安全设备B在路网业务智慧安全中心注册上线,两者绑定的应用A与应用B之间配置的访问关系,安全设备A与安全设备B隶属于不同的局域网,应用A与应用B之间需要传输数据。Security device A and security device B are registered and launched in the road network business intelligent security center. The access relationship between the bound applications A and B is configured. Security device A and security device B belong to different local area networks, and data needs to be transmitted between applications A and B.

步骤①,应用A将数据信息发送给安全设备A,安全设备A使用对称密钥KEY1对进行加密形成密文数据A,再使用公钥PK对KEY1进行加密,密文数据A和PK加密的KEY1按协议(该协议即为预设密文传输协议)组成密文A’。Step ①, application A sends data information to security device A, which uses symmetric key KEY1 to encrypt the data to form ciphertext data A, and then uses public key PK to encrypt KEY1. Ciphertext data A and PK-encrypted KEY1 form ciphertext A' according to the protocol (the protocol is the preset ciphertext transmission protocol).

安全设备A还具备使用国密算法(也即预设非对称加密算法)的摘要以及签名的功能,使用国密算法对将要发送的数据信息内容生成签名,用于在接收端也即应用端验证信息内容的合法性、有效性Security device A also has the function of using the summary and signature of the national secret algorithm (that is, the preset asymmetric encryption algorithm), and uses the national secret algorithm to generate a signature for the data information content to be sent, which is used to verify the legitimacy and validity of the information content at the receiving end, that is, the application end.

步骤②,安全设备A将密文A’传输回应用A。Step ②: Security device A transmits ciphertext A’ back to application A.

步骤③,应用A将密文A’传输给应用B。Step ③, application A transmits ciphertext A’ to application B.

步骤④,应用B将密文A’传输给安全设备B。Step ④, application B transmits ciphertext A’ to security device B.

步骤⑤,安全设备B解析密文A’得到密文数据A和协议头,协议头中包括被PK加密的KEY1。将协议头发送给路网业务智慧安全中心,路网业务智慧安全中心通过自身的私钥解密协议头中的被PK加密的KEY1,得到KEY1。Step ⑤, security device B parses ciphertext A' to obtain ciphertext data A and protocol header, which includes KEY1 encrypted by PK. The protocol header is sent to the road network business smart security center, which decrypts KEY1 encrypted by PK in the protocol header with its own private key to obtain KEY1.

步骤⑥,路网业务智慧安全中心使用公钥PKB加密KEY1并发送给安全设备B,安全设备B使用自身的私钥解密被PKB加密的KEY1,得到KEY1,再使用KEY1解密密文数据A得到数据信息。Step ⑥, the road network business intelligent security center uses the public key PKB to encrypt KEY1 and sends it to security device B. Security device B uses its own private key to decrypt KEY1 encrypted by PKB to obtain KEY1, and then uses KEY1 to decrypt the ciphertext data A to obtain the data information.

步骤⑦,安全设备B将解密的数据信息发送给应用B。Step ⑦, security device B sends the decrypted data information to application B.

加密的密钥是通过路网业务智慧安全中心完成协商交换操作的,路网业务智慧安全中心在整个流程中起到了至关重要的作用。安全设备A还会在路网业务智慧安全中心定期更新被PK加密的KEY1。实现结合对称、非对称加密算法对高速公路行业数据传输密钥的分布式管理,并且对称密钥是定时更新的,安全性更高。安全设备需要在安全中心注册上线进行身份验证,认证通过后才能与其他设备完成密钥交换;安全设备需要与应用绑定并配置应用之间的访问关系,应用才能使用安全设备完成加解密流程;制定了一套密文传输协议,即密文数据需要通过按照协议进行组装才能被解析。构建了1个安全中心-N个安全设备的密钥管理体系,设计了一套私有的密文传输协议,通过两个维度的技术约束,适合面向高速公路行业应用的国密改造,从而进一步提高数据传输的安全保障能力。The encrypted key is negotiated and exchanged through the intelligent security center of the road network business. The intelligent security center of the road network business plays a vital role in the whole process. Security device A will also regularly update the PK-encrypted KEY1 in the intelligent security center of the road network business. The distributed management of data transmission keys in the highway industry is realized by combining symmetric and asymmetric encryption algorithms, and the symmetric key is updated regularly, which is more secure. The security device needs to register and go online in the security center for identity authentication. Only after the authentication is passed can the key exchange be completed with other devices; the security device needs to be bound to the application and configure the access relationship between the applications, so that the application can use the security device to complete the encryption and decryption process; a set of ciphertext transmission protocols is formulated, that is, the ciphertext data needs to be assembled according to the protocol before it can be parsed. A key management system of 1 security center-N security devices is constructed, and a set of private ciphertext transmission protocols are designed. Through the technical constraints of two dimensions, it is suitable for the national secret transformation for highway industry applications, thereby further improving the security guarantee capability of data transmission.

本申请实施例中,安全中心接收第二安全设备的身份验证请求,以便第二安全设备验证安全中心的身份并生成待解密密文发送至第二应用,便于第二应用将待解密密文发送至第一应用,使第一安全设备接收到待解密密文并解析其中的协议头给安全中心,安全中心在将加密的第一原始密钥解密再加密,并将二次加密后的第一原始密钥发送至第一安全设备,便于后续数据的解密,实现数据的安全传输。通过部署一个安全中心多个安全设备的分布式数据安全系统,在安全中心中进行密钥加密基准的交换实现密钥协商交换,使第二安全设备以及第一安全设备两者的密钥表现形式不相同,提高密钥破译的难度。并将数据的加密以及解密过程交给安全中心以及安全设备进行,且安全中心以及安全设备之间的数据都是加密后的数据,在支撑整个数据的安全传输的数据传输链的同时,提高数据破译的难度,保障数据传输的安全性以及可靠性。In the embodiment of the present application, the security center receives the identity authentication request of the second security device, so that the second security device verifies the identity of the security center and generates a ciphertext to be decrypted and sends it to the second application, so that the second application can send the ciphertext to be decrypted to the first application, so that the first security device receives the ciphertext to be decrypted and parses the protocol header therein to the security center. The security center decrypts and re-encrypts the encrypted first original key, and sends the second encrypted first original key to the first security device, so as to facilitate the decryption of subsequent data and realize the secure transmission of data. By deploying a distributed data security system with a security center and multiple security devices, the exchange of key encryption benchmarks in the security center realizes key negotiation exchange, so that the key expressions of the second security device and the first security device are different, and the difficulty of key decryption is increased. The encryption and decryption process of the data is handed over to the security center and the security device, and the data between the security center and the security device are all encrypted data. While supporting the data transmission chain of the entire data secure transmission, the difficulty of data decryption is increased, and the security and reliability of data transmission are guaranteed.

在本申请实施例中还提供了一种数据加密传输装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiments of the present application, a data encryption transmission device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

本申请实施例提供一种数据加密传输装置,如图7所示,应用于分布式数据安全系统,系统包括安全中心以及多个安全设备,该装置由第一安全设备执行,该装置包括:The present application embodiment provides a data encryption transmission device, as shown in FIG7, which is applied to a distributed data security system. The system includes a security center and multiple security devices. The device is executed by a first security device. The device includes:

第一接收模块710,用于接收第一应用发送的待解密密文,待解密密文为第二应用向第一应用发送的密文,待解密密文包括协议头和加密数据,第一安全设备为多个安全设备中任一个,第一应用为第一安全设备所绑定的应用,第二应用为多个安全设备中除第一安全设备以外的任一安全设备所绑定的应用;The first receiving module 710 is used to receive a ciphertext to be decrypted sent by the first application, the ciphertext to be decrypted is the ciphertext sent by the second application to the first application, the ciphertext to be decrypted includes a protocol header and encrypted data, the first security device is any one of the multiple security devices, the first application is an application bound to the first security device, and the second application is an application bound to any security device among the multiple security devices except the first security device;

解析模块720,用于根据预设密文传输协议解析协议头,并将解析出的协议头发送至安全中心,以便安全中心基于自身的私钥解密出协议头中的第一原始密钥,并利用第一设备公钥加密第一原始密钥,并返回加密后第一原始密钥,第一设备公钥为第一安全设备生成的公钥,第一原始密钥为第二应用对应安全设备生成的对称密钥;A parsing module 720, configured to parse the protocol header according to a preset ciphertext transmission protocol, and send the parsed protocol header to the security center, so that the security center decrypts the first original key in the protocol header based on its own private key, encrypts the first original key using the first device public key, and returns the encrypted first original key, where the first device public key is a public key generated by the first security device, and the first original key is a symmetric key generated by the security device corresponding to the second application;

第一解密模块730,用于根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥;A first decryption module 730, configured to decrypt the encrypted first original key according to a device private key corresponding to the first device public key to obtain the first original key;

第二解密模块740,用于根据第一原始密钥以及预设密文传输协议,解密加密数据,得到明文数据,并将明文数据传输至第一应用。The second decryption module 740 is used to decrypt the encrypted data according to the first original key and the preset ciphertext transmission protocol to obtain plaintext data, and transmit the plaintext data to the first application.

在一些可选的实施例中,解析模块包括:In some optional embodiments, the parsing module includes:

第一确定单元,用于根据预获取的访问关系配置信息确定第二应用与第一应用之间是否存在访问关系;A first determining unit, configured to determine whether an access relationship exists between the second application and the first application according to the pre-acquired access relationship configuration information;

第一确定单元,还用于若存在访问关系,则在待解密密文中查找与预设密文传输协议中预设协议头地址相同的地址,并将查找出的地址中记载的内容确定为协议头;The first determining unit is further configured to search, in the ciphertext to be decrypted, for an address that is the same as a preset protocol header address in a preset ciphertext transmission protocol if an access relationship exists, and determine the content recorded in the found address as the protocol header;

若不存在访问关系,则确定协议头解析失败结束数据加密传输流程。If there is no access relationship, it is determined that the protocol header parsing has failed and the data encryption transmission process ends.

在一些可选的实施例中,该装置还包括:In some optional embodiments, the device further comprises:

第三接收模块,用于接收第三应用发送的待发送明文数据,第三应用为第一安全设备绑定的任一个应用;A third receiving module, used to receive the plaintext data to be sent sent by a third application, where the third application is any application bound to the first security device;

第一加密模块,用于基于预生成的第二原始密钥,加密待发送明文数据,得到待发送加密数据;A first encryption module, used for encrypting the plaintext data to be sent based on the pre-generated second original key to obtain the encrypted data to be sent;

第二加密模块,用于基于安全中心的公钥加密第二原始密钥,得到加密后密钥;A second encryption module, used to encrypt the second original key based on the public key of the security center to obtain an encrypted key;

组装模块,用于根据预设密文传输协议,将待发送加密数据以及加密后密钥组装为密文;An assembly module, used to assemble the encrypted data to be sent and the encrypted key into ciphertext according to a preset ciphertext transmission protocol;

发送模块,用于将密文发送至第三应用,以便第三应用将组装的密文作为待解密密文传输至其他应用。The sending module is used to send the ciphertext to the third application so that the third application transmits the assembled ciphertext as the ciphertext to be decrypted to other applications.

在一些可选的实施例中,该装置还包括:In some optional embodiments, the device further comprises:

生成模块,用于基于明文数据生成第一待验证签名;A generating module, used to generate a first signature to be verified based on the plaintext data;

发送模块,还用于将第一待验证签名发送至第一应用,以便第一应用基于第一待验证签名验证明文数据的合法性与有效性。The sending module is further used to send the first signature to be verified to the first application, so that the first application verifies the legality and validity of the plaintext data based on the first signature to be verified.

图7中还示出了一种由安全中心执行的数据加密传输装置,应用于分布式数据安全系统,该装置包括:FIG7 also shows a data encryption transmission device executed by a security center, which is applied to a distributed data security system. The device includes:

第二接收模块750,用于接收第一安全设备发送的待解密密文中的协议头,从协议头中解析出第一密钥,第一密钥为经由安全中心的公钥加密后的第一原始密钥,第一原始密钥为第二应用对应安全设备生成的对称密钥,第二应用为向第一应用发送待解密密文的应用,第一应用为第一安全设备绑定的应用,第一安全设备为多个安全设备中的任一个,待解密密文包括协议头以及加密数据;The second receiving module 750 is used to receive a protocol header in the ciphertext to be decrypted sent by the first security device, and parse the first key from the protocol header, where the first key is a first original key encrypted by a public key of the security center, and the first original key is a symmetric key generated by the security device corresponding to the second application, the second application is an application that sends the ciphertext to be decrypted to the first application, the first application is an application bound to the first security device, and the first security device is any one of multiple security devices, and the ciphertext to be decrypted includes a protocol header and encrypted data;

第三解密模块760,用于基于自身的私钥解密第一密钥,得到第一原始密钥;The third decryption module 760 is used to decrypt the first key based on its own private key to obtain a first original key;

加密模块770,用于根据第一安全设备上传的第一设备公钥加密第一原始密钥,并将加密后第一原始密钥发送至第一安全设备,以便第一安全设备根据第一设备公钥对应的设备私钥解密加密后第一原始密钥,得到第一原始密钥,并根据第一原始密钥解密加密数据,得到明文数据,并将明文数据传输至第一应用。The encryption module 770 is used to encrypt the first original key according to the first device public key uploaded by the first security device, and send the encrypted first original key to the first security device, so that the first security device can decrypt the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key, and decrypt the encrypted data according to the first original key to obtain plaintext data, and transmit the plaintext data to the first application.

上述各个模块和单元的更进一步的功能描述与上述对应实施例相同,在此不再赘述。The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

本申请实施例中的数据加密传输装置是以功能单元的形式来呈现,这里的单元是指ASIC(Application Specific Integrated Circuit,专用集成电路)电路,执行一个或多个软件或固定程序的处理器和存储器,和/或其他可以提供上述功能的器件。The data encryption transmission device in the embodiment of the present application is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and/or other devices that can provide the above-mentioned functions.

本申请实施例还提供一种计算机设备,具有上述图7所示的数据加密传输装置。The embodiment of the present application also provides a computer device having the data encryption transmission device shown in FIG. 7 above.

请参阅图8,图8是本申请可选实施例提供的一种计算机设备的结构示意图,如图8所示,该计算机设备包括:一个或多个处理器10、存储器20,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相通信连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在计算机设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在一些可选的实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个计算机设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图8中以一个处理器10为例。Please refer to Figure 8, which is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present application. As shown in Figure 8, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). In Figure 8, a processor 10 is taken as an example.

处理器10可以是中央处理器,网络处理器或其组合。其中,处理器10还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路,可编程逻辑器件或其组合。上述可编程逻辑器件可以是复杂可编程逻辑器件,现场可编程逻辑门阵列,通用阵列逻辑或其任意组合。The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

其中,所述存储器20存储有可由至少一个处理器10执行的指令,以使所述至少一个处理器10执行实现上述实施例示出的方法。The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

存储器20可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据计算机设备的使用所创建的数据等。此外,存储器20可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些可选的实施方式中,存储器20可选包括相对于处理器10远程设置的存储器,这些远程存储器可以通过网络连接至该计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

存储器20可以包括易失性存储器,例如,随机存取存储器;存储器也可以包括非易失性存储器,例如,快闪存储器,硬盘或固态硬盘;存储器20还可以包括上述种类的存储器的组合。The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

该计算机设备还包括通信接口30,用于该计算机设备与其他设备或通信网络通信。The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

本申请实施例还提供了一种计算机可读存储介质,上述根据本申请实施例的方法可在硬件、固件中实现,或者被实现为可记录在存储介质,或者被实现通过网络下载的原始存储在远程存储介质或非暂时机器可读存储介质中并将被存储在本地存储介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件的存储介质上的这样的软件处理。其中,存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;进一步地,存储介质还可以包括上述种类的存储器的组合。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件,当软件或计算机代码被计算机、处理器或硬件访问且执行时,实现上述实施例示出的方法。The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or is implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

本申请的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本申请的方法和/或技术方案。本领域技术人员应能理解,计算机程序指令在计算机可读介质中的存在形式包括但不限于源文件、可执行文件、安装包文件等,相应地,计算机程序指令被计算机执行的方式包括但不限于:该计算机直接执行该指令,或者该计算机编译该指令后再执行对应的编译后程序,或者该计算机读取并执行该指令,或者该计算机读取并安装该指令后再执行对应的安装后程序。在此,计算机可读介质可以是可供计算机访问的任意可用的计算机可读存储介质或通信介质。Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and/or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

虽然结合附图描述了本申请的实施例,但是本领域技术人员可以在不脱离本申请的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.

Claims (11)

1. A data encryption transmission method applied to a distributed data security system, the system including a security center and a plurality of security devices, the method performed by a first security device, the method comprising:
Receiving a ciphertext to be decrypted sent by the first application, wherein the ciphertext to be decrypted is a ciphertext sent by a second application to the first application, the ciphertext to be decrypted comprises a protocol header and encrypted data, the first security device is any one of a plurality of security devices, the first application is an application bound by the first security device, and the second application is an application bound by any one of the plurality of security devices except the first security device;
Analyzing the protocol header according to a preset ciphertext transmission protocol, and sending the analyzed protocol header to the security center, so that the security center decrypts a first original key in the protocol header based on a private key of the security center, encrypts the first original key by using a first equipment public key, and returns the encrypted first original key, wherein the first equipment public key is a public key generated by the first security equipment, and the first original key is a symmetric key generated by the second application corresponding security equipment;
decrypting the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key;
and decrypting the encrypted data according to the first original key and the preset ciphertext transmission protocol to obtain plaintext data, and transmitting the plaintext data to the first application.
2. The method of claim 1, wherein parsing the protocol header according to a preset ciphertext transmission protocol comprises:
Determining whether an access relationship exists between the second application and the first application according to the pre-acquired access relationship configuration information;
if an access relation exists, searching an address which is the same as a preset protocol header address in the preset ciphertext transmission protocol in the ciphertext to be decrypted, and determining the content recorded in the searched address as the protocol header;
If the access relation does not exist, determining that the protocol header analysis fails to finish the data encryption transmission flow.
3. The method according to claim 1, wherein the method further comprises:
Receiving plaintext data to be transmitted, which is transmitted by a third application, wherein the third application is any application bound by the first security device;
Encrypting the plaintext data to be transmitted based on a pre-generated second original key to obtain encrypted data to be transmitted;
encrypting the second original key based on the public key of the security center to obtain an encrypted key;
according to the preset ciphertext transmission protocol, the encrypted data to be sent and the encrypted secret key are assembled into ciphertext;
And sending the assembled ciphertext to the third application, so that the third application can transmit the assembled ciphertext to other applications as the ciphertext to be decrypted.
4. A method according to any one of claims 1 to 3, wherein prior to sending the plaintext data to the first application, the method further comprises:
generating a first signature to be verified based on the plaintext data;
and sending the first signature to be verified to the first application so that the first application verifies the validity and the validity of the plaintext data based on the first signature to be verified.
5. A data encryption transmission method applied to a distributed data security system, the system including a security center and a plurality of security devices, the method performed by the security center, the method comprising:
Receiving a protocol header in a ciphertext to be decrypted, which is sent by a first security device, resolving a first key from the protocol header, wherein the first key is a first original key encrypted by a public key of the security center, the first original key is a symmetric key generated by a second application corresponding to the security device, the second application is an application for sending the ciphertext to be decrypted to the first application, the first application is an application bound by the first security device, the first security device is any one of a plurality of security devices, and the ciphertext to be decrypted comprises the protocol header and encrypted data;
decrypting the first key based on the private key of the user to obtain the first original key;
Encrypting the first original key according to a first device public key uploaded by the first security device, and sending the encrypted first original key to the first security device, so that the first security device decrypts the encrypted first original key according to a device private key corresponding to the first device public key to obtain the first original key, decrypts the encrypted data according to the first original key to obtain plaintext data, and transmits the plaintext data to the first application.
6. A distributed data security system, the system comprising a security center, a first security device, and a second security device, the first security device having a first application bound thereto, the second security device having a second application bound thereto;
The first application is used for sending the received ciphertext to be decrypted to the first security device;
The first security device is configured to parse a protocol header in the to-be-decrypted text according to a preset ciphertext transmission protocol, send the parsed protocol header to a security center, receive an encrypted first original key sent by the security center, decrypt the encrypted first original key according to a device private key of the first security device to obtain a first original key, decrypt encrypted data according to the first original key to obtain plaintext data, and transmit the plaintext data to the first application; and sending the pre-generated first device public key to the security center; the first original key is a symmetric key generated by the second security device, and the ciphertext to be decrypted comprises the protocol header and the encrypted data;
The second security device is configured to encrypt the first original key according to a public key of the security center to obtain a first key, encrypt plaintext data sent by the second application according to the first original key to obtain encrypted data, assemble the encrypted data and the first key into the ciphertext to be decrypted based on a preset ciphertext transmission protocol, and send the ciphertext to be decrypted to the second application;
The second application is used for sending the ciphertext to be decrypted to the first application and sending plaintext data to the second security device;
The security center is used for decrypting the first key in the protocol header into a first original key according to the private key of the security center, encrypting the first original key by using the public key of the first device, transmitting the first encrypted original key to the first security device, and transmitting the public key of the security center to the second security device.
7. A data encryption transmission apparatus for use in a distributed data security system, the system comprising a security center and a plurality of security devices, the apparatus being executable by a first security device, the apparatus comprising:
the first receiving module is used for receiving a ciphertext to be decrypted sent by the first application, wherein the ciphertext to be decrypted is a ciphertext sent by a second application to the first application, the ciphertext to be decrypted comprises a protocol header and encrypted data, the first security device is any one of the plurality of security devices, the first application is an application bound by the first security device, and the second application is an application bound by any one of the plurality of security devices except the first security device;
the analysis module is used for analyzing the protocol header according to a preset ciphertext transmission protocol, and sending the analyzed protocol header to the security center, so that the security center decrypts a first original key in the protocol header based on a private key of the security center, encrypts the first original key by using a first equipment public key, and returns the encrypted first original key, wherein the first equipment public key is a public key generated by the first security equipment, and the first original key is a symmetric key generated by the second application corresponding security equipment;
the first decryption module is used for decrypting the encrypted first original key according to the device private key corresponding to the first device public key to obtain the first original key;
And the second decryption module is used for decrypting the encrypted data according to the first original key and the preset ciphertext transmission protocol to obtain plaintext data and transmitting the plaintext data to the first application.
8. A data encryption transmission apparatus for use in a distributed data security system, the system comprising a security center and a plurality of security devices, the apparatus being implemented by the security center, the apparatus comprising:
The second receiving module is used for receiving a protocol header in a ciphertext to be decrypted, which is sent by the first security device, resolving a first key from the protocol header, wherein the first key is a first original key encrypted by a public key of the security center, the first original key is a symmetric key generated by a second application corresponding to the security device, the second application is an application for sending the ciphertext to be decrypted to the first application, the first application is an application bound by the first security device, the first security device is any one of a plurality of security devices, and the ciphertext to be decrypted comprises the protocol header and encrypted data;
the third decryption module is used for decrypting the first key based on the private key of the third decryption module to obtain the first original key;
The encryption module is used for encrypting the first original key according to the first equipment public key uploaded by the first safety equipment, and sending the encrypted first original key to the first safety equipment, so that the first safety equipment decrypts the encrypted first original key according to the equipment private key corresponding to the first equipment public key, obtains the first original key, decrypts the encrypted data according to the first original key, obtains plaintext data, and transmits the plaintext data to the first application.
9. A computer device, comprising:
A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the data encryption transmission method of any one of claims 1 to 4 or 5.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the data encryption transmission method according to any one of claims 1 to 4 or 5.
11. A computer program product comprising computer instructions for causing a computer to perform the data encryption transmission method of any one of claims 1 to 4 or 5.
CN202410293802.XA 2024-03-14 2024-03-14 Data encryption transmission method, device, computer equipment, medium and program product Active CN118101298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410293802.XA CN118101298B (en) 2024-03-14 2024-03-14 Data encryption transmission method, device, computer equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410293802.XA CN118101298B (en) 2024-03-14 2024-03-14 Data encryption transmission method, device, computer equipment, medium and program product

Publications (2)

Publication Number Publication Date
CN118101298A true CN118101298A (en) 2024-05-28
CN118101298B CN118101298B (en) 2024-11-22

Family

ID=91156055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410293802.XA Active CN118101298B (en) 2024-03-14 2024-03-14 Data encryption transmission method, device, computer equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN118101298B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118734353A (en) * 2024-06-04 2024-10-01 中国通信建设集团有限公司 A safe data transmission communication cabinet

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603485A (en) * 2016-10-31 2017-04-26 美的智慧家居科技有限公司 Secret key negotiation method and device
WO2018076365A1 (en) * 2016-10-31 2018-05-03 美的智慧家居科技有限公司 Key negotiation method and device
CN114430345A (en) * 2022-01-26 2022-05-03 深圳乐信软件技术有限公司 A data transmission method, device, storage medium and electronic device
CN115001720A (en) * 2022-08-05 2022-09-02 北京融数联智科技有限公司 Optimization method, device, medium and equipment for safe transmission of federal learning modeling
CN116633658A (en) * 2023-06-14 2023-08-22 南方电网科学研究院有限责任公司 Data transmission method, data sending end and data receiving end
CN116830525A (en) * 2022-01-27 2023-09-29 京东方科技集团股份有限公司 Data transmission method, device, system, electronic equipment and readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603485A (en) * 2016-10-31 2017-04-26 美的智慧家居科技有限公司 Secret key negotiation method and device
WO2018076365A1 (en) * 2016-10-31 2018-05-03 美的智慧家居科技有限公司 Key negotiation method and device
CN114430345A (en) * 2022-01-26 2022-05-03 深圳乐信软件技术有限公司 A data transmission method, device, storage medium and electronic device
CN116830525A (en) * 2022-01-27 2023-09-29 京东方科技集团股份有限公司 Data transmission method, device, system, electronic equipment and readable medium
CN115001720A (en) * 2022-08-05 2022-09-02 北京融数联智科技有限公司 Optimization method, device, medium and equipment for safe transmission of federal learning modeling
CN116633658A (en) * 2023-06-14 2023-08-22 南方电网科学研究院有限责任公司 Data transmission method, data sending end and data receiving end

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118734353A (en) * 2024-06-04 2024-10-01 中国通信建设集团有限公司 A safe data transmission communication cabinet

Also Published As

Publication number Publication date
CN118101298B (en) 2024-11-22

Similar Documents

Publication Publication Date Title
CN111314274B (en) Vehicle-mounted terminal and center platform bidirectional authentication method and system
CN112150147A (en) Data security storage system based on block chain
CN112653556B (en) TOKEN-based micro-service security authentication method, device and storage medium
CN114830572B (en) A data transmission method, device, equipment, system and storage medium
CN112235301B (en) Access right verification method and device and electronic equipment
CN111131416A (en) Business service providing method and device, storage medium and electronic device
CN101883122B (en) Safety connection establishing method and client equipment for establishing safety connection
WO2020078225A1 (en) Key downloading method, client, cryptographic device and terminal device
CN113613227B (en) Data transmission method and device of Bluetooth equipment, storage medium and electronic device
CN110381012B (en) Method and system for facilitating broadcast of encrypted data
CN112261002B (en) Data interface docking method and device
CN108846671B (en) Online secure transaction method and system based on block chain
CN116961973A (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN111414640A (en) Key access control method and device
CN118101298A (en) Data encryption transmission method, device, computer equipment, medium and program product
CN112583594B (en) Data processing method, acquisition device, gateway, trusted platform and storage medium
CN111901335B (en) Block chain data transmission management method and system based on middle station
CN102594564A (en) Equipment for traffic guidance information security management
CN111225001B (en) Block chain decentralized communication method, electronic equipment and system
US8081758B2 (en) Communication support server, communication support method, and communication support system
CN118233158A (en) Safe access method for intelligent terminal at service edge of power system
CN117354016A (en) Whole car OTA security upgrading method, device, equipment and medium
CN115001744B (en) Cloud platform data integrity verification method and system
CN114844695B (en) Business data circulation method, system and related equipment based on block chain
CN114980012A (en) A vehicle networking device authentication method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant