Blockchain data processing method, system and device supporting a full homomorphic encryption algorithm

By employing a fully homomorphic encryption algorithm and the Shamir secret sharing scheme, the privacy leakage problem in blockchain data sharing is solved, enabling data computation and sharing in an encrypted state and improving data collaboration efficiency.

CN118381595BActive Publication Date: 2026-02-27BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410300096.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2026-02-27
Estimated Expiration
2044-03-15

AI Technical Summary

Technical Problem

Existing blockchain data sharing solutions suffer from privacy breaches, especially since blockchain-based data sharing solutions cannot perform computational operations and private data is easily leaked.

Method used

Employing a fully homomorphic encryption algorithm, a fully homomorphic public-private key pair is generated through a key management institution. The private key is then fragmented using the Shamir secret sharing scheme. Combined with a distributed file storage system and a blockchain network, data can be computed and shared in an encrypted state.

Benefits of technology

It enables computation without disclosing private data, reducing the risk of privacy data leakage during application and improving data collaboration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381595B_ABST
    Figure CN118381595B_ABST
Patent Text Reader

Abstract

The application provides a blockchain data processing method, system and device supporting a full homomorphic encryption algorithm. In a data sharing process based on a blockchain network, a full homomorphic encryption algorithm is introduced to calculate the private data of a data holder in the blockchain network in an encrypted state, and the calculation result is decrypted by a demander, thereby solving the leakage problem of blockchain private data sharing and cooperation, reducing the risk of leakage of individual sensitive data in the application process, and protecting the private data of enterprises while improving the data cooperation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a blockchain data processing method, system and device supporting a fully homomorphic encryption algorithm. BACKGROUND

[0002] With the landing application of new information technologies such as big data, cloud computing, and edge computing, data as a basic resource is promoting the vigorous development of the digital economy and playing a crucial role in promoting technological innovation, business cooperation, and social development. In this context, data security and data collaboration and sharing have become the focus of attention from all walks of life.

[0003] With the continuous expansion of the application of blockchain technology, the problem of leakage of private data has gradually become prominent. The openness and transparency of blockchain also threaten the confidentiality of user identity and private data. Blockchain is maintained by all nodes on the chain. The content of the distributed ledger is open and transparent, and all transaction records are open to all nodes on the chain, so there is a serious privacy leakage risk in the secure sharing of data on the chain. At the same time, most of the existing data sharing schemes based on blockchain have limitations. For example, using the Pallier public key encryption algorithm to achieve data sharing can only be applied to positive integer data and can only perform addition operations. The data sharing scheme implemented using symmetric encryption algorithms and asymmetric encryption algorithms can only share the original data and cannot perform calculation operations on the data.

[0004] Therefore, a new data sharing method is urgently needed for distributed storage data. SUMMARY

[0005] In view of this, the embodiments of the present application provide a blockchain data processing method, system and device supporting a fully homomorphic encryption algorithm to eliminate or improve one or more defects in the prior art, and to solve the problem that data sharing based on the blockchain in the prior art is prone to cause privacy leakage.

[0006] One aspect of the present application provides a blockchain data processing method supporting a fully homomorphic encryption algorithm, the method comprising the following steps:

[0007] Parameter initialization is performed by a key management agency and a data computing center, and a fully homomorphic encryption environment is constructed;

[0008] A first data sharing agency initiates an application user data request to a plurality of second data sharing agencies through a blockchain network; each second data sharing agency listens to the application user data request and feeds back team formation information in the case of passing identity verification, and the first data sharing agency writes team formation information to the blockchain network;

[0009] The first data sharing institution initiates a key application request to the key management institution, and the key management institution verifies the team information based on the key application request. If the verification is successful, a fully homomorphic public-private key pair is generated.

[0010] The fully homomorphic public key in the fully homomorphic public-private key pair is encrypted and sent to the first data sharing institution and the second data sharing institution; the fully homomorphic private key in the fully homomorphic public-private key pair is fragmented according to the number of the first data sharing institution and the second data sharing institution, and then encrypted and distributed to the first data sharing institution and the second data sharing institution.

[0011] The first data sharing institution and the second data sharing institution decrypt the fragments of the fully homomorphic public key and the fully homomorphic private key received locally, and use the fully homomorphic public key to encrypt local user data to obtain the corresponding first ciphertext data;

[0012] The first data sharing institution and the second data sharing institution upload the local first encrypted data to the distributed file storage system, and package and store the storage addresses of each first encrypted data on the blockchain network;

[0013] The first data sharing institution initiates a data computing request to the data computing center. The data computing center queries the storage address of each first encrypted data on the blockchain network based on the data computing request and obtains each first encrypted data from the distributed file storage system.

[0014] The data computing center performs homomorphic computation on each first encrypted data according to the set requirements, obtains the second encrypted data, stores it in the distributed file storage system, and feeds back the data storage address of the second encrypted data to the first data sharing organization;

[0015] The first data sharing institution sends a request to each of the second data sharing institutions to recover the key. Each of the second data sharing institutions verifies the identity and legitimacy of the first data sharing institution. If the identity is legitimate, the second data sharing institution encrypts and sends fragments of the fully homomorphic private key to the first data sharing institution.

[0016] The first data sharing organization obtains the second ciphertext data according to the second ciphertext data storage address, recovers the fully homomorphic private key according to the fragments of the fully homomorphic private key, and decrypts the second ciphertext data to obtain the target calculation result.

[0017] In some embodiments, before parameter initialization is performed by the key management authority and the data computing center, the method further includes:

[0018] The first data sharing mechanism and each of the second data sharing mechanisms are pre-registered on the blockchain network to obtain corresponding identities for identity legitimacy verification.

[0019] In some embodiments, the method further comprises:

[0020] An asymmetric encryption algorithm ECC is used to generate a corresponding public-private key pair for the pre-registered first data sharing mechanism and each of the second data sharing mechanisms, for encrypting transmission of the shards of the fully homomorphic public key and the fully homomorphic private key.

[0021] In some embodiments, the asymmetric encryption algorithm ECC selects an integer smaller than an elliptic curve order as an i-th private key SK i The calculation formula corresponding to the i-th public key is PK i = SK i · G, G is a base point of an elliptic curve.

[0022] In some embodiments, the fully homomorphic public-private key pair is generated using a CKKS algorithm, and the fully homomorphic private key is shredded using a Shamir secret sharing scheme.

[0023] In some embodiments, the fully homomorphic private key is shredded using a Shamir secret sharing scheme, comprising:

[0024] A minimum number of recovered keys p is set, p is less than the total number k of the first data sharing mechanism and the second data sharing mechanism;

[0025] A finite field F q is initialized, and p-1 values a1, a2,..., a p-1 are selected in the finite field Fq, and a polynomial is constructed as follows:

[0026] f(x) = SK FHE + a1x + a2x 2 + … + a p-1 x p-1 ;

[0027] wherein SK FHE represents the fully homomorphic private key;

[0028] k non-zero elements x1, x2,..., x k are selected in the finite field F q , and a shard (x i , f(x i )) of the fully homomorphic private key is calculated for an i-th of the first data sharing mechanism and the second data sharing mechanism.

[0029] In some embodiments, the blockchain network adopts a consortium chain Hyperledger Fabric blockchain platform, and the distributed file storage system is an IPFS file storage system.

[0030] In another aspect, the present application also provides a blockchain data processing system supporting a fully homomorphic encryption algorithm, comprising a key management authority, a data computing center, a distributed file storage system, a blockchain network, a first data sharing authority and a plurality of second data sharing authorities; the system is used to execute the steps of the above-mentioned blockchain data processing method supporting a fully homomorphic encryption algorithm.

[0031] In another aspect, the present application also provides a computer readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, realizes the steps of the above-mentioned method.

[0032] In another aspect, the present application also provides a computer program product comprising a computer program / instruction, which, when executed by a processor, realizes the steps of the above-mentioned method.

[0033] The present application has at least the following beneficial effects:

[0034] The blockchain data processing method, system and device supporting a fully homomorphic encryption algorithm according to the present application, in the process of data sharing based on a blockchain network, by introducing a fully homomorphic encryption algorithm, the privacy data of the data holder in the blockchain network is calculated in an encrypted state, and the calculation result is decrypted by the demander, solving the leakage problem of blockchain privacy data sharing and cooperation, not only reducing the risk of leakage of personal sensitive data in the application process, but also protecting the privacy data between enterprises and improving the data cooperation efficiency.

[0035] Additional advantages, objects, and features of the application will be set forth in part by the description that follows, and will become apparent to those skilled in the art upon examination of the following figures and detailed description thereof or can be learned by practice of the application. The objects and other advantages of the application can be realized and attained by the structure particularly pointed out in the description and claims hereof as well as the appended drawings.

[0036] It will be understood by those skilled in the art that the objects and advantages of the present application can be realized and attained by the structure particularly pointed out in the appended claims and carried out as hereinafter described in the specification and claims hereof, and it is understood that structural changes can be made without departing from the spirit and scope of the present application. The application is to cover and embrace all suitable modifications and equivalents thereof. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings:

[0038] Figure 1A flowchart of a blockchain data processing method supporting a fully homomorphic encryption algorithm according to an embodiment of the present application is shown.

[0039] Figure 2 An architecture diagram of a blockchain data processing method supporting a fully homomorphic encryption algorithm according to another embodiment of the present application is shown. DETAILED DESCRIPTION

[0040] In order to make the objectives, technical solutions, and advantages of the present application clearer, further detailed descriptions will be given below in conjunction with embodiments and drawings. Here, the illustrative embodiments of the present application and their descriptions are used to explain the present application, but are not intended to limit the present application.

[0041] It should also be noted that, in order to avoid obscuring the present application due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present application are shown in the drawings, and other details not closely related to the present application are omitted.

[0042] It should be emphasized that the term “comprises / comprising” is used herein to indicate the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0043] It should also be noted that, unless otherwise specified, the term “connected” used herein can not only mean direct connection, but also indirect connection in the presence of an intermediate.

[0044] In the following, embodiments of the present application will be described with reference to the drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0045] In order to solve the problem of limited business scenarios of blockchain data collaboration due to privacy leakage of data sharing, and expand the data sharing demand scenarios based on blockchain, the present application provides a blockchain data processing method, system, and device supporting a fully homomorphic encryption algorithm, which promotes the safe sharing and collaboration of private data on a blockchain platform. The method uses blockchain technology and a fully homomorphic encryption algorithm to reduce the risk of leakage of individual sensitive data in the application process, while protecting private data between enterprises, thereby promoting efficient cooperation of data between enterprises, and ultimately maximizing the value of data between enterprises.

[0046] Specifically, a blockchain data processing method supporting a fully homomorphic encryption algorithm is provided, referring to Figure 1 The method includes the following steps S101-S110:

[0047] Step S101: Perform parameter initialization by a key management agency and a data computing center, and construct a fully homomorphic encryption environment.

[0048] Step S102: The first data sharing agency initiates an application user data request to the plurality of second data sharing agencies through the blockchain network; each second data sharing agency listens to the application user data request and feeds back the consent team information if the identity verification is passed, and the first data sharing agency writes the team information to the blockchain network.

[0049] Step S103: The first data sharing agency initiates a key application request to the key management agency, and the key management agency verifies the team information based on the key application request, and generates a full homomorphic public-private key pair if the verification is passed.

[0050] Step S104: The full homomorphic public key in the full homomorphic public-private key pair is encrypted and sent to the first data sharing agency and the second data sharing agency, and the full homomorphic private key in the full homomorphic public-private key pair is fragmented according to the number of the first data sharing agency and the second data sharing agency, and is encrypted and distributed to the first data sharing agency and the second data sharing agency.

[0051] Step S105: The first data sharing agency and the second data sharing agency decrypt the locally received full homomorphic public key and the fragments of the full homomorphic private key, and encrypt the local user data using the full homomorphic public key to obtain the corresponding first ciphertext data.

[0052] Step S106: The first data sharing agency and the second data sharing agency upload the local first ciphertext data to the distributed file storage system, and package and store the storage addresses of each first ciphertext data on the blockchain network.

[0053] Step S107: The first data sharing agency initiates a data calculation request to the data calculation center, and the data calculation center queries the storage addresses of each first ciphertext data on the blockchain network based on the data calculation request, and obtains each first ciphertext data from the distributed file storage system.

[0054] Step S108: The data calculation center performs homomorphic calculation on each first ciphertext data according to the set demand to obtain second ciphertext data, and stores the second ciphertext data to the distributed file storage system, and feeds back the second ciphertext data storage address to the first data sharing agency.

[0055] Step S109: The first data sharing agency sends an application key recovery request to each second data sharing agency, and each second data sharing agency verifies the identity legality of the first data sharing agency, and encrypts and sends the local fragment of the full homomorphic private key to the first data sharing agency if the identity is legal.

[0056] Step S110: The first data sharing agency obtains the second ciphertext data according to the second ciphertext data storage address, recovers the full homomorphic private key according to the fragment of the full homomorphic private key, and decrypts the second ciphertext data to obtain the target calculation result.

[0057] In steps S101-S110, the main subjects involved include: key management agency, data computing center, first data sharing agency, second data sharing agency and blockchain network. It should be noted that the first and second in the present application are not limited to ordinal numbers, but are used to distinguish different data sharing agency objects. In the present application, the key management agency is used to generate, store and distribute various forms of key pairs, in the present embodiment, mainly used to generate homomorphic key pairs, and asymmetric encryption public and private key pairs for data transmission. The data computing center is used to perform data computing tasks, and the specific content of the computing task is set based on the actual application requirements, including data addition, subtraction, multiplication and division and other data operations. The first data sharing agency and the second data sharing agency belong to the same type of agency, which can be the data entity owner and the data computing requestor, such as government, bank, credit union and insurance company, etc.

[0058] In step S101, the key management agency and the data computing center are first initialized. The main role of the initialization process of the homomorphic encryption environment is to establish a secure encryption environment, so that data can be calculated in an encrypted manner without revealing its plaintext content. Through initialization, it is ensured that the encryption algorithm and parameter settings selected meet the security requirements, and appropriate keys are generated for subsequent encryption and decryption operations. This can protect the security and privacy of data during the calculation process, so that the data owner can entrust other computing parties to calculate in an encrypted manner without worrying about data leakage. Denote the key management agency as KA and the data computing center as DC. KA and DC need to generate a series of parameters in the system initialization stage. KA initializes to generate homomorphic encryption parameters and constructs a homomorphic encryption environment Env FHE and Shamir secret sharing environment. Specifically, the initialization process includes: parameter generation, key generation, encryption algorithm setting, security parameter setting, testing and verification, etc.

[0059] In step S102, in a specific problem scenario, the first data sharing agency and multiple second data sharing agencies hold the same type of private data. In order to calculate the private data held by each party without revealing the privacy, the first data sharing agency first initiates an application for user data, and the second data sharing agency verifies the identity information of the initiator if it listens to the initiation of the application for user data, and agrees to data sharing if it is legal.

[0060] For example, after the first data sharing agency and the second data sharing agency join the blockchain network, the first data sharing agency DI i Initiate a team application through the blockchain network to k-1 second data sharing agencies, denoted as:

[0061] Request group ={GID,CID group ,DID i};

[0062] Wherein, GID is a team unique identifier, CID group represents a user ID group, DID i is a unique identifier of the first data sharing mechanism DI i .

[0063] When the second data sharing mechanism listens to the team application, it considers whether to agree to enter the team according to CID group , that is, whether the following formula is established:

[0064]

[0065] CID refers to a user ID group owned by a data sharing mechanism, and the data sharing mechanism owns the data of the user group.

[0066] The first data sharing mechanism DI i will collect the team return result, modify the team state on the chain, and write the ID group of the mechanism to be involved in the team to the chain. The fields on the chain include:

[0067] Tx group ={GID,CID group ,DID group ,DID i ,status};

[0068] Wherein, status is used to mark the team state, and if all institutions agree to team, it is marked as true, otherwise it is marked as false.

[0069] In step S103, the homomorphic public-private key pair is generated by CKKS algorithm, and the homomorphic private key is fragmented by Shamir secret sharing scheme.

[0070] The key management agency KA views the team information Tx group of this time according to the team unique identifier GID, views the team state, and if status is false, or the initiator user identifier in the key application request is not DID i , it is ended. Otherwise, the key management agency KA generates a homomorphic public-private key pair, and KA calls the key generation algorithm CKKS.Keygen(1 λ ) to generate a homomorphic public-private key pair PK FHE and SK FHE .

[0071] CKKS.Keygen(1 λ )→(PK FHE SK FHE );

[0072] Where λ is the safety parameter. PK FHE SK represents a fully homomorphic public key. FHE This represents a fully homomorphic private key.

[0073] In step S104, using the Shamir secret sharing scheme, the minimum number of recovery keys is set to p, where p is less than the total number k of the first and second data sharing organizations. The finite field F is initialized. q and in the finite field F q Select p-1 values ​​a1, a2, ..., a p-1 Construct a polynomial:

[0074] f(x) = SK FHE +a1·x+a2·x 2 +…+a p-1 ·x p-1 ;

[0075] Based on this polynomial, corresponding secret fragments (x) are generated for the first and second data sharing mechanisms. i f(x) i )).

[0076] In the finite field F q Select k non-zero elements x1, x2, ..., xk k For the i-th fragment (x) in the first and second data sharing institutions, compute the fully homomorphic private key. i ,f(x i )).

[0077] The key management authority KA generates asymmetric public-private key pairs (PK, SK) for the first and second data sharing authorities respectively using the asymmetric encryption algorithm ECC.

[0078] Then, the public key PK of each data sharing institution is used. i Encrypting the secret fragment of the corresponding fully homomorphic private key yields the ciphertext fragment CT. i And along with the fully homomorphic public key PK FHE The information returned to the respective institutions is as follows:

[0079] ECC.Encrypt(PK i , (x i f(x) i )))→CT i ;

[0080] In step S105, each first data sharing agency and second data sharing agency receives the shards of the full homomorphic private key and the full homomorphic public key, and uses the full homomorphic public key PK FHE Encrypt the locally held private data Encrypt to obtain the first ciphertext The expression is:

[0081]

[0082] In step S106, the first data sharing agency and the second data sharing agency upload the local first ciphertext data to the distributed file storage system, and store the storage address herf i Join the group initiator agency DI i Established ciphertext address group Addr group , Addr group is stored in the blockchain, and DI i is sent a message that the upload is successful, and the on-chain group information is added as follows:

[0083] Addr group ={herf1, herf2, …, herf n}.

[0084] In this embodiment, the distributed file storage system uses IPFS, the full name of which is InterPlanetary File System, which is a peer-to-peer distributed file storage system. IPFS is a global, distributed file system that enables users to share and access information in a more secure, faster and more open manner.

[0085] In step S107, the first data sharing agency initiates a data computing request to the data computing center DC, and the request is recorded as Request cal ={k, GID}, DC queries the blockchain record through GID to obtain the ciphertext address group Addr group , and according to this group of ciphertext addresses, queries and obtains k first ciphertext data from IPFS.

[0086] In step S108, the data computing center DC performs full homomorphic computing operation on the k first ciphertext data to obtain second ciphertext data. For example, according to the business requirements, the addition operation is performed on the field data of the ciphertext to obtain the encrypted user data sum Where m represents the number of users.

[0087]

[0088] Then the second ciphertext CTcal Upload to IPFS, and the ciphertext file address obtained is stored in the blockchain, and a request for key recovery is sent to the second data sharing institution DI i Return a message indicating that the calculation is complete.

[0089] In step S109, the first data sharing institution DI i According to the team GID, the blockchain record is queried to obtain the ciphertext address herf, and a request for key recovery is sent to the second data sharing institution of the other team res = {GID, DID i}.

[0090] After the second data sharing institution obtains the team information through the blockchain, it verifies the legality of DI i , that is, it verifies whether DID i belongs to DID group . If the verification is successful, the key fragments held by the second data sharing institution are encrypted using the public key PK of DI i and returned to DI i .

[0091] In step S110, the first data sharing institution obtains the ciphertext fragment that satisfies the number p of the minimum recoverable key, and decrypts the ciphertext fragment using the private key SK to finally recover the full homomorphic private key SK FHE .

[0092] The first data sharing institution obtains the ciphertext data result CT from the IPFS according to the ciphertext file address herf cal , and then calls the homomorphic decryption algorithm CKKS.Dec(CTc al , SK FHE ) to decrypt CT FHE using the private key SK cal , and obtains the user data after homomorphic calculation statistics through the decoding algorithm CKKS.Dcd(m(X), Delta).

[0093] In some embodiments, before step S101, that is, before the parameter initialization by the key management institution and the data calculation center, the method further includes step S201: pre-registration by the first data sharing institution and each second data sharing institution on the blockchain network to obtain corresponding identity identifiers for identity legality verification.

[0094] Further, the method further includes: generating a corresponding public-private key pair for the pre-registered first data sharing institution and each second data sharing institution using the asymmetric encryption algorithm ECC, for encrypting transmission of the homomorphic public key and the homomorphic private key fragments.

[0095] In some embodiments, the asymmetric encryption algorithm ECC selects an integer less than the elliptic curve order as the i-th private key SK i The calculation formula corresponding to the i-th public key is PK i = SK i ·G, G is the base point of the elliptic curve.

[0096] In some embodiments, the blockchain network adopts the consortium chain Hyperledger Fabric blockchain platform, and the distributed file storage system is an IPFS file storage system.

[0097] In another aspect, the present application also provides a blockchain data processing system supporting a fully homomorphic encryption algorithm, comprising a key management authority, a data computing center, a distributed file storage system, a blockchain network, a first data sharing authority and a plurality of second data sharing authorities; the system is used to execute the steps of the above-mentioned blockchain data processing method supporting a fully homomorphic encryption algorithm.

[0098] In another aspect, the present application also provides a computer readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, realizes the steps of the above-mentioned method.

[0099] In another aspect, the present application also provides a computer program product comprising a computer program / instruction, which, when executed by a processor, realizes the steps of the above-mentioned method.

[0100] The present application will be described below in conjunction with a specific embodiment:

[0101] The present embodiment provides a blockchain data processing method supporting a fully homomorphic encryption algorithm, mainly solving the problem of leakage of blockchain private data sharing and cooperation, and guaranteeing the "useful invisibility" of private data. The present embodiment applies private computing technology to the blockchain, first constructs a blockchain data security sharing model, and then gives a blockchain data privacy protection method supporting a fully homomorphic encryption algorithm. The present embodiment realizes both data sharing and circulation and data privacy protection, achieving the "useful invisibility" of data. Referring to Figure 2 The present embodiment first gives a blockchain data security sharing model, which mainly includes five types of entities: data owners, data recipients, data computing centers, key management authorities and trusted blockchain networks.

[0102] Data owner (DO): refers to an entity that owns data, which can generally be a government, a bank, a credit union, an insurance company, etc. In data security sharing technology, the main responsibility of the data owner is to ensure the privacy and integrity of the data. They use fully homomorphic encryption and other technologies to encrypt the data and decide the data sharing strategy, including selecting entities participating in sharing, etc.

[0103] Data Receiver (DR): refers to an entity granted access to shared data, possessing secret shards and capable of acquiring enough secret shards to recover the full homomorphic private key. Throughout the data security sharing technology, the data receiver can effectively participate in the decryption and calculation process while maintaining data privacy, thus realizing conditional access to shared data.

[0104] Data Computing Center (DC): an entity responsible for performing data computation tasks. It is an entity specifically responsible for storing and managing data owner data. Its main responsibility is to collect, organize, store and calculate data about data owners. In the context of homomorphic encryption, the data computing center can perform calculations in ciphertext state without understanding the plaintext content of the data. The data computing center plays a key role in specific industries, providing data reference.

[0105] Key Management Agency (KA): the key management agency is an entity responsible for managing homomorphic encryption keys. Homomorphic encryption, as a key technology, is used for computation while maintaining data privacy. The key management agency is responsible for generating, storing and distributing these encryption keys, and through key distribution management, ensures that data receivers can only recover the full homomorphic private key by collecting enough key shards to access the plaintext content of the data.

[0106] Trusted Blockchain Network (BC): used to store transaction records and data. The blockchain network serves as the underlying infrastructure for data storage. Each node has the same data copy, ensuring consistency through consensus mechanisms. The blockchain network not only improves data security and reliability, but also provides transparency and tamper-proofing for data sharing.

[0107] This embodiment takes the user data collaboration needs between different agencies as the business scenario and describes in detail a blockchain data privacy protection method supporting the full homomorphic encryption algorithm. In this method, the data agency DI acts as the data owner and data receiver. By adopting the full homomorphic encryption algorithm, this embodiment realizes the secure encryption and calculation of user data, ensuring the secure sharing of user data in collaboration. In addition, the Shamir secret sharing technology is introduced for distributed management of the full homomorphic private key, further enhancing the security and attack resistance of the system. This innovative method provides an efficient, secure and privacy-protecting data sharing environment for the financial credit and other fields, not only ensuring the security of the key, but also guaranteeing the secure data transmission and sharing in sensitive areas.

[0108] The specific implementation process of the blockchain data privacy protection method supporting the full homomorphic encryption algorithm proposed in this embodiment is as follows:

[0109] Step 1: Key management authority KA and data center DC perform system initialization operation, generate relevant parameters. First, the key management authority KA performs homomorphic encryption parameter initialization, constructs CKKS homomorphic encryption environment Env FHE . Specifically, set λ as the security parameter of the algorithm. For base integer p > 0, modulo q 0, number of layers L, set modulus chain q l = p l · q 0, 0 < l ≤ L. Gaussian integer ring is a discrete subspace of C. Polynomial ring is the encoding plaintext space. For σ > 0, define denotes extracting an N-dimensional polynomial vector from , where each coefficient is taken from a discrete Gaussian distribution with variance a 2 . Define denotes extracting an N-dimensional vector from {0, 1, -1} N , whose Hamming weight is exactly h. For 0 ≤ ρ ≤ 1, symbol denotes extracting an N-dimensional vector from {0, 1, -1} N , where the probabilities of selecting 1 and -1 are ρ / 2 and 1-ρ, respectively. Set the scaling factor Δ ≥ 1 to maintain the accuracy of the plaintext in encoding. Then the key management authority KA initializes the finite field F q , constructs the environment of Shamir secret sharing.

[0110] Step 2. The k participating institutions join the blockchain network as blockchain nodes, authenticate the institutions through the blockchain network to ensure that each institution is a legal institution; institution DI i applies for user data, sends a team-up request transaction Request group to other institutions through the blockchain network, the request parameters include team-up unique identifier GID, user ID group CID group and FI i unique identifier DID i , namely:

[0111] Request group = {GID, CID group , DID i}; (1)

[0112] On-chain store GID, CID group , DID i and the status of this team-up, the default value of status is false.

[0113] Step 3. The organization that receives the team request, based on its CID. group Consider whether to agree to form a team. Specifically, the user ID group corresponding to the user dataset owned by the organization is CID. Determine:

[0114]

[0115] A CID refers to a group of user IDs owned by a data sharing organization, which owns the data of that user group.

[0116] If equation (1) is successfully verified, a message agreeing to form a team will be returned. (Institution DI) i The success of the team formation is determined based on the results returned by other institutions. If successful, a success notification is sent to other institutions, the team formation status stored on the blockchain is updated to true, and the ID group DID of the participating institutions is written into the blockchain. group Therefore, the fields stored on the chain at this time include:

[0117] Tx group ={GID, CID group DID group DID i ,status}; (3)

[0118] Step 4. In each institution DI i After joining the blockchain network, it uses the existing asymmetric encryption algorithm ECC to apply for a public-private key pair (PK). i SK i ),Right now:

[0119] ECC.Keygen() → (PK i SK i (4)

[0120] Specifically, an integer less than the elliptic curve order is chosen as the private key SK. i Public key PK i =SK i ·G, where G is the base point of the elliptic curve. PK i Stored in the blockchain network for subsequent encrypted transmission of private key fragments; the first data sharing institution (FI) initiating the data sharing request. i Send a key request to KA key To request a fully homomorphic key for encrypting data, the request parameters include the team unique identifier GID and the organization unique identifier DID′. i ,Right now:

[0121] Request key ={GID, DID' i}; (5)

[0122] Step 5. KA receives the key application request Request key Then, KA looks up the information stored in the blockchain with the group unique identifier GID to obtain the group field Tx group . Determine:

[0123] status = true; (6)

[0124] DID' i = DID i ; (7)

[0125] If (6) and (7) fail to verify, end.

[0126] Step 6. If (6) and (7) are verified successfully, the key management authority KA generates a fully homomorphic public-private key pair PK λ and SK FHE according to the security parameter λ by calling CKKS.Keygen(1 FHE ), as follows:

[0127] CKKS.Keygen(1 λ )→(PK FHE , SK FHE ).

[0128] Specifically, input the security parameter λ, and λ and q L , select a suitable positive integer N = N(λ, q L ), h = h(λ, q L ), integer P = P(λ, q L ), and real number σ = σ(λ, q L ). Select Let the private key SK FHE ←(1, s), and the encryption public key where b ← -a·sk+e mod q l .

[0129] Extract Calculate the public key

[0130] where b' ← -a'·s+e'+P·s 2 mod P·q L .

[0131] Then, according to the number of institutions in DID group , the private key SK FHE is fragmented, and the minimum number of key recovery is set to p. In F q , select p-1 values a1, a2,..·, ap-1 p-1, construct the polynomial:

[0132] f(x) = Sk FHE +a1·x+a2·x 2 +…+a p-1 ·x p-1 ; (8)

[0133] i.e. f(0) = SK FHE . In F q , select k different non-zero elements x1, x2,..., x k k, for each agency DI i , according to formula (8) to calculate the value of the polynomial f(x i ), get the secret fragments (x i , f(x i )); KA through the DID i of each agency, query the corresponding public key PK i from the blockchain network, encrypt the secret fragments (x i , f(x i )) using PK i , get the encrypted fragments CT i = (r·G, (x i , f(x i ))+r·PK i ), that is:

[0134] ECC.Encrypt(PK i , (x i , f(x i )))→CT i ; (9)

[0135] Then return the full homomorphic public key PK FHE and the encrypted fragments CT i to each agency FI i . Destroy SK FHE and the polynomial f(x). And write the calculation public key to the blockchain.

[0136] Step 7: After the key application is successful, each agency DI i queries the blockchain record Tx group according to the team unique identifier GID. Each agency DI i encrypts the user data in CID group . Call CKKS.Enc(M) to perform full homomorphic encryption operation using the full homomorphic public key PK FHE . Specifically, for user u t , encrypt the data to get the ciphertext Here, the encoding algorithm CKKS.Ecd(Data, Delta) is first called. Specifically, define the mapping where l 2i-1 represents X N +1N original roots. Let be a C N subring.

[0137] Define the mapping pi→pi(t)=(t0,t1,...,t N / 2 )∈C N / 2 , and the inverse mappings of sigma and pi are sigma-1 and pi-1. Map the data d t1 , d t2 , d t3 to multi-dimensional vectors z1,z2,z3, and get polynomials m(X)1,m(X)2,m(X)3:

[0138]

[0139] Then, encrypt the encoded plaintext. For m(X) i , select and output:

[0140] CT ti =v·PK FHE +(m(X) i +e0,e1)mod q l , i=1,2,3; (11)

[0141] Finally output

[0142]

[0143] Step 8. Each institution uploads the encrypted ciphertext to IPFS to get the file address herf i ; The institution DI i initiated by the team will establish a ciphertext address group Addr group , add its own ciphertext address herf i to Addr group , and then initiate a ciphertext upload transaction to store GID and Addr group on the blockchain; other institutions will obtain the ciphertext address group Addr group , add the ciphertext address herf i to Addr group , and then upload to the blockchain. The on-chain team field Tx group is increased:

[0144] Addr group= {herf1, herf2,..., herf n}; (13)

[0145] After uploading successfully, DI i sends a message of uploading success.

[0146] Step 9. DI i After receiving the messages of all the group institutions, the data computing center DC initiates a data computing request Request cal , and the request parameters include the number of group institutions k and the group unique identifier GID, that is:

[0147] Request cal = {k, GID}; (14)

[0148] Step 10. After receiving Request cal , DC queries the blockchain record Tx group according to GID, obtains the storage ciphertext address group Addr group , and gets a group of file addresses herf i , where i = 1, 2,..., k; according to this group of file addresses herf i , the data is queried from IPFS to obtain k ciphertexts.

[0149] Step 11. DC performs computing operations on the data of each field of the k ciphertexts, here for the sake of simplifying the description, the addition operation is performed. That is, for user u t , is the calculated ciphertext result, where the ciphertext result of m data is:

[0150]

[0151] Where:

[0152]

[0153] DC uploads the ciphertext CT cal to IPFS, returns the ciphertext file address herf, and then initiates a result ciphertext upload transaction to store GID and the address herf of the calculated ciphertext CT cal to the blockchain; returns the message of computing completion to DI i .

[0154] Step 12: DI i receives the message of ciphertext computing completion, queries the blockchain record according to the group unique identifier GID to obtain the ciphertext address herf, and sends a request Request for key recovery to other group institutionsres , the request parameter includes an organization unique identifier DID i , a team unique identifier GID, that is:

[0155] Request res = {GID, DID i}; (17)

[0156] Step 13. After receiving the request, the other team organization queries the blockchain record through the team unique identifier GID to obtain the team organization DID group , and verifies:

[0157] DID i ∈DID group ; (18)

[0158] If formula (4) fails to verify, it ends; otherwise, DID i belongs to DID group , and the other organization uses the public key of DID i to encrypt its own secret fragments (x j , f(x j )) to obtain ciphertext CT i , which is returned to the organization FI i , selects a random number r, and calculates the ciphertext CT i = (r·G, (x j , f(x j ))+r·PK i ), which is formally represented as:

[0159] ECC.Encrypt(PK i , (x j , f(x j )))→CT j ; (19)

[0160] Step 14. After obtaining the p ciphertext fragments, the organization FI i can perform key recovery. First, FI i calls ECC.Decrypt(SK i , CT j ) to decrypt the ciphertext fragment CT i = (c1, c2) using its own private key SK j , and calculates:

[0161] M = c2 - SK i ·c1, to obtain the original p secret fragments (x1, y1), (x2, y2),..., (x p , y p). With p secret shards, construct formula (20), and convert into a matrix to obtain formula (21). Then according to formula (21), formula (22) can be obtained, and finally a0 is obtained, that is, the full homomorphic private key SK can be recovered FHE .

[0162]

[0163]

[0164]

[0165] Step 15. FI i According to the address herf, the user ciphertext data CT is obtained from the IPFS cal , and the private key is used to decrypt CT cal to obtain the statistical user data Data. First, call the fully homomorphic decryption algorithm CKKS.Dec(CT cal , SK FHE ) to obtain the decrypted polynomial:

[0166] m(X) <- <CT cal , SK FHE > mod q l ; (23)

[0167] Then, call the decoding algorithm CKKS.Dec(m(X), Delta) to calculate the corresponding vector sigma(Delta -1 *m(X)) e H for the input decrypted polynomial , and finally output:

[0168] z <- pi(sigma(Delta -1 *m(X))) e Z[i] N / 2 ; (24)

[0169] Finally, the plaintext data Data is obtained according to the vector z.

[0170] The embodiment is based on a blockchain data security sharing model constructed based on a blockchain technology and a full homomorphic encryption algorithm, solves the leakage problem of blockchain private data sharing and cooperation, and expands the demand scenario of data sharing based on the blockchain, realizes data sharing and circulation, and realizes data privacy protection, that is, data "available and invisible". The blockchain data privacy protection method supporting the full homomorphic encryption algorithm not only guarantees the security of enterprise private data, but also promotes data cooperation, plays a key role in promoting the maximization of data value at the enterprise and industry levels, and provides important significance for the sustainable development of the blockchain technology. Through the breakthrough in data privacy and cooperation, the method opens up a new prospect for the blockchain application, and helps various industries to realize safer, more efficient and privacy-protected data sharing.

[0171] Corresponding to the above method, the application also provides a device / system, which comprises a computer device including a processor and a memory, the memory storing computer instructions, and the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device / system realizes the steps of the above method.

[0172] The embodiment of the application also provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the above edge computing server deployment method are realized. The computer readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0173] In summary, the blockchain data processing method, system and device supporting the full homomorphic encryption algorithm can solve the leakage problem of blockchain private data sharing and cooperation by introducing the full homomorphic encryption algorithm to calculate the private data of the data holder in the blockchain network in an encrypted state, and delivering the calculation result to the demand side for decryption, not only can reduce the risk of leakage of individual sensitive data in the application process, but also can protect the private data between enterprises while improving the data cooperation efficiency.

[0174] Those of ordinary skill in the art will appreciate that the various illustrative components, systems and methods described in connection with the embodiments disclosed herein can be implemented as hardware, software, or both. The particular implementation is dependent on the specific application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. When implemented in hardware, for example, the hardware can comprise an electronic circuit, an Application Specific Integrated Circuit (ASIC), a suitable firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the application are the program or code segments to perform a specific task. The program or code segments can be stored in a machine-readable medium, or transmitted by a carrier wave as data signals over a transmission medium or communication link.

[0175] It is to be understood that the application is not limited to the particular configurations and processes described herein and shown in the drawings. For simplicity, detailed descriptions of known methods and apparatuses are omitted so as not to obscure the disclosure. In the above-described embodiments, several specific steps are described and illustrated as examples. However, the method processes are not limited to the specific steps described and illustrated, and the order of the steps can be changed, or other steps can be added, or replaced, or eliminated, depending on the application.

[0176] In the present application, features described and / or illustrated in relation to one embodiment can be used in the same or a similar way in one or more other embodiments, and / or combined with or instead of features of other embodiments.

[0177] The above description is only preferred embodiments of the present application, and is not intended to limit the present application. The embodiments of the present application can be variously changed and modified by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the present application.

Claims

1. A blockchain data processing method supporting fully homomorphic encryption algorithms, characterized in that, The method includes the following steps: The parameters are initialized by the key management agency and the data computing center, and a fully homomorphic encryption environment is constructed. The first data sharing institution initiates a user data request to multiple second data sharing institutions through the blockchain network; each second data sharing institution listens to the user data request and, upon successful identity verification, provides feedback on agreeing to team formation; the first data sharing institution then writes the team formation information to the blockchain network. The first data sharing institution initiates a key application request to the key management institution, and the key management institution verifies the team information based on the key application request. If the verification is successful, a fully homomorphic public-private key pair is generated. The fully homomorphic public key in the fully homomorphic public-private key pair is encrypted and sent to the first data sharing institution and the second data sharing institution; the fully homomorphic private key in the fully homomorphic public-private key pair is fragmented according to the number of the first data sharing institution and the second data sharing institution, and then encrypted and distributed to the first data sharing institution and the second data sharing institution. The first data sharing institution and the second data sharing institution decrypt the fragments of the fully homomorphic public key and the fully homomorphic private key received locally, and use the fully homomorphic public key to encrypt local user data to obtain the corresponding first ciphertext data; The first data sharing institution and the second data sharing institution upload the local first encrypted data to the distributed file storage system, and package and store the storage addresses of each first encrypted data on the blockchain network; The first data sharing institution initiates a data computing request to the data computing center. The data computing center queries the storage address of each first encrypted data on the blockchain network based on the data computing request and obtains each first encrypted data from the distributed file storage system. The data computing center performs homomorphic computation on each first encrypted data according to the set requirements, obtains the second encrypted data, stores it in the distributed file storage system, and feeds back the data storage address of the second encrypted data to the first data sharing organization; The first data sharing institution sends a request to each of the second data sharing institutions to recover the key. Each of the second data sharing institutions verifies the identity and legitimacy of the first data sharing institution. If the identity is legitimate, the second data sharing institution encrypts and sends fragments of the fully homomorphic private key to the first data sharing institution. The first data sharing organization obtains the second ciphertext data according to the second ciphertext data storage address, recovers the fully homomorphic private key according to the fragments of the fully homomorphic private key, and decrypts the second ciphertext data to obtain the target calculation result.

2. The blockchain data processing method supporting fully homomorphic encryption algorithm according to claim 1, characterized in that, Before the parameter initialization is performed by the key management authority and the data computing center, the method further includes: The first data sharing institution and each of the second data sharing institutions pre-register on the blockchain network to obtain corresponding identity identifiers, which are used for identity legitimacy verification.

3. The blockchain data processing method supporting fully homomorphic encryption algorithm according to claim 2, characterized in that, The method further includes: The asymmetric encryption algorithm ECC is used to generate corresponding public-private key pairs for the pre-registered first data sharing institution and each of the second data sharing institutions, which are used to encrypt the fragments of the fully homomorphic public key and the fully homomorphic private key.

4. The blockchain data processing method supporting fully homomorphic encryption algorithm according to claim 3, characterized in that, The asymmetric encryption algorithm ECC selects an integer less than the elliptic curve order as the i-th private key SK. i The formula for calculating the i-th public key is PK. i =SK i ·G, where G is the base point of the elliptic curve.

5. The blockchain data processing method supporting fully homomorphic encryption algorithm according to claim 1, characterized in that, The fully homomorphic public-private key pair is generated using the CKKS algorithm, and the fully homomorphic private key is fragmented using the Shamir secret sharing scheme.

6. The blockchain data processing method supporting fully homomorphic encryption algorithm according to claim 1, characterized in that, The fully homomorphic private key is fragmented using the Shamir secret sharing scheme, including: Set the minimum number of recovery keys to p, where p is less than the total number k of the first data sharing institution and the second data sharing institution; Initialize the finite field F q and in the finite field F q Select p-1 values ​​a1, a2, ..., a p-1 The polynomial is constructed as follows: f(x)=SK FHE +α1·x+a2·x 2 +…+a p-1 ·x p-1 ; Among them, SK FHE This refers to the fully homomorphic private key; In the finite field F q Select k non-zero elements x1, x2, ..., xk k For the i-th fragment (x) in the first data sharing institution and the second data sharing institution, the fully homomorphic private key is calculated. i f(x) i )).

7. The blockchain data processing method supporting fully homomorphic encryption algorithm according to claim 1, characterized in that, The blockchain network uses the Hyperledger Fabric consortium blockchain platform, and the distributed file storage system is the IPFS file storage system.

8. A blockchain data processing system supporting fully homomorphic encryption algorithms, characterized in that, include: Key management authority, data computing center, distributed file storage system, blockchain network, primary data sharing authority and multiple secondary data sharing authorities; The system is used to perform the steps of the blockchain data processing method supporting fully homomorphic encryption algorithms as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 7.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Block chain privacy protection method and system based on homomorphic encryption algorithm and zero-knowledge proof protocol

    CN116915379A

  • Method and system for providing privacy-preserving data analysis

    US20230147654A1