CN118214558B - Data circulation processing method, system, device and storage medium - Google Patents
Data circulation processing method, system, device and storage medium Download PDFInfo
- Publication number
- CN118214558B CN118214558B CN202410632457.8A CN202410632457A CN118214558B CN 118214558 B CN118214558 B CN 118214558B CN 202410632457 A CN202410632457 A CN 202410632457A CN 118214558 B CN118214558 B CN 118214558B
- Authority
- CN
- China
- Prior art keywords
- key
- source system
- transfer platform
- data
- public key
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000003860 storage Methods 0.000 title claims abstract description 13
- 238000012546 transfer Methods 0.000 claims abstract description 337
- 238000000034 method Methods 0.000 claims abstract description 124
- 230000005540 biological transmission Effects 0.000 claims abstract description 113
- 238000004422 calculation algorithm Methods 0.000 claims description 85
- 230000006870 function Effects 0.000 claims description 48
- 238000009795 derivation Methods 0.000 claims description 32
- 230000008569 process Effects 0.000 claims description 31
- 238000012795 verification Methods 0.000 claims description 30
- 238000005111 flow chemistry technique Methods 0.000 claims description 29
- 238000012545 processing Methods 0.000 claims description 23
- 238000012790 confirmation Methods 0.000 claims description 3
- 238000004891 communication Methods 0.000 description 17
- 238000005516 engineering process Methods 0.000 description 8
- 230000008676 import Effects 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 230000005610 quantum mechanics Effects 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013144 data compression Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013524 data verification Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000026676 system process Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 238000013478 data encryption standard Methods 0.000 description 1
- 238000013496 data integrity verification Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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/045—Network 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 hybrid encryption, i.e. combination of symmetric and asymmetric encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key 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/0825—Key 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 asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L9/3066—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/08—Randomization, e.g. dummy operations or using noise
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/72—Signcrypting, i.e. digital signing and encrypting simultaneously
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Algebra (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Mathematical Physics (AREA)
- Pure & Applied Mathematics (AREA)
- Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
本申请公开了一种数据流通处理方法、系统、装置及存储介质,确保了整个传输过程的高效性和安全性,从而有效减少或避免大规模数据泄露的事件发生,极大的提高数据传输的安全性。本申请方法包括:所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;所述中转平台和所述源系统进行密钥协商以生成对称密钥;所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名。
The present application discloses a data circulation processing method, system, device and storage medium, which ensures the efficiency and security of the entire transmission process, thereby effectively reducing or avoiding the occurrence of large-scale data leakage incidents and greatly improving the security of data transmission. The present application method includes: the source system, the transfer platform and the destination system respectively generate a source system key pair, a transfer platform key pair and a destination system key pair, the source system key pair includes a source system public key and a source system private key, the transfer platform key pair includes a transfer platform public key and a transfer platform private key, and the destination system key pair includes a destination system public key and a destination system private key; the transfer platform and the source system perform key negotiation to generate a symmetric key; the source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature.
Description
技术领域Technical Field
本申请涉及数据流通技术领域,尤其涉及一种数据流通处理方法、系统、装置及存储介质。The present application relates to the field of data circulation technology, and in particular to a data circulation processing method, system, device and storage medium.
背景技术Background Art
在现代信息技术快速发展的背景下,不同的系统和平台进行数据交换已成为常态,这些系统可能涵盖不同的行业与域,如金融、医疗、教育、政府机构等,在这些系统之间进行高效而安全的数据流传输是构建可靠信息服务的重要基础,传统的数据交换方法通常涉及将数据从源系统传输到一个中转平台,在该平台上对数据进行必要的处理和转换,然后再将数据传输到目的系统,数据流通过程是指数据从其源出发,经过一系列传输和处理,最终到达目的地的整个过程,这一过程具备连续性、实时性、可扩展性、多样性和安全性。With the rapid development of modern information technology, data exchange between different systems and platforms has become the norm. These systems may cover different industries and domains, such as finance, medical care, education, government agencies, etc. Efficient and secure data flow transmission between these systems is an important foundation for building reliable information services. Traditional data exchange methods usually involve transferring data from the source system to a transit platform, performing necessary processing and conversion on the data on the platform, and then transferring the data to the destination system. The data flow process refers to the entire process from the source to the destination after a series of transmission and processing. This process is continuous, real-time, scalable, diverse and secure.
目前数据交换方法通常涉及将数据从源系统传输到一个中转平台,在该平台上对数据进行必要的处理和转换,然后再将数据传输到目的系统的方法存在着显著的缺陷,数据在传输时被加密,由于加密方法较为简单,数据存在泄露的风险,这一环节成为潜在的安全漏洞,一旦中转平台受到攻击或遭到内部人员的滥用,可能导致大规模的数据泄露事件,危及个人隐私和企业机密。The current data exchange method usually involves transferring data from the source system to a transit platform, performing necessary processing and conversion on the data, and then transferring the data to the destination system. This method has significant defects. The data is encrypted during transmission. Since the encryption method is relatively simple, there is a risk of data leakage. This link becomes a potential security vulnerability. Once the transit platform is attacked or abused by internal personnel, it may lead to large-scale data leakage incidents, endangering personal privacy and corporate secrets.
发明内容Summary of the invention
为了解决上述技术问题,本申请提供了一种数据流通处理方法、系统、装置及存储介质。In order to solve the above technical problems, the present application provides a data flow processing method, system, device and storage medium.
下面对本申请中提供的技术方案进行描述:The technical solution provided in this application is described below:
本申请第一方面提供了一种数据流通处理方法,所述数据流通处理方法应用在源系统、中转平台和目的地系统三个系统中,所述方法包括:In a first aspect, the present application provides a data circulation processing method, which is applied in three systems: a source system, a transfer platform, and a destination system. The method includes:
所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;The source system, the transit platform and the destination system generate a source system key pair, a transit platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transit platform key pair includes a transit platform public key and a transit platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;The source system and the transfer platform exchange the source system public key and the transfer platform public key;
所述源系统根据所述中转平台公钥对认证信息进行加密,并将加密后的认证信息发送至所述中转平台;The source system encrypts the authentication information according to the transfer platform public key, and sends the encrypted authentication information to the transfer platform;
所述中转平台使用所述中转平台私钥对所述认证信息进行解密;The transfer platform uses the transfer platform private key to decrypt the authentication information;
当所述中转平台验证所述认证信息正确之后,所述中转平台和所述源系统选定目标椭圆曲线以及所述目标椭圆曲线上的一个基点G;After the transfer platform verifies that the authentication information is correct, the transfer platform and the source system select a target elliptic curve and a base point G on the target elliptic curve;
所述中转平台随机选择一个私钥dA,并计算相应的公钥QA = dAtimesG,其中G是基点,times表示乘法运算;The transfer platform randomly selects a private key dA and calculates the corresponding public key QA = dAtimesG, where G is the base point and times represents multiplication operation;
所述中转平台将公钥QA发送给所述源系统;The transfer platform sends the public key QA to the source system;
所述源系统随机选择一个私钥dB,并计算相应的公钥QB = dBtimesG,其中G是基点;The source system randomly selects a private key dB and calculates the corresponding public key QB = dBtimesG, where G is the base point;
所述源系统将公钥QB发送给所述中转平台;The source system sends the public key QB to the transfer platform;
所述中转平台使用私钥dA和公钥QB计算共享密钥S = dAtimesQB;The transfer platform uses the private key dA and the public key QB to calculate the shared key S = dAtimesQB;
所述源系统使用私钥dB和公钥QA计算共享密钥S = dBtimesQA;The source system uses the private key dB and the public key QA to calculate the shared key S = dBtimesQA;
所述源系统和所述中转平台使用共享密钥S作为种子,通过所述共享密钥派生函数KDF生成对称密钥;The source system and the transit platform use the shared key S as a seed and generate a symmetric key through the shared key derivation function KDF;
所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名;The source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature;
所述源系统将所述加密数据和所述数字签名发送至所述中转平台;The source system sends the encrypted data and the digital signature to the transfer platform;
所述中转平台使用所述源系统公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;The transfer platform verifies the digital signature using the source system public key. After determining the integrity of the target encrypted data, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system.
所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统公钥发送至所述目的地系统;The transfer platform encrypts the encrypted data using the destination system public key to obtain target encrypted data, and sends the target encrypted data and the source system public key to the destination system;
所述目的地系统使用所述目的地系统私钥解密所述目标加密数据得到所述加密数据;The destination system uses the destination system private key to decrypt the target encrypted data to obtain the encrypted data;
所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;The destination system verifies the digital signature on the encrypted data using the source system public key;
在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统,以使得所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。After successful verification, the transit platform sends the symmetric key pair to the destination system, so that the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
可选的,所述源系统和所述中转平台使用共享密钥S作为种子,通过所述共享密钥派生函数KDF生成对称密钥,包括:Optionally, the source system and the transit platform use a shared key S as a seed and generate a symmetric key through the shared key derivation function KDF, including:
确定HMAC的密钥派生函数,并为所述HMAC的密钥派生函数设置迭代次数和密钥长度信息;Determine a key derivation function of HMAC, and set the number of iterations and key length information for the key derivation function of HMAC;
选定目标随机数D;Select the target random number D;
将所述目标随机数D、所述共享密钥S、所述迭代次数信息和密钥长度信息输入所述HMAC的密钥派生函数中进行派生处理;Input the target random number D, the shared key S, the iteration number information and the key length information into the key derivation function of the HMAC for derivation processing;
通过所述派生处理后获取所述对称密钥。The symmetric key is obtained after the derivation process.
可选的,所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名,包括:Optionally, the source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature, including:
所述源系统计算所述目标数据的哈希值,并将哈希值与所述对称密钥结合生成目标对称密钥;The source system calculates a hash value of the target data, and combines the hash value with the symmetric key to generate a target symmetric key;
所述源系统通过所述目标对称密钥对所述目标数据进行加密后得到所述加密数据;The source system encrypts the target data using the target symmetric key to obtain the encrypted data;
所述源系统计算所述加密数据的目标哈希值;The source system calculates a target hash value of the encrypted data;
所述源系统使用所述源系统私钥对所述目标哈希值进行加密以生成数字签名。The source system encrypts the target hash value using the source system private key to generate a digital signature.
可选的,所述源系统计算所述加密数据的目标哈希值,包括:Optionally, the source system calculates a target hash value of the encrypted data, including:
所述源系统使用SHA-256算法和SHA-3算法分别计算所述加密数据的第一哈希值和第二哈希值;The source system uses the SHA-256 algorithm and the SHA-3 algorithm to calculate a first hash value and a second hash value of the encrypted data respectively;
所述源系统将所述第一哈希值和所述第二哈希值结合后得到所述目标哈希值。The source system combines the first hash value and the second hash value to obtain the target hash value.
可选的,所述源系统计算所述加密数据的目标哈希值,包括:Optionally, the source system calculates a target hash value of the encrypted data, including:
所述源系统将所述加密数据分成若干块数据,并分别计算每块数据的哈希值;The source system divides the encrypted data into a plurality of blocks of data, and calculates a hash value of each block of data respectively;
所述源系统使用默克尔树来组合每块数据的哈希值以得到所述目标哈希值。The source system uses a Merkle tree to combine the hash values of each block of data to obtain the target hash value.
可选的,所述源系统计算所述加密数据的目标哈希值,包括:Optionally, the source system calculates a target hash value of the encrypted data, including:
所述源系统使用SHA-256算法计算所述加密数据的一类哈希值;The source system calculates a type of hash value of the encrypted data using a SHA-256 algorithm;
所述源系统使用SHA-3算法计算所述源系统公钥和所述源系统私钥的二类哈希值和三类哈希值;The source system uses the SHA-3 algorithm to calculate the second type hash value and the third type hash value of the source system public key and the source system private key;
所述源系统使用默克尔树来组合所述一类哈希值、所述二类哈希值和所述三类哈希值以得到所述目标哈希值。The source system uses a Merkle tree to combine the first type of hash value, the second type of hash value, and the third type of hash value to obtain the target hash value.
可选的,在所述源系统根据所述中转平台公钥对认证信息进行加密之前,所述方法还包括:Optionally, before the source system encrypts the authentication information according to the transit platform public key, the method further includes:
所述源系统和所述中转平台基于通话密钥构建数据安全传输通道。The source system and the transfer platform establish a secure data transmission channel based on the call key.
可选的,所述源系统生成源系统密钥对,包括:Optionally, the source system generates a source system key pair, including:
确定第一素数P1,P1是有限域的基础;Determine the first prime number P1, P1 is the basis of the finite field;
定义第一椭圆曲线:,其中,a和b是所述第一椭圆曲线方程上的曲线参数,a和b需满足以下条件:,以确保所述第一椭圆曲线上无奇点;Define the first elliptic curve: , where a and b are curve parameters on the first elliptic curve equation, and a and b must satisfy the following conditions: , to ensure that there is no singular point on the first elliptic curve;
在第一椭圆曲线上选择一个基点G1;Select a base point G1 on the first elliptic curve;
定义源系统私钥d1,d1是一个随机定义的一个正整数,d1的范围[1,n-1],其中n是基点G1的阶,即是最小的正整数n;Define the source system private key d1, d1 is a randomly defined positive integer, the range of d1 is [1, n-1], where n is the order of the base point G1, that is, the smallest positive integer n;
根据所述第一椭圆曲线上的点乘运算计算源系统公钥Q1,Q1=d1*G1;Calculate the source system public key Q1 according to the point multiplication operation on the first elliptic curve, Q1=d1*G1;
获取所述源系统公钥Q1和源系统私钥d1。The source system public key Q1 and the source system private key d1 are obtained.
可选的,所述中转平台生成中转平台密钥对,包括:Optionally, the transfer platform generates a transfer platform key pair, including:
确定第二素数P2,P2是有限域的基础;Determine the second prime number P2, P2 is the basis of the finite field;
定义第二椭圆曲线:,其中,a和b是所述第二椭圆曲线方程上的曲线参数,a和b需满足以下条件:,以确保所述第二椭圆曲线上无奇点;Define the second elliptic curve: , where a and b are curve parameters on the second elliptic curve equation, and a and b must satisfy the following conditions: , to ensure that there is no singular point on the second elliptic curve;
在第二椭圆曲线上选择一个基点G2;Select a base point G2 on the second elliptic curve;
定义中转平台私钥d2,d2是一个随机定义的一个正整数,d2的范围[1,n-1],其中n是基点G2的阶,即是最小的正整数n;Define the transfer platform private key d2, d2 is a randomly defined positive integer, the range of d2 is [1, n-1], where n is the order of the base point G2, that is, the smallest positive integer n;
根据所述第二椭圆曲线上的点乘运算计算源系统公钥Q2,Q2=d2*G2;Calculate the source system public key Q2 according to the point multiplication operation on the second elliptic curve, Q2=d2*G2;
获取所述中转平台公钥Q2和中转平台私钥d2。Obtain the transfer platform public key Q2 and the transfer platform private key d2.
可选的,所述目的地系生成目的地密钥对,包括:Optionally, the destination generates a destination key pair, including:
确定第三素数P3,P3是有限域的基础;Determine the third prime number P3, which is the basis of the finite field;
定义第三椭圆曲线:,其中,a和b是所述第三椭圆曲线方程上的曲线参数,a和b需满足以下条件:,以确保所述第三椭圆曲线上无奇点;Define the third elliptic curve: , where a and b are curve parameters on the third elliptic curve equation, and a and b must satisfy the following conditions: , to ensure that there is no singular point on the third elliptic curve;
在第三椭圆曲线上选择一个基点G3;Select a base point G3 on the third elliptic curve;
定义目的地系统私钥d3,d3是一个随机定义的一个正整数,d3的范围[1,n-1],其中n是基点G3的阶,即是最小的正整数n;Define the destination system private key d3, where d3 is a randomly defined positive integer in the range [1, n-1], where n is the order of the base point G3, i.e. the smallest positive integer n;
根据所述第三椭圆曲线上的点乘运算计算源系统公钥Q3,Q3=d3*G3;Calculate the source system public key Q3 according to the point multiplication operation on the third elliptic curve, Q3=d3*G3;
获取所述目的地公钥Q3和所述目的地系统私钥d3。Acquire the destination public key Q3 and the destination system private key d3.
可选的,所述源系统将所述加密数据和所述数字签名发送至所述中转平台,包括:Optionally, the source system sends the encrypted data and the digital signature to the transfer platform, including:
所述源系统将所述加密数据分割成若干个数据包;The source system divides the encrypted data into a plurality of data packets;
所述源系统确定传输至所述中转平台的若干个传输通道;The source system determines a number of transmission channels for transmission to the transfer platform;
所述源系统将所述若干个数据包和所述数字签名通过所述若干个传输通道传输至所述中转平台,所述若干个数据包上均对应有所述数字签名。The source system transmits the plurality of data packets and the digital signatures to the transfer platform through the plurality of transmission channels, and the plurality of data packets each have a corresponding digital signature.
可选的,所述中转平台使用所述源系统公钥验证所述数字签名,包括:Optionally, the transfer platform verifies the digital signature using the source system public key, including:
所述中转平台接收若干个传输通道的若干个数据包和所述数字签名;The transfer platform receives a plurality of data packets and the digital signatures of a plurality of transmission channels;
所述中转平台调取所述源系统公钥;The transfer platform retrieves the source system public key;
所述中转平台使用所述源系统公钥验证若干个数据包上的数字签名;The transfer platform verifies the digital signatures on several data packets using the source system public key;
当所述中转平台确定所述若干个数据包的数字签名验证无误之后,将所述若干个数据结合生成所述加密数据。After the transfer platform determines that the digital signatures of the plurality of data packets are verified to be correct, the plurality of data packets are combined to generate the encrypted data.
可选的,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换,包括:Optionally, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system, including:
所述中转平台根据所述加密数据上的标识确定目的地系统;The transfer platform determines the destination system according to the identifier on the encrypted data;
所述中转平台向所述目的地系统发送接收指令;The transfer platform sends a receiving instruction to the destination system;
当所述中转平台获取所述目的地系统反馈的确认指令后,所述中转平台和所述目的地系统构建安全传输通道;After the transfer platform obtains the confirmation instruction fed back by the destination system, the transfer platform and the destination system establish a secure transmission channel;
所述中转平台将所述中转平台公钥通过所述安全传输通道发送至所述目的地系统;The transfer platform sends the transfer platform public key to the destination system through the secure transmission channel;
待所述目的地系统获取到所述中转平台公钥之后,验证所述中转平台公钥的IP地址与所述接收指令的IP地址是否一致;After the destination system obtains the transfer platform public key, verify whether the IP address of the transfer platform public key is consistent with the IP address of the receiving instruction;
若是,则所述目的地系统将所述目的地系统公钥发送至所述中转平台。If so, the destination system sends the destination system public key to the transfer platform.
可选的,所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,包括:Optionally, the transfer platform uses the destination system public key to encrypt the encrypted data to obtain target encrypted data, including:
所述中转平台调出所述目的地系统公钥;The transfer platform calls out the destination system public key;
所述中转平台生成一串随机数;The transfer platform generates a string of random numbers;
所述中转平台使用目标哈希函数计算目的地系统公钥和随机数结合得到的哈希值hash;The transfer platform uses the target hash function to calculate the hash value hash obtained by combining the destination system public key and the random number;
所述中转平台使用计算出的哈希值hash作为密钥派生函数的输入,并生成目标密钥K;The transfer platform uses the calculated hash value hash as the input of the key derivation function and generates a target key K;
所述中转平台使用目标密钥K和所述目的地系统公钥将所述加密数据进行加密后得到目标加密数据。The transfer platform uses the target key K and the destination system public key to encrypt the encrypted data to obtain the target encrypted data.
可选的,在将所述目标加密数据和所述源系统公钥发送至所述目的地系统之前,所述方法还包括:Optionally, before sending the target encrypted data and the source system public key to the destination system, the method further includes:
所述中转平台与所述目的地系统进行密钥协商以生成通话密钥;The transfer platform performs key negotiation with the destination system to generate a call key;
所述中转平台和所述目的地系统根据所述通话密钥构建数据传输通道。The transfer platform and the destination system establish a data transmission channel according to the call key.
可选的,所述中转平台与所述目的地系统进行密钥协商以生成通话密钥,包括:Optionally, the transfer platform performs key negotiation with the destination system to generate a call key, including:
所述中转平台确定素数p和一个基数g,并将所述素数p和基数g发送至所述目的地系统;The transfer platform determines a prime number p and a base g, and sends the prime number p and the base g to the destination system;
所述目的地系统随机选择一个私钥a,并计算出其公钥A = g^a mod p;The destination system randomly selects a private key a and calculates its public key A = g^a mod p;
所述中转平台随机选择一个私钥b,计算出其公钥B = g^b mod p;The transfer platform randomly selects a private key b and calculates its public key B = g^b mod p;
所述目的地系统将其公钥a发送给中转平台,且所述中转平台将其公钥b发送给所述目的地系统;The destination system sends its public key a to the transit platform, and the transit platform sends its public key b to the destination system;
当所述目的地系统接收到公钥b后,使用私钥a计算共享密钥S = B^a mod p;When the destination system receives the public key b, it uses the private key a to calculate the shared key S = B^a mod p;
当所述中转平台接收到公钥a后,使用自己的私钥b计算共享密钥S = A^b mod p;When the transfer platform receives the public key a, it uses its own private key b to calculate the shared key S = A^b mod p;
所述中转平台和所述目的地系统使用密钥派生函数并结合共享密钥S和会话ID生成通话密钥。The transit platform and the destination system use a key derivation function and combine the shared key S and the session ID to generate a session key.
可选的,在所述目的地系统使用所述目的地系统私钥解密所述目标数据包得到所述加密数据之前,所述方法还包括:Optionally, before the destination system uses the destination system private key to decrypt the target data packet to obtain the encrypted data, the method further includes:
所述目的地系统接收所述中转平台发送的所述目标加密数据和一串随机数。The destination system receives the target encrypted data and a string of random numbers sent by the transfer platform.
可选的,所述目的地系统使用所述目的地系统私钥解密所述目标数据包得到所述加密数据,包括:Optionally, the destination system uses the destination system private key to decrypt the target data packet to obtain the encrypted data, including:
所述目的地系统使用目的地系统公钥和一串随机数通过所述目标哈希函数计算哈希值;The destination system calculates a hash value using the destination system public key and a string of random numbers through the target hash function;
所述目的地系统使用哈希值通过密钥派生函数生成解密密钥;The destination system generates a decryption key using the hash value through a key derivation function;
所述目的地系统使用解密密钥和目的地系统私钥解密所述目标加密数据后得到加密数据。The destination system decrypts the target encrypted data using the decryption key and the destination system private key to obtain the encrypted data.
可选的,在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统之前,所述方法还包括:Optionally, after the verification is successful and before the transfer platform sends the symmetric key pair to the destination system, the method further includes:
所述目的地系统将验证成功的反馈信息发送至所述中转平台,所述反馈信息包括所述加密数据的标识信息;The destination system sends feedback information of successful verification to the transfer platform, wherein the feedback information includes identification information of the encrypted data;
所述中转平台根据所述反馈信息中的标识信息将对应的对称密钥发送至所述目的地系统。The transfer platform sends the corresponding symmetric key to the destination system according to the identification information in the feedback information.
本申请第二方面提供了一种数据流通处理系统,所述数据流通处理系统包括:A second aspect of the present application provides a data circulation processing system, the data circulation processing system comprising:
源系统、中转平台和目的地系统,所述源系统、所述中转平台和所述目的地系统执行如下操作:A source system, a transfer platform and a destination system, wherein the source system, the transfer platform and the destination system perform the following operations:
所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;The source system, the transit platform and the destination system generate a source system key pair, a transit platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transit platform key pair includes a transit platform public key and a transit platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;The source system and the transfer platform exchange the source system public key and the transfer platform public key;
所述源系统根据所述中转平台公钥对认证信息进行加密,并将加密后的认证信息发送至所述中转平台;The source system encrypts the authentication information according to the transfer platform public key, and sends the encrypted authentication information to the transfer platform;
所述中转平台使用所述中转平台私钥对所述认证信息进行解密;The transfer platform uses the transfer platform private key to decrypt the authentication information;
当所述中转平台验证所述认证信息正确之后,所述中转平台和所述源系统选定目标椭圆曲线以及所述目标椭圆曲线上的一个基点G;After the transfer platform verifies that the authentication information is correct, the transfer platform and the source system select a target elliptic curve and a base point G on the target elliptic curve;
所述中转平台随机选择一个私钥dA,并计算相应的公钥QA = dAtimesG,其中G是基点,times表示乘法运算;The transfer platform randomly selects a private key dA and calculates the corresponding public key QA = dAtimesG, where G is the base point and times represents multiplication operation;
所述中转平台将公钥QA发送给所述源系统;The transfer platform sends the public key QA to the source system;
所述源系统随机选择一个私钥dB,并计算相应的公钥QB = dBtimesG,其中G是基点;The source system randomly selects a private key dB and calculates the corresponding public key QB = dBtimesG, where G is the base point;
所述源系统将公钥QB发送给所述中转平台;The source system sends the public key QB to the transfer platform;
所述中转平台使用私钥dA和公钥QB计算共享密钥S = dAtimesQB;The transfer platform uses the private key dA and the public key QB to calculate the shared key S = dAtimesQB;
所述源系统使用私钥dB和公钥QA计算共享密钥S = dBtimesQA;The source system uses the private key dB and the public key QA to calculate the shared key S = dBtimesQA;
所述源系统和所述中转平台使用共享密钥S作为种子,通过所述共享密钥派生函数KDF生成对称密钥;The source system and the transit platform use the shared key S as a seed and generate a symmetric key through the shared key derivation function KDF;
所述中转平台和所述源系统进行密钥协商以生成对称密钥;The transit platform and the source system perform key negotiation to generate a symmetric key;
所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名;The source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature;
所述源系统将所述加密数据和所述数字签名发送至所述中转平台;The source system sends the encrypted data and the digital signature to the transfer platform;
所述中转平台使用所述源系统公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;The transfer platform verifies the digital signature using the source system public key. After determining the integrity of the target encrypted data, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system.
所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统公钥发送至所述目的地系统;The transfer platform encrypts the encrypted data using the destination system public key to obtain target encrypted data, and sends the target encrypted data and the source system public key to the destination system;
所述目的地系统使用所述目的地系统私钥解密所述目标数据包得到所述加密数据;The destination system uses the destination system private key to decrypt the target data packet to obtain the encrypted data;
所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;The destination system verifies the digital signature on the encrypted data using the source system public key;
在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统,以使得所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。After successful verification, the transit platform sends the symmetric key pair to the destination system, so that the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
本申请第三方面提供了一种数据流通处理装置,所述装置包括:A third aspect of the present application provides a data flow processing device, the device comprising:
处理器、存储器、输入输出单元以及总线;Processor, memory, input-output unit, and bus;
所述处理器与所述存储器、所述输入输出单元以及所述总线相连;The processor is connected to the memory, the input and output unit, and the bus;
所述存储器保存有程序,所述处理器调用所述程序以执行第一方面以及第一方面中任一项可选的所述方法。The memory stores a program, and the processor calls the program to execute the first aspect and any optional method in the first aspect.
本申请第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质上保存有程序,所述程序在计算机上执行时执行第一方面以及第一方面中任一项可选的所述方法。A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method in the first aspect.
从以上技术方案可以看出,本申请具有以下优点:It can be seen from the above technical solutions that this application has the following advantages:
本申请数据流通处理方法有效地提升了数据传输的安全性和效率。具体来说,源系统、中转平台和目的地系统各自生成自己的密钥对,并通过密钥协商生成对称密钥,确保了数据加密的强度,源系统不仅使用对称密钥加密数据,还利用自己的私钥对加密数据生成数字签名,增加了数据传输的安全层级,且中转平台在验证数字签名无误后,负责与目的地系统交换公钥,并使用目的地系统公钥进一步加密已加密的数据,再将其发送给目的地系统,目的地系统通过自己的私钥解密数据,再用源系统公钥验证数字签名,确保了数据的完整性和发送方的身份验证,最后,中转平台将对称密钥安全地发送至目的地系统,以解锁加密数据,实现安全的数据传输。The data circulation processing method of this application effectively improves the security and efficiency of data transmission. Specifically, the source system, the transit platform and the destination system each generate their own key pairs, and generate symmetric keys through key negotiation to ensure the strength of data encryption. The source system not only uses symmetric keys to encrypt data, but also uses its own private key to generate digital signatures for encrypted data, which increases the security level of data transmission. After verifying that the digital signature is correct, the transit platform is responsible for exchanging public keys with the destination system, and further encrypting the encrypted data with the destination system public key, and then sending it to the destination system. The destination system decrypts the data with its own private key, and then verifies the digital signature with the source system public key, ensuring the integrity of the data and the identity of the sender. Finally, the transit platform securely sends the symmetric key to the destination system to unlock the encrypted data and achieve secure data transmission.
本申请方案中利用了对称和非对称加密的优点,结合数字签名确保了数据传输的机密性、完整性和发送方身份的真实性,中转平台的介入,减轻了密钥管理的复杂性,同时降低了直接密钥交换的安全风险,确保了整个传输过程的高效性和安全性,从而有效减少或避免大规模数据泄露的事件发生,极大的提高数据传输的安全性。The present application scheme utilizes the advantages of symmetric and asymmetric encryption, and combines digital signatures to ensure the confidentiality, integrity and authenticity of data transmission. The intervention of the transit platform reduces the complexity of key management, while reducing the security risks of direct key exchange, ensuring the efficiency and security of the entire transmission process, thereby effectively reducing or avoiding large-scale data leakage incidents and greatly improving the security of data transmission.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments 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 an embodiment of the data circulation processing method of the present application;
图2为本申请数据流通处理方法一个实施例S201至S209部分内容的流程示意图;FIG2 is a flow chart of a portion of S201 to S209 of an embodiment of the data circulation processing method of the present application;
图3为本申请数据流通处理方法一个实施例S209至S214部分内容的流程示意图;FIG3 is a flow chart of a portion of S209 to S214 of an embodiment of the data circulation processing method of the present application;
图4为本申请数据流通处理方法一个实施例S301至S309部分内容的流程示意图;FIG4 is a flow chart of a portion of S301 to S309 of an embodiment of the data circulation processing method of the present application;
图5为本申请数据流通处理方法一个实施例S309至S313部分内容的流程示意图;FIG5 is a flow chart of a portion of contents from S309 to S313 of an embodiment of the data circulation processing method of the present application;
图6为本申请数据流通处理方法一个实施例S401至S409部分内容的流程示意图;FIG6 is a flowchart of a portion of S401 to S409 of an embodiment of the data circulation processing method of the present application;
图7为本申请数据流通处理方法一个实施例S409至S413部分内容的流程示意图;FIG. 7 is a flow chart showing a portion of contents from S409 to S413 of an embodiment of the data circulation processing method of the present application;
图8为本申请数据流通处理方法一个实施例S501至S510部分内容的流程示意图;FIG8 is a flowchart of a portion of S501 to S510 of an embodiment of the data circulation processing method of the present application;
图9为本申请数据流通处理方法一个实施例S511至S513部分内容的流程示意图;FIG9 is a flow chart showing a portion of contents from S511 to S513 of an embodiment of the data circulation processing method of the present application;
图10为本申请数据流通处理系统的一个实施例示意图;FIG10 is a schematic diagram of an embodiment of the data circulation processing system of the present application;
图11为本申请数据流通处理装置的一个实施例示意图。FIG. 11 is a schematic diagram of an embodiment of a data circulation processing device of the present application.
具体实施方式DETAILED DESCRIPTION
请参阅图1,本申请首先提供了一个数据流通处理方法的一个实施例,所述数据流通处理方法应用在源系统、中转平台和目的地系统,该实施例包括:Please refer to FIG. 1 . The present application first provides an embodiment of a data flow processing method. The data flow processing method is applied to a source system, a transfer platform, and a destination system. The embodiment includes:
S101、所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;S101, the source system, the transit platform and the destination system generate a source system key pair, a transit platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transit platform key pair includes a transit platform public key and a transit platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
在本申请实施例中,首先对系统中的组成进行介绍:In the embodiment of the present application, the components in the system are first introduced:
源系统:需要将数据安全传输至中转平台的多个系统或平台;Source system: multiple systems or platforms that need to securely transfer data to the transit platform;
中转平台:负责接收、认证、加密和传输数据的平台;Transfer platform: a platform responsible for receiving, authenticating, encrypting and transmitting data;
目的地系统:从中转平台接收经过加密处理的数据的目的地系统。Destination system: The destination system that receives encrypted data from the transit platform.
在源系统、中转平台和目的地系统进行数据流通处理之前,首先源系统、中转平台和目的地系统首先生成各位的密钥对,其中,密钥对生成通常涉及到非对称加密技术,其中最常用的方法包括:Before the source system, transit platform and destination system process data, they first generate their own key pairs. The key pair generation usually involves asymmetric encryption technology, the most commonly used methods of which include:
RSA (Rivest-Shamir-Adleman):是最早和最广泛使用的非对称加密算法之一,RSA 是基于一个简单的数论事实,将两个大质数相乘是容易的,但是对其乘积进行因数分解却极其困难,RSA算法的安全性建立在大数分解问题的难度上。RSA (Rivest-Shamir-Adleman): is one of the earliest and most widely used asymmetric encryption algorithms. RSA is based on a simple number theory fact: it is easy to multiply two large prime numbers, but it is extremely difficult to factorize their product. The security of the RSA algorithm is based on the difficulty of the large number factorization problem.
ECC (Elliptic Curve Cryptography):相比于RSA,ECC可以提供相同级别的安全性,同时使用更短的密钥长度,这意味着更快的处理速度和更低的资源消耗。ECC (Elliptic Curve Cryptography): Compared to RSA, ECC can provide the same level of security while using a shorter key length, which means faster processing speed and lower resource consumption.
DSA (Digital Signature Algorithm):是一种标准的数字签名算法,也可以用于生成密钥对。它基于模素数的离散对数问题,特别适合用于签名验证过程。DSA (Digital Signature Algorithm): is a standard digital signature algorithm that can also be used to generate key pairs. It is based on the discrete logarithm problem modulo prime numbers and is particularly suitable for signature verification.
Diffie-Hellman密钥交换协议:虽然它本身不直接生成密钥对,但它允许两个无先前共享秘密的通信方,在不安全的通信渠道上生成一个共同的秘密密钥,这个密钥可以用于后续的通信加密。Diffie-Hellman key exchange protocol: Although it does not directly generate a key pair itself, it allows two communicating parties without previously shared secrets to generate a common secret key over an insecure communication channel, which can be used to encrypt subsequent communications.
生成密钥对的过程通常涉及以下步骤:The process of generating a key pair generally involves the following steps:
选择算法:首先根据安全需求和应用环境选择一个非对称加密算法;Select an algorithm: First, select an asymmetric encryption algorithm based on security requirements and application environment;
生成参数:对于例如ECC和DSA算法中,必须首先生成或选择一组适当的参数;Generate parameters: For algorithms such as ECC and DSA, an appropriate set of parameters must first be generated or selected;
生成密钥对:使用选择的算法和参数生成一对密钥,其中一个被称为公钥,另一个被称为私钥,公钥可以公开分享,而私钥必须保密。Generate a key pair: Generate a pair of keys using the selected algorithm and parameters, one of which is called a public key and the other is called a private key. The public key can be shared publicly, while the private key must be kept secret.
对于上述密钥对的生成方法,源系统、中转平台和目的地系统可根据实际情况自行选择对应的密钥对生成方法来生成密钥对,优选的,在本申请中,为方便后续密钥对之间的加密和解密,本申请优选的选用ECC椭圆加密算法生成密钥对。其中,生成的源系统密钥对中包含源系统公钥和源系统私钥,源系统公钥是公开的,源系统私钥为私密的,仅保存在源系统中;生成的中转平台密钥对中包含中转平台公钥和中转平台私钥,中转平台公钥是公开的,中转平台私钥为私密,仅保存在中转平台中;同样的,生成的目的地系统密钥对中包含目的地系统公钥和目的地系统私钥,目的地系统公钥是公开的,目的地系统私钥为私密,仅保存在目的地系统中。For the above-mentioned key pair generation method, the source system, the transfer platform and the destination system can select the corresponding key pair generation method to generate the key pair according to the actual situation. Preferably, in this application, in order to facilitate the subsequent encryption and decryption between key pairs, this application preferably uses the ECC elliptic encryption algorithm to generate the key pair. Among them, the generated source system key pair contains the source system public key and the source system private key. The source system public key is public, and the source system private key is private and is only stored in the source system; the generated transfer platform key pair contains the transfer platform public key and the transfer platform private key. The transfer platform public key is public, and the transfer platform private key is private and is only stored in the transfer platform; similarly, the generated destination system key pair contains the destination system public key and the destination system private key. The destination system public key is public, and the destination system private key is private and is only stored in the destination system.
以上获取得到的公钥均可对外公开,但是对应的私钥均保存在各种的系统中,不会对外公开。The public keys obtained above can be made public, but the corresponding private keys are stored in various systems and will not be made public.
S102、所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;S102: The source system and the transfer platform exchange the source system public key and the transfer platform public key;
S103、所述中转平台和所述源系统进行密钥协商以生成对称密钥;S103: The transfer platform and the source system perform key negotiation to generate a symmetric key;
在本申请实施例中,当源系统和中转平台均生成各种的密钥对之后,进一步的,源系统为安全的将目标数据传输至中转平台,以使得中转平台将目标数据传输至目的地系统中,源系统首先会与源系统进行密钥协商以生成对称密钥,生成的对称密钥仅是在中转平台和源系统之间传输,具体的,对于对称密钥的生成可参考如下方法:In the embodiment of the present application, after the source system and the transit platform have generated various key pairs, further, in order to safely transmit the target data to the transit platform, so that the transit platform transmits the target data to the destination system, the source system will first negotiate a key with the source system to generate a symmetric key. The generated symmetric key is only transmitted between the transit platform and the source system. Specifically, the generation of the symmetric key can refer to the following method:
Diffie-Hellman密钥交换:这是一种非常流行的方法,允许双方在没有共享秘密的情况下通过不安全的通道安全地生成对称密钥。Diffie-Hellman key exchange: This is a very popular method that allows two parties to securely generate symmetric keys over an insecure channel without a shared secret.
RSA密钥交换:一方可以生成一个临时的RSA密钥对,并将RSA密钥对中的公钥发送给另一方,接收方使用这个公钥加密对称密钥,并将其发送回去。RSA key exchange: One party can generate a temporary RSA key pair and send the public key in the RSA key pair to the other party. The recipient uses this public key to encrypt the symmetric key and send it back.
预共享密钥协商:双方会预先共享一个密钥,这个预共享密钥可以直接作为对称密钥使用,或用于在不安全的通道上安全地协商新的密钥。Pre-shared key negotiation: Both parties will share a key in advance. This pre-shared key can be used directly as a symmetric key or used to securely negotiate a new key over an insecure channel.
传输层安全性协议:尽管TLS通常用于客户端和服务器之间的安全通信,但它也可以用于安全的密钥协商。Transport Layer Security: Although TLS is often used for secure communications between clients and servers, it can also be used for secure key negotiation.
量子密钥分发:QKD代表了一种利用量子力学原理来生成并分配绝对安全的密钥对的方法。Quantum Key Distribution: QKD represents a method that uses the principles of quantum mechanics to generate and distribute absolutely secure key pairs.
在实际应用中,选择哪一种密钥协商方法取决于具体的安全需求、性能要求以及双方的能力,例如,在计算资源受限的环境中,会选择更加轻量级的密钥协商方法,而在需要极高安全保证的情况下,则会采用更加复杂的协议。In practical applications, the choice of key negotiation method depends on the specific security requirements, performance requirements, and the capabilities of both parties. For example, in an environment with limited computing resources, a more lightweight key negotiation method will be chosen, while in situations where extremely high security guarantees are required, a more complex protocol will be used.
在本申请中,中转平台和源系统可根据对应的方法生成对称密钥,在生成对称密钥之后,进一步的执行步骤S104。In the present application, the transit platform and the source system may generate a symmetric key according to a corresponding method, and after generating the symmetric key, further execute step S104.
S104、所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名;S104, the source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature;
在本申请实施例中,当源系统和中转平台生成对称密钥之后,进一步的,源系统调取出需要发送至目的地系统的目标数据,并使用跟中转平台协商生成的对称密钥对目标数据进行加密得到加密数据,具体的,首先要确保加密数据是加密算法可以处理的形式,需要先进行数据压缩以减少加密数据的大小,若要加密的加密数据大小不符合加密算法的要求,则需要进行填充,以使数据符合加密算法块的大小要求。然后选定的对称加密算法和对称密钥对目标数据进行加密,加密完成后,生成的加密数据可以安全地存储在源系统中。进一步的,为保证传输到中转平台之后,加密数据的完整性和安全性,源系统会使用源系统私钥在加密数据上进行加密,并生成数字签名,具体的,源系统对加密数据使用哈希函数生成唯一的哈希值,哈希函数设计为单向函数,对于任何给定的数据都会产生一个固定长度的,独一无二的哈希值,但从哈希值不能反向推导出原始数据,在获取到加密数据的哈希值之后,源系统使用源系统私钥对哈希值进行加密,生成所谓的数字签名。在这一步骤中,源系统私钥作为加密的密钥,确保了只有拥有对应公钥的接收者才能验证签名,即只有源系统公钥才可解密哈希值。In an embodiment of the present application, after the source system and the transfer platform generate a symmetric key, the source system further retrieves the target data that needs to be sent to the destination system, and uses the symmetric key generated by negotiation with the transfer platform to encrypt the target data to obtain encrypted data. Specifically, it is necessary to first ensure that the encrypted data is in a form that can be processed by the encryption algorithm. Data compression is required to reduce the size of the encrypted data. If the size of the encrypted data to be encrypted does not meet the requirements of the encryption algorithm, padding is required to make the data meet the size requirements of the encryption algorithm block. Then the selected symmetric encryption algorithm and symmetric key encrypt the target data. After the encryption is completed, the generated encrypted data can be safely stored in the source system. Furthermore, to ensure the integrity and security of the encrypted data after it is transmitted to the transit platform, the source system will use the source system private key to encrypt the encrypted data and generate a digital signature. Specifically, the source system uses a hash function to generate a unique hash value for the encrypted data. The hash function is designed as a one-way function. For any given data, a unique hash value of a fixed length will be generated, but the original data cannot be reversely derived from the hash value. After obtaining the hash value of the encrypted data, the source system uses the source system private key to encrypt the hash value and generate the so-called digital signature. In this step, the source system private key is used as the encryption key to ensure that only the recipient with the corresponding public key can verify the signature, that is, only the source system public key can decrypt the hash value.
S105、所述源系统将所述加密数据和所述数字签名发送至所述中转平台;S105, the source system sends the encrypted data and the digital signature to the transfer platform;
在本申请实施例中,源系统在获取到加密数据和对应的数字签名之后,为安全的将加密数据和数字签名传输到中转平台中,源系统与中转平台之间会搭建专门的数据传输通道,该数据传输通道可基于对称算法生成,确定在进行数据传输时,仅有源系统和中转平台之间进行通信,然后源系统将加密数据和数字签名共同打包后发送至中转平台。In an embodiment of the present application, after the source system obtains the encrypted data and the corresponding digital signature, in order to safely transmit the encrypted data and the digital signature to the transit platform, a dedicated data transmission channel will be established between the source system and the transit platform. The data transmission channel can be generated based on a symmetric algorithm to ensure that only communication is performed between the source system and the transit platform during data transmission. The source system then packages the encrypted data and the digital signature together and sends them to the transit platform.
S106、所述中转平台使用所述源系统公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;S106, the transfer platform verifies the digital signature using the source system public key, and after determining the integrity of the target encrypted data, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system;
在本申请实施中,在中转平台接收到源系统发送的加密数据和对应的数字签名之后,为进一步验证在传输过程中加密数据未被解密或未被串改,保证加密数据的完整性,需要进一步对数字签名进行验证,由于源系统是使用源系统私钥对加密数据加密生成数字签名,因此仅可通过源系统公钥进行验证,具体的,中转平台将目标数据和数字签名进行分离,然后使用源系统公钥对数字签名进行解密,得到哈希值,由于源系统公钥和源系统私钥是一对匹配的密钥对,因此使用源系统公钥能成功解密源系统私钥加密的签名,从而得到原始的哈希值,进一步的,中转系统重新计算加密数据的哈希值,最后,源系统比较解密得到的哈希值和重新计算的哈希值,当确定两个哈希值相同,说明数据在传输过程中未被篡改,并且确定加密数据是来自源系统。In the implementation of this application, after the transit platform receives the encrypted data and the corresponding digital signature sent by the source system, in order to further verify that the encrypted data has not been decrypted or tampered with during the transmission process and to ensure the integrity of the encrypted data, it is necessary to further verify the digital signature. Since the source system uses the source system private key to encrypt the encrypted data to generate a digital signature, it can only be verified by the source system public key. Specifically, the transit platform separates the target data and the digital signature, and then uses the source system public key to decrypt the digital signature to obtain a hash value. Since the source system public key and the source system private key are a matching pair of key pairs, the source system public key can be used to successfully decrypt the signature encrypted by the source system private key, thereby obtaining the original hash value. Furthermore, the transit system recalculates the hash value of the encrypted data. Finally, the source system compares the decrypted hash value and the recalculated hash value. When it is determined that the two hash values are the same, it means that the data has not been tampered with during transmission, and it is determined that the encrypted data comes from the source system.
当源系统确定加密数据的完整性之后,中转平台会暂存加密数据,并依据加密数据上的标识确定接入中转平台的目的地系统,待确定目的地系统之后,中转平台与目的地系统进行目的地系统公钥和中转平台公钥的交换,即中转平台将中转平台公钥发送至目的地系统中,待目的地系统接收到中转平台公钥之后,根据中转平台公钥上的标识或IP地址,目的地系统将目的地系统公钥发送至中转平台中,以此完成双方的公钥交换。After the source system determines the integrity of the encrypted data, the transit platform will temporarily store the encrypted data and determine the destination system connected to the transit platform based on the identifier on the encrypted data. After the destination system is determined, the transit platform and the destination system exchange the destination system public key and the transit platform public key, that is, the transit platform sends the transit platform public key to the destination system. After the destination system receives the transit platform public key, the destination system sends the destination system public key to the transit platform based on the identifier or IP address on the transit platform public key, thereby completing the public key exchange between the two parties.
S107、所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统公钥发送至所述目的地系统;S107, the transfer platform uses the destination system public key to encrypt the encrypted data to obtain target encrypted data, and sends the target encrypted data and the source system public key to the destination system;
在本申请实施例中,中转平台与目的地系统建立通信连接,并完成中转平台公钥和中转平台私钥的交换之后,中转平台使用得到的目的地系统公钥对加密数据进行加密,然后得到目标加密数据,其中,需要说明的是,中转平台使用目的地系统公钥对加密数据进行加密的方法与前述源系统对目标数据进行加密得到加密数据的方法类似,在此不再赘述,可根据实际情况进行选择。中转平台在得到目标加密数据之后,进一步的将目标加密数据和源系统公钥一起发送至目的地系统中。In the embodiment of the present application, after the transfer platform establishes a communication connection with the destination system and completes the exchange of the transfer platform public key and the transfer platform private key, the transfer platform uses the obtained destination system public key to encrypt the encrypted data, and then obtains the target encrypted data, where it should be noted that the method by which the transfer platform uses the destination system public key to encrypt the encrypted data is similar to the method by which the source system encrypts the target data to obtain the encrypted data, which will not be described in detail here, and can be selected according to the actual situation. After obtaining the target encrypted data, the transfer platform further sends the target encrypted data and the source system public key to the destination system.
S108、所述目的地系统使用所述目的地系统私钥解密所述目标加密数据得到所述加密数据;S108, the destination system uses the destination system private key to decrypt the target encrypted data to obtain the encrypted data;
在本申请实施例中,目的地系统接收中转平台发送的目标加密数据和源系统公钥,然后将源系统公钥进行暂存处理,由于目标加密数据是在加密数据的基础上使用目的地系统公钥进行加密,因此,即使在中转平台和目的地系统传输过程中数据被盗取,不法分子也无法获取到真正的目标数据。目的地系统会使用独有的目的地系统私钥解密目标加密数据之后得到加密数据,需要说明的事,在加密数据上会有源系统生成的数字签名,在目的地系统打开加密数据之前,为进一步验证加密数据的完整性,保证加密数据在被目的地系统进一步加密之前未被篡改,进一步的,目的地系统需要对数字签名进行验证,执行步骤S109。In the embodiment of the present application, the destination system receives the target encrypted data and the source system public key sent by the transfer platform, and then temporarily stores the source system public key. Since the target encrypted data is encrypted using the destination system public key based on the encrypted data, even if the data is stolen during the transmission between the transfer platform and the destination system, the criminals cannot obtain the real target data. The destination system will use the unique destination system private key to decrypt the target encrypted data to obtain the encrypted data. It should be noted that there will be a digital signature generated by the source system on the encrypted data. Before the destination system opens the encrypted data, in order to further verify the integrity of the encrypted data and ensure that the encrypted data has not been tampered with before being further encrypted by the destination system, the destination system needs to verify the digital signature and execute step S109.
S109、所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;S109, the destination system verifies the digital signature on the encrypted data using the source system public key;
在本申请实施例中,目的地系统将源系统公钥调出,并对加密数据上的数字签名进行验证,对于数字签名的验证过程,可参考前述中转平台使用源系统公钥验证数字签名的过程,在此不再赘述。In an embodiment of the present application, the destination system calls out the source system public key and verifies the digital signature on the encrypted data. For the digital signature verification process, reference can be made to the aforementioned transfer platform using the source system public key to verify the digital signature process, which will not be repeated here.
S110、在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统,以使得所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。S110. After successful verification, the transfer platform sends the symmetric key pair to the destination system, so that the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
在本申请实施例中,在目的地系统确定加密数据上的数字签名验证成功之后,进一步的,目的地系统将验证成功的反馈信息发送至中转平台,反馈信息包括加密数据的标识信息;之后中转平台根据反馈信息中的标识信息将对应的对称密钥调出,并将对应的对称密钥发送至目的地系统,以使得目的地系统使用对称密钥解锁加密数据,从而得到源系统传输的目标数据。In an embodiment of the present application, after the destination system determines that the digital signature verification on the encrypted data is successful, the destination system further sends feedback information of the verification success to the transfer platform, and the feedback information includes identification information of the encrypted data; thereafter, the transfer platform calls out the corresponding symmetric key according to the identification information in the feedback information, and sends the corresponding symmetric key to the destination system, so that the destination system uses the symmetric key to unlock the encrypted data, thereby obtaining the target data transmitted by the source system.
对于数据流通处理方法的处理过程的代码示例可参考以下内容:For code examples of the data flow processing method, please refer to the following:
import hashlibimport hashlib
import hmacimport hmac
from cryptography.hazmat.primitives import serializationfrom cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsafrom cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import hashesfrom cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import paddingfrom cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives.ciphers import Cipher,algorithms, modesfrom cryptography.hazmat.primitives.ciphers import Cipher,algorithms, modes
from cryptography.hazmat.primitives import padding as symmetric_paddingfrom cryptography.hazmat.primitives import padding as symmetric_padding
# 生成密钥对# Generate a key pair
def generate_key_pair():def generate_key_pair():
private_key =rsa.generate_private_key(public_exponent=65537, key_size=2048)private_key =rsa.generate_private_key(public_exponent=65537, key_size=2048)
public_key = private_key.public_key()public_key = private_key.public_key()
return private_key, public_keyreturn private_key, public_key
# 密钥交换# Key Exchange
def exchange_public_keys(source_system, relay_platform):def exchange_public_keys(source_system, relay_platform):
source_system.public_key = relay_platform.public_keysource_system.public_key = relay_platform.public_key
relay_platform.public_key = source_system.public_keyrelay_platform.public_key = source_system.public_key
# 密钥协商# Key negotiation
def negotiate_symmetric_key(source_system, relay_platform):def negotiate_symmetric_key(source_system, relay_platform):
symmetric_key = os.urandom(32)symmetric_key = os.urandom(32)
source_system.symmetric_key = symmetric_keysource_system.symmetric_key = symmetric_key
relay_platform.symmetric_key = symmetric_keyrelay_platform.symmetric_key = symmetric_key
return symmetric_keyreturn symmetric_key
# 加密目标数据# Encrypt target data
def encrypt_data(source_system, data):def encrypt_data(source_system, data):
cipher = Cipher(algorithms.AES(source_system.symmetric_key),modes.ECB())cipher = Cipher(algorithms.AES(source_system.symmetric_key),modes.ECB())
encryptor = cipher.encryptor()encryptor = cipher.encryptor()
padder =symmetric_padding.PKCS7(algorithms.AES.block_size).padder()padder =symmetric_padding.PKCS7(algorithms.AES.block_size).padder()
padded_data = padder.update(data) + padder.finalize()padded_data = padder.update(data) + padder.finalize()
encrypted_data = encryptor.update(padded_data) + encryptor.finalize()encrypted_data = encryptor.update(padded_data) + encryptor.finalize()
return encrypted_datareturn encrypted_data
# 生成数字签名# Generate digital signature
def sign_data(source_system, data):def sign_data(source_system, data):
signature = source_system.private_key.sign(signature = source_system.private_key.sign(
data,data,
padding.PSS(padding.PSS(
mgf=padding.MGF1(hashes.SHA256()),mgf=padding.MGF1(hashes.SHA256()),
salt_length=padding.PSS.MAX_LENGTHsalt_length=padding.PSS.MAX_LENGTH
),),
hashes.SHA256()hashes.SHA256()
))
return signaturereturn signature
# 验证数字签名# Verify digital signature
def verify_signature(destination_system, data, signature):def verify_signature(destination_system, data, signature):
try:try:
destination_system.public_key.verify(destination_system.public_key.verify(
signature,signature,
data,data,
padding.PSS(padding.PSS(
mgf=padding.MGF1(hashes.SHA256()),mgf=padding.MGF1(hashes.SHA256()),
salt_length=padding.PSS.MAX_LENGTHsalt_length=padding.PSS.MAX_LENGTH
),),
hashes.SHA256()hashes.SHA256()
))
return Truereturn True
except:except:
return Falsereturn False
# 解密数据# Decrypt data
def decrypt_data(destination_system, encrypted_data):def decrypt_data(destination_system, encrypted_data):
cipher = Cipher(algorithms.AES(destination_system.symmetric_key),modes.ECB())cipher = Cipher(algorithms.AES(destination_system.symmetric_key),modes.ECB())
decryptor = cipher.decryptor()decryptor = cipher.decryptor()
decrypted_data = decryptor.update(encrypted_data) +decryptor.finalize()decrypted_data = decryptor.update(encrypted_data) +decryptor.finalize()
unpadder = symmetric_padding.PKCS7(algorithms.AES.block_size).unpadder()unpadder = symmetric_padding.PKCS7(algorithms.AES.block_size).unpadder()
data = unpadder.update(decrypted_data) + unpadder.finalize()data = unpadder.update(decrypted_data) + unpadder.finalize()
return data.return data.
该代码示例中涉及到几个加密和数据传输的过程中,具体的,在数据传输的安全保障中,源系统、中转平台和目的地系统各自生成RSA密钥对,包括公钥和私钥,源系统与中转平台首先交换公钥,随后中转平台与目的地系统也进行公钥交换,源系统和中转平台通过协商生成一个对称密钥,用于对目标数据进行AES加密,源系统对加密数据使用自己的私钥生成数字签名,以确保数据的完整性和身份验证,加密数据和数字签名被发送至中转平台,中转平台使用源系统的公钥验证签名后,将加密数据转发给目的地系统,中转平台与目的地系统交换公钥,并对加密数据再次加密,增加保护层,目的地系统接收后,使用自己的私钥解密,得到原始加密数据,并使用源系统的公钥验证数字签名,验证成功后,中转平台将协商出的对称密钥传输给目的地系统,目的地系统使用该密钥解密加密数据,最终获得源系统传输的原始目标数据,这一流程通过加密和签名确保了数据在传输过程中的安全性和完整性。This code example involves several encryption and data transmission processes. Specifically, in the security of data transmission, the source system, the transit platform and the destination system each generate an RSA key pair, including a public key and a private key. The source system and the transit platform first exchange public keys, and then the transit platform and the destination system also exchange public keys. The source system and the transit platform generate a symmetric key through negotiation for AES encryption of the target data. The source system uses its own private key to generate a digital signature for the encrypted data to ensure the integrity and identity of the data. The encrypted data and the digital signature are sent to the transit platform. After the transit platform verifies the signature using the public key of the source system, it forwards the encrypted data to the destination system. The transit platform exchanges public keys with the destination system and encrypts the encrypted data again to increase the protection layer. After receiving the data, the destination system uses its own private key to decrypt it to obtain the original encrypted data, and uses the public key of the source system to verify the digital signature. After successful verification, the transit platform transmits the negotiated symmetric key to the destination system, and the destination system uses the key to decrypt the encrypted data to finally obtain the original target data transmitted by the source system. This process ensures the security and integrity of data during transmission through encryption and signature.
本申请数据流通处理方法有效地提升了数据传输的安全性和效率。具体来说,源系统、中转平台和目的地系统各自生成自己的密钥对,并通过密钥协商生成对称密钥,确保了数据加密的强度,源系统不仅使用对称密钥加密数据,还利用自己的私钥对加密数据生成数字签名,增加了数据传输的安全层级,且中转平台在验证数字签名无误后,负责与目的地系统交换公钥,并使用目的地系统公钥进一步加密已加密的数据,再将其发送给目的地系统,目的地系统通过自己的私钥解密数据,再用源系统公钥验证数字签名,确保了数据的完整性和发送方的身份验证,最后,中转平台将对称密钥安全地发送至目的地系统,以解锁加密数据,实现安全的数据传输。The data circulation processing method of this application effectively improves the security and efficiency of data transmission. Specifically, the source system, the transit platform and the destination system each generate their own key pairs, and generate symmetric keys through key negotiation to ensure the strength of data encryption. The source system not only uses symmetric keys to encrypt data, but also uses its own private key to generate digital signatures for encrypted data, which increases the security level of data transmission. After verifying that the digital signature is correct, the transit platform is responsible for exchanging public keys with the destination system, and further encrypting the encrypted data with the destination system public key, and then sending it to the destination system. The destination system decrypts the data with its own private key, and then verifies the digital signature with the source system public key, ensuring the integrity of the data and the identity of the sender. Finally, the transit platform securely sends the symmetric key to the destination system to unlock the encrypted data and achieve secure data transmission.
本申请方案中利用了对称和非对称加密的优点,结合数字签名确保了数据传输的机密性、完整性和发送方身份的真实性,中转平台的介入,减轻了密钥管理的复杂性,同时降低了直接密钥交换的安全风险,确保了整个传输过程的高效性和安全性,从而有效减少或避免大规模数据泄露的事件发生,极大的提高数据传输的安全性。The present application scheme utilizes the advantages of symmetric and asymmetric encryption, and combines digital signatures to ensure the confidentiality, integrity and authenticity of data transmission. The intervention of the transit platform reduces the complexity of key management, while reducing the security risks of direct key exchange, ensuring the efficiency and security of the entire transmission process, thereby effectively reducing or avoiding large-scale data leakage incidents and greatly improving the security of data transmission.
请参阅图2至图3,本申请提供了一个数据流通处理方法的另一个实施例,所述数据流通处理方法应用在源系统、中转平台和目的地系统,该实施例包括:Please refer to FIG. 2 to FIG. 3 , the present application provides another embodiment of a data flow processing method, the data flow processing method is applied to a source system, a transfer platform and a destination system, and the embodiment includes:
S201、所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;S201, the source system, the transit platform and the destination system generate a source system key pair, a transit platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transit platform key pair includes a transit platform public key and a transit platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
在本申请实施例中,对于源系统、中转平台和目的地系统生成对应的源系统密钥对、中转平台密钥对和目的地系统密钥对,具体的,是通过ECC椭圆曲线算法进行生成,对于使用ECC椭圆曲线算法生成的步骤和过程,现进行如下说明:In the embodiment of the present application, the corresponding source system key pair, transfer platform key pair and destination system key pair are generated for the source system, transfer platform and destination system. Specifically, they are generated by the ECC elliptic curve algorithm. The steps and processes of generating by using the ECC elliptic curve algorithm are now described as follows:
源系统密钥对的生成过程:The process of generating the source system key pair is as follows:
确定第一素数P1,P1是有限域的基础;Determine the first prime number P1, P1 is the basis of the finite field;
定义第一椭圆曲线:,其中,a和b是所述第一椭圆曲线方程上的曲线参数,a和b需满足以下条件:,以确保所述第一椭圆曲线上无奇点;Define the first elliptic curve: , where a and b are curve parameters on the first elliptic curve equation, and a and b must satisfy the following conditions: , to ensure that there is no singular point on the first elliptic curve;
在第一椭圆曲线上选择一个基点G1;Select a base point G1 on the first elliptic curve;
定义源系统私钥d1,d1是一个随机定义的一个正整数,d1的范围[1,n-1],其中n是基点G1的阶,即是最小的正整数n;Define the source system private key d1, d1 is a randomly defined positive integer, the range of d1 is [1, n-1], where n is the order of the base point G1, that is, the smallest positive integer n;
根据所述第一椭圆曲线上的点乘运算计算源系统公钥Q1,Q1=d1*G1;Calculate the source system public key Q1 according to the point multiplication operation on the first elliptic curve, Q1=d1*G1;
获取所述源系统公钥Q1和源系统私钥d1;Obtain the source system public key Q1 and the source system private key d1;
中转平台密钥对的生成过程:The process of generating the key pair of the transfer platform:
确定第二素数P2,P2是有限域的基础;Determine the second prime number P2, P2 is the basis of the finite field;
定义第二椭圆曲线:,其中,a和b是所述第二椭圆曲线方程上的曲线参数,a和b需满足以下条件:,以确保所述第二椭圆曲线上无奇点;Define the second elliptic curve: , where a and b are curve parameters on the second elliptic curve equation, and a and b must satisfy the following conditions: , to ensure that there is no singular point on the second elliptic curve;
在第二椭圆曲线上选择一个基点G2;Select a base point G2 on the second elliptic curve;
定义中转平台私钥d2,d2是一个随机定义的一个正整数,d2的范围[1,n-1],其中n是基点G2的阶,即是最小的正整数n;Define the transfer platform private key d2, d2 is a randomly defined positive integer, the range of d2 is [1, n-1], where n is the order of the base point G2, that is, the smallest positive integer n;
根据所述第二椭圆曲线上的点乘运算计算源系统公钥Q2,Q2=d2*G2;Calculate the source system public key Q2 according to the point multiplication operation on the second elliptic curve, Q2=d2*G2;
获取所述中转平台公钥Q2和中转平台私钥d2。Obtain the transfer platform public key Q2 and the transfer platform private key d2.
目的地系统密钥对的生成过程:The process of generating the destination system key pair is as follows:
确定第三素数P3,P3是有限域的基础;Determine the third prime number P3, which is the basis of the finite field;
定义第三椭圆曲线:,其中,a和b是所述第三椭圆曲线方程上的曲线参数,a和b需满足以下条件:,以确保所述第三椭圆曲线上无奇点;Define the third elliptic curve: , where a and b are curve parameters on the third elliptic curve equation, and a and b must satisfy the following conditions: , to ensure that there is no singular point on the third elliptic curve;
在第三椭圆曲线上选择一个基点G3;Select a base point G3 on the third elliptic curve;
定义目的地系统私钥d3,d3是一个随机定义的一个正整数,d3的范围[1,n-1],其中n是基点G3的阶,即是最小的正整数n;Define the destination system private key d3, where d3 is a randomly defined positive integer in the range [1, n-1], where n is the order of the base point G3, i.e. the smallest positive integer n;
根据所述第三椭圆曲线上的点乘运算计算源系统公钥Q3,Q3=d3*G3;Calculate the source system public key Q3 according to the point multiplication operation on the third elliptic curve, Q3=d3*G3;
获取所述目的地公钥Q3和所述目的地系统私钥d3。Acquire the destination public key Q3 and the destination system private key d3.
其中,需要说明的是,对于生成源系统密钥对,中转平台密钥对和目的地系统密钥对的第一椭圆曲线、第二椭圆曲线和第三椭圆曲线之间,可采用相同的椭圆曲线方程也可使用不同的椭圆曲线方程,可通过调整椭圆曲线方程上的a和b进行选定。Among them, it should be noted that for generating the source system key pair, the first elliptic curve, the second elliptic curve and the third elliptic curve of the transit platform key pair and the destination system key pair, the same elliptic curve equation can be used or different elliptic curve equations can be used, which can be selected by adjusting a and b on the elliptic curve equation.
尽管均是采用ECC椭圆曲线算法计算对应的密钥对,但生成的源系统密钥对、中转平台密钥对和目的地系统密钥对均不相同,以使得在后续进行加密和传输过程中进行有效的区分。在获取得到源系统密钥对、中转平台密钥对和目的地系统密钥对之后,执行步骤S202。Although the ECC elliptic curve algorithm is used to calculate the corresponding key pair, the generated source system key pair, transfer platform key pair and destination system key pair are all different, so that they can be effectively distinguished during the subsequent encryption and transmission process. After obtaining the source system key pair, transfer platform key pair and destination system key pair, step S202 is executed.
S202、所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;S202: The source system and the transfer platform exchange the source system public key and the transfer platform public key;
在本申请实施例中,当源系统和中转平台均生成各种的密钥对之后,进一步的,源系统为安全的将目标数据传输至中转平台,以使得中转平台将目标数据传输至目的地系统中,源系统首先会与源系统进行密钥协商以生成对称密钥,生成的对称密钥仅是在中转平台和源系统之间传输,具体的,对于对称密钥的生成可参考如下方法:In the embodiment of the present application, after the source system and the transit platform have generated various key pairs, further, in order to safely transmit the target data to the transit platform, so that the transit platform transmits the target data to the destination system, the source system will first negotiate a key with the source system to generate a symmetric key. The generated symmetric key is only transmitted between the transit platform and the source system. Specifically, the generation of the symmetric key can refer to the following method:
Diffie-Hellman密钥交换:这是一种非常流行的方法,允许双方在没有共享秘密的情况下通过不安全的通道安全地生成对称密钥。Diffie-Hellman key exchange: This is a very popular method that allows two parties to securely generate symmetric keys over an insecure channel without a shared secret.
RSA密钥交换:一方可以生成一个临时的RSA密钥对,并将RSA密钥对中的公钥发送给另一方,接收方使用这个公钥加密对称密钥,并将其发送回去。RSA key exchange: One party can generate a temporary RSA key pair and send the public key in the RSA key pair to the other party. The recipient uses this public key to encrypt the symmetric key and send it back.
预共享密钥协商:双方会预先共享一个密钥,这个预共享密钥可以直接作为对称密钥使用,或用于在不安全的通道上安全地协商新的密钥。Pre-shared key negotiation: Both parties will share a key in advance. This pre-shared key can be used directly as a symmetric key or used to securely negotiate a new key over an insecure channel.
传输层安全性协议:尽管TLS通常用于客户端和服务器之间的安全通信,但它也可以用于安全的密钥协商。Transport Layer Security: Although TLS is often used for secure communications between clients and servers, it can also be used for secure key negotiation.
量子密钥分发:QKD代表了一种利用量子力学原理来生成并分配绝对安全的密钥对的方法。Quantum Key Distribution: QKD represents a method that uses the principles of quantum mechanics to generate and distribute absolutely secure key pairs.
在实际应用中,选择哪一种密钥协商方法取决于具体的安全需求、性能要求以及双方的能力,例如,在计算资源受限的环境中,会选择更加轻量级的密钥协商方法,而在需要极高安全保证的情况下,则会采用更加复杂的协议,在本申请中,中转平台和源系统可根据对应的方法生成对称密钥。In actual applications, the choice of key negotiation method depends on the specific security requirements, performance requirements and capabilities of both parties. For example, in an environment with limited computing resources, a more lightweight key negotiation method will be selected, while in situations where extremely high security guarantees are required, a more complex protocol will be used. In this application, the transit platform and the source system can generate symmetric keys according to the corresponding methods.
S203、所述源系统根据所述中转平台公钥对认证信息进行加密,并将加密后的认证信息发送至所述中转平台;S203, the source system encrypts the authentication information according to the transfer platform public key, and sends the encrypted authentication information to the transfer platform;
在本申请实施例中,源系统在将源系统公钥发送至中转平台,中转平台将中转平台公钥发送至源系统之后,进一步的,在源系统与中转平台进行通信之前,双方需要先进行验证,具体的,源系统使用得到的中转平台公钥对认证信息进行加密,具体的,可使用ECC椭圆曲线算法或其他对称算法进行加密,通过此过程是为了保证源系统与中转平台之间的交互独立性,即使认证信息被第三方获取,但由于第三方不存在中转平台私钥,因此无法准确的获取认证信息,从而也就无法得到是哪一个源系统正在与中转平台进行交互,起到隐蔽并保护源系统的作用。源系统将认证信息通过中转平台公钥进行加密之后,并将加密后的认证信息发送至中转平台中,从而进行下一步的认证过程。In an embodiment of the present application, after the source system sends the source system public key to the transfer platform, and the transfer platform sends the transfer platform public key to the source system, further, before the source system and the transfer platform communicate, both parties need to verify first. Specifically, the source system uses the obtained transfer platform public key to encrypt the authentication information. Specifically, the ECC elliptic curve algorithm or other symmetric algorithms can be used for encryption. This process is to ensure the interaction independence between the source system and the transfer platform. Even if the authentication information is obtained by a third party, the third party cannot accurately obtain the authentication information because it does not have the transfer platform private key, and thus cannot obtain which source system is interacting with the transfer platform, which plays a role in concealing and protecting the source system. After the source system encrypts the authentication information using the transfer platform public key, and sends the encrypted authentication information to the transfer platform, the next step of the authentication process is carried out.
S204、所述中转平台使用所述中转平台私钥对所述认证信息进行解密;S204, the transfer platform uses the transfer platform private key to decrypt the authentication information;
在本申请实施例中,中转平台在接收到认证信息之后,进一步的,当中转平台获知是从源系统上获取时,则中转平台直接调用中转平台私钥,并使用中转平台私钥对认证信息进行解密,从而得到认证信息的内容,在该认证信息中包括但不限于以下信息:源系统的IP地址、源系统所要传输的数据类型、源系统的认证信息类型等。In an embodiment of the present application, after receiving the authentication information, the transit platform further, when the transit platform learns that it is obtained from the source system, the transit platform directly calls the transit platform private key, and uses the transit platform private key to decrypt the authentication information, thereby obtaining the content of the authentication information, which includes but is not limited to the following information: the IP address of the source system, the type of data to be transmitted by the source system, the authentication information type of the source system, etc.
S205、当所述中转平台验证所述认证信息正确之后,所述中转平台和所述源系统进行密钥协商以生成对称密钥;S205: After the transfer platform verifies that the authentication information is correct, the transfer platform and the source system perform key negotiation to generate a symmetric key;
在本申请实施例中,当中转平台确定认证信息正确之后,源系统与中转平台之间则构建对应的数据传输通道,以使得中转平台与源系统之间进行秘钥协商以生成对称密钥,生成对称密钥的过程可参照如下方式:In the embodiment of the present application, after the transit platform determines that the authentication information is correct, a corresponding data transmission channel is established between the source system and the transit platform, so that the transit platform and the source system perform key negotiation to generate a symmetric key. The process of generating the symmetric key can refer to the following method:
中转平台和源系统选定目标椭圆曲线以及目标椭圆曲线上的一个基点G,其中,该目标椭圆曲线是中转平台和源系统共同选定,该基点则是一个随机的点数,且该基点G是双方均认同的。然后中转平台随机选择一个私钥dA,并计算相应的公钥QA = dA times G,其中G是基点,“times”表示乘法操作,"dA times G"可以理解为"将dA乘以G",用于进行数学运算,计算QA的值,之后出现的“times”与此相同,之后不做赘述。接着中转平台将公钥QA发送给源系统;源系统随机选择一个私钥dB,并计算相应的公钥QB = dB times G,其中G是基点;源系统将公钥QB发送给所述中转平台;The transfer platform and the source system select the target elliptic curve and a base point G on the target elliptic curve, where the target elliptic curve is jointly selected by the transfer platform and the source system, and the base point is a random point number, and the base point G is recognized by both parties. Then the transfer platform randomly selects a private key dA and calculates the corresponding public key QA = dA times G, where G is the base point, and "times" represents the multiplication operation. "dA times G" can be understood as "multiplying dA by G", which is used to perform mathematical operations and calculate the value of QA. The "times" that appear later are the same and will not be repeated. Then the transfer platform sends the public key QA to the source system; the source system randomly selects a private key dB and calculates the corresponding public key QB = dB times G, where G is the base point; the source system sends the public key QB to the transfer platform;
中转平台使用私钥dA和公钥QB计算共享密钥S = dAtimesQB);源系统使用私钥dB和公钥QA计算共享密钥S = dBtimesQA;根据算法原理可知,中转平台和源系统计算得到的共享密钥S是相同的,为进一步提高共享密钥的安全性,源系统和中转平台使用共享密钥S作为种子,并通过共享密钥派生函数KDF生成对称密钥。The transit platform uses the private key dA and the public key QB to calculate the shared key S = dAtimesQB); the source system uses the private key dB and the public key QA to calculate the shared key S = dBtimesQA; according to the algorithm principle, the shared key S calculated by the transit platform and the source system is the same. To further improve the security of the shared key, the source system and the transit platform use the shared key S as a seed and generate a symmetric key through the shared key derivation function KDF.
进一步的:在通过共享密钥派生函数KDF生成对称密钥中,具体可参照如下方法:Further: In generating a symmetric key by using a shared key derivation function KDF, the following method may be specifically referred to:
首先确定HMAC的密钥派生函数,并为HMAC的密钥派生函数设置迭代次数和密钥长度信息,对于迭代次数和密钥长度信息,可预先进行选定,选定后的信息是双方均认同的,之后选定目标随机数D,并将目标随机数D、共享密钥S、预先设定的迭代次数信息和密钥长度信息输入HMAC的密钥派生函数中进行派生处理,在经过派生处理之后得到对称密钥。First, determine the key derivation function of HMAC, and set the number of iterations and key length information for the key derivation function of HMAC. The number of iterations and key length information can be selected in advance, and the selected information is recognized by both parties. Then select the target random number D, and input the target random number D, shared key S, pre-set number of iterations and key length information into the key derivation function of HMAC for derivation processing. After the derivation processing, the symmetric key is obtained.
S206、所述源系统计算所述目标数据的哈希值,并将哈希值与所述对称密钥结合生成目标对称密钥;S206. The source system calculates a hash value of the target data, and combines the hash value with the symmetric key to generate a target symmetric key;
在本申请实施例中,源系统与中转平台共同协商生成对称密钥之后,对称密钥会保存在源系统和中转平台中,双方均可进行调用,并使用对称密钥进行后续的会话通信或数据传输。具体的,为进一步提高数据传输的安全性,源系统首先计算目标数据的哈希值,并将哈希值与对称密钥结合后生成目标对称密钥,由于在对称密钥的基础上再结合哈希值生成的目标对称密钥会具有很强的安全性,哈希值是由散列函数生成的一个固定大小的数字,通常是一串字母和数字的组合,它是任意大小的数据的数字“指纹”或“摘要”,散列函数的设计使得它能将不定长度的输入数据映射到固定长度的输出,且哈希值具有不可逆性,两者结合之后可生成强安全性的目标对称密钥。In the embodiment of the present application, after the source system and the transit platform jointly negotiate to generate a symmetric key, the symmetric key will be stored in the source system and the transit platform, and both parties can call it and use the symmetric key for subsequent session communication or data transmission. Specifically, in order to further improve the security of data transmission, the source system first calculates the hash value of the target data, and combines the hash value with the symmetric key to generate a target symmetric key. Since the target symmetric key generated by combining the hash value on the basis of the symmetric key will have strong security, the hash value is a fixed-size number generated by a hash function, usually a combination of a string of letters and numbers. It is a digital "fingerprint" or "summary" of data of any size. The design of the hash function enables it to map input data of indefinite length to output of fixed length, and the hash value is irreversible. After the two are combined, a target symmetric key with strong security can be generated.
S207、所述源系统通过所述目标对称密钥对所述目标数据进行加密后得到所述加密数据;S207, the source system encrypts the target data using the target symmetric key to obtain the encrypted data;
在本申请实施例中,源系统在获取得到目标对称密钥之后,进一步的,会选择对应的密钥加密算法,如高级加密标准算法、数据加密标准算法和三重数据加密算法等,源系统使用目标对称密钥和所选的加密算法对目标数据进行加密,在这个过程中,目标数据在所选的加密算法和目标对称密钥的作用转换成了加密数据,在整个目标数据的加密过程通常涉及多个转换和替换步骤,这些步骤共同确保了目标数据的安全性。In an embodiment of the present application, after obtaining the target symmetric key, the source system will further select a corresponding key encryption algorithm, such as the Advanced Encryption Standard algorithm, the Data Encryption Standard algorithm, and the Triple Data Encryption algorithm, etc. The source system uses the target symmetric key and the selected encryption algorithm to encrypt the target data. In this process, the target data is converted into encrypted data under the action of the selected encryption algorithm and the target symmetric key. The entire target data encryption process usually involves multiple conversion and replacement steps, which together ensure the security of the target data.
S208、所述源系统计算所述加密数据的目标哈希值;S208, the source system calculates a target hash value of the encrypted data;
在本申请实施例中,源系统在获取到加密数据之后,进一步的,为提高加密数据传输至中转平台的完整性,并使得中转平台进行验证,具体的,源系统计算加密数据的目标哈希值,加密数据的目标哈希值可通过如下方式获取:In the embodiment of the present application, after the source system obtains the encrypted data, in order to improve the integrity of the encrypted data transmitted to the transit platform and enable the transit platform to verify it, specifically, the source system calculates the target hash value of the encrypted data. The target hash value of the encrypted data can be obtained in the following way:
一、所述源系统使用SHA-256算法和SHA-3算法分别计算所述加密数据的第一哈希值和第二哈希值;所述源系统将所述第一哈希值和所述第二哈希值结合后得到所述目标哈希值。1. The source system uses the SHA-256 algorithm and the SHA-3 algorithm to respectively calculate the first hash value and the second hash value of the encrypted data; the source system combines the first hash value and the second hash value to obtain the target hash value.
在本申请实施例中,源系统首先使用SHA-256算法计算出加密数据的第一哈希值之后,接着使用SHA-3算法计算出加密数据的第二哈希值,其中,In the embodiment of the present application, the source system first uses the SHA-256 algorithm to calculate the first hash value of the encrypted data, and then uses the SHA-3 algorithm to calculate the second hash value of the encrypted data, wherein:
通过结合SHA-256算法和SHA-3算法可以降低碰撞攻击的风险,SHA-256算法和SHA-3算法是基于不同的设计原理,SHA-256是基于Merkle-Damgård结构,而SHA-3是基于Keccak算法,它们对抗攻击的方式不同,这种多样性可以提供更多层次的安全保障,数据在传输或存储期间会遭受破坏,两个独立计算的哈希值可以提供更强的数据完整性检查,减少数据错误和篡改的风险。The risk of collision attacks can be reduced by combining the SHA-256 algorithm and the SHA-3 algorithm. The SHA-256 algorithm and the SHA-3 algorithm are based on different design principles. SHA-256 is based on the Merkle-Damgård structure, while SHA-3 is based on the Keccak algorithm. They have different ways of counteracting attacks. This diversity can provide more levels of security. Data can be damaged during transmission or storage. Two independently calculated hash values can provide stronger data integrity checks and reduce the risk of data errors and tampering.
在计算得到第一哈希值和第二哈希值之后,进一步的,源系统将第一哈希值和第二哈希值结合后得到目标哈希值,具体的,可通过串联的方式将第一哈希值和第二哈希值进行结合,当串联两个哈希值时,最终的目标哈希值的长度会是第一哈希值和第二哈希值长度的总和。After calculating the first hash value and the second hash value, the source system further combines the first hash value and the second hash value to obtain the target hash value. Specifically, the first hash value and the second hash value can be combined in series. When the two hash values are connected in series, the length of the final target hash value will be the sum of the lengths of the first hash value and the second hash value.
二、所述源系统将所述加密数据分成若干块数据,并分别计算每块数据的哈希值;所述源系统使用默克尔树来组合每块数据的哈希值以得到所述目标哈希值。2. The source system divides the encrypted data into several blocks of data and calculates the hash value of each block of data respectively; the source system uses a Merkle tree to combine the hash value of each block of data to obtain the target hash value.
在本申请实施例中,在将加密数据分成若干块数据,并分别计算每块数据的哈希值之后,应用默克尔树来组合每块数据的哈希值以得到目标哈希值,其中,默克尔树是一种二叉树,其中每个叶节点包含了数据块的哈希值,而非叶节点则存储着其子节点哈希值的组合,通过这种方式可验证数据的完整性。In an embodiment of the present application, after the encrypted data is divided into several blocks of data and the hash value of each block of data is calculated separately, a Merkle tree is applied to combine the hash value of each block of data to obtain a target hash value, wherein the Merkle tree is a binary tree in which each leaf node contains the hash value of the data block, and the non-leaf node stores a combination of the hash values of its child nodes. In this way, the integrity of the data can be verified.
具体的,在处理加密数据时,首先将数据分成若干块,每块的大小可以根据实际需求进行调整,这样做的好处是可以并行处理,提高数据处理效率。然后进一步计算每块数据的哈希值,哈希值是一种固定长度的字符串,它是对数据块内容的唯一标识,即使数据块的内容发生微小的改变,其哈希值也会发生显著的变化,这使得哈希值成为数据完整性和真实性的重要指标。Specifically, when processing encrypted data, the data is first divided into several blocks. The size of each block can be adjusted according to actual needs. The advantage of this is that it can be processed in parallel and improve data processing efficiency. Then the hash value of each block of data is further calculated. The hash value is a fixed-length string that uniquely identifies the content of the data block. Even if the content of the data block changes slightly, its hash value will change significantly, which makes the hash value an important indicator of data integrity and authenticity.
然后利用默克尔树的结构,将每块加密数据的哈希值作为叶节点,通过哈希函数组合相邻叶节点的哈希值,生成非叶节点的哈希值。这个过程一直向上进行,直到生成一个根节点,这个根节点的哈希值就是所谓的“目标哈希值”。这个目标哈希值是对整个数据集的一个简洁表示,它可以用来验证整个加密数据集的完整性和真实性。Then, using the structure of the Merkle tree, the hash value of each encrypted data block is used as a leaf node, and the hash values of adjacent leaf nodes are combined through a hash function to generate the hash value of the non-leaf node. This process continues upward until a root node is generated. The hash value of this root node is the so-called "target hash value." This target hash value is a concise representation of the entire data set, which can be used to verify the integrity and authenticity of the entire encrypted data set.
当需要验证加密数据时,只需计算目标哈希值并与原始的目标哈希值进行比较,如果两者一致,那么就说明加密数据在传输或存储过程中没有被篡改,保持了完整性,如果目标哈希值不一致,那则说明加密数据存在问题,需要进一步处理。通过这种使用默克尔树的方法,不仅提高了加密数据处理的效率,也保证了加密数据的安全性和完整性。When the encrypted data needs to be verified, the target hash value is calculated and compared with the original target hash value. If the two are consistent, it means that the encrypted data has not been tampered with during transmission or storage and maintains integrity. If the target hash value is inconsistent, it means that there is a problem with the encrypted data and further processing is required. This method of using the Merkle tree not only improves the efficiency of encrypted data processing, but also ensures the security and integrity of encrypted data.
三、所述源系统使用SHA-256算法计算所述加密数据的一类哈希值;所述源系统使用SHA-3算法计算所述源系统公钥和所述源系统私钥的二类哈希值和三类哈希值;所述源系统使用默克尔树来组合所述一类哈希值、所述二类哈希值和所述三类哈希值以得到所述目标哈希值;3. The source system uses the SHA-256 algorithm to calculate a first-class hash value of the encrypted data; the source system uses the SHA-3 algorithm to calculate a second-class hash value and a third-class hash value of the source system public key and the source system private key; the source system uses a Merkle tree to combine the first-class hash value, the second-class hash value and the third-class hash value to obtain the target hash value;
在本申请实施例中,源系统使用了SHA-256算法来计算加密数据的一类哈希值,SHA-256算法是一种先进的加密哈希算法,具有极高的安全性和稳定性,能够有效保证数据的完整性和真实性。通过这种算法,源系统能够将加密数据转化为一个固定长度的哈希值,这个哈希值具有唯一的标识性,即使原始数据发生微小的变化,也会导致哈希值发生显著的变化。In the embodiment of the present application, the source system uses the SHA-256 algorithm to calculate a type of hash value for encrypted data. The SHA-256 algorithm is an advanced cryptographic hash algorithm with extremely high security and stability, and can effectively ensure the integrity and authenticity of the data. Through this algorithm, the source system can convert the encrypted data into a hash value of a fixed length. This hash value has a unique identifier, and even if the original data changes slightly, the hash value will change significantly.
除了计算加密数据得到一类哈希值外,源系统还使用了SHA-3算法来计算源系统公钥和源系统私钥的二类哈希值和三类哈希值,通过对源系统公钥和源系统私钥进行哈希计算,源系统能够进一步确保数据传输的安全性,防止密钥被窃取或篡改。In addition to calculating the encrypted data to obtain the first type of hash value, the source system also uses the SHA-3 algorithm to calculate the second type of hash value and the third type of hash value of the source system public key and the source system private key. By performing hash calculations on the source system public key and the source system private key, the source system can further ensure the security of data transmission and prevent the key from being stolen or tampered with.
为了进一步增强数据的安全性,源系统采用了默克尔树来组合一类哈希值、二类哈希值和三类哈希值,从而得到最终的目标哈希值。默克尔树是一种高效的数据结构,它能够将多个哈希值组合成一个唯一的哈希值,这样就能够检测出数据的任何微小改动。通过默克尔树的应用,源系统能够在数据传输过程中实现端到端的数据完整性验证,确保数据在传输过程中没有被篡改或伪造。To further enhance data security, the source system uses a Merkle tree to combine the first, second, and third hash values to obtain the final target hash value. The Merkle tree is an efficient data structure that can combine multiple hash values into a unique hash value, so that any minor changes to the data can be detected. Through the application of the Merkle tree, the source system can implement end-to-end data integrity verification during data transmission to ensure that the data has not been tampered with or forged during transmission.
因此,源系统通过使用SHA-256和SHA-3算法以及默克尔树来生成目标哈希值的方法,实现了对数据的高效、安全传输和验证,这种机制不仅具有强大的加密能力和抗破解能力,还能够及时发现并应对数据被篡改的风险,为数据传输的安全性提供了坚实的保障。Therefore, the source system achieves efficient and secure transmission and verification of data by using SHA-256 and SHA-3 algorithms and Merkle trees to generate target hash values. This mechanism not only has strong encryption and anti-cracking capabilities, but can also promptly detect and respond to the risk of data tampering, providing a solid guarantee for the security of data transmission.
S209、所述源系统使用所述源系统私钥对所述目标哈希值进行加密以生成数字签名;S209, the source system uses the source system private key to encrypt the target hash value to generate a digital signature;
在本申请实施例中,源系统在获取到目标哈希值之后,使用源系统私钥对目标哈希值进行加密以生成数字签名,具体的,源系统首先从非对称算法RSA、ECDSA或DSA等算法中挑出对应的算法之后,再将目标哈希值传递给挑出的非对称加密算法,该算法使用私钥对哈希值进行加密,产生加密后的输出,这就是数字签名。生成的数字签名具备极高的独特性和不可伪造性,数字签名中蕴含了源系统的身份信息和哈希值的加密结果。In the embodiment of the present application, after the source system obtains the target hash value, it uses the source system private key to encrypt the target hash value to generate a digital signature. Specifically, the source system first selects the corresponding algorithm from the asymmetric algorithm RSA, ECDSA or DSA, and then passes the target hash value to the selected asymmetric encryption algorithm. The algorithm uses the private key to encrypt the hash value and generates an encrypted output, which is the digital signature. The generated digital signature has extremely high uniqueness and unforgeability, and the digital signature contains the identity information of the source system and the encryption result of the hash value.
S210、所述源系统将所述加密数据和所述数字签名发送至所述中转平台;S210, the source system sends the encrypted data and the digital signature to the transfer platform;
在本申请实施例中,源系统在获取到加密数据和对应的数字签名之后,为安全的将加密数据和数字签名传输到中转平台中,源系统与中转平台之间会搭建专门的数据传输通道,该数据传输通道可基于对称算法生成,确定在进行数据传输时,仅有源系统和中转平台之间进行通信,然后源系统将加密数据和数字签名共同打包后发送至中转平台。In an embodiment of the present application, after the source system obtains the encrypted data and the corresponding digital signature, in order to safely transmit the encrypted data and the digital signature to the transit platform, a dedicated data transmission channel will be established between the source system and the transit platform. The data transmission channel can be generated based on a symmetric algorithm to ensure that only communication is performed between the source system and the transit platform during data transmission. The source system then packages the encrypted data and the digital signature together and sends them to the transit platform.
S211、所述中转平台使用所述源系统公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;S211, the transfer platform verifies the digital signature using the source system public key. After determining the integrity of the target encrypted data, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system.
在本申请实施中,在中转平台接收到源系统发送的加密数据和对应的数字签名之后,为进一步验证在传输过程中加密数据未被解密或未被串改,保证加密数据的完整性,需要进一步对数字签名进行验证,由于源系统是使用源系统私钥对加密数据加密生成数字签名,因此仅可通过源系统公钥进行验证,具体的,中转平台将目标数据和数字签名进行分离,然后使用源系统公钥对数字签名进行解密,得到哈希值,由于源系统公钥和源系统私钥是一对匹配的密钥对,因此使用源系统公钥能成功解密源系统私钥加密的签名,从而得到原始的哈希值,进一步的,中转系统重新计算加密数据的哈希值,最后,源系统比较解密得到的哈希值和重新计算的哈希值,当确定两个哈希值相同,说明数据在传输过程中未被篡改,并且确定加密数据是来自源系统。In the implementation of this application, after the transit platform receives the encrypted data and the corresponding digital signature sent by the source system, in order to further verify that the encrypted data has not been decrypted or tampered with during the transmission process and to ensure the integrity of the encrypted data, it is necessary to further verify the digital signature. Since the source system uses the source system private key to encrypt the encrypted data to generate a digital signature, it can only be verified by the source system public key. Specifically, the transit platform separates the target data and the digital signature, and then uses the source system public key to decrypt the digital signature to obtain a hash value. Since the source system public key and the source system private key are a matching pair of key pairs, the source system public key can be used to successfully decrypt the signature encrypted by the source system private key, thereby obtaining the original hash value. Furthermore, the transit system recalculates the hash value of the encrypted data. Finally, the source system compares the decrypted hash value and the recalculated hash value. When it is determined that the two hash values are the same, it means that the data has not been tampered with during transmission, and it is determined that the encrypted data comes from the source system.
当源系统确定加密数据的完整性之后,中转平台会暂存加密数据,并依据加密数据上的标识确定接入中转平台的目的地系统,待确定目的地系统之后,中转平台与目的地系统进行目的地系统公钥和中转平台公钥的交换,即中转平台将中转平台公钥发送至目的地系统中,待目的地系统接收到中转平台公钥之后,根据中转平台公钥上的标识或IP地址,目的地系统将目的地系统公钥发送至中转平台中,以此完成双方的公钥交换。After the source system determines the integrity of the encrypted data, the transit platform will temporarily store the encrypted data and determine the destination system connected to the transit platform based on the identifier on the encrypted data. After the destination system is determined, the transit platform and the destination system exchange the destination system public key and the transit platform public key, that is, the transit platform sends the transit platform public key to the destination system. After the destination system receives the transit platform public key, the destination system sends the destination system public key to the transit platform based on the identifier or IP address on the transit platform public key, thereby completing the public key exchange between the two parties.
S212、所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统公钥发送至所述目的地系统;S212, the transfer platform uses the destination system public key to encrypt the encrypted data to obtain target encrypted data, and sends the target encrypted data and the source system public key to the destination system;
在本申请实施例中,中转平台与目的地系统建立通信连接,并完成中转平台公钥和中转平台私钥的交换之后,中转平台使用得到的目的地系统公钥对加密数据进行加密,然后得到目标加密数据,其中,需要说明的是,中转平台使用目的地系统公钥对加密数据进行加密的方法与前述源系统对目标数据进行加密得到加密数据的方法类似,在此不再赘述,可根据实际情况进行选择。中转平台在得到目标加密数据之后,进一步的将目标加密数据和源系统公钥一起发送至目的地系统中。In the embodiment of the present application, after the transfer platform establishes a communication connection with the destination system and completes the exchange of the transfer platform public key and the transfer platform private key, the transfer platform uses the obtained destination system public key to encrypt the encrypted data, and then obtains the target encrypted data, where it should be noted that the method by which the transfer platform uses the destination system public key to encrypt the encrypted data is similar to the method by which the source system encrypts the target data to obtain the encrypted data, which will not be described in detail here, and can be selected according to the actual situation. After obtaining the target encrypted data, the transfer platform further sends the target encrypted data and the source system public key to the destination system.
S213、所述目的地系统使用所述目的地系统私钥解密所述目标加密数据得到所述加密数据;S213, the destination system uses the destination system private key to decrypt the target encrypted data to obtain the encrypted data;
在本申请实施例中,目的地系统接收中转平台发送的目标加密数据和源系统公钥,然后将源系统公钥进行暂存处理,由于目标加密数据是在加密数据的基础上使用目的地系统公钥进行加密,因此,即使在中转平台和目的地系统传输过程中数据被盗取,不法分子也无法获取到真正的目标数据。目的地系统会使用独有的目的地系统私钥解密目标加密数据之后得到加密数据,需要说明的事,在加密数据上会有源系统生成的数字签名,在目的地系统打开加密数据之前,为进一步验证加密数据的完整性,保证加密数据在被目的地系统进一步加密之前未被篡改,进一步的,目的地系统需要对数字签名进行验证。In the embodiment of the present application, the destination system receives the target encrypted data and the source system public key sent by the transfer platform, and then temporarily stores the source system public key. Since the target encrypted data is encrypted using the destination system public key based on the encrypted data, even if the data is stolen during the transmission between the transfer platform and the destination system, the criminals cannot obtain the real target data. The destination system will use the unique destination system private key to decrypt the target encrypted data and obtain the encrypted data. It should be noted that there will be a digital signature generated by the source system on the encrypted data. Before the destination system opens the encrypted data, in order to further verify the integrity of the encrypted data and ensure that the encrypted data has not been tampered with before being further encrypted by the destination system, the destination system needs to verify the digital signature.
S214、所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;S214, the destination system verifies the digital signature on the encrypted data using the source system public key;
在本申请实施例中,目的地系统将源系统公钥调出,并对加密数据上的数字签名进行验证,对于数字签名的验证过程,可参考前述中转平台使用源系统公钥验证数字签名的过程,在此不再赘述。In an embodiment of the present application, the destination system calls out the source system public key and verifies the digital signature on the encrypted data. For the digital signature verification process, reference can be made to the aforementioned transfer platform using the source system public key to verify the digital signature process, which will not be repeated here.
S215、在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统,以使得所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。S215. After successful verification, the transfer platform sends the symmetric key pair to the destination system, so that the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
在本申请实施例中,在目的地系统确定加密数据上的数字签名验证成功之后,进一步的,目的地系统将验证成功的反馈信息发送至中转平台,反馈信息包括加密数据的标识信息;之后中转平台根据反馈信息中的标识信息将对应的对称密钥调出,并将对应的对称密钥发送至目的地系统,以使得目的地系统使用对称密钥解锁加密数据,从而得到源系统传输的目标数据。In an embodiment of the present application, after the destination system determines that the digital signature verification on the encrypted data is successful, the destination system further sends feedback information of the verification success to the transfer platform, and the feedback information includes identification information of the encrypted data; thereafter, the transfer platform calls out the corresponding symmetric key according to the identification information in the feedback information, and sends the corresponding symmetric key to the destination system, so that the destination system uses the symmetric key to unlock the encrypted data, thereby obtaining the target data transmitted by the source system.
请参阅图4至图5,本申请提供了一个数据流通处理方法的另一个实施例,所述数据流通处理方法应用在源系统、中转平台和目的地系统,该实施例包括:Please refer to FIG. 4 and FIG. 5 , the present application provides another embodiment of a data circulation processing method, the data circulation processing method is applied to a source system, a transfer platform and a destination system, and the embodiment includes:
S301、所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;S301, the source system, the transfer platform and the destination system generate a source system key pair, a transfer platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transfer platform key pair includes a transfer platform public key and a transfer platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
在本申请实施例中,生成密钥对的过程通常涉及以下步骤:In the embodiment of the present application, the process of generating a key pair generally involves the following steps:
选择算法:首先根据安全需求和应用环境选择一个非对称加密算法;Select an algorithm: First, select an asymmetric encryption algorithm based on security requirements and application environment;
生成参数:对于例如ECC和DSA算法中,必须首先生成或选择一组适当的参数;Generate parameters: For algorithms such as ECC and DSA, an appropriate set of parameters must first be generated or selected;
生成密钥对:使用选择的算法和参数生成一对密钥,其中一个被称为公钥,另一个被称为私钥,公钥可以公开分享,而私钥必须保密。Generate a key pair: Generate a pair of keys using the selected algorithm and parameters, one of which is called a public key and the other is called a private key. The public key can be shared publicly, while the private key must be kept secret.
对于上述密钥对的生成方法,源系统、中转平台和目的地系统可根据实际情况自行选择对应的密钥对生成方法来生成密钥对,优选的,在本申请中,为方便后续密钥对之间的加密和解密,本申请优选的选用ECC椭圆加密算法生成密钥对。其中,生成的源系统密钥对中包含源系统公钥和源系统私钥,源系统公钥是公开的,源系统私钥为私密的,仅保存在源系统中;生成的中转平台密钥对中包含中转平台公钥和中转平台私钥,中转平台公钥是公开的,中转平台私钥为私密,仅保存在中转平台中;同样的,生成的目的地系统密钥对中包含目的地系统公钥和目的地系统私钥,目的地系统公钥是公开的,目的地系统私钥为私密,仅保存在目的地系统中。以上获取得到的公钥均可对外公开,但是对应的私钥均保存在各种的系统中,不会对外公开。For the above-mentioned key pair generation method, the source system, the transfer platform and the destination system can select the corresponding key pair generation method to generate the key pair according to the actual situation. Preferably, in this application, in order to facilitate the subsequent encryption and decryption between key pairs, this application preferably uses the ECC elliptic encryption algorithm to generate the key pair. Among them, the generated source system key pair contains the source system public key and the source system private key. The source system public key is public, and the source system private key is private and is only stored in the source system; the generated transfer platform key pair contains the transfer platform public key and the transfer platform private key. The transfer platform public key is public, and the transfer platform private key is private and is only stored in the transfer platform; similarly, the generated destination system key pair contains the destination system public key and the destination system private key. The destination system public key is public, and the destination system private key is private and is only stored in the destination system. The above-obtained public keys can be made public, but the corresponding private keys are stored in various systems and will not be made public.
S302、所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;S302: The source system and the transfer platform exchange the source system public key and the transfer platform public key;
S303、所述中转平台和所述源系统进行密钥协商以生成对称密钥;S303: The transfer platform and the source system perform key negotiation to generate a symmetric key;
在本申请实施例中,当源系统和中转平台均生成各种的密钥对之后,进一步的,源系统为安全的将目标数据传输至中转平台,以使得中转平台将目标数据传输至目的地系统中,源系统首先会与源系统进行密钥协商以生成对称密钥,生成的对称密钥仅是在中转平台和源系统之间传输,具体的,对于对称密钥的生成可参考如下方法:In the embodiment of the present application, after the source system and the transit platform have generated various key pairs, further, in order to safely transmit the target data to the transit platform, so that the transit platform transmits the target data to the destination system, the source system will first negotiate a key with the source system to generate a symmetric key. The generated symmetric key is only transmitted between the transit platform and the source system. Specifically, the generation of the symmetric key can refer to the following method:
Diffie-Hellman密钥交换:这是一种非常流行的方法,允许双方在没有共享秘密的情况下通过不安全的通道安全地生成对称密钥。Diffie-Hellman key exchange: This is a very popular method that allows two parties to securely generate symmetric keys over an insecure channel without a shared secret.
RSA密钥交换:一方可以生成一个临时的RSA密钥对,并将RSA密钥对中的公钥发送给另一方,接收方使用这个公钥加密对称密钥,并将其发送回去。RSA key exchange: One party can generate a temporary RSA key pair and send the public key in the RSA key pair to the other party. The recipient uses this public key to encrypt the symmetric key and send it back.
预共享密钥协商:双方会预先共享一个密钥,这个预共享密钥可以直接作为对称密钥使用,或用于在不安全的通道上安全地协商新的密钥。Pre-shared key negotiation: Both parties will share a key in advance. This pre-shared key can be used directly as a symmetric key or used to securely negotiate a new key over an insecure channel.
传输层安全性协议:尽管TLS通常用于客户端和服务器之间的安全通信,但它也可以用于安全的密钥协商。Transport Layer Security: Although TLS is often used for secure communications between clients and servers, it can also be used for secure key negotiation.
量子密钥分发:QKD代表了一种利用量子力学原理来生成并分配绝对安全的密钥对的方法。Quantum Key Distribution: QKD represents a method that uses the principles of quantum mechanics to generate and distribute absolutely secure key pairs.
在实际应用中,选择哪一种密钥协商方法取决于具体的安全需求、性能要求以及双方的能力,例如,在计算资源受限的环境中,会选择更加轻量级的密钥协商方法,而在需要极高安全保证的情况下,则会采用更加复杂的协议,在本申请中,中转平台和源系统可根据对应的方法生成对称密钥。In actual applications, the choice of key negotiation method depends on the specific security requirements, performance requirements and capabilities of both parties. For example, in an environment with limited computing resources, a more lightweight key negotiation method will be selected, while in situations where extremely high security guarantees are required, a more complex protocol will be used. In this application, the transit platform and the source system can generate symmetric keys according to the corresponding methods.
S304、所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名;S304: The source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature;
在本申请实施例中,当源系统和中转平台生成对称密钥之后,进一步的,源系统调取出需要发送至目的地系统的目标数据,并使用跟中转平台协商生成的对称密钥对目标数据进行加密得到加密数据,具体的,首先要确保加密数据是加密算法可以处理的形式,需要先进行数据压缩以减少加密数据的大小,若要加密的加密数据大小不符合加密算法的要求,则需要进行填充,以使数据符合加密算法块的大小要求。然后选定的对称加密算法和对称密钥对目标数据进行加密,加密完成后,生成的加密数据可以安全地存储在源系统中。进一步的,为保证传输到中转平台之后,加密数据的完整性和安全性,源系统会使用源系统私钥在加密数据上进行加密,并生成数字签名,具体的,源系统对加密数据使用哈希函数生成唯一的哈希值,哈希函数设计为单向函数,对于任何给定的数据都会产生一个固定长度的,独一无二的哈希值,但从哈希值不能反向推导出原始数据,在获取到加密数据的哈希值之后,源系统使用源系统私钥对哈希值进行加密,生成所谓的数字签名。在这一步骤中,源系统私钥作为加密的密钥,确保了只有拥有对应公钥的接收者才能验证签名,即只有源系统公钥才可解密哈希值。In an embodiment of the present application, after the source system and the transfer platform generate a symmetric key, the source system further retrieves the target data that needs to be sent to the destination system, and uses the symmetric key generated by negotiation with the transfer platform to encrypt the target data to obtain encrypted data. Specifically, it is necessary to first ensure that the encrypted data is in a form that can be processed by the encryption algorithm. Data compression is required to reduce the size of the encrypted data. If the size of the encrypted data to be encrypted does not meet the requirements of the encryption algorithm, padding is required to make the data meet the size requirements of the encryption algorithm block. Then the selected symmetric encryption algorithm and symmetric key encrypt the target data. After the encryption is completed, the generated encrypted data can be safely stored in the source system. Furthermore, to ensure the integrity and security of the encrypted data after it is transmitted to the transit platform, the source system will use the source system private key to encrypt the encrypted data and generate a digital signature. Specifically, the source system uses a hash function to generate a unique hash value for the encrypted data. The hash function is designed as a one-way function. For any given data, a unique hash value of a fixed length will be generated, but the original data cannot be reversely derived from the hash value. After obtaining the hash value of the encrypted data, the source system uses the source system private key to encrypt the hash value and generate the so-called digital signature. In this step, the source system private key is used as the encryption key to ensure that only the recipient with the corresponding public key can verify the signature, that is, only the source system public key can decrypt the hash value.
S305、所述源系统将所述加密数据分割成若干个数据包;S305, the source system divides the encrypted data into a plurality of data packets;
在本申请实施例中,源系统在得到加密数据之后,需要先将加密数据分割成若干个数据包,数据包会经过多个网络节点和传输介质,如果整个加密数据作为一个整体进行传输,一旦数据包在传输过程中被截取,攻击者会获得整个加密数据的内容,从而威胁到数据的安全性,因此,通过将加密数据分割成若干个数据包,可以降低数据包被截取的风险。In an embodiment of the present application, after obtaining the encrypted data, the source system needs to first split the encrypted data into several data packets. The data packets will pass through multiple network nodes and transmission media. If the entire encrypted data is transmitted as a whole, once the data packet is intercepted during the transmission process, the attacker will obtain the content of the entire encrypted data, thereby threatening the security of the data. Therefore, by splitting the encrypted data into several data packets, the risk of the data packet being intercepted can be reduced.
在加密数据分包过程中,源系统会根据加密数据的大小和网络的带宽等因素,将加密数据分割成适当大小的数据包,每个数据包都会包含一部分加密数据以及必要的元数据,如数据包的序号、源地址和目标地址等,这样,即使数据包在传输过程中发生丢失或损坏,接收系统也可以通过元数据来重新构建原始的加密数据。During the encrypted data packetization process, the source system will divide the encrypted data into data packets of appropriate size based on factors such as the size of the encrypted data and the bandwidth of the network. Each data packet will contain a portion of the encrypted data and necessary metadata, such as the data packet's sequence number, source address, and destination address. In this way, even if the data packet is lost or damaged during transmission, the receiving system can reconstruct the original encrypted data through the metadata.
此外,为了进一步提高数据传输的安全性,还可以采用一些先进的加密技术和传输协议。例如,可以使用公钥加密技术对每个数据包进行加密,确保只有拥有相应私钥的接收系统才能解密数据包的内容。同时,也可以采用可靠的传输协议,如TCP(传输控制协议),确保数据包能够按照正确的顺序到达目的地,并避免数据包在传输过程中被篡改或重复。In addition, in order to further improve the security of data transmission, some advanced encryption technologies and transmission protocols can be used. For example, public key encryption technology can be used to encrypt each data packet to ensure that only the receiving system with the corresponding private key can decrypt the content of the data packet. At the same time, reliable transmission protocols such as TCP (Transmission Control Protocol) can also be used to ensure that data packets can reach the destination in the correct order and avoid data packets being tampered with or repeated during transmission.
S306、所述源系统确定传输至所述中转平台的若干个传输通道;S306, the source system determines a number of transmission channels for transmission to the transfer platform;
在本申请实施例中,在将加密数据分割成若干个数据包之后,为了进一步确定源系统与中转平台的传输通道,传输通道需要多个,以使得若干个数据包均可通过不同的传输通道传输至中转平台中,每个数据包可以通过预先设定的或动态选择的传输通道进行发送,要确保不同传输通道的负载均衡,避免某一传输通道过载而导致的延迟或数据丢失,这可通过软件定义网络(SDN)或其他网络负载均衡技术来实现。In an embodiment of the present application, after the encrypted data is divided into several data packets, in order to further determine the transmission channel between the source system and the transit platform, multiple transmission channels are required so that several data packets can be transmitted to the transit platform through different transmission channels. Each data packet can be sent through a pre-set or dynamically selected transmission channel. It is necessary to ensure load balancing of different transmission channels to avoid delays or data loss caused by overloading of a certain transmission channel. This can be achieved through software defined networking (SDN) or other network load balancing technologies.
其中,需要说明的是,所有的传输通道均应使用TLS或SSL等加密协议加密,这是为了保护数据在传输过程中的安全性和隐私,且在传输通道中应部署入侵检测系统(IDS)和入侵防御系统(IPS),以识别并阻止潜在的恶意流量和攻击尝试。It should be noted that all transmission channels should be encrypted using encryption protocols such as TLS or SSL to protect the security and privacy of data during transmission. Intrusion detection systems (IDS) and intrusion prevention systems (IPS) should be deployed in the transmission channels to identify and block potential malicious traffic and attack attempts.
S307、所述源系统将所述若干个数据包和所述数字签名通过所述若干个传输通道传输至所述中转平台,所述若干个数据包上均对应有所述数字签名;S307, the source system transmits the plurality of data packets and the digital signatures to the transfer platform through the plurality of transmission channels, and the plurality of data packets each have the digital signature;
在本申请实施例中,在将传输通道搭建完成之后,进一步的,源系统将若干个数据包和对应的数字签名通过传输通道传输至中转平台中,在进行传输时,每个数据包都有一个唯一的序列号,以便在中转平台进行组装时能够正确地恢复为原始数据,且每个数据包到达中转平台后需要经过完整性校验,确保数据在传输过程中未被篡改,这个过程可通过数字签名进行验证,如果某个数据包在传输过程中丢失或被损坏,中转平台检测到这一情况之后,会发送一个重传响应给到源系统,以使得源系统重新发送数据包至中转平台中。In an embodiment of the present application, after the transmission channel is established, the source system further transmits several data packets and corresponding digital signatures to the transit platform through the transmission channel. During the transmission, each data packet has a unique serial number so that it can be correctly restored to the original data when assembled on the transit platform, and each data packet needs to undergo an integrity check after arriving at the transit platform to ensure that the data has not been tampered with during transmission. This process can be verified by a digital signature. If a data packet is lost or damaged during transmission, the transit platform will detect this and send a retransmission response to the source system so that the source system resends the data packet to the transit platform.
S308、所述中转平台使用所述源系统公钥验证所述数字签名;S308, the transfer platform verifies the digital signature using the source system public key;
在本申请实施例中,中转平台接收若干个传输通道的若干个数据包和数字签名,为确保传输过来的若干个数据包的完整性,中转平台将源系统公钥进行调取,并使用源系统公钥验证若干个数据包上的数字签名,验证成功后,中转平台将确认数据包的完整性和真实性,从而避免数据在传输过程中被篡改或损坏。同时,中转平台还将对数据包进行排序和整合,以确保它们按照正确的顺序和格式重新合成加密数据。In the embodiment of the present application, the transfer platform receives several data packets and digital signatures from several transmission channels. To ensure the integrity of the transmitted data packets, the transfer platform retrieves the source system public key and uses the source system public key to verify the digital signatures on the data packets. After successful verification, the transfer platform will confirm the integrity and authenticity of the data packets, thereby preventing the data from being tampered with or damaged during transmission. At the same time, the transfer platform will also sort and integrate the data packets to ensure that they are re-synthesized into encrypted data in the correct order and format.
S309、当确定所述加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;S309: After the integrity of the encrypted data is determined, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system;
在本申请实施例中,当中转平台得到目标加密数据,并确定目标加密数据的完整性之后,进一步的,中转平台要将加密数据发送至目的地系统中,从而完成源系统到目的地系统的数据传输,具体的,中转平台根据加密数据上的标识确定目的地系统,然后中转平台向目的地系统发送接收指令;当中转平台获取目的地系统反馈的确认指令后,中转平台和所述目的地系统构建安全传输通道;中转平台将中转平台公钥通过安全传输通道发送至目的地系统;待目的地系统获取到中转平台公钥之后,验证中转平台公钥的IP地址与接收指令的IP地址是否一致;若是,则目的地系统将所述目的地系统公钥发送至中转平台。In an embodiment of the present application, after the transit platform obtains the target encrypted data and determines the integrity of the target encrypted data, the transit platform further sends the encrypted data to the destination system, thereby completing the data transmission from the source system to the destination system. Specifically, the transit platform determines the destination system based on the identifier on the encrypted data, and then the transit platform sends a receiving instruction to the destination system; after the transit platform obtains the confirmation instruction fed back by the destination system, the transit platform and the destination system establish a secure transmission channel; the transit platform sends the transit platform public key to the destination system through the secure transmission channel; after the destination system obtains the transit platform public key, it verifies whether the IP address of the transit platform public key is consistent with the IP address of the receiving instruction; if so, the destination system sends the destination system public key to the transit platform.
中转平台接收到目的地系统公钥后,会进行公钥验证,以确保数据传输的安全性。验证过程包括检查公钥的有效期、公钥的签名等。一旦验证通过,中转平台就可以使用这对公钥和私钥进行加密和解密操作,确保数据在传输过程中的安全性。After receiving the public key of the destination system, the transfer platform will perform public key verification to ensure the security of data transmission. The verification process includes checking the validity period of the public key, the signature of the public key, etc. Once the verification is passed, the transfer platform can use the public key and private key to perform encryption and decryption operations to ensure the security of data during transmission.
S310、所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统公钥发送至所述目的地系统;S310, the transfer platform uses the destination system public key to encrypt the encrypted data to obtain target encrypted data, and sends the target encrypted data and the source system public key to the destination system;
在本申请实施例中,中转平台与目的地系统建立通信连接,并完成中转平台公钥和中转平台私钥的交换之后,中转平台使用得到的目的地系统公钥对加密数据进行加密,然后得到目标加密数据,其中,需要说明的是,中转平台使用目的地系统公钥对加密数据进行加密的方法与前述源系统对目标数据进行加密得到加密数据的方法类似,在此不再赘述,可根据实际情况进行选择。中转平台在得到目标加密数据之后,进一步的将目标加密数据和源系统公钥一起发送至目的地系统中。In the embodiment of the present application, after the transfer platform establishes a communication connection with the destination system and completes the exchange of the transfer platform public key and the transfer platform private key, the transfer platform uses the obtained destination system public key to encrypt the encrypted data, and then obtains the target encrypted data, where it should be noted that the method by which the transfer platform uses the destination system public key to encrypt the encrypted data is similar to the method by which the source system encrypts the target data to obtain the encrypted data, which will not be described in detail here, and can be selected according to the actual situation. After obtaining the target encrypted data, the transfer platform further sends the target encrypted data and the source system public key to the destination system.
S311、所述目的地系统使用所述目的地系统私钥解密所述目标加密数据得到所述加密数据;S311, the destination system uses the destination system private key to decrypt the target encrypted data to obtain the encrypted data;
在本申请实施例中,目的地系统接收中转平台发送的目标加密数据和源系统公钥,然后将源系统公钥进行暂存处理,由于目标加密数据是在加密数据的基础上使用目的地系统公钥进行加密,因此,即使在中转平台和目的地系统传输过程中数据被盗取,不法分子也无法获取到真正的目标数据。目的地系统会使用独有的目的地系统私钥解密目标加密数据之后得到加密数据,需要说明的事,在加密数据上会有源系统生成的数字签名,在目的地系统打开加密数据之前,为进一步验证加密数据的完整性,保证加密数据在被目的地系统进一步加密之前未被篡改,进一步的,目的地系统需要对数字签名进行验证,执行步骤S312。In the embodiment of the present application, the destination system receives the target encrypted data and the source system public key sent by the transfer platform, and then temporarily stores the source system public key. Since the target encrypted data is encrypted using the destination system public key based on the encrypted data, even if the data is stolen during the transmission between the transfer platform and the destination system, the criminals cannot obtain the real target data. The destination system will use the unique destination system private key to decrypt the target encrypted data to obtain the encrypted data. It should be noted that there will be a digital signature generated by the source system on the encrypted data. Before the destination system opens the encrypted data, in order to further verify the integrity of the encrypted data and ensure that the encrypted data has not been tampered with before being further encrypted by the destination system, the destination system needs to verify the digital signature and execute step S312.
S312、所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;S312, the destination system verifies the digital signature on the encrypted data using the source system public key;
在本申请实施例中,目的地系统将源系统公钥调出,并对加密数据上的数字签名进行验证,对于数字签名的验证过程,可参考前述中转平台使用源系统公钥验证数字签名的过程,在此不再赘述。In an embodiment of the present application, the destination system calls out the source system public key and verifies the digital signature on the encrypted data. For the digital signature verification process, reference can be made to the aforementioned transfer platform using the source system public key to verify the digital signature process, which will not be repeated here.
S313、在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统,以使得所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。S313. After successful verification, the transfer platform sends the symmetric key pair to the destination system, so that the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
在本申请实施例中,在目的地系统确定加密数据上的数字签名验证成功之后,进一步的,目的地系统将验证成功的反馈信息发送至中转平台,反馈信息包括加密数据的标识信息;之后中转平台根据反馈信息中的标识信息将对应的对称密钥调出,并将对应的对称密钥发送至目的地系统,以使得目的地系统使用对称密钥解锁加密数据,从而得到源系统传输的目标数据。In an embodiment of the present application, after the destination system determines that the digital signature verification on the encrypted data is successful, the destination system further sends feedback information of the verification success to the transfer platform, and the feedback information includes identification information of the encrypted data; thereafter, the transfer platform calls out the corresponding symmetric key according to the identification information in the feedback information, and sends the corresponding symmetric key to the destination system, so that the destination system uses the symmetric key to unlock the encrypted data, thereby obtaining the target data transmitted by the source system.
本申请数据流通处理方法有效地提升了数据传输的安全性和效率。具体来说,源系统、中转平台和目的地系统各自生成自己的密钥对,并通过密钥协商生成对称密钥,确保了数据加密的强度,源系统不仅使用对称密钥加密数据,还利用自己的私钥对加密数据生成数字签名,增加了数据传输的安全层级,且中转平台在验证数字签名无误后,负责与目的地系统交换公钥,并使用目的地系统公钥进一步加密已加密的数据,再将其发送给目的地系统,目的地系统通过自己的私钥解密数据,再用源系统公钥验证数字签名,确保了数据的完整性和发送方的身份验证,最后,中转平台将对称密钥安全地发送至目的地系统,以解锁加密数据,实现安全的数据传输。The data circulation processing method of this application effectively improves the security and efficiency of data transmission. Specifically, the source system, the transit platform and the destination system each generate their own key pairs, and generate symmetric keys through key negotiation to ensure the strength of data encryption. The source system not only uses symmetric keys to encrypt data, but also uses its own private key to generate digital signatures for encrypted data, which increases the security level of data transmission. After verifying that the digital signature is correct, the transit platform is responsible for exchanging public keys with the destination system, and further encrypting the encrypted data with the destination system public key, and then sending it to the destination system. The destination system decrypts the data with its own private key, and then verifies the digital signature with the source system public key, ensuring the integrity of the data and the identity of the sender. Finally, the transit platform securely sends the symmetric key to the destination system to unlock the encrypted data and achieve secure data transmission.
请参阅图6至图7,本申请提供了一个数据流通处理方法的另一个实施例,所述数据流通处理方法应用在源系统、中转平台和目的地系统,该实施例包括:Please refer to FIG. 6 and FIG. 7 , the present application provides another embodiment of a data flow processing method, the data flow processing method is applied to a source system, a transfer platform and a destination system, and the embodiment includes:
S401、所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;S401, the source system, the transfer platform and the destination system generate a source system key pair, a transfer platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transfer platform key pair includes a transfer platform public key and a transfer platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
在源系统、中转平台和目的地系统进行数据流通处理之前,首先源系统、中转平台和目的地系统首先生成各位的密钥对,其中,密钥对生成通常涉及到非对称加密技术,其中最常用的方法包括:Before the source system, transit platform and destination system process data, the source system, transit platform and destination system first generate their own key pairs. The key pair generation usually involves asymmetric encryption technology, the most commonly used methods of which include:
RSA (Rivest-Shamir-Adleman):是最早和最广泛使用的非对称加密算法之一,RSA 是基于一个简单的数论事实,将两个大质数相乘是容易的,但是对其乘积进行因数分解却极其困难,RSA算法的安全性建立在大数分解问题的难度上。RSA (Rivest-Shamir-Adleman): is one of the earliest and most widely used asymmetric encryption algorithms. RSA is based on a simple number theory fact: it is easy to multiply two large prime numbers, but it is extremely difficult to factorize their product. The security of the RSA algorithm is based on the difficulty of the large number factorization problem.
ECC (Elliptic Curve Cryptography):相比于RSA,ECC可以提供相同级别的安全性,同时使用更短的密钥长度,这意味着更快的处理速度和更低的资源消耗。ECC (Elliptic Curve Cryptography): Compared to RSA, ECC can provide the same level of security while using a shorter key length, which means faster processing speed and lower resource consumption.
DSA (Digital Signature Algorithm):是一种标准的数字签名算法,也可以用于生成密钥对。它基于模素数的离散对数问题,特别适合用于签名验证过程。DSA (Digital Signature Algorithm): is a standard digital signature algorithm that can also be used to generate key pairs. It is based on the discrete logarithm problem modulo prime numbers and is particularly suitable for signature verification.
Diffie-Hellman密钥交换协议:虽然它本身不直接生成密钥对,但它允许两个无先前共享秘密的通信方,在不安全的通信渠道上生成一个共同的秘密密钥,这个密钥可以用于后续的通信加密。Diffie-Hellman key exchange protocol: Although it does not directly generate a key pair itself, it allows two communicating parties without previously shared secrets to generate a common secret key over an insecure communication channel, which can be used to encrypt subsequent communications.
生成密钥对的过程通常涉及以下步骤:The process of generating a key pair generally involves the following steps:
选择算法:首先根据安全需求和应用环境选择一个非对称加密算法;Select an algorithm: First, select an asymmetric encryption algorithm based on security requirements and application environment;
生成参数:对于例如ECC和DSA算法中,必须首先生成或选择一组适当的参数;Generate parameters: For algorithms such as ECC and DSA, an appropriate set of parameters must first be generated or selected;
生成密钥对:使用选择的算法和参数生成一对密钥,其中一个被称为公钥,另一个被称为私钥,公钥可以公开分享,而私钥必须保密。Generate a key pair: Generate a pair of keys using the selected algorithm and parameters, one of which is called a public key and the other is called a private key. The public key can be shared publicly, while the private key must be kept secret.
对于上述密钥对的生成方法,源系统、中转平台和目的地系统可根据实际情况自行选择对应的密钥对生成方法来生成密钥对,优选的,在本申请中,为方便后续密钥对之间的加密和解密,本申请优选的选用ECC椭圆加密算法生成密钥对。其中,生成的源系统密钥对中包含源系统公钥和源系统私钥,源系统公钥是公开的,源系统私钥为私密的,仅保存在源系统中;生成的中转平台密钥对中包含中转平台公钥和中转平台私钥,中转平台公钥是公开的,中转平台私钥为私密,仅保存在中转平台中;同样的,生成的目的地系统密钥对中包含目的地系统公钥和目的地系统私钥,目的地系统公钥是公开的,目的地系统私钥为私密,仅保存在目的地系统中。For the above-mentioned key pair generation method, the source system, the transfer platform and the destination system can select the corresponding key pair generation method to generate the key pair according to the actual situation. Preferably, in this application, in order to facilitate the subsequent encryption and decryption between key pairs, this application preferably uses the ECC elliptic encryption algorithm to generate the key pair. Among them, the generated source system key pair contains the source system public key and the source system private key. The source system public key is public, and the source system private key is private and is only stored in the source system; the generated transfer platform key pair contains the transfer platform public key and the transfer platform private key. The transfer platform public key is public, and the transfer platform private key is private and is only stored in the transfer platform; similarly, the generated destination system key pair contains the destination system public key and the destination system private key. The destination system public key is public, and the destination system private key is private and is only stored in the destination system.
以上获取得到的公钥均可对外公开,但是对应的私钥均保存在各种的系统中,不会对外公开。The public keys obtained above can be made public, but the corresponding private keys are stored in various systems and will not be made public.
S402、所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;S402: The source system and the transfer platform exchange the source system public key and the transfer platform public key;
S403、所述中转平台和所述源系统进行密钥协商以生成对称密钥;S403: The transfer platform and the source system perform key negotiation to generate a symmetric key;
在本申请实施例中,当源系统和中转平台均生成各种的密钥对之后,进一步的,源系统为安全的将目标数据传输至中转平台,以使得中转平台将目标数据传输至目的地系统中,源系统首先会与源系统进行密钥协商以生成对称密钥,生成的对称密钥仅是在中转平台和源系统之间传输,具体的,对于对称密钥的生成可参考如下方法:In the embodiment of the present application, after the source system and the transit platform have generated various key pairs, further, in order to safely transmit the target data to the transit platform, so that the transit platform transmits the target data to the destination system, the source system will first negotiate a key with the source system to generate a symmetric key. The generated symmetric key is only transmitted between the transit platform and the source system. Specifically, the generation of the symmetric key can refer to the following method:
Diffie-Hellman密钥交换:这是一种非常流行的方法,允许双方在没有共享秘密的情况下通过不安全的通道安全地生成对称密钥。Diffie-Hellman key exchange: This is a very popular method that allows two parties to securely generate symmetric keys over an insecure channel without a shared secret.
RSA密钥交换:一方可以生成一个临时的RSA密钥对,并将RSA密钥对中的公钥发送给另一方,接收方使用这个公钥加密对称密钥,并将其发送回去。RSA key exchange: One party can generate a temporary RSA key pair and send the public key in the RSA key pair to the other party. The recipient uses this public key to encrypt the symmetric key and send it back.
预共享密钥协商:双方会预先共享一个密钥,这个预共享密钥可以直接作为对称密钥使用,或用于在不安全的通道上安全地协商新的密钥。Pre-shared key negotiation: Both parties will share a key in advance. This pre-shared key can be used directly as a symmetric key or used to securely negotiate a new key over an insecure channel.
传输层安全性协议:尽管TLS通常用于客户端和服务器之间的安全通信,但它也可以用于安全的密钥协商。Transport Layer Security: Although TLS is often used for secure communications between clients and servers, it can also be used for secure key negotiation.
量子密钥分发:QKD代表了一种利用量子力学原理来生成并分配绝对安全的密钥对的方法。Quantum Key Distribution: QKD represents a method that uses the principles of quantum mechanics to generate and distribute absolutely secure key pairs.
在实际应用中,选择哪一种密钥协商方法取决于具体的安全需求、性能要求以及双方的能力,例如,在计算资源受限的环境中,会选择更加轻量级的密钥协商方法,而在需要极高安全保证的情况下,则会采用更加复杂的协议。在本申请中,中转平台和源系统可根据对应的方法生成对称密钥,在生成对称密钥之后,进一步的执行步骤S403。In practical applications, the key negotiation method selected depends on the specific security requirements, performance requirements and the capabilities of both parties. For example, in an environment with limited computing resources, a more lightweight key negotiation method will be selected, while in the case of extremely high security guarantees, a more complex protocol will be used. In this application, the transit platform and the source system can generate a symmetric key according to the corresponding method, and after generating the symmetric key, step S403 is further performed.
S404、所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名;S404: The source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature;
在本申请实施例中,当源系统和中转平台生成对称密钥之后,进一步的,源系统调取出需要发送至目的地系统的目标数据,并使用跟中转平台协商生成的对称密钥对目标数据进行加密得到加密数据,具体的,首先要确保加密数据是加密算法可以处理的形式,需要先进行数据压缩以减少加密数据的大小,若要加密的加密数据大小不符合加密算法的要求,则需要进行填充,以使数据符合加密算法块的大小要求。然后选定的对称加密算法和对称密钥对目标数据进行加密,加密完成后,生成的加密数据可以安全地存储在源系统中。进一步的,为保证传输到中转平台之后,加密数据的完整性和安全性,源系统会使用源系统私钥在加密数据上进行加密,并生成数字签名,具体的,源系统对加密数据使用哈希函数生成唯一的哈希值,哈希函数设计为单向函数,对于任何给定的数据都会产生一个固定长度的,独一无二的哈希值,但从哈希值不能反向推导出原始数据,在获取到加密数据的哈希值之后,源系统使用源系统私钥对哈希值进行加密,生成所谓的数字签名。在这一步骤中,源系统私钥作为加密的密钥,确保了只有拥有对应公钥的接收者才能验证签名,即只有源系统公钥才可解密哈希值。In an embodiment of the present application, after the source system and the transfer platform generate a symmetric key, the source system further retrieves the target data that needs to be sent to the destination system, and uses the symmetric key generated by negotiation with the transfer platform to encrypt the target data to obtain encrypted data. Specifically, it is necessary to first ensure that the encrypted data is in a form that can be processed by the encryption algorithm. Data compression is required to reduce the size of the encrypted data. If the size of the encrypted data to be encrypted does not meet the requirements of the encryption algorithm, padding is required to make the data meet the size requirements of the encryption algorithm block. Then the selected symmetric encryption algorithm and symmetric key encrypt the target data. After the encryption is completed, the generated encrypted data can be safely stored in the source system. Furthermore, to ensure the integrity and security of the encrypted data after it is transmitted to the transit platform, the source system will use the source system private key to encrypt the encrypted data and generate a digital signature. Specifically, the source system uses a hash function to generate a unique hash value for the encrypted data. The hash function is designed as a one-way function. For any given data, a unique hash value of a fixed length will be generated, but the original data cannot be reversely derived from the hash value. After obtaining the hash value of the encrypted data, the source system uses the source system private key to encrypt the hash value and generate the so-called digital signature. In this step, the source system private key is used as the encryption key to ensure that only the recipient with the corresponding public key can verify the signature, that is, only the source system public key can decrypt the hash value.
S405、所述源系统将所述加密数据和所述数字签名发送至所述中转平台;S405, the source system sends the encrypted data and the digital signature to the transfer platform;
在本申请实施例中,源系统在获取到加密数据和对应的数字签名之后,为安全的将加密数据和数字签名传输到中转平台中,源系统与中转平台之间会搭建专门的数据传输通道,该数据传输通道可基于对称算法生成,确定在进行数据传输时,仅有源系统和中转平台之间进行通信,然后源系统将加密数据和数字签名共同打包后发送至中转平台。In an embodiment of the present application, after the source system obtains the encrypted data and the corresponding digital signature, in order to safely transmit the encrypted data and the digital signature to the transit platform, a dedicated data transmission channel will be established between the source system and the transit platform. The data transmission channel can be generated based on a symmetric algorithm to ensure that only communication is performed between the source system and the transit platform during data transmission. The source system then packages the encrypted data and the digital signature together and sends them to the transit platform.
S406、所述中转平台使用所述源系统公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;S406: The transfer platform verifies the digital signature using the source system public key. After determining the integrity of the target encrypted data, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system.
在本申请实施中,在中转平台接收到源系统发送的加密数据和对应的数字签名之后,为进一步验证在传输过程中加密数据未被解密或未被串改,保证加密数据的完整性,需要进一步对数字签名进行验证,由于源系统是使用源系统私钥对加密数据加密生成数字签名,因此仅可通过源系统公钥进行验证,具体的,中转平台将目标数据和数字签名进行分离,然后使用源系统公钥对数字签名进行解密,得到哈希值,由于源系统公钥和源系统私钥是一对匹配的密钥对,因此使用源系统公钥能成功解密源系统私钥加密的签名,从而得到原始的哈希值,进一步的,中转系统重新计算加密数据的哈希值,最后,源系统比较解密得到的哈希值和重新计算的哈希值,当确定两个哈希值相同,说明数据在传输过程中未被篡改,并且确定加密数据是来自源系统。In the implementation of this application, after the transit platform receives the encrypted data and the corresponding digital signature sent by the source system, in order to further verify that the encrypted data has not been decrypted or tampered with during the transmission process and to ensure the integrity of the encrypted data, it is necessary to further verify the digital signature. Since the source system uses the source system private key to encrypt the encrypted data to generate a digital signature, it can only be verified by the source system public key. Specifically, the transit platform separates the target data and the digital signature, and then uses the source system public key to decrypt the digital signature to obtain a hash value. Since the source system public key and the source system private key are a matching pair of key pairs, the source system public key can be used to successfully decrypt the signature encrypted by the source system private key, thereby obtaining the original hash value. Furthermore, the transit system recalculates the hash value of the encrypted data. Finally, the source system compares the decrypted hash value and the recalculated hash value. When it is determined that the two hash values are the same, it means that the data has not been tampered with during transmission, and it is determined that the encrypted data comes from the source system.
当源系统确定加密数据的完整性之后,中转平台会暂存加密数据,并依据加密数据上的标识确定接入中转平台的目的地系统,待确定目的地系统之后,中转平台与目的地系统进行目的地系统公钥和中转平台公钥的交换,即中转平台将中转平台公钥发送至目的地系统中,待目的地系统接收到中转平台公钥之后,根据中转平台公钥上的标识或IP地址,目的地系统将目的地系统公钥发送至中转平台中,以此完成双方的公钥交换。After the source system determines the integrity of the encrypted data, the transit platform will temporarily store the encrypted data and determine the destination system connected to the transit platform based on the identifier on the encrypted data. After the destination system is determined, the transit platform and the destination system exchange the destination system public key and the transit platform public key, that is, the transit platform sends the transit platform public key to the destination system. After the destination system receives the transit platform public key, the destination system sends the destination system public key to the transit platform based on the identifier or IP address on the transit platform public key, thereby completing the public key exchange between the two parties.
S407、所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据;S407, the transfer platform uses the destination system public key to encrypt the encrypted data to obtain target encrypted data;
在本申请实施中,中转平台调出目的地系统公钥,并对应的生成一串随机数;中转平台使用目标哈希函数计算目的地系统公钥和随机数结合得到的哈希值hash,接着中转平台使用计算出的哈希值hash作为密钥派生函数的输入,并生成目标密钥K;中转平台使用目标密钥K和目的地系统公钥将加密数据进行加密后得到目标加密数据。In the implementation of this application, the transit platform calls out the destination system public key and generates a corresponding string of random numbers; the transit platform uses the target hash function to calculate the hash value hash obtained by combining the destination system public key and the random number, and then the transit platform uses the calculated hash value hash as the input of the key derivation function and generates the target key K; the transit platform uses the target key K and the destination system public key to encrypt the encrypted data to obtain the target encrypted data.
目标加密数据是确保数据在传输过程中安全性的关键,通过将原始数据加密,并使用目标密钥K和目的地系统公钥进行二次加密,可以确保只有拥有相应私钥的目的地系统才能解密和访问这些数据,这种双重加密的方式大大增强了数据的安全性,即使数据在传输过程中被截获,攻击者也无法直接获取到原始数据的内容。Target encrypted data is the key to ensuring the security of data during transmission. By encrypting the original data and re-encrypting it with the target key K and the destination system public key, it can be ensured that only the destination system with the corresponding private key can decrypt and access the data. This double encryption method greatly enhances the security of the data. Even if the data is intercepted during transmission, the attacker cannot directly obtain the content of the original data.
S408、所述中转平台与所述目的地系统进行密钥协商以生成通话密钥;S408, the transfer platform negotiates a key with the destination system to generate a call key;
在本申请实施例中,中转平台在根据目的地系统公钥和目标密钥K对加密数据进行加密得到目标加密数据之后,为进一步确保中转平台与目的地系统之间的数据传输,中转平台与目的地系统进行密钥协商以生成通话密钥,具体的,中转平台确定素数p和一个基数g,并将素数p和基数g发送至目的地系统;目的地系统随机选择一个私钥a,并计算出其公钥A = g^a mod p,中转平台随机选择一个私钥b,计算出其公钥B = g^b mod p,目的地系统将其公钥a发送给中转平台,且中转平台将其公钥b发送给目的地系统;当目的地系统接收到中转平台公钥b后,使用私钥a计算共享密钥S = B^a mod p;当中转平台接收到目的地系统公钥a后,使用自己的私钥b计算共享密钥S = A^b mod p;由于目的地系统和中转平台所计算出来的共享密钥相同,因此,中转平台和目的地系统使用密钥派生函数并结合共享密钥S和会话ID生成通话密钥,以使得中转平台和目的地系统根据通话密钥构建数据传输通道。In an embodiment of the present application, after the transit platform encrypts the encrypted data according to the destination system public key and the target key K to obtain the target encrypted data, in order to further ensure the data transmission between the transit platform and the destination system, the transit platform negotiates a key with the destination system to generate a call key. Specifically, the transit platform determines a prime number p and a base g, and sends the prime number p and the base g to the destination system; the destination system randomly selects a private key a, and calculates its public key A = g^a mod p, the transit platform randomly selects a private key b, calculates its public key B = g^b mod p, the destination system sends its public key a to the transit platform, and the transit platform sends its public key b to the destination system; when the destination system receives the transit platform public key b, it uses the private key a to calculate the shared key S = B^a mod p; when the transit platform receives the destination system public key a, it uses its own private key b to calculate the shared key S = A^b mod p; Since the shared key calculated by the destination system and the transit platform is the same, the transit platform and the destination system use a key derivation function and combine the shared key S and the session ID to generate a call key, so that the transit platform and the destination system build a data transmission channel based on the call key.
S409、所述中转平台将所述目标加密数据和所述源系统公钥发送至所述目的地系统;S409, the transfer platform sends the target encrypted data and the source system public key to the destination system;
在本申请实施例中,中转平台和目的地系统在根据通话密钥构建数据传输通道之后,进一步的,中转平台将目标加密数据和源系统公钥通过数据传输通道发送至目的地系统中,目的地系统将接收到的目标加密数据和源系统公钥进行暂存,并用于执行后续的数据处理。In an embodiment of the present application, after the transit platform and the destination system establish a data transmission channel based on the call key, the transit platform further sends the target encrypted data and the source system public key to the destination system through the data transmission channel, and the destination system temporarily stores the received target encrypted data and the source system public key, and uses them to perform subsequent data processing.
S410、所述目的地系统使用所述目的地系统私钥解密所述目标加密数据得到所述加密数据;S410, the destination system uses the destination system private key to decrypt the target encrypted data to obtain the encrypted data;
S411、所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;S411, the destination system verifies the digital signature on the encrypted data using the source system public key;
S412、在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统;所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。S412. After successful verification, the transfer platform sends the symmetric key pair to the destination system; the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
在本申请实施中,步骤S410至步骤S412与前述步骤S108至步骤S110类似,在此不再赘述。In the implementation of this application, steps S410 to S412 are similar to the aforementioned steps S108 to S110 and will not be repeated here.
请参阅图8至图9,本申请提供了一个数据流通处理方法的另一个实施例,所述数据流通处理方法应用在源系统、中转平台和目的地系统,该实施例包括:Please refer to FIG. 8 and FIG. 9 . The present application provides another embodiment of a data circulation processing method. The data circulation processing method is applied to a source system, a transfer platform and a destination system. The embodiment includes:
S501、所述源系统、所述中转平台和所述目的地系统分别生成源系统密钥对、中转平台密钥对和目的地系统密钥对,所述源系统密钥对包括源系统公钥和源系统私钥,所述中转平台密钥对包括中转平台公钥和中转平台私钥,所述目的地系统密钥对包括目的地系统公钥和目的地系统私钥;S501, the source system, the transfer platform and the destination system generate a source system key pair, a transfer platform key pair and a destination system key pair respectively, the source system key pair includes a source system public key and a source system private key, the transfer platform key pair includes a transfer platform public key and a transfer platform private key, and the destination system key pair includes a destination system public key and a destination system private key;
S502、所述源系统与所述中转平台之间进行所述源系统公钥和所述中转平台公钥的交换;S502: The source system and the transfer platform exchange the source system public key and the transfer platform public key;
S503、所述中转平台和所述源系统进行密钥协商以生成对称密钥;S503: The transfer platform and the source system perform key negotiation to generate a symmetric key;
S504、所述源系统使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统私钥在所述加密数据上进行加密并生成数字签名;S504: The source system uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the source system private key to encrypt the encrypted data and generate a digital signature;
S505、所述源系统将所述加密数据和所述数字签名发送至所述中转平台;S505, the source system sends the encrypted data and the digital signature to the transfer platform;
S506、所述中转平台使用所述源系统公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台与所述目的地系统进行目的地系统公钥和中转平台公钥的交换;S506: The transfer platform verifies the digital signature using the source system public key. After determining the integrity of the target encrypted data, the transfer platform exchanges the destination system public key and the transfer platform public key with the destination system.
S507、所述中转平台使用所述目的地系统公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统公钥发送至所述目的地系统;S507: The transfer platform uses the destination system public key to encrypt the encrypted data to obtain target encrypted data, and sends the target encrypted data and the source system public key to the destination system;
在本申请实施例中,步骤S501至步骤S507与前述步骤S101至步骤S107类似,在此不再赘述。In the embodiment of the present application, steps S501 to S507 are similar to the aforementioned steps S101 to S107 and are not described again here.
S508、所述目的地系统接收所述中转平台发送的所述目标加密数据和一串随机数;S508, the destination system receives the target encrypted data and a string of random numbers sent by the transfer platform;
在本申请实施例中,中转平台将目标加密数据和源系统公钥发送至目的地系统之后,进一步的,还将一串随机数也一起发送至目的地系统中,以使得目的地系统从中转平台处接收到目标加密数据、一串随机数和源系统公钥。In an embodiment of the present application, after the transfer platform sends the target encrypted data and the source system public key to the destination system, it further sends a string of random numbers to the destination system, so that the destination system receives the target encrypted data, a string of random numbers and the source system public key from the transfer platform.
具体的,中转平台在将目标加密数据和源系统公钥发送至目的地系统之后,采取了进一步的安全措施,为了增强数据传输过程中的安全性,中转平台还生成了一串随机数,并将其与目标加密数据和源系统公钥一同发送至目的地系统。这样,目的地系统在接收到数据时,不仅能够获得目标加密数据和源系统公钥,还能够获得这串随机数,从而确保数据传输的完整性和安全性。Specifically, after sending the target encrypted data and the source system public key to the destination system, the transit platform takes further security measures. In order to enhance the security of data transmission, the transit platform also generates a string of random numbers and sends it to the destination system together with the target encrypted data and the source system public key. In this way, when the destination system receives the data, it can not only obtain the target encrypted data and the source system public key, but also obtain this string of random numbers, thereby ensuring the integrity and security of data transmission.
具体来说,这串随机数在数据传输过程中起到了重要作用。首先,它可以作为一种校验机制,用于验证数据的完整性,当目的地系统接收到数据时,可以通过对比中转平台所持有的随机数是否一致来判断数据在传输过程中是否发生了篡改或损坏,如果随机数一致,那么可以认为数据是完整无损的;如果随机数不一致,则说明数据在传输过程中出现了问题,需要进行相应的处理。Specifically, this string of random numbers plays an important role in the data transmission process. First, it can be used as a verification mechanism to verify the integrity of the data. When the destination system receives the data, it can determine whether the data has been tampered with or damaged during the transmission process by comparing the random numbers held by the transit platform. If the random numbers are consistent, then the data can be considered intact; if the random numbers are inconsistent, it means that there is a problem with the data during transmission and corresponding processing is required.
其次,这串随机数还可以作为一种加密机制,用于增强数据的安全性。在发送数据之前,中转平台可以使用这串随机数对目标加密数据进行进一步的加密处理,以确保数据在传输过程中不被非法截取或篡改。当目的地系统接收到加密后的数据时,可以使用相应的解密算法和这串随机数进行解密操作,从而还原出原始的目标加密数据。这样,即使数据在传输过程中被非法截取,攻击者也无法直接获取到目标加密数据的内容,从而保证了数据的安全性。Secondly, this string of random numbers can also be used as an encryption mechanism to enhance data security. Before sending the data, the transit platform can use this string of random numbers to further encrypt the target encrypted data to ensure that the data is not illegally intercepted or tampered with during the transmission process. When the destination system receives the encrypted data, it can use the corresponding decryption algorithm and this string of random numbers to perform decryption operations to restore the original target encrypted data. In this way, even if the data is illegally intercepted during the transmission process, the attacker cannot directly obtain the content of the target encrypted data, thereby ensuring the security of the data.
此外,这串随机数还可以作为一种身份验证机制,用于确认中转平台和目的地系统的身份,在中转平台发送数据之前,中转平台可以将这串随机数作为一种身份验证信息附加在目标加密数据上。当目的地系统接收到目标加密数据时,可以通过验证这串随机数是否与预期的一致来确认发送方的身份是否正确。同样地,中转平台也可以通过验证目的地系统所持有的随机数来确认接收方的身份是否正确。这样,就可以有效地防止假冒身份的攻击者进行非法操作。In addition, this string of random numbers can also be used as an authentication mechanism to confirm the identity of the transit platform and the destination system. Before the transit platform sends data, the transit platform can attach this string of random numbers as authentication information to the target encrypted data. When the destination system receives the target encrypted data, it can confirm whether the sender's identity is correct by verifying whether the string of random numbers is consistent with the expected one. Similarly, the transit platform can also confirm whether the receiver's identity is correct by verifying the random numbers held by the destination system. In this way, it can effectively prevent attackers who impersonate others from performing illegal operations.
S509、所述目的地系统使用目的地系统公钥和一串随机数通过所述目标哈希函数计算哈希值;S509, the destination system uses the destination system public key and a string of random numbers to calculate a hash value through the target hash function;
在本申请实施例中,这串随机数被用作输入的一部分,与目的地系统公钥一起传递给目标哈希函数,通过这样的操作,可以获得了一个哈希值,这个哈希值是独特且不可预测,哈希函数具有单向性,即无法通过哈希值反向推导出原始输入,这使得哈希值成为一种非常有效的数据校验机制,可以确保数据的完整性和未被篡改。In an embodiment of the present application, this string of random numbers is used as part of the input and passed to the target hash function together with the destination system public key. Through such an operation, a hash value can be obtained. This hash value is unique and unpredictable. The hash function is one-way, that is, the original input cannot be reversed through the hash value, which makes the hash value a very effective data verification mechanism that can ensure the integrity of the data and that it has not been tampered with.
S510、所述目的地系统使用哈希值通过密钥派生函数生成解密密钥;S510, the destination system generates a decryption key using a hash value through a key derivation function;
在本申请实施例中,使用哈希值和密钥派生函数来生成解密密钥的方式,既保证了数据的安全性,又保证了数据的完整性,它使得只有拥有正确密钥和哈希值的接收者才能解密和读取数据,从而有效地防止了数据的非法访问和篡改。In the embodiment of the present application, the method of using hash value and key derivation function to generate decryption key ensures both the security and integrity of the data. It allows only the recipient with the correct key and hash value to decrypt and read the data, thereby effectively preventing illegal access and tampering of the data.
S511、所述目的地系统使用解密密钥和目的地系统私钥解密所述目标加密数据后得到加密数据;S511, the destination system uses the decryption key and the destination system private key to decrypt the target encrypted data to obtain encrypted data;
在本申请实施例中,解密后的加密数据在目的地系统中扮演了关键的角色,这个数据不仅代表了原始信息的核心,还是确保信息在传输过程中未被篡改的关键。为了确保数据的完整性和安全性,目的地系统采用了先进的加密技术来保护这些数据。In the embodiment of the present application, the decrypted encrypted data plays a key role in the destination system. This data not only represents the core of the original information, but also is the key to ensure that the information has not been tampered with during transmission. In order to ensure the integrity and security of the data, the destination system uses advanced encryption technology to protect the data.
在解密过程中,目的地系统首先使用解密密钥来解开目标加密数据的外部保护层。这一步骤至关重要,因为它确保了只有拥有正确密钥的接收者才能访问数据的内容,一旦外部保护层被解开,系统就会暴露出加密数据的真实面貌。During the decryption process, the destination system first uses the decryption key to unlock the outer protection layer of the target encrypted data. This step is crucial because it ensures that only the recipient with the correct key can access the content of the data. Once the outer protection layer is unlocked, the system will expose the true face of the encrypted data.
接下来,目的地系统利用自身的私钥对解密后的数据进行进一步的解密操作,私钥是目的地系统独有的,它确保了只有该系统能够访问和解密这些数据,这一步骤不仅增强了数据的安全性,还保证了数据的私密性。Next, the destination system uses its own private key to further decrypt the decrypted data. The private key is unique to the destination system, which ensures that only the system can access and decrypt the data. This step not only enhances the security of the data, but also ensures the privacy of the data.
解密后的数据现在可以在目的地系统中自由流通,但系统仍然会对其进行严格的监控和管理,通过实施一系列的安全措施,如访问控制、数据审计和加密存储等,目的地系统确保了解密后的数据不会被未经授权的第三方获取或滥用。The decrypted data can now flow freely in the destination system, but the system will still be strictly monitored and managed. By implementing a series of security measures such as access control, data auditing and encrypted storage, the destination system ensures that the decrypted data will not be obtained or abused by unauthorized third parties.
S512、所述目的地系统使用源系统公钥对所述加密数据上的数字签名进行验证;S512, the destination system verifies the digital signature on the encrypted data using the source system public key;
S513、在验证成功之后,所述中转平台将所述对称密钥对发送至目的地系统,以使得所述目的地系统使用对称密钥对解锁所述加密数据,以得到所述源系统传输的所述目标数据。S513. After successful verification, the transfer platform sends the symmetric key pair to the destination system, so that the destination system uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system.
在本申请实施例中,步骤S512至步骤S513与前述步骤S109这步骤S110类似,在此不再赘述。In the embodiment of the present application, steps S512 to S513 are similar to the aforementioned steps S109 to S110 and are not described in detail herein.
请参阅图10、本申请第二方面提供了一种数据流通处理系统,所述数据流通处理系统包括:Referring to FIG. 10 , the second aspect of the present application provides a data circulation processing system, the data circulation processing system comprising:
源系统1、中转平台2和目的地系统3,所述源系统1、所述中转平台2和所述目的地系统3执行如下操作:The source system 1, the transfer platform 2 and the destination system 3 perform the following operations:
所述源系统1、所述中转平台2和所述目的地系统3分别生成源系统1密钥对、中转平台2密钥对和目的地系统3密钥对,所述源系统1密钥对包括源系统1公钥和源系统1私钥,所述中转平台2密钥对包括中转平台2公钥和中转平台2私钥,所述目的地系统3密钥对包括目的地系统3公钥和目的地系统3私钥;The source system 1, the transfer platform 2 and the destination system 3 generate a source system 1 key pair, a transfer platform 2 key pair and a destination system 3 key pair respectively, the source system 1 key pair includes a source system 1 public key and a source system 1 private key, the transfer platform 2 key pair includes a transfer platform 2 public key and a transfer platform 2 private key, and the destination system 3 key pair includes a destination system 3 public key and a destination system 3 private key;
所述源系统1与所述中转平台2之间进行所述源系统公钥和所述中转平台公钥的交换;The source system 1 and the transfer platform 2 exchange the source system public key and the transfer platform public key;
所述中转平台2和所述源系统1进行密钥协商以生成对称密钥;The transfer platform 2 and the source system 1 perform key negotiation to generate a symmetric key;
所述源系统1使用所述对称密钥对目标数据进行加密得到加密数据,并使用源系统1私钥在所述加密数据上进行加密并生成数字签名;The source system 1 uses the symmetric key to encrypt the target data to obtain encrypted data, and uses the private key of the source system 1 to encrypt the encrypted data and generate a digital signature;
所述源系统1将所述加密数据和所述数字签名发送至所述中转平台2;The source system 1 sends the encrypted data and the digital signature to the transfer platform 2;
所述中转平台2使用所述源系统1公钥验证所述数字签名,当确定所述目标加密数据的完整性之后,所述中转平台2与所述目的地系统3进行目的地系统3公钥和中转平台2公钥的交换;The transfer platform 2 verifies the digital signature using the public key of the source system 1. After determining the integrity of the target encrypted data, the transfer platform 2 exchanges the public key of the destination system 3 and the public key of the transfer platform 2 with the destination system 3.
所述中转平台2使用所述目的地系统3公钥对所述加密数据进行加密得到目标加密数据,并将所述目标加密数据和所述源系统1公钥发送至所述目的地系统3;The transfer platform 2 uses the public key of the destination system 3 to encrypt the encrypted data to obtain target encrypted data, and sends the target encrypted data and the public key of the source system 1 to the destination system 3;
所述目的地系统3使用所述目的地系统3私钥解密所述目标数据包得到所述加密数据;The destination system 3 uses the destination system 3 private key to decrypt the target data packet to obtain the encrypted data;
所述目的地系统3使用源系统1公钥对所述加密数据上的数字签名进行验证;The destination system 3 verifies the digital signature on the encrypted data using the source system 1 public key;
在验证成功之后,所述中转平台2将所述共享密钥对发送至目的地系统3,以使得所述目的地系统3使用对称密钥对解锁所述加密数据,以得到所述源系统1传输的所述目标数据。After successful verification, the transfer platform 2 sends the shared key pair to the destination system 3, so that the destination system 3 uses the symmetric key pair to unlock the encrypted data to obtain the target data transmitted by the source system 1.
请参阅图11,本申请还提供了一种数据流通处理装置,包括:Please refer to FIG. 11 , the present application also provides a data flow processing device, including:
处理器701、存储器702、输入输出单元703、总线704;Processor 701, memory 702, input and output unit 703, bus 704;
处理器701与存储器702、输入输出单元703以及总线704相连;The processor 701 is connected to the memory 702, the input and output unit 703 and the bus 704;
存储器702保存有程序,处理器701调用程序以执行如上任一方法。The memory 702 stores a program, and the processor 701 calls the program to execute any of the above methods.
本申请还涉及一种计算机可读存储介质,计算机可读存储介质上保存有程序,其特征在于,当程序在计算机上运行时,使得计算机执行如上任一方法。The present application also relates to a computer-readable storage medium on which a program is stored, wherein when the program is run on a computer, the computer is caused to execute any of the above methods.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-onlymemory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims (22)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410632457.8A CN118214558B (en) | 2024-05-21 | 2024-05-21 | Data circulation processing method, system, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410632457.8A CN118214558B (en) | 2024-05-21 | 2024-05-21 | Data circulation processing method, system, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118214558A CN118214558A (en) | 2024-06-18 |
CN118214558B true CN118214558B (en) | 2024-08-23 |
Family
ID=91454904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410632457.8A Active CN118214558B (en) | 2024-05-21 | 2024-05-21 | Data circulation processing method, system, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118214558B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118573473B (en) * | 2024-07-31 | 2024-10-11 | 飞驰云联(南京)科技有限公司 | Network data safety transmission method based on trusted platform |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021009554A1 (en) * | 2019-07-18 | 2021-01-21 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and system for secured information exchange between intermediate and endpoint nodes in a communications network |
CN117879833A (en) * | 2024-01-15 | 2024-04-12 | 郑州盛见网络科技有限公司 | Digital signature generation method based on improved elliptic curve |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220385453A1 (en) * | 2021-05-28 | 2022-12-01 | Atakama LLC | Secure file transfer |
-
2024
- 2024-05-21 CN CN202410632457.8A patent/CN118214558B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021009554A1 (en) * | 2019-07-18 | 2021-01-21 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and system for secured information exchange between intermediate and endpoint nodes in a communications network |
CN117879833A (en) * | 2024-01-15 | 2024-04-12 | 郑州盛见网络科技有限公司 | Digital signature generation method based on improved elliptic curve |
Also Published As
Publication number | Publication date |
---|---|
CN118214558A (en) | 2024-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102619383B1 (en) | End-to-end double ratchet encryption using epoch key exchange | |
CN104023013B (en) | Data transmission method, server side and client | |
US12010216B2 (en) | Computer-implemented system and method for highly secure, high speed encryption and transmission of data | |
US12284270B2 (en) | Systems and methods for providing signatureless, confidential and authentication of data during handshake for classical and quantum computing environments | |
TW201733302A (en) | Secure multiparty loss resistant storage and transfer of cryptographic keys for blockchain based systems in conjunction with a wallet management system | |
CN109274502B (en) | Method and device for creating public key encryption and key signature and readable storage medium | |
JP2022537733A (en) | Authenticated key agreement | |
CN118784337B (en) | Data security transmission method and system based on autonomous security interaction protocol | |
CN102724041A (en) | Steganography-based key transmission and key updating method | |
EP3883178A1 (en) | Encryption system and method employing permutation group-based encryption technology | |
US11528127B2 (en) | Computer-implemented system and method for highly secure, high speed encryption and transmission of data | |
CN113242129B (en) | End-to-end data confidentiality and integrity protection method based on lattice encryption | |
TW201537937A (en) | Unified identity authentication platform and authentication method thereof | |
CN118540163B (en) | Anti-quantum security enhancement method for national secret SSL VPN protocol | |
CN118540165B (en) | Anti-quantum security enhancement method for national secret IPSec VPN protocol | |
CN117201000A (en) | Mass data secure communication method, equipment and medium based on temporary key agreement | |
CN118214558B (en) | Data circulation processing method, system, device and storage medium | |
CN114386020A (en) | Method and system for fast secondary identity authentication based on quantum security | |
CN114553420B (en) | Digital envelope packaging method based on quantum key and data secret communication network | |
WO2020042023A1 (en) | Instant messaging data encryption method and apparatus | |
EP4305800A1 (en) | Devices and methods for performing cryptographic handshaking | |
CN117749909A (en) | Data transmission method, data processing method and computer equipment | |
Arora et al. | Handling Secret Key Compromise by Deriving Multiple Asymmetric Keys based on Diffie-Hellman Algorithm | |
CN113691373A (en) | A quantum-resistant key escrow system and method based on consortium blockchain | |
Chauhan et al. | Enhancing Mobile Cloud Computing Security with SHA-256 and RSA for User Authentication and Data Sharing |
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 |