Data processing method and related device

By combining fully homomorphic ciphertext and smart contracts in the blockchain network, the security and usability of on-chain data are ensured without sacrificing transparency and interoperability. This solves the challenges of data security and usability in blockchain networks, especially in protecting data security in financial scenarios.

WO2025246270A1PCT designated stage Publication Date: 2025-12-04HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137829
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-05
Filing Date
2024-12-09
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

In blockchain networks, how can we ensure the security and usability of on-chain data with high security requirements without sacrificing transparency and interoperability, especially in financial scenarios?

Method used

By defining and using fully homomorphic ciphertext at the smart contract language level, all data is stored in the blockchain ledger, and the data type is declared as fully homomorphic ciphertext through fully homomorphic encryption. Fully homomorphic operations are performed using the fully homomorphic evaluation key issued by the first smart contract and the subkey group, thereby achieving data security and operability.

Benefits of technology

Without sacrificing the availability and operability of on-chain data, it ensures the security of data with high security requirements, reduces the difficulty of use, supports data permission configuration and proactive authorization, and improves data security and ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137829_04122025_PF_FP_ABST
    Figure CN2024137829_04122025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, which is applied to a blockchain management system. The system comprises a first client, a second client, and a blockchain network, and a first smart contract is deployed on a plurality of chain nodes in a network. The method comprises: a first client uses a fully homomorphic public key issued by a sub-key group to encrypt first data, and then sends transaction information to a chain node, wherein the transaction information comprises a ciphertext of the first data; the chain node records the ciphertext of the first data in a blockchain ledger, and declares, by means of the first smart contract, that a data type of the ciphertext of the first data is a fully homomorphic ciphertext; and a second client sends an operation request to the chain node. The chain node performs a fully homomorphic operation on the ciphertext of the first data on the basis of the first smart contract and a fully homomorphic evaluation key issued by the sub-key group, and records the homomorphic operation result in the blockchain ledger. Thus, the security of data having high security requirements is guaranteed on the premise of not sacrificing the availability and operability of on-chain data.
Need to check novelty before this filing date? Find Prior Art

Description

A data processing method and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202410677374.0, filed on May 28, 2024, entitled "A Data Processing Method and Related Equipment", and to Chinese Patent Application No. 202411066828.7, filed on August 5, 2024, entitled "A Data Processing Method and Related Equipment", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of blockchain technology, and in particular to a data processing method, a blockchain management system, a computing device cluster, a computer-readable storage medium, and a computer program product. Background Technology

[0003] Blockchain technology is a novel distributed infrastructure and computing paradigm that uses a block-chain data structure to verify and store data, a consensus algorithm of distributed nodes to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script code to program and manipulate data.

[0004] Decentralized blockchain networks can be built based on blockchain technology. To ensure that nodes in a decentralized blockchain network can effectively reach consensus, the data recorded by each node in the blockchain ledger (referred to as on-chain data) has a certain degree of transparency. However, the transparency of on-chain data presents significant challenges in practical applications, especially in financial scenarios where data security requirements are high. This transparency hinders the exploration and application of blockchain technology in financial services.

[0005] Related technologies often sacrifice security to increase transparency, or sacrifice interoperability to ensure security. Ensuring both the security and usability of on-chain data has become a key concern for the industry. Summary of the Invention

[0006] This application provides a data processing method that defines and uses fully homomorphic ciphertext at the smart contract language level. All data remains stored in the blockchain ledger to ensure transparency, while data with higher security requirements is stored in the blockchain ledger as fully homomorphic ciphertext to ensure security. Furthermore, fully homomorphically encrypted data can be declared as fully homomorphic ciphertext through a first smart contract. When operating on this data, fully homomorphic operations can be performed on the fully homomorphic ciphertext based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group. This achieves security for data with high security requirements without sacrificing the availability and operability of on-chain data. This application also provides a blockchain management system, computing device cluster, computer-readable storage medium, and computer program product corresponding to the above method.

[0007] Firstly, this application provides a data processing method. This method is applied to a blockchain management system. The blockchain management system includes a first client, a second client, and a blockchain network. The blockchain network includes multiple chain nodes, and each chain node deploys a first smart contract. The first smart contract is used to perform fully homomorphic operations on data declared as fully homomorphic ciphertext.

[0008] Specifically, the first client encrypts the first data using a fully homomorphic public key issued by the subkey group, and then sends transaction information, including the ciphertext of the first data, to at least one chain node in the blockchain network. At least one chain node in the blockchain network records the ciphertext of the first data in the blockchain ledger and declares the data type of the ciphertext of the first data as fully homomorphic ciphertext through a first smart contract. The second client sends an operation request to at least one chain node in the blockchain network, the operation request being used to manipulate the first data. At least one chain node in the blockchain network performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group, obtains the homomorphic operation result, and records the homomorphic operation result in the blockchain ledger; the homomorphic operation result is the ciphertext of the operation result of the first data.

[0009] This method defines and uses fully homomorphic ciphertext at the smart contract language level. All data remains stored in the blockchain ledger, ensuring transparency. Data with high security requirements can be stored in fully homomorphic ciphertext form in the blockchain ledger to guarantee security. Fully homomorphically encrypted data can be declared as fully homomorphic ciphertext through a first smart contract. Thus, when operations are needed on data stored in the blockchain ledger, if the data type is fully homomorphic ciphertext, fully homomorphic operations can be performed on the fully homomorphic ciphertext based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group. This achieves security for data with high security requirements without sacrificing the availability and operability of on-chain data. Furthermore, this method does not require users to have cryptographic knowledge; data protection is achieved simply by declaring the data type, reducing the difficulty of use and providing high usability.

[0010] In some possible implementations, the blockchain network also records a list of authorized users of the first data defined by the first user, and the operation request carries the user identifier of the second user requesting to use the first data. At least one chain node in the blockchain network performs authentication based on the list of authorized users of the first data and the user identifier of the second user, obtaining a first authentication result. Accordingly, when the first authentication result is successful, at least one chain node in the blockchain network performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group.

[0011] This method supports configuring data permissions, such as configuring data usage rights for data with high security requirements, allowing users with data usage rights to perform fully homomorphic operations using fully homomorphic ciphertext. This can protect the data from being used only for this calculation, prevent data from being misused, and protect data security.

[0012] In some possible implementations, the first client may receive a list of authorized users defined by the first user when writing the first smart contract, and the blockchain network records the list of authorized users accordingly through the first smart contract. Alternatively, the first client may receive a usage authorization request from a second user and add the second user's user identifier to the list of authorized users recorded by the blockchain network based on the usage authorization request.

[0013] This method supports multiple authorization methods, such as proactive authorization or authorization request, to authorize data users. Authorized data users are allowed to use the data, thus ensuring data security.

[0014] In some possible implementations, the second client may also send a view request to at least one chain node in the blockchain network to view the first data. At least one chain node in the blockchain network sends a decryption request to the subkey group, the decryption request including the ciphertext of the first data. Then, at least one chain node in the blockchain network receives the encrypted first data and the encrypted symmetric key sent by the subkey group, and returns the encrypted first data and the encrypted symmetric key to the second client. The encrypted first data is obtained by the subkey group recovering the first data from the ciphertext of the first data using a fully homomorphic sub-private key, and then encrypting it using the symmetric key. The encrypted symmetric data is obtained by the subkey group encrypting the symmetric key using the second user's public key. The second client uses the second user's private key to recover the symmetric key from the encrypted symmetric key, and uses the symmetric key to recover the first data from the encrypted first data.

[0015] In this method, when a user requests to view data with high security requirements, the chain node can request the subkey group to decrypt the fully homomorphic ciphertext of the data using a fully homomorphic sub-private key, and then encrypt the plaintext data using a method that the user can decrypt, thus ensuring the security of the data during transmission.

[0016] In some possible implementations, the blockchain network also records a list of authorized viewers of the first data defined by the first user. A second client sends a view request to at least one node in the blockchain network to view the first data. The view request carries the user identifier of the second user requesting to view the first data. At least one node in the blockchain network can also perform authentication based on the list of authorized viewers of the first data and the user identifier of the second user, obtaining a second authentication result. When the second authentication result indicates successful authentication, at least one node in the blockchain network sends a decryption request to the subkey group.

[0017] This method also supports configuring data viewing rights. Users who obtain data viewing rights can request the subkey group to decrypt the fully homomorphic ciphertext in order to view the plaintext data, thus further ensuring data security.

[0018] In some possible implementations, the first client may also generate proof information based on the first data and send the proof information to at least one chain node in the blockchain network. The proof information may include a random number encrypted using a fully homomorphic public key and a hash value determined based on the first data and the random number, or the proof information may include zero-knowledge proofs. Accordingly, when the proof information is verified successfully, at least one chain node in the blockchain network stores the user identifier of the first user who owns the first data.

[0019] This method packages the proof information and transaction information onto the blockchain to perform identity authentication through the proof information. Once the identity authentication is successful, the corresponding data processing is then performed, thus ensuring security.

[0020] Secondly, this application provides a blockchain management system. The system includes a first client, a second client, and a blockchain network. The blockchain network includes multiple chain nodes, and each chain node deploys a first smart contract. The first smart contract is used to perform fully homomorphic operations on data whose declared data type is fully homomorphic ciphertext.

[0021] The first client is used to encrypt the first data using a fully homomorphic public key issued by a subkey group, and then send transaction information to at least one chain node in the blockchain network, the transaction information including the ciphertext of the first data; the at least one chain node in the blockchain network is used to record the ciphertext of the first data in the blockchain ledger, and declare the data type of the ciphertext of the first data as fully homomorphic ciphertext through the first smart contract.

[0022] The second client is used to send an operation request to at least one chain node in the blockchain network, the operation request being used to operate on the first data; at least one chain node in the blockchain network is used to perform a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group, to obtain the homomorphic operation result, and to record the homomorphic operation result in the blockchain ledger, the homomorphic operation result being the ciphertext of the operation result of the first data.

[0023] In some possible implementations, the blockchain network also records a list of authorized users of the first data defined by the first user, the operation request carries a user identifier of a second user requesting to use the first data, and at least one chain node in the blockchain network is further used for:

[0024] Authentication is performed based on the list of authorized users in the first data and the user ID of the second user to obtain the first authentication result;

[0025] At least one chain node in the blockchain network is specifically used for:

[0026] When the first authentication result is successful, a fully homomorphic operation is performed on the ciphertext of the first data based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group.

[0027] In some possible implementations, the first client is also used for:

[0028] The blockchain network receives the list of authorized users defined by the first user when writing the first smart contract, and records the list of authorized users through the first smart contract; or...

[0029] Upon receiving the authorization request from the second user, the user identifier of the second user is added to the list of authorized users recorded in the blockchain network according to the authorization request.

[0030] In some possible implementations, the second client is also used for:

[0031] Send a view request to at least one chain node in the blockchain network, the view request being used to view the first data;

[0032] Send a decryption request to the subkey group, the decryption request including the ciphertext of the first data, receive the encrypted first data and the encrypted symmetric key sent by the subkey group, and return the encrypted first data and the encrypted symmetric key to the second client. The encrypted first data is obtained by the subkey group recovering the first data from the ciphertext of the first data using a fully homomorphic sub-private key and encrypting it using the symmetric key. The encrypted symmetric data is obtained by the subkey group encrypting the symmetric key using the public key of the second user.

[0033] The symmetric key is recovered from the encrypted symmetric key using the second user's private key, and the first data is recovered from the encrypted first data using the symmetric key.

[0034] In some possible implementations, the blockchain network also records a list of authorized viewers of the first data defined by the first user, and the second client is further used for:

[0035] A view request is sent to at least one chain node in the blockchain network. The view request is used to view the first data, and the view request carries the user identifier of the second user who requests to view the first data.

[0036] At least one chain node in the blockchain network is also used for:

[0037] Authentication is performed based on the list of authorized viewers of the first data and the user ID of the second user to obtain a second authentication result.

[0038] When the second authentication result is successful, a decryption request is sent to the subkey group.

[0039] In some possible implementations, the first client is also used for:

[0040] Proof information is generated based on the first data and sent to at least one chain node in the blockchain network. The proof information includes a random number encrypted using the fully homomorphic public key and a hash value determined based on the first data and the random number, or the proof information includes zero-knowledge proof.

[0041] At least one chain node in the blockchain network is also used for:

[0042] When the verification of the proof information is successful, the user identifier of the first user who owns the first data is stored.

[0043] Thirdly, this application provides a computing device cluster. The computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory. The at least one processor and the at least one memory communicate with each other. The at least one processor is used to execute instructions stored in the at least one memory to cause the computing device or the computing device cluster to perform the data processing method as described in the first aspect or any implementation thereof.

[0044] Fourthly, this application provides a computer-readable storage medium storing instructions that instruct a computing device or a cluster of computing devices to perform the data processing method described in the first aspect or any implementation thereof.

[0045] Fifthly, this application provides a computer program product containing instructions that, when run on a computing device or a cluster of computing devices, causes the computing device or cluster of computing devices to perform the data processing method described in the first aspect or any implementation thereof.

[0046] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0047] To more clearly illustrate the technical methods of this application, the accompanying drawings used will be briefly described below.

[0048] Figure 1 is a flowchart of data processing in a blockchain network provided in this application;

[0049] Figure 2 is a schematic diagram of the architecture of a blockchain management system provided in this application;

[0050] Figure 3 is a flowchart of a data processing method provided in this application;

[0051] Figure 4 is a flowchart of a data processing method provided in this application;

[0052] Figure 5 is a schematic diagram of the structure of a computing device provided in this application;

[0053] Figure 6 is a schematic diagram of the structure of a computing device cluster provided in this application;

[0054] Figure 7 is a schematic diagram of another computing device cluster provided in this application. Detailed Implementation

[0055] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.

[0056] First, some technical terms involved in the embodiments of this application will be introduced.

[0057] Blockchain technology is a novel distributed infrastructure and computing paradigm that utilizes a block-chain data structure to verify and store data, distributed node consensus algorithms to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script code to program and manipulate data. The network built on blockchain technology is called a blockchain network, which consists of multiple blockchain nodes, often simply called chain nodes. These blockchain nodes store data through a block-chain ledger.

[0058] A smart contract is an event-driven, stateful automated contract written in code that runs on a blockchain network to process data in the blockchain ledger (also known as on-chain data). A smart contract is a special computer program that can automatically execute corresponding operations based on pre-defined rules and conditions when specific conditions are met. Smart contracts are typically designed to automate and securely execute and verify various transactions and agreements within a contract without the intervention or trust of a third party.

[0059] Fully homomorphic encryption is a special type of encryption technology. It has the unique ability to perform computations while in an encrypted state and generate encrypted results. Using fully homomorphic encryption, computations can be performed in an encrypted state without decrypting the data. The result of a fully homomorphic computation is also encrypted; when a user needs to view the plaintext, they can decrypt the result. These features of fully homomorphic encryption allow for various computations to be performed in an encrypted state while protecting data security.

[0060] Blockchain networks are typically decentralized. To ensure effective consensus among nodes in a decentralized blockchain network, on-chain data usually possesses a certain degree of transparency, meaning it is transmitted or stored in plaintext within the blockchain network. However, many scenarios have high data security requirements. For example, in financial settings, the public disclosure of transaction data could lead to user losses; therefore, ensuring the security of such transaction data is essential. The lack of transparency in on-chain data hinders the exploration and application of blockchain technology in related businesses.

[0061] Related technologies often sacrifice security to increase transparency, or sacrifice interoperability to ensure security. How to ensure the security and usability of on-chain data with high security requirements has become a key concern in the industry. For data with high security requirements, ensuring its security and usability presents the following challenges: maintaining the Turing completeness of the contract language, meaning contract operations should not be partially lost; ensuring the security of the blockchain network, for example, the security of consensus should not be weakened, and compatibility with the original consensus should be maintained; maintaining the transparency of contract execution, for example, the computation process remains public while the computed data is hidden; and ensuring the security of data with high security requirements, for example, only users should be able to read their own data, while the right to use the data also needs to be guaranteed.

[0062] Currently, the industry offers several solutions to ensure data security and ease of use. Referring to Figure 1, which illustrates a data processing flowchart in a blockchain network, the blockchain platform's software development kit (SDK) includes a common library. This library provides basic capabilities for semi-homomorphic encryption, such as the Paillier algorithm. Command-line tools can encapsulate the Paillier algorithm from the common library, generate a Paillier public key, and save it locally. The command-line tool interacts with the chain nodes through the SDK. Specifically, the SDK uploads the ciphertext to the chain, and the chain nodes perform on-chain homomorphic operations based on methods provided by the on-chain contract. The SDK can also retrieve the results of the on-chain homomorphic operations from the chain nodes and decrypt them. However, the above solutions only support semi-homomorphic operations and require users to possess certain cryptographic knowledge and manage additional keys, increasing the complexity of key management.

[0063] In view of this, this application provides a data processing method. This method is applied to a blockchain management system. The blockchain management system includes a first client, a second client, and a blockchain network. The blockchain network includes multiple chain nodes, and each chain node deploys a first smart contract. The first smart contract is used to perform fully homomorphic operations on data declared as fully homomorphic ciphertext. Unlike ordinary second smart contracts that perform operations on plaintext, the first smart contract can also be called a secure smart contract or a secure contract. Because the first smart contract is used to perform fully homomorphic operations, it can also be called a fully homomorphic smart contract.

[0064] Specifically, the first client encrypts the first data using a fully homomorphic public key issued by the subkey group, and then sends transaction information, including the ciphertext of the first data, to at least one chain node in the blockchain network. The at least one chain node then records the ciphertext of the first data in the blockchain ledger and declares the data type of the ciphertext as fully homomorphic ciphertext through a first smart contract. The second client sends an operation request to at least one chain node in the blockchain network to manipulate the first data. The at least one chain node performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group, obtains the homomorphic operation result, and records the result in the blockchain ledger. The homomorphic operation result is the ciphertext of the operation result on the first data.

[0065] This method defines and uses fully homomorphic ciphertext at the smart contract language level. All data remains stored in the blockchain ledger, ensuring transparency. Data with higher security requirements can be stored in the blockchain ledger as fully homomorphic ciphertext to guarantee security. Fully homomorphically encrypted data can be declared as fully homomorphic ciphertext through a first smart contract. Thus, when operations are needed on data stored in the blockchain ledger, if the data type is fully homomorphic ciphertext, fully homomorphic operations can be performed on the fully homomorphic ciphertext based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group. This achieves security for data with high security requirements without sacrificing the availability and operability of on-chain data.

[0066] To make the technical solution of this application clearer and easier to understand, the blockchain management system of this application will be introduced below with reference to the accompanying drawings.

[0067] Referring to Figure 2, which illustrates the architecture of a blockchain management system 10, the blockchain management system 10 includes a first client 100A, a second client 100B, and a blockchain network 200. The blockchain network 200 includes multiple chain nodes 202, each deploying a first smart contract. The first smart contract performs fully homomorphic operations on data declared as fully homomorphic ciphertext. Furthermore, the multiple chain nodes 202 can also deploy second smart contracts, which perform operations on plaintext data. The blockchain management system 10 can connect to a subkey group 20 to collaboratively process data. It should be noted that Figure 2 illustrates an example where the subkey group 20 is independent of the blockchain management system 10. In other possible implementations of this application, the subkey group 20 can also be a group of chain nodes 202, and the owner of the subkey can be a chain node 202.

[0068] The first client 100A and the second client 100B can be clients used to implement on-chain data management. Users can use these clients to perform operations such as uploading data to the chain, querying on-chain data, and performing on-chain data calculations. It should be noted that the first client 100A and the second client 100B can be clients of different users. For example, the first client 100A can be the client of a data provider, which can provide data with high security requirements in fully homomorphic encrypted form, while the second client 100B can be the client of a data viewer or data user.

[0069] Chain node 202 is the execution unit of blockchain network 200. Multiple chain nodes 202 connected together form a peer-to-peer (P2P) network, carrying the communication, computation, and storage of the blockchain network. In this application, blockchain network 200 can be a consortium blockchain. A consortium blockchain is a blockchain network model that typically includes multiple pre-selected chain nodes 202 (or entities), which are usually jointly managed by a specific organization, industry, or stakeholder. Unlike public blockchains, participants in a consortium blockchain are usually entities that already trust each other, or at least entities with a certain level of trust. In a consortium blockchain, chain nodes 202 can also be functionally categorized as endorsement nodes and consensus nodes.

[0070] Endorsing nodes are nodes in a consortium blockchain responsible for verifying and endorsing transactions. They are typically trust units within the consortium blockchain, and users can set endorsement policies when installing smart contracts. Endorsement refers to simulating the execution of a smart contract deployed on chain node 202 (e.g., the first smart contract) to generate an endorsement result for a transaction proposal sent by a client. The endorsement result can include the signature of the endorsing nodes on the transaction. An endorsement policy defines the nodes that must reach a consensus on a transaction before it is recorded in the blockchain ledger. For example, endorsing nodes could be all chain nodes 202, more than half of the chain nodes 202, or specific chain nodes 202 defined for a specific transaction type.

[0071] Consensus nodes are nodes in a consortium blockchain responsible for confirming and verifying transactions and reaching consensus within the network to determine which transactions will be included in the next block. A block can record multiple transactions, and consensus nodes can list these transactions in chronological order to ensure they agree on the same transaction order or sequence.

[0072] Subkey group 20 includes multiple subkey owners. During initialization, each subkey owner can generate its own fully homomorphic subprivate key, which is securely stored by its generator (e.g., the subkey owner) for decrypting fully homomorphic ciphertext. Multiple subkey owners can also jointly generate and publish a fully homomorphic public key and a fully homomorphic evaluation key. The fully homomorphic public key is used to encrypt data, and the fully homomorphic evaluation key is used to ensure that homomorphic operations performed on the ciphertext can be completed in the encrypted state without decrypting the ciphertext into plaintext. Specifically, the fully homomorphic evaluation key is used to reduce ciphertext noise growth during operations.

[0073] The functions of the first client 100A, the second client 100B, and the chain node are described in detail below. The first client 100A or the second client 100B can first receive the first smart contract written by the user according to the variable declaration method, and complete the installation and deployment of the first smart contract to facilitate subsequent operations such as on-chain data entry, on-chain data querying, and on-chain data computation based on the first smart contract.

[0074] The first client 100A is used to encrypt the first data using a fully homomorphic public key issued by a subkey group, and then send transaction information, including the ciphertext of the first data, to at least one chain node 202 in the blockchain network 200. The at least one chain node 202 in the blockchain network 200 is used to record the ciphertext of the first data in the blockchain ledger and declare the data type of the ciphertext of the first data as fully homomorphic ciphertext through a first smart contract.

[0075] Specifically, the first client 100A can first send a transaction proposal to the endorsing node in the blockchain network 200. The transaction proposal includes the transaction information. The endorsing node simulates the execution of the first smart contract to verify the legality of the transaction information. If the verification is successful, it returns an endorsement result, which may include the endorsing node's signature on the transaction, such as a signature on the ciphertext of the first data. The first client 100A can also send a transaction ordering request to the consensus node in the blockchain network 200. The consensus node reaches consensus on the transaction sequence through a consensus algorithm, achieving consistency in the transaction sequence. A block can be generated for the consistent transaction sequence. The block body includes transaction information, such as the ciphertext of the first data. By adding the above block to the blockchain ledger, the ciphertext of the first data can be recorded in the blockchain ledger. Furthermore, the consensus node can declare the data type of the ciphertext of the first data as fully homomorphic ciphertext through the first smart contract. For example, if the data type of the first data is 32-bit integer, denoted as int32, the type of the ciphertext of the first data can be fully homomorphic ciphertext of 32-bit integer, denoted as eint32.

[0076] The blockchain ledger can include block-chain storage and world state storage. World state storage is a database that uniquely stores the current values ​​of business object attributes as ledger states; in other words, it stores a set of current values ​​for ledger states. World state storage allows direct access to the current value of a ledger state without traversing the entire transaction log to calculate it. Block-chain storage stores the transaction log, recording all changes that led to the current world state—specifically, how a business object reached the current world state. In block-chain storage, each block header contains a hash of the block's transactions and the hash of the previous block header. Thus, all transactions in the block-chain storage are ordered and connected by hashes, ensuring the immutability of the transactions recorded in the block-chain storage.

[0077] The above explanation is from the perspective of the data provider; the following explanation is from the perspective of the data user.

[0078] The second client 100B is used to send an operation request to at least one chain node 202 in the blockchain network 200, the operation request being used to manipulate the first data. At least one chain node in the blockchain network is used to perform a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group 20, obtain the homomorphic operation result, and record the homomorphic operation result in the blockchain ledger. The homomorphic operation result is the ciphertext of the operation result of the first data.

[0079] Specifically, the second client 100B can first send a transaction proposal to the endorsing node in the blockchain network 200. This transaction proposal is used to manipulate the first data. The endorsing node recognizes that the data type of the copy of the first data to be manipulated, stored in the blockchain ledger, is fully homomorphic ciphertext. It can then simulate the execution of a first smart contract on the endorsing node, performing a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key, obtaining the homomorphic operation result. This homomorphic operation result is the ciphertext of the operation result for the first data. The endorsing node can also return an endorsement result, which may include the ciphertext of the operation result for the first data and a signature on behalf of the endorsing node.

[0080] The second client 100B, upon receiving an endorsement result conforming to the endorsement policy (e.g., receiving signatures from more than half or all endorsement nodes), can send a transaction ordering request to the consensus nodes in the blockchain network 200. The consensus nodes use a consensus algorithm to reach a consensus on the transaction sequence, achieving consistency. A block can be generated for the agreed-upon transaction sequence, and the block body includes the ciphertext of the operation result of the first data. By adding the aforementioned block to the blockchain ledger, the ciphertext of the operation result of the first data can be recorded in the blockchain ledger. Similarly, the consensus node can declare the data type of the ciphertext of the operation result of the first data as fully homomorphic ciphertext through the first smart contract.

[0081] Furthermore, the blockchain management system 10 of this application also supports on-chain data querying, which will be explained from the perspective of the data viewer below. A client example using the second client 100B as the data viewer is provided.

[0082] The second client 100B is also used to send a view request to at least one chain node 202 in the blockchain network 200. The view request is used to view the first data. At least one chain node 202 in the blockchain network 200 is also used to send a decryption request to the subkey group 20, the decryption request including the ciphertext of the first data, then receive the encrypted first data and the encrypted symmetric key sent by the subkey group 20, and return the encrypted first data and the encrypted symmetric key to the second client 100B. The encrypted first data is obtained by the subkey group 20 recovering the first data from the ciphertext of the first data using a fully homomorphic sub-private key, and then encrypting it using the symmetric key. The encrypted symmetric data is obtained by the subkey group 20 encrypting the symmetric key using the second user's public key. Accordingly, the second client 100B is also used to recover the symmetric key from the encrypted symmetric key using the second user's private key, and to recover the first data from the encrypted first data using the symmetric key.

[0083] It should be noted that the specific implementation of the second client 100B querying the first data is similar to the specific implementation of the second client 100B querying the first data, and will not be repeated here.

[0084] The blockchain management system 10 also supports permission allocation for data with high security requirements, such as dividing data viewing rights and data usage rights. By setting permissions for specific data to allow use but not viewing, the system ensures that the data is usable but not visible, further enhancing security. The specific implementation method is explained below.

[0085] In some possible implementations, the blockchain network 200 also records a list of authorized users of the first data defined by the first user, and the operation request carries the user identifier of the second user requesting to use the first data, wherein the user identifier may include an on-chain address or a unique identifier determined based on the on-chain address.

[0086] At least one chain node 202 in the blockchain network 200 is also used to authenticate based on the list of authorized users of the first data and the user identifier of the second user, to obtain a first authentication result; when the first authentication result is successful, a fully homomorphic operation is performed on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group 20. In some examples, when the first authentication result is unsuccessful, at least one chain node 202 in the blockchain network 200 can return an authentication failure notification.

[0087] In some possible implementations, the blockchain network 200 also records a list of authorized viewers of the first data defined by the first user, and the viewing request carries the user identifier of the second user requesting to view the first data. Accordingly, at least one chain node 202 in the blockchain network 200 is also used to perform authentication based on the list of authorized viewers of the first data and the user identifier of the second user, obtaining a second authentication result; when the second authentication result is successful, a decryption request is sent to the subkey group 20. In some examples, when the second authentication result is unsuccessful, at least one chain node 202 in the blockchain network 200 can return an authentication failure notification.

[0088] Based on the blockchain management system 10 shown in Figure 2, this application also provides a data processing method. The data processing method of this application will be described in detail below with reference to the accompanying drawings.

[0089] The data processing method of this application can be executed by the blockchain management system 10. The blockchain management system 10 includes a first client 100A, a second client 100B, and a blockchain network 200, which includes multiple chain nodes 202. Before performing operations such as uploading data to the chain, querying on-chain data, and performing calculations on on-chain data, the blockchain management system 10 can first perform functional initialization.

[0090] Function initialization may include initializing subkey group 20 and initializing the contract engine. The contract engine is the runtime engine for smart contracts, providing a simple, deterministic, efficient, and secure execution environment. The initialization of subkey group 20 and the initialization of the smart contract runtime engine are explained below.

[0091] The process of initializing the subkey group 20 can involve multiple participants (e.g., multiple chain nodes 202) forming the subkey group 20 and setting a ciphertext recovery threshold k. The number of participants n≥1; the more participants, the higher the degree of decentralization. The ciphertext recovery threshold k means that when a ciphertext needs to be decrypted, it is necessary to collect the sub-ciphertexts decrypted by k participants to recover the complete ciphertext. Then, multiple participants can generate their own fully homomorphic sub-private keys SK. i The fully homomorphic private key SK i This can be securely stored by each generator (e.g., each participant) for use in decrypting the ciphertext. Among these, the fully homomorphic sub-private key SK is stored. i The entity or organization is called the subkey owner; for example, multiple participants in subkey group 20 can be subkey owners. These participants also jointly generate and publish the fully homomorphic public key PK and fully homomorphic evaluation key VK of the blockchain management system 10. The fully homomorphic public key is used to encrypt data, and the fully homomorphic evaluation key is used to enable homomorphic operations performed on ciphertext to be completed in an encrypted state without decrypting the ciphertext into plaintext. Specifically, the fully homomorphic evaluation key can be used to reduce ciphertext noise growth during operations.

[0092] Initializing the contract engine may include initializing the contract engine of the first smart contract, that is, initializing the fully homomorphic smart contract engine. The process of initializing the execution engine of the first smart contract may involve configuring the fully homomorphic public key PK and fully homomorphic evaluation key VK issued by subkey group 20 for the first smart contract engine.

[0093] The first smart contract's contract engine has the following functions: variable declaration at the contract language layer and fully homomorphic computation at the contract language layer. Furthermore, the first smart contract's contract engine also supports fully homomorphic data authorization and viewing at the contract language layer. These functions are described in detail below.

[0094] For the variable declaration functionality at the contract language layer, the contract engine embeds support for fully homomorphic data type definitions. For example, `euint32` represents an encrypted unsigned 32-bit integer, and `ebool` represents an encrypted boolean type. Furthermore, the contract engine supports automatically recording the owner's identifier when a user stores fully homomorphic data (e.g., fully homomorphic ciphertext obtained after fully homomorphic encryption) on-chain. The owner's identifier can be the user identifier of the data provider, which may include, but is not limited to, an on-chain address. It should be noted that the contract engine can record the owner's identifier of the fully homomorphic data in the blockchain ledger or within the first smart contract.

[0095] For the fully homomorphic operation function at the contract language layer, data users can perform fully homomorphic operations on fully homomorphic ciphertext. Before using this function, the contract engine can automatically load the fully homomorphic evaluation key VK to ensure that fully homomorphic operations can be performed on the fully homomorphic ciphertext without decryption. The types of fully homomorphic operations can include addition, subtraction, multiplication, division, XOR, etc.

[0096] For the fully homomorphic data authorization feature at the contract language layer, the contract engine supports data providers granting data permissions to other users. Data permissions include data usage rights and data viewing rights. Data providers can authorize other users to view the data (i.e., configure data viewing rights for other users), or they can only authorize other users to use the data (i.e., data usage rights) to achieve data availability without visibility.

[0097] For the fully homomorphic data viewing function at the contract language layer, both the data provider (owner) and the data viewer (such as a user with viewing rights) can request to decrypt and view the fully homomorphic ciphertext. For example, the data provider or viewer can send a data viewing request through their respective clients. The contract engine can automatically verify the data viewing request, and upon successful verification, initiate a decryption request to subkey group 20. Subkey group 20 collects the results returned by k subkey owners, aggregates the results to recover the plaintext data m, and simultaneously generates a random symmetric key Key. sy and use the user's public key to PK user Encrypting this symmetric key yields the encrypted symmetric key C. sy =E a (Key sy PK user ), where E a This is an asymmetric encryption algorithm. Using this symmetric key, the plaintext data m is encrypted to obtain the encrypted data C. m =E b (m,Key sy E bIt is a symmetric encryption algorithm. The contract engine can receive the encrypted symmetric key C returned by subkey group 20. sy and encrypted data C m The client can use the user's private key to recover the symmetric key from the encrypted symmetric key, and then use the symmetric key to recover the data from the encrypted data.

[0098] Referring to Figure 3, a flowchart of a data processing method is shown. The method includes the following steps:

[0099] S302, The first client 100A uses the fully homomorphic public key published by subkey group 20 to encrypt the first data.

[0100] Primary data refers to data with high security requirements, such as data that needs to be prevented from being leaked or widely disclosed. Examples include account balances and transaction records in financial transactions, or user preferences and average order value in e-commerce. When primary data needs to be stored in a blockchain ledger, it can be encrypted and stored in ciphertext form to prevent leakage and ensure security. Considering the operability of the data, fully homomorphic encryption can be used to encrypt the primary data.

[0101] Specifically, the first client 100A can use the fully homomorphic public key published by the subkey group 20 to encrypt the first data using a fully homomorphic encryption algorithm to obtain the ciphertext of the first data. The first client 100A can encrypt the first data locally using a fully homomorphic encryption algorithm, or it can encrypt the first data using a fully homomorphic encryption algorithm through the fully homomorphic encryption interface provided by the chain node 202.

[0102] Furthermore, to prevent information leakage, the first client 100A can also generate a random number (Nonce), encrypt the first data and the random number using a fully homomorphic public key, thereby obtaining the ciphertext of the first data, denoted as c. m =E c (m,PK), where E c It is a fully homomorphic encryption algorithm.

[0103] In some possible implementations, the first client 100A can also generate proof information based on the first data. This proof information is used for authentication on the chain node 202 side, ensuring that the user who inputs the ciphertext of the first data knows exactly the plaintext of the first data. The proof information may include a random number encrypted using a fully homomorphic public key and a hash value determined based on the first data and the random number. For example, the proof information can be represented as Proof = {E} c (Nonce), Hash(m||Nonce}. Where Hash is the hash algorithm, and || is the concatenation operation, that is, appending the later text to the previous text.

[0104] In some examples, the proof information can also include zero-knowledge proofs. Zero-knowledge proofs allow users to prove that they know or possess information without revealing the information itself. The "prover" uses information input from a system to create a proof, while the "verifier" verifies the computational result of the proof, but cannot know the specific content of the information.

[0105] The NP statement of this zero-knowledge proof is the ciphertext c of the first data. m Indeed, the data is obtained by encrypting the plaintext m of the first data using the fully homomorphic public key PK, where m is private data and c and PK are public data. The first client 100A can also publish the relevant parameters of the zero-knowledge proof arithmetic circuit for users to generate zero-knowledge proofs.

[0106] S304, the first client 100A sends transaction information to at least one chain node 202 in the blockchain network 200.

[0107] S306. At least one chain node 202 in the blockchain network 200 records the ciphertext of the first data in the blockchain ledger and declares the data type of the ciphertext of the first data as fully homomorphic ciphertext through the first smart contract.

[0108] The transaction information includes the encrypted first data. Furthermore, the transaction information may also include proof information. In other words, when a user intends to upload first data with high security requirements to the blockchain, the first client 100A can package the encrypted first data and proof information as transaction parameters and upload them to the blockchain.

[0109] In some possible implementations, the first client 100A can first send the aforementioned transaction information to the endorsing nodes in the blockchain network 200. For example, the first client 100A can generate a transaction proposal based on the transaction information and then send the transaction proposal to the endorsing nodes. The endorsing nodes can simulate the execution of the first smart contract based on the transaction proposal, generate an endorsement result, and then return the endorsement result to the first client 100A. This endorsement result may include a signature of the transaction. When the endorsement result received by the first client 100A satisfies the endorsement policy, such as the endorsement policy being a majority of channel members, and the number of signatures received for the transaction being greater than half the number of chain nodes, the transaction can be sorted. Specifically, the first client 100A can send a transaction sorting request to the consensus nodes in the blockchain network 200. The transaction sorting request includes transaction information. The consensus nodes can sort the transactions based on the transaction information, generate a transaction sequence, reach consensus on the transaction sequence through a consensus algorithm, generate a block based on the consistent transaction sequence, and add the block to the blockchain ledger.

[0110] It should be noted that when transaction information includes proof information, chain node 202 can also perform identity authentication through the contract engine first. Taking chain node 202 as an endorser node as an example, the endorser node can automatically trigger the encryption of the first data ciphertext c through the contract engine. m and encrypted random number E c The distributed decryption of (Nonce) yields a decryption result, which can be the decrypted first data and a random number. This is achieved by concatenating the decrypted first data and the random number, performing a hash operation, and then comparing the result with the hash field in the proof information. If they match, the verification is successful, meaning the encrypted message (the message obtained by encrypting a message carrying the first data and a random number) is legitimate, and the sender indeed knows the plaintext of the first data. When zero-knowledge proofs are introduced, the first client 100A can generate a zero-knowledge proof. Correspondingly, the verification part on the contract engine side is modified to verify this zero-knowledge proof, that is, verifying that the first user is indeed the owner of this encrypted data.

[0111] Furthermore, for the encrypted first data stored in the blockchain ledger, chain node 202 can also declare the data type of the encrypted first data as fully homomorphic ciphertext through the first smart contract. Fully homomorphic ciphertext can include various types, such as euint32 or ebool. In addition, chain node 202 can also record the data provider (owner, owner) of the encrypted first data.

[0112] In some possible implementations, chain node 202 can record the user identifier of the first user in the blockchain ledger, thereby recording the data provider of the encrypted first data. Specifically, at least one chain node 202 in the blockchain network 200 stores the user identifier of the first user who owns the first data when the proof information is verified, so that authorization can be requested from the first user based on the user identifier later. By verifying data ownership and correctness, data misuse can be prevented.

[0113] It should be noted that this application addresses on-chain data security at the contract language layer by employing a fully homomorphic algorithm based on a distributed threshold (e.g., a ciphertext recovery threshold k), ensuring the Turing completeness of the contract language. Users do not need cryptographic knowledge; they can protect data security simply by declaring variable types. In this method, all data remains stored on-chain, ensuring transparency. Some user-defined data with higher security requirements exists in fully homomorphic ciphertext form, and the deterministic nature of fully homomorphic function operations guarantees the security of the consensus protocol. Simultaneously, a distributed threshold-based fully homomorphic algorithm decrypts the fully homomorphic ciphertext, ensuring the security of user data.

[0114] S308, the second client 100B sends an operation request to at least one chain node 202 in the blockchain network 200.

[0115] S310, at least one chain node 202 in the blockchain network 200 performs a fully homomorphic operation on the ciphertext of the first data based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group 20, and obtains the homomorphic operation result.

[0116] S312. At least one chain node 202 in the blockchain network 200 records the homomorphic operation result in the blockchain ledger.

[0117] An operation request is used to manipulate the first data. Operations can include addition, subtraction, multiplication, division, or XOR operations. Considering that the blockchain ledger stores the encrypted first data, rather than its plaintext, at least one chain node 202 of the blockchain network 200 can perform a fully homomorphic operation on the encrypted first data to obtain the homomorphic result, without needing to decrypt the encrypted first data and then perform ordinary operations based on the decrypted plaintext. The homomorphic operation result is the encrypted result of the operation on the first data. The operation result of the first data can be obtained through this homomorphic operation result.

[0118] The fully homomorphic evaluation key is typically generated based on a fully homomorphic sub-private key and is used to control noise growth or ciphertext expansion during the homomorphic evaluation process. Chain node 202 can load the fully homomorphic evaluation key and perform a fully homomorphic operation on the ciphertext of the first data using an evaluation algorithm to obtain the homomorphic operation result. This homomorphic operation result is equivalent to the fully homomorphic ciphertext obtained by fully homomorphically encrypting the result of the operation on the plaintext first data. This fully homomorphic ciphertext can be decrypted into the plaintext operation result by subkey group 20 using the fully homomorphic sub-private key and a decryption algorithm.

[0119] In practice, the second client 100B can send an operation request to the endorsing node in the blockchain network 200. The operation request is used to manipulate the first data. This operation request can be sent to the endorsing node in the form of a transaction proposal. The endorsing node identifies the data type being manipulated by the operation request. When it recognizes that the first data is stored in fully homomorphic ciphertext in the blockchain ledger, it can simulate the execution of the first smart contract. Through the first smart contract, it performs a fully homomorphic operation on the ciphertext of the first data to obtain the homomorphic operation result. The endorsing node can then return the endorsement result, which may include the homomorphic operation result and the endorsing node's signature on the transaction.

[0120] When the signatures collected by the second client 100B satisfy the endorsement policy, for example, if the number of signatures collected by the second client 100B is greater than half of the number of chain nodes (e.g., the number of channel members), the second client 100B can send a transaction ordering request to the consensus nodes in the blockchain network 200. This transaction ordering request includes transaction information, which may include the results of homomorphic operations. The consensus nodes can order the transactions and generate a transaction sequence. When the consensus nodes reach a consensus on this transaction sequence, they can generate a block that includes the aforementioned transaction sequence. The block body includes the transaction information of each transaction in the transaction sequence, such as the results of homomorphic operations.

[0121] This method retains all data in the blockchain ledger, ensuring transparency. For data with high security requirements, fully homomorphic encryption can be used to store it in the blockchain ledger as fully homomorphic ciphertext, thus guaranteeing security. Fully homomorphically encrypted data can be declared as fully homomorphic ciphertext through a first smart contract. Therefore, when operations are needed on data stored in the blockchain ledger, if the data type is fully homomorphic ciphertext, fully homomorphic operations can be performed on the fully homomorphic ciphertext based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group. This achieves security for data with high security requirements without sacrificing the availability and operability of on-chain data.

[0122] Furthermore, the data processing method of this application also allows users to view the plaintext corresponding to the fully homomorphic ciphertext stored in the blockchain ledger. A detailed explanation follows with reference to the accompanying drawings.

[0123] Referring to the flowchart of a data processing method shown in Figure 4, which illustrates the method by example of a second user viewing first data uploaded to the blockchain by a first user through a first client 100A via a second client 100B, the method includes the following steps:

[0124] S402, the second client 100B sends a viewing request to at least one chain node 202 in the blockchain network 200.

[0125] A view request is used to view the first piece of data. For example, a view request may include a data identifier for the first piece of data. This data identifier may include the data name and the hash value of the data. For instance, if the data is file data, the data identifier could be the filename.

[0126] S404. At least one chain node 202 in the blockchain network 200 sends a decryption request to the subkey group 20.

[0127] The decryption request includes the ciphertext of the first data. The ciphertext of the first data is fully homomorphic ciphertext, and the decryption request is used to request the decryption of the ciphertext of the first data using a fully homomorphic algorithm to obtain the plaintext of the first data.

[0128] S406, At least one chain node 202 in the blockchain network 200 receives encrypted first data and an encrypted symmetric key sent by the subkey group 20.

[0129] S408, at least one chain node 202 in the blockchain network 200 returns encrypted first data and encrypted symmetric key to the second client 100B.

[0130] Specifically, the subkey owners in subkey group 20 use their respective fully homomorphic subprivate keys to decrypt the ciphertext of the first data, obtaining sub-plaintext fragments. When the number of sub-plaintext fragments reaches the ciphertext recovery threshold k, subkey group 20 can recover the complete plaintext based on the sub-plaintext fragments, and this complete plaintext can be the first data.

[0131] To ensure the security of the first data, subkey group 20 can also generate a symmetric key, for example, a randomly generated symmetric key. Subkey group 20 can use the symmetric key to encrypt the first data, obtaining the encrypted first data. In other words, the encrypted first data is obtained by subkey group 20 recovering the first data from the ciphertext of the first data using a fully homomorphic sub-private key, and then encrypting it using the symmetric key. Furthermore, subkey group 20 can use the second user's public key to encrypt the symmetric key, thereby obtaining the encrypted symmetric key, which the second user can then decrypt using their private key.

[0132] Accordingly, the chain node 202 in the blockchain network 200 receives the encrypted first data and the encrypted symmetric key returned by the subkey group 20, and returns the encrypted first data and the encrypted symmetric key to the client, thereby realizing the secure transmission of the first data and the symmetric key and ensuring security.

[0133] S410, the second client 100B uses the second user's private key to recover the symmetric key from the encrypted symmetric key, and uses the symmetric key to recover the first data from the encrypted first data.

[0134] Specifically, the encrypted symmetric key is generated using an asymmetric encryption algorithm. The second client 100B can use the second user's private key to decrypt the encrypted symmetric key using an asymmetric decryption algorithm, thereby recovering the symmetric key. The encrypted first data is generated using a symmetric encryption algorithm. The second client 100B uses the symmetric key to decrypt the encrypted first data using a symmetric decryption algorithm, thereby recovering the first data.

[0135] It should be noted that Figure 4 illustrates an example of a second user viewing the data uploaded to the blockchain by a first user. In other possible implementations of this application, the first user can also view the data uploaded to the blockchain by the first user. When the first user needs to query its own on-chain data, it can sign any data to prove its on-chain identity, and then call the contract engine of the first smart contract to trigger the fully homomorphic data viewing function of the contract language layer. This can protect the first user's ownership of the first data. The first user can obtain the plaintext of the first data by proving its on-chain identity. Specifically, the first client 100A can generate a viewing request based on the interface of the first smart contract and send the viewing request to at least one chain node 202 of the blockchain network 200. After the chain node 202 passes the authentication, it sends a decryption request to the subkey group 20 and receives the encrypted first data and the encrypted symmetric key returned by the subkey group 20. The encrypted symmetric key can be obtained by encrypting the symmetric key using the first user's public key, and the encrypted first data can be obtained by encrypting the symmetric key using the symmetric key. The chain node 202 returns the encrypted first data and the encrypted symmetric key to the first client 100A. The first user can use its private key to decrypt and obtain the first data after successful verification.

[0136] In some possible implementations, data users, when using data provided by a data provider, or data viewers, when viewing data provided by a data provider, can obtain authorization from the data provider beforehand. For example, a data user granted data usage rights by the data provider can perform fully homomorphic operations on the blockchain, while a data viewer granted data viewing rights by the data provider can view on-chain data.

[0137] Regarding data usage, the blockchain network also records a list of authorized users of the first data defined by the first user. The operation request carries the user identifier of the second user requesting to use the first data. At least one chain node 202 in the blockchain network 200 can also perform authentication based on the list of authorized users of the first data and the user identifier of the second user, obtaining a first authentication result. When the first authentication result is successful, at least one chain node 202 in the blockchain network 200 performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group.

[0138] The authorization methods include proactive authorization and authorization request. Authorization request allows a second user to request authorization from a first user in real time, while proactive authorization allows the first user to pre-define authorized users. For example, the first client 100A receives a usage authorization request from a second user and adds the second user's user identifier to the list of authorized users recorded in the blockchain network based on the usage authorization request. Another example is that the first client 100A receives a list of authorized users defined by the first user when writing the first smart contract, and the blockchain network records the list of authorized users through the first smart contract.

[0139] For data viewing, the blockchain network also records a list of authorized viewers of the first data defined by the first user, and the viewing request carries the user identifier of the second user requesting to view the first data. Accordingly, at least one chain node in the blockchain network 200 performs authentication based on the list of authorized viewers of the first data and the user identifier of the second user, obtaining a second authentication result. When the second authentication result is successful, at least one chain node 202 in the blockchain network 200 sends a decryption request to the subkey group 20.

[0140] This method assigns permissions based on data usage and viewing rights. Other users wishing to use the data for computation must obtain authorization from the data owner. When performing fully homomorphic operations on the data, the contract side can proactively verify whether a user has the right to use the data, preventing data misuse. Furthermore, this method can achieve data availability without visibility for specific data, further ensuring security.

[0141] It should be noted that when implementing the data processing method of this application, it is also possible not to verify the data usage rights and data viewing rights, but to record the behavior of using and viewing data for subsequent traceability.

[0142] Based on the aforementioned data processing method, this application also provides a blockchain management system 10. The blockchain management system 10 includes a first client 100A, a second client 100B, and a blockchain network 200. The blockchain network includes multiple chain nodes 202, and each chain node 202 is deployed with a first smart contract. The first smart contract is used to perform fully homomorphic operations on data whose declared data type is fully homomorphic ciphertext.

[0143] The first client 100A is used to encrypt the first data using the fully homomorphic public key issued by the subkey group 20, and then send transaction information to at least one chain node 202 in the blockchain network 200. The transaction information includes the ciphertext of the first data. The at least one chain node 202 in the blockchain network 200 is used to record the ciphertext of the first data in the blockchain ledger and declare the data type of the ciphertext of the first data as fully homomorphic ciphertext through the first smart contract.

[0144] The second client 100B is used to send an operation request to at least one chain node 202 in the blockchain network 200. The operation request is used to operate on the first data. The at least one chain node 202 in the blockchain network 200 is used to perform a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group 20, obtain the homomorphic operation result, and record the homomorphic operation result in the blockchain ledger. The homomorphic operation result is the ciphertext of the operation result of the first data.

[0145] For example, the first client 100A, the second client 100B, and the chain node 202 described above can be implemented by software or by hardware.

[0146] When implemented through software, the first client 100A, the second client 100B, and the chain node 202 can be applications running on computer devices, such as computing engines. These applications can also be virtualized and provided to users as virtualization services. Virtualization services can include virtual machine (VM) services, bare metal server (BMS) services, or container services. Specifically, a VM service can be a service that uses virtualization technology to create a pool of virtual machine (VM) resources on multiple physical hosts, providing VMs for users to use on demand. A BMS service is a service that uses virtualization technology to create a pool of BMS resources on multiple physical hosts, providing BMS for users to use on demand. A container service is a service that uses virtualization technology to create a pool of container resources on multiple physical hosts, providing containers for users to use on demand. A VM is a simulated virtual computer, that is, a logical computer. A BMS is a scalable, high-performance computing service with computing performance indistinguishable from traditional physical machines, featuring secure physical isolation. A container is a kernel virtualization technology that provides lightweight virtualization to isolate user space, processes, and resources. It should be understood that the VM service, BMS service, and container service mentioned above are merely specific examples. In practical applications, virtualization services can also include other lightweight or heavyweight virtualization services, which are not specifically limited here.

[0147] When implemented in hardware, the first client 100A, the second client 100B, and the chain node 202 may include at least one computing device, such as a client machine or a server. Alternatively, the first client 100A, the second client 100B, and the chain node 202 may also be devices implemented using application-specific integrated circuits (ASICs) or programmable logic devices (PLDs). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0148] In some possible implementations, the blockchain network 200 also records a list of authorized users of the first data defined by the first user, and the operation request carries the user identifier of the second user requesting to use the first data. At least one chain node 202 in the blockchain network 200 is also used to perform authentication based on the list of authorized users of the first data and the user identifier of the second user, obtaining a first authentication result. Accordingly, at least one chain node 202 in the blockchain network 200 is specifically used to: when the first authentication result is successful, perform a fully homomorphic operation on the ciphertext of the first data based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group 20.

[0149] In some possible implementations, the first client 100A is also used for:

[0150] The blockchain network 200 receives the list of authorized users defined when the first user writes the first smart contract, and records the list of authorized users through the first smart contract; or...

[0151] Receive the authorization request from the second user, and add the second user's user identifier to the list of authorized users in the blockchain network record 200 based on the authorization request.

[0152] In some possible implementations, the second client 100B is also used for:

[0153] Send a view request to at least one chain node 202 in the blockchain network 200, the view request being used to view the first data;

[0154] Send a decryption request to subkey group 20, the decryption request includes the ciphertext of the first data, receive the encrypted first data and the encrypted symmetric key sent by subkey group 20, and return the encrypted first data and the encrypted symmetric key to the second client 100B. The encrypted first data is obtained by subkey group 20 recovering the first data from the ciphertext of the first data using the fully homomorphic sub-private key and encrypting it using the symmetric key. The encrypted symmetric data is obtained by subkey group 20 encrypting the symmetric key using the public key of the second user.

[0155] The symmetric key is recovered from the encrypted symmetric key using the second user's private key, and the first data is recovered from the encrypted first data using the symmetric key.

[0156] In some possible implementations, the blockchain network 200 also records a list of authorized viewers of the first user-defined first data, and the second client 100B is also used for:

[0157] A view request is sent to at least one chain node 202 in the blockchain network 200. The view request is used to view the first data and carries the user identifier of the second user who requests to view the first data.

[0158] At least one chain node 202 in the blockchain network 200 is also used for:

[0159] Authentication is performed based on the list of authorized viewers of the first data and the user ID of the second user to obtain a second authentication result.

[0160] When the second authentication result is successful, a decryption request is sent to subkey group 20.

[0161] In some possible implementations, the first client 100A is also used for:

[0162] The proof information is generated based on the first data and sent to at least one chain node 202 in the blockchain network 200. The proof information includes a random number encrypted with a fully homomorphic public key and a hash value determined based on the first data and the random number, or the proof information includes zero-knowledge proof.

[0163] At least one chain node 202 in the blockchain network 200 is also used for:

[0164] When the verification of the proof information is successful, the user identifier of the first user who owns the first data is stored.

[0165] This application also provides a computing device 500. As shown in FIG5, the computing device 500 includes: a bus 502, a processor 504, a memory 506, and a communication interface 508. The processor 504, the memory 506, and the communication interface 508 communicate with each other via the bus 502. The computing device 500 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 500.

[0166] Bus 502 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 5, but this does not imply that there is only one bus or one type of bus. Bus 502 can include pathways for transmitting information between various components of computing device 500 (e.g., memory 506, processor 504, communication interface 508).

[0167] Processor 504 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0168] The memory 506 may include volatile memory, such as random access memory (RAM). The memory 506 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). The memory 506 stores executable program code, which the processor 504 executes to implement the aforementioned data processing method. Specifically, the memory 506 stores instructions from the blockchain management system 10 for executing the data processing method. For example, the memory 506 may store instructions from the first client 100A, the second client 100B, or the chain node 202 for executing the data processing method.

[0169] The communication interface 508 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 500 and other devices or communication networks.

[0170] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0171] As shown in Figure 6, the computing device cluster includes at least one computing device 500. The memory 506 of one or more computing devices 500 in the computing device cluster may store the same instructions from the blockchain management system 10 for executing data processing methods.

[0172] In some possible implementations, one or more computing devices 500 in the computing device cluster can also be used to execute some of the instructions used by the blockchain management system 10 to perform data processing methods. In other words, a combination of one or more computing devices 500 can jointly execute the instructions used by the blockchain management system 10 to perform data processing methods.

[0173] It should be noted that the memory 506 in different computing devices 500 in the computing device cluster can store different instructions for executing some functions of the blockchain management system 10.

[0174] Figure 7 illustrates one possible implementation. As shown in Figure 7, one or more computing devices in the computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. The communication interfaces in computing devices 500A, 500B, 500C, 500D, and 500E are connected to the network. The memory 506 in computing device 500A stores instructions for executing the functions of the first client 100A; the memory 506 in computing device 500B stores instructions for executing the functions of the second client 100B; and computing devices 500C, 500D, and 500E store instructions for executing the functions of the chain node 202. In other words, the memories of computing devices 500A, 500B, 500C, 500D, and 500E collectively store the instructions used by the blockchain management system 10 to execute data processing methods.

[0175] The connection method between the computing device clusters shown in Figure 7 can be considered because the data processing method provided in this application requires a lot of resources for verification and block generation. Therefore, it is considered that the functions implemented by the first client 100A, the second client 100B, and the chain node 202 are executed by independent computing devices.

[0176] It should be understood that the functions of computing devices 500A and 500B shown in Figure 7 can also be performed by multiple computing devices 500. Similarly, the functions of computing devices 500C, 500D, and 500E can also be performed by multiple computing devices 500.

[0177] This application embodiment also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the data processing method described above for use in the blockchain management system 10.

[0178] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform the above-described data processing method.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data processing method, characterized in that, An application is made in a blockchain management system, the system comprising a first client, a second client, and a blockchain network, the blockchain network comprising multiple chain nodes, each chain node deploying a first smart contract. The first smart contract is used to perform fully homomorphic operations on data declared as fully homomorphic ciphertext, the method comprising: The first client encrypts the first data using a fully homomorphic public key published by the subkey group, and then sends transaction information to at least one chain node in the blockchain network, the transaction information including the ciphertext of the first data; At least one chain node in the blockchain network records the ciphertext of the first data in the blockchain ledger and declares through the first smart contract that the data type of the ciphertext of the first data is fully homomorphic ciphertext. The second client sends an operation request to at least one chain node in the blockchain network, the operation request being used to manipulate the first data; At least one chain node in the blockchain network performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group, obtains the homomorphic operation result, and records the homomorphic operation result in the blockchain ledger. The homomorphic operation result is the ciphertext of the operation result of the first data.

2. The method according to claim 1, characterized in that, The blockchain network also records a list of authorized users of the first data defined by the first user, and the operation request carries the user identifier of the second user requesting to use the first data. The method further includes: At least one chain node in the blockchain network performs authentication based on the list of authorized users of the first data and the user identifier of the second user to obtain a first authentication result. At least one chain node in the blockchain network performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group, including: When the first authentication result is successful, at least one chain node in the blockchain network performs a fully homomorphic operation on the ciphertext of the first data based on the first smart contract and the fully homomorphic evaluation key issued by the subkey group.

3. The method according to claim 2, characterized in that, The method further includes: The first client receives the list of authorized users defined by the first user when writing the first smart contract, and the blockchain network records the list of authorized users through the first smart contract; or... The first client receives the second user's authorization request and adds the second user's user identifier to the list of authorized users recorded in the blockchain network according to the authorization request.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The second client sends a view request to at least one chain node in the blockchain network, the view request being used to view the first data; At least one chain node in the blockchain network sends a decryption request to the subkey group. The decryption request includes the ciphertext of the first data. The node receives the encrypted first data and the encrypted symmetric key sent by the subkey group and returns the encrypted first data and the encrypted symmetric key to the second client. The encrypted first data is obtained by the subkey group recovering the first data from the ciphertext of the first data using a fully homomorphic sub-private key and encrypting it using the symmetric key. The encrypted symmetric data is obtained by the subkey group encrypting the symmetric key using the public key of the second user. The second client uses the second user's private key to recover the symmetric key from the encrypted symmetric key, and uses the symmetric key to recover the first data from the encrypted first data.

5. The method according to any one of claims 1 to 3, characterized in that, The blockchain network also records a list of authorized viewers of the first data defined by the first user, and the method further includes: The second client sends a view request to at least one chain node in the blockchain network. The view request is used to view the first data, and the view request carries the user identifier of the second user who requests to view the first data. At least one chain node in the blockchain network performs authentication based on the list of authorized viewers of the first data and the user identifier of the second user to obtain a second authentication result. When the second authentication result is successful, at least one chain node in the blockchain network sends a decryption request to the subkey group.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: The first client generates proof information based on the first data and sends the proof information to at least one chain node in the blockchain network. The proof information includes a random number encrypted using the fully homomorphic public key and a hash value determined based on the first data and the random number, or the proof information includes zero-knowledge proof. At least one chain node in the blockchain network stores the user identifier of the first user who owns the first data when the proof information is verified.

7. A blockchain management system, characterized in that, The system includes a first client, a second client, and a blockchain network. The blockchain network includes multiple chain nodes, and the multiple chain nodes are deployed with a first smart contract. The first smart contract is used to perform fully homomorphic operations on data whose declared data type is fully homomorphic ciphertext. The first client is configured to encrypt the first data using a fully homomorphic public key published by a subkey group, and then send transaction information to at least one chain node in the blockchain network, the transaction information including the ciphertext of the first data; At least one chain node in the blockchain network is used to record the ciphertext of the first data in the blockchain ledger, and declare the data type of the ciphertext of the first data as fully homomorphic ciphertext through the first smart contract. The second client is configured to send an operation request to at least one chain node in the blockchain network, the operation request being used to manipulate the first data; At least one chain node in the blockchain network is configured to perform a fully homomorphic operation on the ciphertext of the first data based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group, obtain the homomorphic operation result, and record the homomorphic operation result in the blockchain ledger, wherein the homomorphic operation result is the ciphertext of the operation result of the first data.

8. The system according to claim 7, characterized in that, The blockchain network also records a list of authorized users of the first data defined by the first user, and the operation request carries the user identifier of the second user requesting to use the first data. At least one chain node in the blockchain network is also used for: Authentication is performed based on the list of authorized users in the first data and the user ID of the second user to obtain the first authentication result; At least one chain node in the blockchain network is specifically used for: When the first authentication result is successful, a fully homomorphic operation is performed on the ciphertext of the first data based on the fully homomorphic evaluation key issued by the first smart contract and the subkey group.

9. The system according to claim 8, characterized in that, The first client is also used for: The blockchain network receives the list of authorized users defined by the first user when writing the first smart contract, and records the list of authorized users through the first smart contract; or... Upon receiving the authorization request from the second user, the user identifier of the second user is added to the list of authorized users recorded in the blockchain network according to the authorization request.

10. The system according to any one of claims 7 to 9, characterized in that, The second client is also used for: Send a view request to at least one chain node in the blockchain network, the view request being used to view the first data; Send a decryption request to the subkey group, the decryption request including the ciphertext of the first data, receive the encrypted first data and the encrypted symmetric key sent by the subkey group, and return the encrypted first data and the encrypted symmetric key to the second client. The encrypted first data is obtained by the subkey group recovering the first data from the ciphertext of the first data using a fully homomorphic sub-private key and encrypting it using the symmetric key. The encrypted symmetric data is obtained by the subkey group encrypting the symmetric key using the public key of the second user. The symmetric key is recovered from the encrypted symmetric key using the second user's private key, and the first data is recovered from the encrypted first data using the symmetric key.

11. The system according to any one of claims 7 to 9, characterized in that, The blockchain network also records a list of authorized viewers of the first data defined by the first user, and the second client is further used for: A view request is sent to at least one chain node in the blockchain network. The view request is used to view the first data, and the view request carries the user identifier of the second user who requests to view the first data. At least one chain node in the blockchain network is also used for: Authentication is performed based on the list of authorized viewers of the first data and the user ID of the second user to obtain a second authentication result. When the second authentication result is successful, a decryption request is sent to the subkey group.

12. The system according to any one of claims 7 to 11, characterized in that, The first client is also used for: Proof information is generated based on the first data and sent to at least one chain node in the blockchain network. The proof information includes a random number encrypted using the fully homomorphic public key and a hash value determined based on the first data and the random number, or the proof information includes zero-knowledge proof. At least one chain node in the blockchain network is also used for: When the verification of the proof information is successful, the user identifier of the first user who owns the first data is stored.

13. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, the at least one computing device including at least one processor and at least one memory, the at least one memory storing computer-readable instructions; the at least one processor executes the computer-readable instructions to cause the computing device cluster to perform the data processing method as described in any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that, Includes computer-readable instructions; the computer-readable instructions are used to implement the data processing method according to any one of claims 1 to 6.

15. A computer program product, characterized in that, Includes computer-readable instructions; the computer-readable instructions are used to implement the data processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Internet of Things block chain transaction method and system based on multi-key homomorphic encryption

    CN113643134A

  • Storage method of addition homomorphic encryption user asset quota in block chain

    CN114417389A

  • Secret-related information processing method and system based on block chain and multi-party security computing

    CN115495768A

  • Blockchain data protection method, device and system, and computer-readable storage medium

    WO2020037654A1