CN113505386A - Data processing method and device based on block chain and homomorphic algorithm and storage medium - Google Patents
Data processing method and device based on block chain and homomorphic algorithm and storage medium Download PDFInfo
- Publication number
- CN113505386A CN113505386A CN202110843671.4A CN202110843671A CN113505386A CN 113505386 A CN113505386 A CN 113505386A CN 202110843671 A CN202110843671 A CN 202110843671A CN 113505386 A CN113505386 A CN 113505386A
- Authority
- CN
- China
- Prior art keywords
- data
- encryption
- random numbers
- homomorphic
- data processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/008—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Abstract
The invention provides a data processing method based on a block chain and a homomorphic algorithm, which comprises the following steps: receiving data processing requests at first and second tile link points, the data processing requests including a first quantity, a second quantity, and private and public keys for homomorphic encryption; generating first and second sets of random numbers at first and second tile link points, the number of data in the first set of random numbers being the same as the number of data in the second set of random numbers; generating a first encryption set at a first block link point and a second encryption set at a second block link point; exchanging the first encryption set and the second encryption set between a first blockchain node and a second blockchain node; and determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node.
Description
Technical Field
The present disclosure relates to a blockchain technology, and more particularly, to a data processing method based on a blockchain and a homomorphic algorithm, a data processing apparatus based on a blockchain and a homomorphic algorithm, and a corresponding computer readable storage medium.
Background
There are many application scenarios where private data sets intersect. For example, in an application scenario of anti-fraud by combining a bank and a telecom operator, the bank and the telecom operator both have respective fraud-related telephone number lists, and if the intersection of the two telephone number lists can be obtained, the telephone numbers in the intersection are more suspicious, so that the accuracy of wind control is improved. However, in actual business, the phone number lists of the two parties are private sensitive data of the two parties, and are not willing to share the private sensitive data with the other party.
Disclosure of Invention
The private data set intersection method based on the block chain and the homomorphic algorithm can calculate the intersection of the private data sets on the premise of not revealing private data sets of all parties.
To this end, in a first aspect of embodiments of the present invention, there is provided a data processing method based on a blockchain and a homomorphic algorithm, the data processing method including:
receiving a data processing request at a first blockchain node and a second blockchain node, wherein the data processing request includes a first amount of data in a first data set, a second amount of data in a second data set, and a private key and a public key for homomorphic encryption;
generating a first set of random numbers at a first block-linked point and a second set of random numbers at a second block-linked point, wherein the number of data in the first set of random numbers is the same as the number of data in the second set of random numbers;
generating a first encryption set from the first set of random numbers, the public key for homomorphic encryption, and data in the first data set at a first blockwise link point, and generating a second encryption set from the second set of random numbers, the public key for homomorphic encryption, and data in the second data set at a second blockwise link point;
exchanging the first encryption set and the second encryption set between a first blockchain node and a second blockchain node; and
determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node based on the first encryption set, the second encryption set, and a private key for homomorphic encryption.
In one embodiment according to the present disclosure, the first block link node and the second block link node belong to different owners.
In one embodiment according to the present disclosure, the first data set is located at the first block link point and the second data set is located at the second block link point.
In one embodiment consistent with the present disclosure, the number of data in the first set of random numbers is associated with the first number and the second number.
In one embodiment according to the present disclosure, the number of data in the first set of random numbers is equal to the product of the first number and the second number.
In one embodiment according to the present disclosure, determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node according to the first encryption set, the second encryption set, and a private key for homomorphic encryption further comprises:
and determining the data with homomorphic calculation result equal to 1 as intersection data.
Next, a second aspect of the present invention provides a data processing apparatus based on a blockchain and a homomorphic algorithm, the data processing apparatus comprising:
a processor; and
a memory for storing instructions that, when executed, cause the processor to:
the data processing method based on the block chain and the homomorphic algorithm is characterized by comprising the following steps:
receiving a data processing request at a first blockchain node and a second blockchain node, wherein the data processing request includes a first amount of data in a first data set, a second amount of data in a second data set, and a private key and a public key for homomorphic encryption;
generating a first set of random numbers at a first block-linked point and a second set of random numbers at a second block-linked point, wherein the number of data in the first set of random numbers is the same as the number of data in the second set of random numbers;
generating a first encryption set from the first set of random numbers, the public key for homomorphic encryption, and data in the first data set at a first blockwise link point, and generating a second encryption set from the second set of random numbers, the public key for homomorphic encryption, and data in the second data set at a second blockwise link point;
exchanging the first encryption set and the second encryption set between a first blockchain node and a second blockchain node; and
determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node based on the first encryption set, the second encryption set, and a private key for homomorphic encryption.
In one embodiment according to the present disclosure, the first block link node and the second block link node belong to different owners.
In one embodiment according to the present disclosure, the first data set is located at the first block link point and the second data set is located at the second block link point.
In one embodiment consistent with the present disclosure, the number of data in the first set of random numbers is associated with the first number and the second number.
In one embodiment according to the present disclosure, the number of data in the first set of random numbers is equal to the product of the first number and the second number.
In one embodiment according to the present disclosure, determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node according to the first encryption set, the second encryption set, and a private key for homomorphic encryption further comprises:
and determining the data with homomorphic calculation result equal to 1 as intersection data.
Finally, a third aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon computer-readable program instructions for executing the data processing method based on blockchain and homomorphic algorithms according to the first aspect of embodiments of the present invention.
Because the data sets of both parties introduce random numbers to protect the privacy of the original data, the data set of any party cannot be revealed. Because the third-party platform cannot obtain the random numbers of the two parties, the third-party platform cannot obtain the original data sets of the two parties. Other advantages of the present invention will be further described below.
Drawings
The features, advantages and other aspects of various embodiments of the present invention will become more apparent by referring to the following detailed description in conjunction with the accompanying drawings, in which several embodiments of the invention are shown by way of illustration and not limitation, wherein:
FIG. 1 shows a flow chart of a data processing method 100 based on blockchain and homomorphic algorithms in accordance with the teachings of the present invention;
FIG. 2 shows a schematic diagram of an embodiment 200 of a network architecture in which a data processing method 100 according to the blockchain and homomorphic algorithm shown in FIG. 1 can be implemented;
FIG. 3 shows a schematic diagram of a data processing apparatus 300 based on blockchain and homomorphic algorithms according to an embodiment of the invention; and
fig. 4 shows a schematic diagram of a data processing apparatus 400 based on blockchain and homomorphic algorithms according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention are described in detail below with reference to the accompanying drawings. Although the exemplary methods, apparatus, and devices described below include software and/or firmware executed on hardware among other components, it should be noted that these examples are merely illustrative and should not be considered as limiting. For example, it is contemplated that any or all of the hardware, software, and firmware components could be embodied exclusively in hardware, exclusively in software, or in any combination of hardware and software. Thus, while the following describes example methods and apparatus, persons of ordinary skill in the art will readily appreciate that the examples provided are not intended to limit the manner in which the methods and apparatus may be implemented.
Furthermore, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of the present invention. It should be noted that the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Before describing the embodiments of the present invention, a homomorphic encryption function, sometimes referred to as a homomorphic encryption algorithm, to be used in the technical solution of the present invention will be described first.
The present invention takes a Simple Encrypted Arithmetric Library of homomorphic encryption algorithms (SEAL) as an example to describe homomorphic encryption functions.
Assume that there is a pair of public and private keys, the public key of the pair being key1 and the private key being key2 accordingly.
A homomorphic encryption function is initialized by using a public key1, E ═ encryptor.
The decryption function uses the private key2 as initialization D, decryption.
For example, there are two integers x1 and x2, the result after encryption is: ex1 ═ e.encrypt (x1), ex2 ═ e.encrypt (x 2). Unless the party who obtains ex1 knows the private key2 and then decrypts ex1 with the decryption function d.decrypt (ex1) to know the value of x1, anyone cannot know the value of x1, i.e., x1 d.decrypt (ex1), from ex 1; similarly, unless the party who obtains ex2 knows the private key2 and then decrypts ex2 with the decryption function d.decrypt (ex2) to know the value of x2, anyone cannot know the value of x2 from ex 2.
In addition, homomorphic encryption algorithms that support addition have the following characteristics:
result1=E.add(ex1,ex2)=E.encrypt(x1+x2)
also unless the private key2 is known, the value of x1+ x2 can be known with the decryption function d.decrypt (result1), and no one can know the value of x1+ x2 from result1, i.e., x1+ x2 ═ d.decrypt (result 1).
Correspondingly, the homomorphic encryption algorithm supporting multiplication has the following characteristics:
result2=E.multiply(ex1,ex2)=E.encrypt(x1*x2),
also unless the private key2 is known, the value of x1 x2 can be known with the decryption function d.decrypt (result2), and no one can know the value of x1 x2, i.e., x1 x2 d.decrypt (result2), from result 2.
The SEAL homomorphic cryptographic algorithm library supports a mix of additions and multiplications (note: subtraction can be converted to additions and division can be converted to multiplications) and can be used for more complex operations.
Fig. 1 shows a flow chart of a data processing method 100 based on blockchain and homomorphic algorithms according to the present disclosure. As can be seen from fig. 1, the data processing method based on the blockchain and homomorphic algorithm includes the following five steps:
first, in method step 110, a data processing request is received at a first blockchain node and a second blockchain node, wherein the data processing request includes a first amount of data in a first data set, a second amount of data in a second data set, and a private key and a public key for homomorphic encryption;
next, in method step 120, a first set of random numbers is generated at a first block-linked point and a second set of random numbers is generated at a second block-linked point, wherein the number of data in the first set of random numbers is the same as the number of data in the second set of random numbers;
then, in method step 130, a first encryption set is generated at a first block link point from the first set of random numbers, the public key for homomorphic encryption, and data in the first data set, and a second encryption set is generated at a second block link point from the second set of random numbers, the public key for homomorphic encryption, and data in the second data set;
then, in method step 140, the first encryption set and the second encryption set are exchanged between a first blockchain node and a second blockchain node; and
finally, in a method step 150, intersection data of the first data set and the second data set is determined between a first blockchain node and a second blockchain node based on the first encryption set, the second encryption set, and a private key for homomorphic encryption.
In one embodiment according to the present disclosure, the first block link node and the second block link node belong to different owners.
In one embodiment according to the present disclosure, the first data set is located at the first block link point and the second data set is located at the second block link point.
In one embodiment consistent with the present disclosure, the number of data in the first set of random numbers is associated with the first number and the second number.
In one embodiment according to the present disclosure, the number of data in the first set of random numbers is equal to the product of the first number and the second number.
In one embodiment according to the present disclosure, determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node according to the first encryption set, the second encryption set, and a private key for homomorphic encryption further comprises:
and determining the data with homomorphic calculation result equal to 1 as intersection data.
Fig. 2 shows a schematic diagram of an embodiment 200 of a network architecture in which a data processing method 100 according to the blockchain and homomorphic algorithm shown in fig. 1 can be implemented. As can be seen from fig. 2, assuming that the company a is an applicant for calculating the intersection of the data sets of both parties, the detailed business process is as follows:
in the process of calculating the data intersection, the following 3 pieces of information are required:
1) both data ranges
2) Random number g
3) Homomorphic encrypted private and public keys
The above information can be transmitted to the intelligent contracts of both parties in the form of parameters when the company A initiates a calculation request, or a method for acquiring the above parameters can be transmitted in a sending request, and the parameters are acquired by the intelligent contracts through the information in the parameters.
The first company sends a request for inquiring data intersection to the intelligent contract nodes of the two parties, and corresponding parameters are transmitted in the inquiry request, so that the intelligent contracts of the two parties can obtain the 3 parameters.
After receiving a call request of a company A business system, an intelligent contract of a company A block chain node generates a random number set, for example: { a11, a12, a13, a21, a22, a23}, the number of generated random numbers is generated according to the number of encrypted data sources of party B and the number of own data sources, and the random number set is sent to the data source system of company A.
After receiving a call request of a company A business system, an intelligent contract of a company B block chain node generates a random number set, for example: { b11, b12, b13, b21, b22, b23}, the number of generated random numbers being generated according to the number of encrypted data sources of party A and the number of own data sources, and sending the set of random numbers to the data source system of company B.
After the data source system of the company A receives the random number generated by the intelligent contract of the company A, the following result is calculated by using the homomorphic encrypted public key:
E(ga11*x1),E(ga12*x1),E(ga13*x1)
E(ga21*x2),E(ga22*x2),E(ga23*x2)
after the data source system of company B receives the random number generated by the intelligent contract of company B, the following result is calculated by using the homomorphic encrypted public key:
E(gb11*-y1),E(gb12*-y2),E(gb13*-y3)
E(gb21*-y1),E(gb22*-y2),E(gb23*-y3)
the above two steps can be calculated in real time in the request of the intelligent contract or can be calculated in advance.
Preferably, the above four steps can be calculated in real time in the request of the intelligent contract or can be calculated in advance.
The intelligent contract of company A calls the data source of company B, calculates the following result by using the random number associated with the data source of company A and returns the result to the business system (inquiring party) of company A.
A11=E((gb11*-y1)a11)=E(ga11*b11*-y1)
A12=E((gb12*-y2)a12)=E(ga12*b12*-y2)
A13=E((gb13*-y3)a13)=E(ga13*b13*-y3)
A21=E((gb21*-y1)a21)=E(ga21*b21*-y1)
A22=E((gb22*-y2)a22)=E(ga22*b22*-y2)
A23=E((gb23*-y3)a23)=E(ga23*b23*-y3)
The intelligent contract of company B calls the data source of company A, and calculates the following result by using the random number associated with the data source of company B and returns the result to the business system (inquiring party) of company A.
B11=E((ga11*x1)b11)=E(ga11*b11*x1)
B12=E((ga12*x1)b12)=E(ga12*b12*x1)
B13=E((ga13*x1)b13)=E(ga13*b13*x1)
B21=E((ga21*x2)b21)=E(ga21*b21*x2)
B22=E((ga22*x2)b22)=E(ga22*b22*x2)
B23=E((ga23*x2)b23)=E(ga23*b23*x2)
And the business system (inquiring party) of the company A calculates the following result according to the data result returned by the intelligent contracts of the company A and the company B, and after the calculation result is homomorphically decrypted, if the calculation result is 1, equal data is found.
A11*B11=E(ga11*b11*x1)E(ga11*b11*-y1)=E(ga11*b11*(x1-y1))
A12*B12=E(ga12*b12*x1)E(ga11*b11*-y1)=E(ga12*b12*(x1-y2))
A13*B13=E(ga13*b13*x1)E(ga13*b13*-y3)=E(ga13*b13*(x1-y3))
A21*B21=E(ga21*b21*x2)E(ga21*b21*-y1)=E(ga21*b21*(x2-y1))
A22*B22=E(ga22*b22*x2)E(ga22*b22*-y2)=E(ga22*b22*(x2-y2))
A23*B23=E(ga23*b23*x2)E(ga23*b23*-y3)=E(ga23*b23*(x2-y3))
The above data sets of company a and company b are only examples, and the number of data elements in the data sets of both parties may be any number in actual use.
Further, alternatively, the above-described method can be implemented by a computer program product, i.e., a computer-readable storage medium. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for carrying out various aspects of the present disclosure. The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
Next, referring to fig. 3 and 4, the data processing apparatuses 300 and 400 based on the blockchain and homomorphic algorithm provided by the second aspect of the present invention will be described. In fig. 3, the data processing apparatus 300 includes:
a processor 310; and
a memory 320 for storing instructions that, when executed, cause the processor 310 to:
the data processing method based on the block chain and the homomorphic algorithm is characterized by comprising the following steps:
receiving a data processing request at a first blockchain node and a second blockchain node, wherein the data processing request includes a first amount of data in a first data set, a second amount of data in a second data set, and a private key and a public key for homomorphic encryption;
generating a first set of random numbers at a first block-linked point and a second set of random numbers at a second block-linked point, wherein the number of data in the first set of random numbers is the same as the number of data in the second set of random numbers;
generating a first encryption set from the first set of random numbers, the public key for homomorphic encryption, and data in the first data set at a first blockwise link point, and generating a second encryption set from the second set of random numbers, the public key for homomorphic encryption, and data in the second data set at a second blockwise link point;
exchanging the first encryption set and the second encryption set between a first blockchain node and a second blockchain node; and
determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node based on the first encryption set, the second encryption set, and a private key for homomorphic encryption.
In one embodiment according to the present disclosure, the first block link node and the second block link node belong to different owners.
In one embodiment according to the present disclosure, the first data set is located at the first block link point and the second data set is located at the second block link point.
In one embodiment consistent with the present disclosure, the number of data in the first set of random numbers is associated with the first number and the second number.
In one embodiment according to the present disclosure, the number of data in the first set of random numbers is equal to the product of the first number and the second number.
In one embodiment according to the present disclosure, determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node according to the first encryption set, the second encryption set, and a private key for homomorphic encryption further comprises:
and determining the data with homomorphic calculation result equal to 1 as intersection data.
Finally, a third aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon computer-readable program instructions for executing the data processing method based on blockchain and homomorphic algorithms according to the first aspect of embodiments of the present invention.
Because the data sets of both parties introduce random numbers to protect the privacy of the original data, the data set of any party cannot be revealed. Because the third-party platform cannot obtain the random numbers of the two parties, the third-party platform cannot obtain the original data sets of the two parties.
A block chain and homomorphic algorithm based data processing apparatus 400 according to another embodiment of the present invention is illustrated. It should be understood that the data processing apparatus 400 based on blockchain and homomorphic algorithm may implement the functions of the data processing method 100 based on blockchain and homomorphic algorithm in fig. 1. As can be seen in fig. 4, the apparatus 400 includes a Central Processing Unit (CPU)401 (e.g., a processor) that can perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)402 or loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the data processing apparatus 400 based on the blockchain and homomorphic algorithm can also be stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in the data processing apparatus 400 based on blockchains and homomorphic algorithms are connected to the I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, or the like; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408 such as a magnetic disk, optical disk, or the like; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the blockchain and homomorphic algorithm based data processing apparatus 400 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The various methods described above, such as the data processing method 100 based on blockchain and homomorphic algorithms, can be performed by the processing unit 401. For example, in some embodiments, the data processing method 100 based on blockchain and homomorphic algorithms may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the apparatus 400 via the ROM 402 and/or the communication unit 409. When loaded into RAM 403 and executed by CPU 401, may perform one or more of the actions or steps of data processing method 100 based on blockchain and homomorphic algorithms described above.
In general, the various exemplary embodiments of this invention may be implemented in hardware or special purpose circuits, software, firmware, logic or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device. While various aspects of the embodiments of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that the blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Although the various exemplary embodiments of the present invention are described above as being implemented in hardware or in dedicated circuitry, the data processing apparatus for blockchains described above may be implemented in either hardware or software, because: in the 90's of the 20 th century, a technological improvement could easily be either a hardware improvement (e.g., an improvement in the structure of a circuit such as a diode, a transistor, a switch, etc.) or a software improvement (e.g., an improvement in the process flow). However, as the technology continues to develop, many of the current method flow improvements can be almost realized by programming the improved method flow into the hardware circuit, in other words, by programming different programs for the hardware circuit to obtain the corresponding hardware circuit structure, i.e. realizing the change of the hardware circuit structure, so that such method flow improvements can also be regarded as direct improvements of the hardware circuit structure. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a piece of programmable logic device by the designer's own programming without requiring the chip manufacturer to design and fabricate application specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler 1 er" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one kind, but many kinds, such as abel (advanced Boolean Expression Language), ahdl (advanced Hardware Description Language), communication, pl (core unity Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, HDL, pamm, hard Language (Hardware Description Language), and vhigh Language (Hardware Description Language), which are currently used in the most popular fields. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
Computer-readable program instructions or computer program products for performing aspects of the present disclosure may also be stored in the cloud, and when a call is needed, a user may access the computer-readable program instructions stored in the cloud for performing aspects of the present disclosure through a mobile internet, a fixed network, or other networks, so as to implement the technical solutions disclosed in the aspects of the present disclosure.
In summary, the method has the following characteristics:
the large-scale data set can be preprocessed through random numbers in advance, complexity of data intersection calculation is simplified, and efficiency is improved. Small-scale datasets can also be computed in real-time.
When the homomorphic encrypted private key and the homomorphic encrypted public key are generated by the third-party platform, the two parties can simultaneously carry out intersection calculation on the encrypted data sets, and random numbers are introduced into the data sets of the two parties to protect the privacy of the original data, so that the data sets of any party cannot be revealed. Because the third-party platform cannot obtain the random numbers of the two parties, the third-party platform cannot obtain the original data sets of the two parties.
The intelligent contract security management mechanism of the alliance chain ensures that the intelligent contracts of the block chain nodes are transparent and can not be tampered. If any party of the two parties changes the logic of the intelligent contract without permission, the signature of the other party on the intelligent contract is invalid, and therefore the intelligent contract cannot be operated. Therefore, the intelligent contract can be ensured to operate according to the business logic agreed by the two parties in advance.
The above description is only an alternative embodiment of the present disclosure, and is not intended to limit the present disclosure, and various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
While embodiments of the invention have been described with reference to several particular embodiments, it is to be understood that embodiments of the invention are not limited to the specific embodiments disclosed. The embodiments of the invention are intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims (13)
1. A data processing method based on a block chain and a homomorphic algorithm is characterized by comprising the following steps:
receiving a data processing request at a first blockchain node and a second blockchain node, wherein the data processing request includes a first amount of data in a first data set, a second amount of data in a second data set, and a private key and a public key for homomorphic encryption;
generating a first set of random numbers at a first block-linked point and a second set of random numbers at a second block-linked point, wherein the number of data in the first set of random numbers is the same as the number of data in the second set of random numbers;
generating a first encryption set from the first set of random numbers, the public key for homomorphic encryption, and data in the first data set at a first blockwise link point, and generating a second encryption set from the second set of random numbers, the public key for homomorphic encryption, and data in the second data set at a second blockwise link point;
exchanging the first encryption set and the second encryption set between a first blockchain node and a second blockchain node; and
determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node based on the first encryption set, the second encryption set, and a private key for homomorphic encryption.
2. The data processing method of claim 1, wherein the first block chain node and the second block chain node belong to different owners.
3. The data processing method of claim 1, wherein the first data set is located at the first block link point and the second data set is located at the second block link point.
4. The data processing method of claim 1, wherein the number of data in the first set of random numbers is associated with the first number and the second number.
5. The data processing method of claim 4, wherein the amount of data in the first set of random numbers is equal to the product of the first amount and the second amount.
6. The data processing method of claim 1, wherein determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node from the first encryption set, the second encryption set, and a private key for homomorphic encryption further comprises:
and determining the data with homomorphic calculation result equal to 1 as intersection data.
7. A data processing apparatus based on blockchain and homomorphic algorithms, the data processing apparatus comprising:
a processor; and
a memory for storing instructions that, when executed, cause the processor to:
the data processing method based on the block chain and the homomorphic algorithm is characterized by comprising the following steps:
receiving a data processing request at a first blockchain node and a second blockchain node, wherein the data processing request includes a first amount of data in a first data set, a second amount of data in a second data set, and a private key and a public key for homomorphic encryption;
generating a first set of random numbers at a first block-linked point and a second set of random numbers at a second block-linked point, wherein the number of data in the first set of random numbers is the same as the number of data in the second set of random numbers;
generating a first encryption set from the first set of random numbers, the public key for homomorphic encryption, and data in the first data set at a first blockwise link point, and generating a second encryption set from the second set of random numbers, the public key for homomorphic encryption, and data in the second data set at a second blockwise link point;
exchanging the first encryption set and the second encryption set between a first blockchain node and a second blockchain node; and
determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node based on the first encryption set, the second encryption set, and a private key for homomorphic encryption.
8. The data processing apparatus according to claim 7, wherein the first block chain node and the second block chain node belong to different owners.
9. The data processing device of claim 7, wherein the first data set is located at the first block link point and the second data set is located at the second block link point.
10. The data processing apparatus of claim 7, wherein a quantity of data in the first set of random numbers is associated with the first quantity and the second quantity.
11. The data processing apparatus of claim 10, wherein the amount of data in the first set of random numbers is equal to a product of the first amount and the second amount.
12. The data processing apparatus of claim 7, wherein determining intersection data of the first data set and the second data set between a first blockchain node and a second blockchain node from the first encryption set, the second encryption set, and a private key for homomorphic encryption further comprises:
and determining the data with homomorphic calculation result equal to 1 as intersection data.
13. A computer readable storage medium having stored thereon computer readable program instructions for executing the method of data processing based on blockchain and homomorphic algorithms according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110843671.4A CN113505386A (en) | 2021-07-26 | 2021-07-26 | Data processing method and device based on block chain and homomorphic algorithm and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110843671.4A CN113505386A (en) | 2021-07-26 | 2021-07-26 | Data processing method and device based on block chain and homomorphic algorithm and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113505386A true CN113505386A (en) | 2021-10-15 |
Family
ID=78014866
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110843671.4A Pending CN113505386A (en) | 2021-07-26 | 2021-07-26 | Data processing method and device based on block chain and homomorphic algorithm and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113505386A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107196926A (en) * | 2017-04-29 | 2017-09-22 | 河南师范大学 | A kind of cloud outsourcing privacy set comparative approach and device |
CN109905227A (en) * | 2015-01-06 | 2019-06-18 | 谷歌有限责任公司 | The system and method for multivalue packing scheme for homomorphic cryptography |
CN110807211A (en) * | 2019-11-04 | 2020-02-18 | 上海讯联数据服务有限公司 | Method, system, readable medium and electronic device for safely acquiring user intersection |
US20200195618A1 (en) * | 2018-12-18 | 2020-06-18 | International Business Machines Corporation | Secure multiparty detection of sensitive data using Private Set Intersection (PSI) |
CN112966283A (en) * | 2021-03-19 | 2021-06-15 | 西安电子科技大学 | PPARM (vertical partition data parallel processor) method for solving intersection based on multi-party set |
-
2021
- 2021-07-26 CN CN202110843671.4A patent/CN113505386A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109905227A (en) * | 2015-01-06 | 2019-06-18 | 谷歌有限责任公司 | The system and method for multivalue packing scheme for homomorphic cryptography |
CN107196926A (en) * | 2017-04-29 | 2017-09-22 | 河南师范大学 | A kind of cloud outsourcing privacy set comparative approach and device |
US20200195618A1 (en) * | 2018-12-18 | 2020-06-18 | International Business Machines Corporation | Secure multiparty detection of sensitive data using Private Set Intersection (PSI) |
CN110807211A (en) * | 2019-11-04 | 2020-02-18 | 上海讯联数据服务有限公司 | Method, system, readable medium and electronic device for safely acquiring user intersection |
CN112966283A (en) * | 2021-03-19 | 2021-06-15 | 西安电子科技大学 | PPARM (vertical partition data parallel processor) method for solving intersection based on multi-party set |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109615378B (en) | Block chain-based secure multi-party computing method and device and readable storage medium | |
Boemer et al. | MP2ML: A mixed-protocol machine learning framework for private inference | |
CN110162551B (en) | Data processing method and device and electronic equipment | |
CN111125727B (en) | Confusion circuit generation method, prediction result determination method, device and electronic equipment | |
WO2021239008A1 (en) | Privacy protection-based encryption method and system | |
CN110391895B (en) | Data preprocessing method, ciphertext data acquisition method, device and electronic equipment | |
WO2020073712A1 (en) | Method for sharing secure application in mobile terminal, and mobile terminal | |
Feng et al. | Privacy-preserving computation in cyber-physical-social systems: A survey of the state-of-the-art and perspectives | |
US11251936B2 (en) | System and method for performing homomorphic aggregation over encrypted data | |
Saini et al. | E2EE for data security for hybrid cloud services: a novel approach | |
KR20200047002A (en) | Method for comparing ciphertext using homomorphic encryption and apparatus for executing thereof | |
JP2022531593A (en) | Systems and methods for adding and comparing integers encrypted by quasigroup operations in AES counter mode encryption | |
CN112765642A (en) | Data processing method, data processing apparatus, electronic device, and medium | |
CN111586142A (en) | Safe multi-party computing method and system | |
CN113239391A (en) | Third-party-free logistic regression federal learning model training system and method | |
CN111478764A (en) | Data processing method, node and storage medium in block chain network | |
CN114884675A (en) | Multi-party privacy intersection method, device, equipment and medium based on bit transmission | |
CN114726512A (en) | Data processing method and device | |
CN112261015B (en) | Information sharing method, platform, system and electronic equipment based on block chain | |
CN111046431B (en) | Data processing method, query method, device, electronic equipment and system | |
CN112966303A (en) | Data encryption and decryption method and device, electronic equipment and computer storage medium | |
CN111010283B (en) | Method and apparatus for generating information | |
CN111046408A (en) | Judgment result processing method, query method, device, electronic equipment and system | |
CN103605927A (en) | Encryption and decryption method based on embedded Linux system | |
WO2020211075A1 (en) | Decentralized secure multi-party data processing method and device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20211015 |
|
WD01 | Invention patent application deemed withdrawn after publication |