Data security interaction method and device based on block chain, equipment and storage medium

Through blockchain, the coordinated decryption party is determined to jointly carry out the decryption operation, which solves the problem of private key leakage risk in traditional data encryption and improves the security and reliability of the data transmission process.

CN119066707AActive Publication Date: 2024-12-03BEIJING PASSWORD CLOUD CORE TECH CO LTD

Patent Information

Application Number
CN202411148939.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-03
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

During the traditional data encryption process, the data demander needs to hold a complete private key, which increases the risk of private key leakage and affects data security, especially in the case of poor hardware environment.

Method used

The blockchain-based data security interaction method is adopted, and the blockchain determines the coordinated decryption party to jointly perform the decryption operation, avoiding the unilateral decryption of the data demander, and encrypting the intermediate parameters using the blockchain to ensure the security of the data transmission process.

Benefits of technology

It improves the security and reliability of the data interaction process, avoids the situation where the key is maliciously intercepted by the intermediate party and obtains plaintext data, and enhances the security of the data transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066707A_ABST
    Figure CN119066707A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain-based data security interaction method, apparatus and device, and a storage medium. The method comprises the steps of obtaining an encrypted data ciphertext and a target public key sent by a data sender; generating a private key acquisition request according to the target public key; sending a private key acquisition request to the block chain, determining a target private key matched with the target public key by the block chain based on the private key acquisition request, performing key splitting on the target private key to obtain a first private key fragment and a second private key fragment, sending the first private key fragment to the data demander, and sending the second private key fragment to the collaborative decryption party; determining a first intermediate value according to the encrypted data ciphertext, sending the first intermediate value to a collaborative decryption party through a block chain, generating a second intermediate value by the collaborative decryption party based on the first intermediate value and a second private key fragment, and sending the second intermediate value to a data demand party through the block chain; and decrypting the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain a data plaintext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a data security interaction method, device, equipment, and storage medium based on blockchain. Background Art

[0002] With the continuous improvement of data security awareness, in order to protect data privacy and confidentiality, the transmitted data is usually encrypted during the data transmission process to prevent it from being monitored and stolen by hackers and unauthorized third parties during the data transmission process.

[0003] In the traditional data encryption process, the data demander and the data provider usually encrypt and decrypt based on pre-negotiated encryption and decryption specifications. However, this method requires the data demander to hold a complete private key. Based on the poor application hardware environment of the data demander, the private key is easily leaked, which affects data security to a certain extent. Summary of the invention

[0004] The present invention provides a data security interaction method, device, equipment, and storage medium based on blockchain to improve the security of data encryption and decryption and data interaction processes.

[0005] According to one aspect of the present invention, a data security interaction method based on blockchain is provided, which is applied to a data demander, and the method includes:

[0006] Obtain the encrypted data ciphertext and target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain;

[0007] Generate a private key acquisition request according to the target public key;

[0008] Sending a private key acquisition request to the blockchain, so that the blockchain determines a target private key matching the target public key based on the private key acquisition request, splits the target private key to obtain a first private key fragment and a second private key fragment, and sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party;

[0009] Determine a first intermediate value according to the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key shard, and send the second intermediate value to the data demander through the blockchain;

[0010] The encrypted data ciphertext is decrypted according to the second intermediate value and the first private key fragment to obtain data plaintext.

[0011] According to another aspect of the present invention, a data security interaction method based on blockchain is provided, which is applied to blockchain and includes:

[0012] Obtain a private key acquisition request sent by a data demander; the private key acquisition request is generated based on the target public key when the data demander obtains the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain;

[0013] Based on the private key acquisition request, determine a target private key that matches the target public key, and perform key splitting on the target private key to obtain a first private key fragment and a second private key fragment;

[0014] Sending the first private key fragment to the data demander, and sending the second private key fragment to the collaborative decryption party, so that the data demander can determine and feedback a first intermediate value according to the encrypted data ciphertext;

[0015] Sending the first intermediate value to the collaborative decryption party, so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate value and the second private key shard;

[0016] The second intermediate value is sent to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key shard to obtain the data plaintext.

[0017] According to another aspect of the present invention, a data security interaction device based on blockchain is provided, which is configured on a data demander and includes:

[0018] A ciphertext acquisition module, used to acquire the encrypted data ciphertext and target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain;

[0019] A request generation module, used to generate a private key acquisition request according to the target public key;

[0020] A request sending module, configured to send a private key acquisition request to the blockchain, so that the blockchain determines a target private key matching the target public key based on the private key acquisition request, performs key splitting on the target private key to obtain a first private key fragment and a second private key fragment, and sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party;

[0021] A first intermediate value determination module, configured to determine a first intermediate value according to the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key shard, and send the second intermediate value to the data demander through the blockchain;

[0022] The ciphertext decryption module is used to decrypt the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext.

[0023] According to another aspect of the present invention, there is provided a data security interaction device based on blockchain, which is configured on blockchain and includes:

[0024] A request acquisition module, used to acquire a private key acquisition request sent by a data demander; the private key acquisition request is generated based on the target public key when the data demander acquires the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain;

[0025] A key splitting module is used to determine a target private key matching the target public key based on the private key acquisition request, and split the target private key to obtain a first private key fragment and a second private key fragment;

[0026] A key shard sending module, used to send the first private key shard to the data demander, and send the second private key shard to the collaborative decryption party, so that the data demander can determine and feedback a first intermediate value according to the encrypted data ciphertext;

[0027] A first intermediate value sending module, configured to send the first intermediate value to the collaborative decryption party, so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate value and the second private key shard;

[0028] The second intermediate value sending module is used to send the second intermediate value to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext.

[0029] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0030] at least one processor; and

[0031] a memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the blockchain-based data security interaction method described in any embodiment of the present invention.

[0033] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the blockchain-based data security interaction method described in any embodiment of the present invention when executed.

[0034] The above technical solution determines the collaborative decryption party to jointly perform the decryption operation through the blockchain, thus avoiding the low data security caused by the data demander unilaterally decrypting the data. The blockchain encrypts the intermediate parameters to ensure the security of the data transmission process. The collaborative decryption method avoids the situation where the key is maliciously intercepted by the intermediate party and the plaintext data is obtained, which improves the security and reliability of the data interaction process to a certain extent.

[0035] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 This is a flowchart of a data security interaction method based on blockchain provided according to Embodiment 1 of the present invention;

[0038] Figure 2 This is a flowchart of a data security interaction method based on blockchain provided according to Embodiment 2 of the present invention;

[0039] Figure 3 This is an interactive schematic diagram of a data security interactive method based on blockchain provided according to Embodiment 3 of the present invention;

[0040] Figure 4 This is a structural diagram of a data security interaction device based on blockchain provided according to Embodiment 4 of the present invention;

[0041] Figure 5This is a structural diagram of a data security interaction device based on blockchain provided according to Embodiment 5 of the present invention;

[0042] Figure 6 It is a structural schematic diagram of an electronic device that implements the blockchain-based data security interaction method of an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] Embodiment 1

[0046] Figure 1 This is a flowchart of a data security interaction method based on blockchain provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of data security interaction transmission. The method can be executed by a data security interaction device based on blockchain. The data security interaction device based on blockchain can be implemented in the form of hardware and / or software. The data security interaction device based on blockchain can be configured in the electronic device of the data demander. Figure 1 As shown, the method includes:

[0047] S110, obtaining the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain.

[0048] The data sender may be a data provider, that is, the data sender usually provides its own data to a party that has a need for the data. The data demander may be a party that has a need to obtain the data.

[0049] The data sender can encrypt the plaintext data to be sent to the data demander to obtain the encrypted data ciphertext. The encryption method of the plaintext data is to encrypt it based on the target public key. The target public key can be obtained by the data sender by initiating a key acquisition request to the blockchain.

[0050] Specifically, the data sender sends a key acquisition request to the blockchain; after receiving the key acquisition request sent by the data sender, the blockchain sends the target public key to the data sender. After receiving the target public key, the data sender uses the target public key to encrypt the data plaintext to obtain the encrypted data ciphertext. Among them, the encryption method can be based on the SM2 algorithm (SM2 Elliptic Curve Public Key Cryptography Algorithm), using the target public key to encrypt the data plaintext to obtain the encrypted data ciphertext.

[0051] The data sender sends the encrypted data ciphertext and the target public key to the data demander, who then obtains the encrypted data ciphertext and the target public key.

[0052] S120. Generate a private key acquisition request according to the target public key.

[0053] Exemplarily, when receiving the target public key, the data demander may generate a public key identifier of the target public key, wherein the public key identifier is used to characterize the uniqueness of the public key; and generate a private key acquisition request based on the public key identifier of the target public key.

[0054] S130. Send a private key acquisition request to the blockchain, so that the blockchain determines the target private key that matches the target public key based on the private key acquisition request, splits the target private key to obtain a first private key fragment and a second private key fragment, and sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party.

[0055] The data demander sends a private key acquisition request to the blockchain. After receiving the private key acquisition request, the on-chain node of the blockchain can parse the private key acquisition request and obtain a public key identifier. Based on the public key identifier obtained by parsing, the blockchain determines the target public key corresponding to the public key identifier and determines the target private key that matches the target public key. The blockchain splits the target private key into a first private key shard and a second private key shard. The first private key shard is also the first private key component, and the second private key shard is also the second private key component. The blockchain sends the first private key shard to the data demander and sends the second private key shard to the collaborative decryption party.

[0056] Among them, the collaborative decryption party can be a party determined by the blockchain for collaborative decryption with the data demander, which can be a blockchain node or a client.

[0057] Among them, the way in which the blockchain splits the target private key can be pre-set by relevant technical personnel. For example, if the target private key is expressed as a string and the string has 16 bits, the first 8 bits are determined as the first private key fragment, and the last 8 bits are determined as the second private key fragment.

[0058] S140. Determine a first intermediate value based on the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party can generate a second intermediate value based on the first intermediate value and the second private key shards, and send the second intermediate value to the data demander through the blockchain.

[0059] In an optional embodiment, the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key according to the elliptic curve public key cryptography algorithm (SM2), including the first sub-data ciphertext, the second sub-data ciphertext and the third sub-data ciphertext.

[0060] The data sender uses the target public key to encrypt the data plaintext based on the elliptic curve public key cryptography (SM2) technology to obtain the first sub-data ciphertext C1, which is the encrypted encrypted data ciphertext. The second sub-data ciphertext C2, which is a random number, is specifically a randomly generated value during the encryption process. In the SM2 encryption algorithm, random numbers are used to generate part of the ciphertext and ensure the security of the encryption. The third sub-data ciphertext C3, which is the public key point, is a point generated by combining the random number and the target public key during the encryption process. It is usually transmitted together with the encrypted data ciphertext to help the data demander recover the data plaintext during the decryption process.

[0061] Determine a first intermediate value according to the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key sharding, and sends the second intermediate value to the data demander through the blockchain, including:

[0062] Step a1: Generate a target random number, and determine a first intermediate value based on the target random number and the first sub-data ciphertext in the encrypted data ciphertext.

[0063] The data demander randomly generates a target random number; based on the target random number K and the first sub-data ciphertext C1 in the encrypted data ciphertext, a first intermediate value T1 is generated. The specific generation method is as follows:

[0064] T1 = K[*]C1;

[0065] Step a2: Send the first intermediate value to the blockchain, so that the blockchain can encrypt the first intermediate value based on the trusted execution environment to obtain the first intermediate ciphertext, and send the first intermediate ciphertext to the collaborative decryption party, which generates and feeds back the second intermediate value to the blockchain based on the first intermediate ciphertext and the second private key shards, and the blockchain encrypts the second intermediate value based on the trusted execution environment, generates and feeds back the second intermediate ciphertext.

[0066] The data demander sends the first intermediate value to the blockchain; the blockchain encrypts the first intermediate value in the trusted execution environment (TEE) to obtain the first intermediate ciphertext. It can be understood that performing encryption operations in a trusted execution environment can ensure the security of the data encryption process to a certain extent and prevent leakage. The blockchain can encrypt the first intermediate value by symmetric encryption or asymmetric encryption to improve the security of the data transmission process. The key for decrypting the intermediate value is negotiated and stored by the blockchain in advance with different clients. For example, the key for decryption is pre-stored in the data demander and the collaborative decryption party.

[0067] The blockchain uses the pre-negotiated encryption key to encrypt the first intermediate value in the trusted execution environment to obtain the first intermediate ciphertext, and sends the first intermediate ciphertext to the collaborative decryption party. After receiving the first intermediate ciphertext, the collaborative decryption party decrypts the first intermediate ciphertext based on the pre-negotiated stored decryption key to obtain the decrypted first intermediate value. The collaborative decryption party decrypts the first intermediate value T1 and the second private key shard D A2 , determine the second intermediate value T2. The specific implementation method of generating the second intermediate value T2 is as follows:

[0068]

[0069] The collaborative decryption party sends the second intermediate value T2 to the blockchain. In the trusted execution environment, the blockchain uses the pre-negotiated encryption key to encrypt the second intermediate value to obtain the second intermediate ciphertext, and sends the second intermediate ciphertext to the data demander.

[0070] Step a3: Obtain a second intermediate ciphertext, and decrypt the second intermediate ciphertext to obtain a second intermediate value.

[0071] The data demander obtains the second intermediate ciphertext, decrypts the second intermediate ciphertext based on the negotiated decryption key, and obtains a second intermediate value.

[0072] The above technical solution transmits intermediate data through blockchain, and encrypts the intermediate data transmitted between the data demander and the collaborative decryption party in a trusted execution environment, which improves the security of the data transmission process to a certain extent, and performs data encryption in a trusted execution environment, thereby improving the security of the data encryption process.

[0073] S150. Decrypt the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext.

[0074] In an optional embodiment, decrypting the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain the data plaintext includes:

[0075] Step b1: Generate a third intermediate value according to the first private key fragment, the target random number, the second intermediate value and the first sub-data ciphertext.

[0076] When the target random number generates ciphertext, the target public key and the characteristics of the SM2 algorithm are combined, and the elliptic curve can generate and calculate a temporary coordinate point, namely the third intermediate value (x2, y2). The generation method of the third intermediate value (x2, y2) is as follows:

[0077]

[0078] Step b2: Generate a key derivation result according to the third intermediate value and based on a key derivation function.

[0079] The key derivation function may be a KDF (Key Derivation Function).

[0080] Exemplarily, the key derivation result t may be generated as follows:

[0081] t=KDF(x2||y2,klen);

[0082] Among them, klen can represent the key generation length.

[0083] Step b3: Determine the data plaintext based on the key derivation result and the second sub-data ciphertext.

[0084] Exemplarily, according to the key derivation result t and the second sub-data ciphertext C2, the data plaintext T may be determined as follows:

[0085]

[0086] In order to further ensure the accuracy of the data plaintext generated by the data demander, the data plaintext T may be further verified for correctness.

[0087] Optionally, after determining the data plaintext according to the key derivation result and the target random number, the method further includes: verifying the correctness of the data plaintext according to the key derivation result and the third sub-data ciphertext to obtain a verification result.

[0088] Specifically, the parameter to be verified C3′ is generated as follows:

[0089] C3′=Hash(x2||T||y2);

[0090] If the parameter to be verified C3′ is the same as the third sub-data ciphertext C3, it means that the correctness verification of the data plaintext has passed; if the parameter to be verified C3′ is different from the third sub-data ciphertext C3, it means that the correctness verification of the data plaintext has failed.

[0091] The technical solution of the embodiment of the present invention obtains the encrypted data ciphertext and the target public key sent by the data sender, and sends a private key acquisition request to the blockchain, so that the blockchain can determine the target private key matching the target public key based on the private key acquisition request, split the target private key to obtain the first private key fragment and the second private key fragment, and send the first private key fragment to the data demander, and send the second private key fragment to the collaborative decryption party; according to the encrypted data ciphertext, determine the first intermediate value, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party can generate the second intermediate value based on the first intermediate value and the second private key fragment, and send the second intermediate value to the data demander through the blockchain; according to the second intermediate value and the first private key fragment, decrypt the encrypted data ciphertext to obtain the data plaintext. The above technical solution avoids the low data security caused by the data demander unilaterally decrypting the data by determining the collaborative decryption party to perform the decryption operation together by the blockchain. The way in which the blockchain encrypts the intermediate parameters ensures the security of the data transmission process. The collaborative decryption method prevents the key from being maliciously intercepted by an intermediary and obtaining plaintext data, which improves the security and reliability of the data interaction process to a certain extent.

[0092] Embodiment 2

[0093] Figure 2A flowchart of a data security interaction method based on blockchain is provided for the second embodiment of the present invention. This embodiment is applicable to the case of secure data interactive transmission. The method can be executed by a data security interaction device based on blockchain. The data security interaction device based on blockchain can be implemented in the form of hardware and / or software. The data security interaction device based on blockchain can be configured in an electronic device to which a blockchain node in the blockchain belongs.

[0094] like Figure 2 As shown, the method comprises the following specific steps:

[0095] S210, obtaining a private key acquisition request sent by a data demander; the private key acquisition request is generated based on the target public key when the data demander obtains the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain.

[0096] The data sender may be a data provider, that is, the data sender usually provides its own data to a party that has a need for the data. The data demander may be a party that has a need to obtain the data.

[0097] The data sender can encrypt the plaintext data to be sent to the data demander to obtain the encrypted data ciphertext. The encryption method of the plaintext data is to encrypt it based on the target public key. The target public key can be obtained by the data sender by initiating a key acquisition request to the blockchain.

[0098] Specifically, the data sender sends a key acquisition request to the blockchain; after receiving the key acquisition request sent by the data sender, the blockchain sends the target public key to the data sender. After receiving the target public key, the data sender uses the target public key to encrypt the data plaintext to obtain the encrypted data ciphertext. Among them, the encryption method can be based on the SM2 algorithm (SM2 Elliptic Curve Public Key Cryptography Algorithm), using the target public key to encrypt the data plaintext to obtain the encrypted data ciphertext.

[0099] The data sender sends the encrypted data ciphertext and the target public key to the data demander. The data demander obtains the encrypted data ciphertext and the target public key. When the data demander receives the target public key, it can generate a public key identifier of the target public key, where the public key identifier is used to characterize the uniqueness of the public key; based on the public key identifier of the target public key, it generates a private key acquisition request and sends the private key acquisition request to the blockchain.

[0100] S220: Based on the private key acquisition request, determine a target private key that matches the target public key, and perform key splitting on the target private key to obtain a first private key fragment and a second private key fragment.

[0101] The data demander sends a private key acquisition request to the blockchain. After receiving the private key acquisition request, the on-chain node of the blockchain can parse the private key acquisition request and obtain a public key identifier. Based on the public key identifier obtained by parsing, the blockchain determines the target public key corresponding to the public key identifier and determines the target private key that matches the target public key. The blockchain splits the target private key into a first private key shard and a second private key shard. The first private key shard is also the first private key component, and the second private key shard is also the second private key component. The blockchain sends the first private key shard to the data demander and sends the second private key shard to the collaborative decryption party.

[0102] Among them, the collaborative decryption party can be a party determined by the blockchain for collaborative decryption with the data demander, which can be a blockchain node or a client.

[0103] Among them, the way in which the blockchain splits the target private key can be pre-set by relevant technical personnel. For example, if the target private key is expressed as a string and the string has 16 bits, the first 8 bits are determined as the first private key fragment, and the last 8 bits are determined as the second private key fragment.

[0104] S230: Send the first private key fragment to the data demander, and send the second private key fragment to the collaborative decryption party, so that the data demander can determine and feedback the first intermediate value according to the encrypted data ciphertext.

[0105] The data sender uses the target public key to encrypt the data plaintext based on the elliptic curve public key cryptography (SM2) technology to obtain the first sub-data ciphertext C1, which is the encrypted encrypted data ciphertext. The second sub-data ciphertext C2, which is a random number, is specifically a randomly generated value during the encryption process. In the SM2 encryption algorithm, random numbers are used to generate part of the ciphertext and ensure the security of the encryption. The third sub-data ciphertext C3, which is the public key point, is a point generated by combining the random number and the target public key during the encryption process. It is usually transmitted together with the encrypted data ciphertext to help the data demander recover the data plaintext during the decryption process.

[0106] The data demander randomly generates a target random number; based on the target random number K and the first sub-data ciphertext C1 in the encrypted data ciphertext, a first intermediate value T1 is generated. The specific generation method is as follows:

[0107] T1 = K[*]C1;

[0108] S240: Send the first intermediate value to the collaborative decryption party, so that the collaborative decryption party can determine and feed back the second intermediate value based on the first intermediate value and the second private key shard.

[0109] Optionally, the first intermediate value is encrypted based on a trusted execution environment to obtain a first intermediate ciphertext, and the first intermediate ciphertext is sent to a collaborative decryption party so that the collaborative decryption party can determine and feedback a second intermediate value based on the first intermediate ciphertext and a second private key fragment.

[0110] The data demander sends the first intermediate value to the blockchain; the blockchain encrypts the first intermediate value in the trusted execution environment (TEE) to obtain the first intermediate ciphertext. It can be understood that performing encryption operations in a trusted execution environment can ensure the security of the data encryption process to a certain extent and prevent leakage. The blockchain can encrypt the first intermediate value by symmetric encryption or asymmetric encryption to improve the security of the data transmission process. The key for decrypting the intermediate value is negotiated and stored by the blockchain in advance with different clients. For example, the key for decryption is pre-stored in the data demander and the collaborative decryption party.

[0111] The blockchain uses the pre-negotiated encryption key to encrypt the first intermediate value in the trusted execution environment to obtain the first intermediate ciphertext, and sends the first intermediate ciphertext to the collaborative decryption party. After receiving the first intermediate ciphertext, the collaborative decryption party decrypts the first intermediate ciphertext based on the pre-negotiated stored decryption key to obtain the decrypted first intermediate value. The collaborative decryption party decrypts the first intermediate value T1 and the second private key shard D A2 , determine the second intermediate value T2. The specific implementation method of generating the second intermediate value T2 is as follows:

[0112]

[0113] The collaborative decryption party sends the second intermediate value T2 to the blockchain. In the trusted execution environment, the blockchain uses the pre-negotiated encryption key to encrypt the second intermediate value to obtain the second intermediate ciphertext, and sends the second intermediate ciphertext to the data demander.

[0114] S250. Send the second intermediate value to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key shard to obtain the data plaintext.

[0115] Optionally, the second intermediate value is encrypted based on a trusted execution environment to obtain a second intermediate ciphertext, and the second intermediate ciphertext is sent to the data demander so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate ciphertext and the first private key shard to obtain data plaintext.

[0116] In an optional embodiment, decrypting the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain the data plaintext includes:

[0117] Step b1: Generate a third intermediate value according to the first private key fragment, the target random number, the second intermediate value and the first sub-data ciphertext.

[0118] When the target random number generates ciphertext, the target public key and the characteristics of the SM2 algorithm are combined, and the elliptic curve can generate and calculate a temporary coordinate point, namely the third intermediate value (x2, y2). The generation method of the third intermediate value (x2, y2) is as follows:

[0119]

[0120] Step b2: Generate a key derivation result according to the third intermediate value and based on a key derivation function.

[0121] The key derivation function may be a KDF (Key Derivation Function).

[0122] Exemplarily, the key derivation result t may be generated as follows:

[0123] t=KDF(x2||y2,klen);

[0124] Among them, klen can represent the key generation length.

[0125] Step b3: Determine the data plaintext based on the key derivation result and the second sub-data ciphertext.

[0126] Exemplarily, according to the key derivation result t and the second sub-data ciphertext C2, the data plaintext T may be determined as follows:

[0127]

[0128] In order to further ensure the accuracy of the data plaintext generated by the data demander, the data plaintext T may be further verified for correctness.

[0129] Optionally, after determining the data plaintext according to the key derivation result and the target random number, the method further includes: verifying the correctness of the data plaintext according to the key derivation result and the third sub-data ciphertext to obtain a verification result.

[0130] Specifically, the parameter to be verified C3′ is generated as follows:

[0131] C3′=Hash(x2||T||y2);

[0132] If the parameter to be verified C3′ is the same as the third sub-data ciphertext C3, it means that the correctness verification of the data plaintext has passed; if the parameter to be verified C3′ is different from the third sub-data ciphertext C3, it means that the correctness verification of the data plaintext has failed.

[0133] The technical solution of this embodiment determines the collaborative decryption party to jointly perform the decryption operation through the blockchain, thereby avoiding the low data security caused by the data demander unilaterally decrypting the data. The blockchain encrypts the intermediate parameters to ensure the security of the data transmission process. The collaborative decryption method avoids the situation where the key is maliciously intercepted by the intermediate party and the plaintext data is obtained, which improves the security and reliability of the data interaction process to a certain extent.

[0134] Embodiment 3

[0135] Figure 3 The interactive diagram of a blockchain-based data security interaction method provided in Example 3 of the present invention is optimized and improved on the basis of the above-mentioned technical solutions.

[0136] like Figure 3 As shown in the figure, the interaction process between the data demander, blockchain and collaborative decryption party is as follows:

[0137] S301. The data demander obtains the encrypted data ciphertext and target public key sent by the data sender, generates a private key acquisition request based on the target public key, and sends the private key acquisition request to the blockchain.

[0138] S302. The blockchain parses the private key acquisition request, determines the target private key that matches the target public key, and splits the target private key to obtain a first private key fragment and a second private key fragment, sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party.

[0139] S303. The data demander generates a target random number K, and determines a first intermediate value T1 based on the target random number K and the first sub-data ciphertext C1 in the encrypted data ciphertext, and sends the first intermediate value T1 to the blockchain.

[0140] S304: The blockchain encrypts the first intermediate value T1 based on the trusted execution environment to obtain the first intermediate ciphertext T 11 , and the first intermediate ciphertext T 11 Sent to the collaborative decryption party.

[0141] S305, the collaborative decryption party decrypts the first intermediate ciphertext T 11 Decryption is performed to obtain the first intermediate value T1, and based on the first intermediate value T1 and the second private key, shard D A2 , generate a second intermediate value T2, and send the second intermediate value T2 to the blockchain.

[0142] S306: Based on the trusted execution environment, the blockchain encrypts the second intermediate value T2 to generate a second intermediate ciphertext T 22 , and the second intermediate ciphertext T 22 Sent to the data requester.

[0143] S307, the data demander checks the second intermediate ciphertext T 22 Decrypt and obtain the second intermediate value T2, and then shard D according to the first private key A1 , the target random number K, the second intermediate value T2 and the first sub-data ciphertext C1, and generate a third intermediate value (x2, y2).

[0144] S308. The data demander generates a key derivation result t according to the third intermediate value (x2, y2) based on the key derivation function KDF.

[0145] S309: The data demander determines the data plaintext T based on the key derivation result t and the second sub-data ciphertext C2.

[0146] S310. The data demander verifies the correctness of the data plaintext T based on the key derivation result (x2, y2) and the third sub-data ciphertext C3 to obtain a verification result.

[0147] Embodiment 4

[0148] Figure 4 The schematic diagram of the structure of a data security interaction device based on blockchain provided in the fourth embodiment of the present invention. The data security interaction device based on blockchain provided in the embodiment of the present invention can be applied to the case of data security interactive transmission. The data security interaction device based on blockchain can be implemented in the form of hardware and / or software, such as Figure 4 As shown, the data security interaction device based on blockchain can be configured in the electronic device of the data demander, and specifically includes: a ciphertext acquisition module 401, a request generation module 402, a request sending module 403, a first intermediate value determination module 404 and a ciphertext decryption module 405. Among them,

[0149] The ciphertext acquisition module 401 is used to acquire the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain;

[0150] A request generation module 402, used to generate a private key acquisition request according to the target public key;

[0151] A request sending module 403 is used to send a private key acquisition request to the blockchain, so that the blockchain determines a target private key matching the target public key based on the private key acquisition request, splits the target private key to obtain a first private key fragment and a second private key fragment, and sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party;

[0152] A first intermediate value determination module 404 is used to determine a first intermediate value according to the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key shard, and sends the second intermediate value to the data demander through the blockchain;

[0153] The ciphertext decryption module 405 is used to decrypt the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext.

[0154] The above technical solution determines the collaborative decryption party to jointly perform the decryption operation through the blockchain, thus avoiding the low data security caused by the data demander unilaterally decrypting the data. The blockchain encrypts the intermediate parameters to ensure the security of the data transmission process. The collaborative decryption method avoids the situation where the key is maliciously intercepted by the intermediate party and the plaintext data is obtained, which improves the security and reliability of the data interaction process to a certain extent.

[0155] Optionally, the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key according to an elliptic curve public key cryptography algorithm, and includes a first sub-data ciphertext, a second sub-data ciphertext and a third sub-data ciphertext;

[0156] Accordingly, the first intermediate value determining module 404 includes:

[0157] A random number generating unit, configured to generate a target random number, and determine a first intermediate value according to the target random number and a first sub-data ciphertext in the encrypted data ciphertext;

[0158] an intermediate value generating unit, configured to send the first intermediate value to the blockchain, so that the blockchain encrypts the first intermediate value based on a trusted execution environment to obtain a first intermediate ciphertext, and sends the first intermediate ciphertext to the collaborative decryption party, and the collaborative decryption party generates and feeds back a second intermediate value to the blockchain based on the first intermediate ciphertext and the second private key shard, and the blockchain encrypts the second intermediate value based on the trusted execution environment to generate and feed back a second intermediate ciphertext;

[0159] The second intermediate value obtaining unit is used to obtain the second intermediate ciphertext and decrypt the second intermediate ciphertext to obtain a second intermediate value.

[0160] Optionally, the ciphertext decryption module 405 includes:

[0161] a third intermediate value generating unit, configured to generate a third intermediate value according to the first private key shard, the target random number, the second intermediate value and the first sub-data ciphertext;

[0162] a derivation result generating unit, configured to generate a key derivation result according to the third intermediate value and based on a key derivation function;

[0163] A data plaintext generating unit is used to determine the data plaintext according to the key derivation result and the second sub-data ciphertext.

[0164] Optionally, the ciphertext decryption module 405 further includes:

[0165] The data plaintext verification unit is used to verify the correctness of the data plaintext according to the key derivation result and the third sub-data ciphertext to obtain a verification result.

[0166] The blockchain-based data security interaction device provided in the embodiment of the present invention can execute the blockchain-based data security interaction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0167] Embodiment 5

[0168] Figure 5 The schematic diagram of the structure of a data security interaction device based on blockchain provided in the fourth embodiment of the present invention. The data security interaction device based on blockchain provided in the embodiment of the present invention can be applied to the case of data security interactive transmission. The data security interaction device based on blockchain can be implemented in the form of hardware and / or software, such as Figure 5As shown, the data security interaction device based on blockchain can be configured in an electronic device to which a block node in the blockchain belongs, and specifically includes: a request acquisition module 501, a key splitting module 502, a key fragment sending module 503, a first intermediate value sending module 504 and a second intermediate value sending module 505, wherein:

[0169] The request acquisition module 501 is used to obtain a private key acquisition request sent by a data demander; the private key acquisition request is generated based on the target public key when the data demander obtains the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain;

[0170] A key splitting module 502 is used to determine a target private key matching the target public key based on the private key acquisition request, and split the target private key to obtain a first private key fragment and a second private key fragment;

[0171] The key fragment sending module 503 is used to send the first private key fragment to the data demander, and send the second private key fragment to the collaborative decryption party, so that the data demander can determine and feedback the first intermediate value according to the encrypted data ciphertext;

[0172] A first intermediate value sending module 504, configured to send the first intermediate value to the collaborative decryption party, so that the collaborative decryption party can determine and feed back a second intermediate value based on the first intermediate value and the second private key shard;

[0173] The second intermediate value sending module 505 is used to send the second intermediate value to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key shard to obtain data plaintext.

[0174] The above technical solution determines the collaborative decryption party to jointly perform the decryption operation through the blockchain, thus avoiding the low data security caused by the data demander unilaterally decrypting the data. The blockchain encrypts the intermediate parameters to ensure the security of the data transmission process. The collaborative decryption method avoids the situation where the key is maliciously intercepted by the intermediate party and the plaintext data is obtained, which improves the security and reliability of the data interaction process to a certain extent.

[0175] Optionally, the first intermediate value sending module 504 includes:

[0176] A first intermediate ciphertext generating unit, configured to encrypt the first intermediate value based on a trusted execution environment to obtain a first intermediate ciphertext, and send the first intermediate ciphertext to the collaborative decryption party, so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate ciphertext and the second private key shard;

[0177] Correspondingly, the second intermediate value sending module 505 includes:

[0178] A second intermediate value sending unit is used to encrypt the second intermediate value based on a trusted execution environment to obtain a second intermediate ciphertext, and send the second intermediate ciphertext to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate ciphertext and the first private key shard to obtain data plaintext.

[0179] The blockchain-based data security interaction device provided in the embodiment of the present invention can execute the blockchain-based data security interaction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0180] Embodiment 6

[0181] Figure 6 A schematic diagram of the structure of an electronic device 60 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0182] like Figure 6 As shown, the electronic device 60 includes at least one processor 61, and a memory connected to the at least one processor 61, such as a read-only memory (ROM) 62, a random access memory (RAM) 63, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 61 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 62 or the computer program loaded from the storage unit 68 to the random access memory (RAM) 63. In the RAM 63, various programs and data required for the operation of the electronic device 60 can also be stored. The processor 61, the ROM 62, and the RAM 63 are connected to each other via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.

[0183] A number of components in the electronic device 60 are connected to the I / O interface 65, including: an input unit 66, such as a keyboard, a mouse, etc.; an output unit 67, such as various types of displays, speakers, etc.; a storage unit 68, such as a disk, an optical disk, etc.; and a communication unit 69, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 69 allows the electronic device 60 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0184] The processor 61 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 61 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 61 executes the various methods and processes described above, such as a data security interaction method based on blockchain.

[0185] In some embodiments, the data security interaction method based on blockchain can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 68. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 60 via the ROM 62 and / or the communication unit 69. When the computer program is loaded into the RAM 63 and executed by the processor 61, one or more steps of the data security interaction method based on blockchain described above can be performed. Alternatively, in other embodiments, the processor 61 can be configured to execute the data security interaction method based on blockchain in any other appropriate manner (for example, by means of firmware).

[0186] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0187] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0188] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0189] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0190] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0191] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0192] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0193] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data security interaction method based on blockchain, It is characterized in that Applied to data demanders, including: Obtain the encrypted data ciphertext and target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain; Generate a private key acquisition request according to the target public key; Sending a private key acquisition request to the blockchain, so that the blockchain determines a target private key matching the target public key based on the private key acquisition request, splits the target private key to obtain a first private key fragment and a second private key fragment, and sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party; Determine a first intermediate value according to the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key shard, and send the second intermediate value to the data demander through the blockchain; The encrypted data ciphertext is decrypted according to the second intermediate value and the first private key fragment to obtain data plaintext.

2. The method according to claim 1, It is characterized in that The encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key according to an elliptic curve public key cryptography algorithm, and includes a first sub-data ciphertext, a second sub-data ciphertext and a third sub-data ciphertext; Accordingly, determining a first intermediate value according to the encrypted data ciphertext, and sending the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key shard, and sending the second intermediate value to the data demander through the blockchain, including: Generate a target random number, and determine a first intermediate value according to the target random number and a first sub-data ciphertext in the encrypted data ciphertext; The first intermediate value is sent to the blockchain, so that the blockchain encrypts the first intermediate value based on the trusted execution environment to obtain a first intermediate ciphertext, and the first intermediate ciphertext is sent to the collaborative decryption party, and the collaborative decryption party generates and feeds back a second intermediate value to the blockchain based on the first intermediate ciphertext and the second private key shard, and the blockchain encrypts the second intermediate value based on the trusted execution environment to generate and feed back a second intermediate ciphertext; The second intermediate ciphertext is obtained, and the second intermediate ciphertext is decrypted to obtain a second intermediate value.

3. The method according to claim 2, It is characterized in that The decrypting the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext includes: Generate a third intermediate value according to the first private key shard, the target random number, the second intermediate value, and the first sub-data ciphertext; Generate a key derivation result based on the third intermediate value and a key derivation function; The data plaintext is determined according to the key derivation result and the second sub-data ciphertext.

4. The method according to claim 3, It is characterized in that After determining the data plaintext according to the key derivation result and the target random number, the method further includes: According to the key derivation result and the third sub-data ciphertext, the correctness of the data plaintext is verified to obtain a verification result.

5. A data security interaction method based on blockchain, It is characterized in that Applications in blockchain include: Obtain a private key acquisition request sent by a data demander; the private key acquisition request is generated based on the target public key when the data demander obtains the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain; Based on the private key acquisition request, determine a target private key that matches the target public key, and perform key splitting on the target private key to obtain a first private key fragment and a second private key fragment; Sending the first private key fragment to the data demander, and sending the second private key fragment to the collaborative decryption party, so that the data demander can determine and feedback a first intermediate value according to the encrypted data ciphertext; Sending the first intermediate value to the collaborative decryption party, so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate value and the second private key shard; The second intermediate value is sent to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key shard to obtain the data plaintext.

6. The method according to claim 5, It is characterized in that The sending the first intermediate value to the collaborative decryption party so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate value and the second private key fragment, including: Encrypting the first intermediate value based on the trusted execution environment to obtain a first intermediate ciphertext, and sending the first intermediate ciphertext to the collaborative decryption party, so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate ciphertext and the second private key shard; Correspondingly, the sending of the second intermediate value to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key shard to obtain data plaintext, includes: The second intermediate value is encrypted based on the trusted execution environment to obtain a second intermediate ciphertext, and the second intermediate ciphertext is sent to the data demander so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate ciphertext and the first private key shard to obtain data plaintext.

7. A data security interaction device based on blockchain, It is characterized in that Configuration on the data demand side, including: A ciphertext acquisition module, used to acquire the encrypted data ciphertext and target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain; A request generation module, used to generate a private key acquisition request according to the target public key; A request sending module, configured to send a private key acquisition request to the blockchain, so that the blockchain determines a target private key matching the target public key based on the private key acquisition request, performs key splitting on the target private key to obtain a first private key fragment and a second private key fragment, and sends the first private key fragment to the data demander, and sends the second private key fragment to the collaborative decryption party; A first intermediate value determination module, configured to determine a first intermediate value according to the encrypted data ciphertext, and send the first intermediate value to the collaborative decryption party through the blockchain, so that the collaborative decryption party generates a second intermediate value based on the first intermediate value and the second private key shard, and send the second intermediate value to the data demander through the blockchain; The ciphertext decryption module is used to decrypt the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext.

8. A data security interaction device based on blockchain, It is characterized in that Configured on blockchain, including: A request acquisition module, used to acquire a private key acquisition request sent by a data demander; the private key acquisition request is generated based on the target public key when the data demander acquires the encrypted data ciphertext and the target public key sent by the data sender; the encrypted data ciphertext is obtained by encrypting the data plaintext based on the target public key; the target public key is obtained by the data sender initiating a key acquisition request to the blockchain; A key splitting module is used to determine a target private key matching the target public key based on the private key acquisition request, and split the target private key to obtain a first private key fragment and a second private key fragment; A key shard sending module, used to send the first private key shard to the data demander, and send the second private key shard to the collaborative decryption party, so that the data demander can determine and feedback a first intermediate value according to the encrypted data ciphertext; A first intermediate value sending module, configured to send the first intermediate value to the collaborative decryption party, so that the collaborative decryption party determines and feeds back a second intermediate value based on the first intermediate value and the second private key shard; The second intermediate value sending module is used to send the second intermediate value to the data demander, so that the data demander can decrypt the encrypted data ciphertext according to the second intermediate value and the first private key fragment to obtain data plaintext.

9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the blockchain-based data security interaction method described in any one of claims 1-4 and / or 5-6.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the blockchain-based data security interaction method described in any one of claims 1-4 and / or 5-6 when executed.

Citation Information

Patent Citations

  • Asymmetric key generation and distribution method and device based on block chain, and medium

    CN113452516A

  • Collaborative security calculation method and device and electronic equipment

    CN113704784A

  • Data encryption transmission method and system, computer equipment and storage medium

    CN115567324A

  • Data transmission method, system and device based on block chain commitment and medium

    CN115664769A

  • Data processing method and device based on block chain key, equipment and storage medium

    CN116743377A

Cited By

  • Data transaction system, method and device, storage medium and product

    CN121614550A

  • Distributed data privacy protection method and system based on hierarchical encryption

    CN122137677A