CN116455618A - Data intersection method and device based on block chain - Google Patents

Data intersection method and device based on block chain Download PDF

Info

Publication number
CN116455618A
CN116455618A CN202310340134.7A CN202310340134A CN116455618A CN 116455618 A CN116455618 A CN 116455618A CN 202310340134 A CN202310340134 A CN 202310340134A CN 116455618 A CN116455618 A CN 116455618A
Authority
CN
China
Prior art keywords
intersection
data
node
key
secret sharing
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
Application number
CN202310340134.7A
Other languages
Chinese (zh)
Inventor
曾钊创
姚新亮
罗强
林国斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310340134.7A priority Critical patent/CN116455618A/en
Publication of CN116455618A publication Critical patent/CN116455618A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0478Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • H04L9/0662Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/062Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying encryption of the keys

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The disclosure provides a data intersection method based on a block chain, and relates to the technical field of block chains. The data intersection method comprises the following steps: the blockchain includes a plurality of intersection nodes including a first intersection node including first intersection data and a second intersection node including second intersection data, the data intersection method including the following steps performed by the second intersection node: generating a second secret sharing value through an unintentional pseudo-random function model according to the second intersection data and the second secret key; acquiring a first secret sharing value through an unintentional pseudo-random function model according to the second intersection data and a first secret key sent by the first intersection node; performing exclusive OR operation on the second secret sharing value and the first secret sharing value; and determining whether a data intersection exists between the second intersection data and the first intersection data according to the result of the exclusive OR operation. The disclosure also provides a data interchange device.

Description

Data intersection method and device based on block chain
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a blockchain-based data interchange method, apparatus, electronic device, storage medium, and program product.
Background
At present, the block chain secure multiparty calculation only supports data intersection between two parties, and when facing a scene requiring multiparty data intersection, the two-to-two intersection needs to be performed first, and then intersection results are acquired. For example, if the intersection is found by A, B, C three parties, the values of the common elements in a and B are compared first to determine whether the intersection A1 exists, and if the intersection A1 exists, the intersection of A1 and C is found again, so as to obtain the final result.
In the above process, a will obtain intermediate data of the intersection, that is, a will obtain data of the element shared with a in B, and these data belong to additional information that a should not know, which results in that in this process, unnecessary data is obtained by a, which easily causes information leakage.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a blockchain-based data interchange method, apparatus, electronic device, storage medium, and program product.
According to a first aspect of the present disclosure, there is provided a data intersection method based on a blockchain, wherein the blockchain includes a plurality of intersection nodes including a first intersection node including first intersection data and a second intersection node including second intersection data, the data intersection method including the following steps performed by the second intersection node:
Generating a second secret sharing value through an unintentional pseudo-random function model according to the second intersection data and the second secret key;
acquiring a first secret sharing value through the unintentional pseudo-random function model according to the second intersection data and a first secret key sent by the first intersection node;
performing exclusive OR operation on the second secret sharing value and the first secret sharing value;
determining whether a data intersection exists between the second intersection data and the first intersection data according to the result of the exclusive OR operation;
the second key is obtained by each intersection solving node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection solving node based on the second key.
According to an embodiment of the present disclosure, the data interchange method further includes a step of generating the first key, and the generating the first key includes:
obtaining a plurality of random keys, wherein the plurality of random keys comprise random keys generated by the current first transaction node when triggering the careless pseudo-random function model and random keys generated by other transaction solving nodes when triggering the careless pseudo-random function model;
Forming the second key from a plurality of the random keys;
and based on the second key, performing encryption operation through the unintentional pseudo-random function model and polynomial interpolation method to generate the first key.
According to an embodiment of the disclosure, the encrypting operation by the unintentional pseudo random function model and polynomial interpolation based on the second key to generate the first key includes:
generating a third secret sharing value for the first intersection data through the unintentional pseudo-random function model based on the second secret key;
generating a first element point set, wherein each element of the first element point set comprises at least one first intersection data and a third secret sharing value generated based on the first intersection data;
determining a disturbance value by using a polynomial interpolation method based on the first element point set;
and generating the first key according to the second key and the disturbance value.
According to an embodiment of the disclosure, the first set of element points includes n elements, and the determining the disturbance value based on the first set of element points using polynomial interpolation includes:
generating an n-1 medium polynomial by using a polynomial interpolation method based on the first element point set;
Taking the coefficient of the polynomial as the disturbance value;
wherein n is a positive integer.
According to an embodiment of the disclosure, the number of the first intersection nodes is a plurality, each first intersection node generates at least one first key, and the obtaining, according to the second intersection data and the first key sent by the first intersection node, a first secret sharing value through the unintentional pseudo random function model includes:
generating a plurality of first secret sharing values through the unintentional pseudo-random function model by combining each first secret key according to the second intersection data;
the exclusive or operation of the second secret sharing value and the first secret sharing value includes:
performing first exclusive OR operation on the second secret sharing value and each first secret sharing value to obtain a plurality of first operation results;
performing a second exclusive-or operation on the plurality of first operation results to obtain a second operation result;
the determining whether the second intersection data and the first intersection data have a data intersection according to the result of the exclusive or operation includes:
and when the second operation result is zero, determining that a data intersection exists between the second intersection data and the first intersection data in each first intersection node.
According to an embodiment of the disclosure, each of the intersection-participating nodes is correspondingly configured with a blockchain ledger channel configured to: enabling the intersection participation node to perform data uplink operation through a block chain account channel correspondingly configured with the intersection participation node;
and the different blockchain ledger channels are isolated by data.
A second aspect of the present disclosure provides a blockchain-based data intersection apparatus, wherein a plurality of nodes in the blockchain include a plurality of intersection nodes, the plurality of intersection nodes include a first intersection node and a second intersection node, the first intersection node includes first intersection data, the second intersection node includes second intersection data, each intersection node is deployed with the data intersection apparatus, the data intersection apparatus includes:
the first processing module is used for generating a second secret sharing value through an unintentional pseudo-random function model according to the second intersection data and the second secret key;
the second processing module is used for acquiring a first secret sharing value through the unintentional pseudo-random function model according to the second intersection data and the first secret key sent by the first intersection node;
The exclusive or module is used for carrying out exclusive or operation on the second secret sharing value and the first secret sharing value;
the output module is used for determining whether a data intersection exists between the second intersection data and the first intersection data according to the exclusive OR operation result;
the second key is obtained by each intersection solving node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection solving node based on the second key.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the data interchange method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the data interchange method described above.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the data interchange method described above.
One or more of the above embodiments have the following advantages or benefits:
in the embodiment of the disclosure, the second intersection node may attempt to restore the first intersection node to obtain the calculation process of the third secret sharing value through the unintentional pseudo-random function model of the embodiment of the disclosure based on the obtained first key and the second intersection data of the second intersection node, but this process is not disclosed to the second intersection node, and the second key used when the first intersection node obtains the third secret sharing value is not known by the second intersection node, and the second intersection node can only obtain the first secret sharing value. If and only if the first intersection data is the same as the second intersection data, the first intersection node can be truly restored by the careless pseudo-random function model to obtain a calculation process of a third secret sharing value, and at the moment, the first secret sharing value is the same as the third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, if and only if the first intersection data and the second intersection data are the same, the first secret sharing value, the second secret sharing value and the third secret sharing value are the same, but all the three are different. And comparing the first secret sharing value with the second secret sharing value, and if the first secret sharing value and the second secret sharing value are the same, indicating that the first intersection data and the second intersection data are the same.
In summary, by adopting the data intersection device of the embodiment of the disclosure, the plurality of intersection nodes cannot acquire real data of each other in the intersection process, so that the problem of data leakage during data intersection in the traditional scheme can be solved, and the data security is ensured.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a data intersection method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a data intersection method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of generating a first key according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow diagram for generating a first key in connection with a polynomial difference method in accordance with an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart for determining disturbance values in connection with a polynomial difference method according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow diagram of parallel data interchange in accordance with an embodiment of the disclosure;
FIG. 7 schematically illustrates a block diagram of a data interchange device, according to an embodiment of the disclosure;
Fig. 8 schematically illustrates a block diagram of an electronic device adapted to implement a data interchange method, according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
It should be noted that, the data exchange method, device, electronic device, storage medium and program product based on the blockchain provided by the embodiments of the present disclosure relate to the technical field of blockchains. The blockchain-based data interchange method, device, electronic equipment, storage medium and program product provided by the embodiment of the disclosure can be applied to the financial field or any field except the financial field. Embodiments of the present disclosure do not limit the application fields of the blockchain-based data interchange method, apparatus, electronic device, storage medium, and program product.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing, applying and the like of the personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
An embodiment of the present disclosure provides a data intersection method based on a blockchain, wherein the blockchain includes a plurality of intersection nodes, the plurality of intersection nodes includes a first intersection node and a second intersection node, the first intersection node includes first intersection data, the second intersection node includes second intersection data, and the data intersection method includes the following steps performed by the second intersection node: generating a second secret sharing value through an unintentional pseudo-random function model according to the second intersection data and the second secret key; acquiring a first secret sharing value through an unintentional pseudo-random function model according to the second intersection data and a first secret key sent by the first intersection node; performing exclusive OR operation on the second secret sharing value and the first secret sharing value; determining whether a data intersection exists between the second intersection data and the first intersection data according to the result of the exclusive OR operation; the second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
In the embodiment of the disclosure, the second intersection node may attempt to restore the first intersection node to obtain the calculation process of the third secret sharing value through the unintentional pseudo-random function model of the embodiment of the disclosure based on the obtained first key and the second intersection data of the second intersection node, but this process is not disclosed to the second intersection node, and the second key used when the first intersection node obtains the third secret sharing value is not known by the second intersection node, and the second intersection node can only obtain the first secret sharing value. If and only if the first intersection data is the same as the second intersection data, the first intersection node can be truly restored by the careless pseudo-random function model to obtain a calculation process of a third secret sharing value, and at the moment, the first secret sharing value is the same as the third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, if and only if the first intersection data and the second intersection data are the same, the first secret sharing value, the second secret sharing value and the third secret sharing value are the same, but all the three are different. In addition, the first secret sharing value, the second secret sharing value and the third secret sharing value are all obtained by local calculation at each intersection node, so that the three secret sharing values can be prevented from being leaked in the transmission process. And comparing the first secret sharing value with the second secret sharing value, and if the first secret sharing value and the second secret sharing value are the same, indicating that the first intersection data and the second intersection data are the same.
In summary, by adopting the data intersection device of the embodiment of the disclosure, the plurality of intersection nodes cannot acquire real data of each other in the intersection process, so that the problem of data leakage during data intersection in the traditional scheme can be solved, and the data security is ensured.
Fig. 1 schematically illustrates an application scenario diagram of a data intersection method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data intersection method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the data interchange device provided in the embodiments of the disclosure may be generally disposed in the server 105. The data interchange method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data traffic arrangement provided by the embodiments of the present disclosure may also be provided in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The blockchain-based data intersection method of the disclosed embodiments will be described in detail below with reference to the scenario described in fig. 1, with reference to fig. 2 to 6.
In an embodiment of the present disclosure, the blockchain includes a plurality of intersection nodes, the plurality of intersection nodes including a first intersection node including first intersection data and a second intersection node including second intersection data.
For the convenience of understanding the solution of the embodiments of the present application, a brief description of related concepts is given below:
first, blockchain techniques.
Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" (i.e., recording transaction data) together, maintaining a complete distributed database. Blockchain technology has been widely used in many fields because of its decentralized (i.e., no central node), public transparency, the ability of each computing device to participate in database records, and the ability to quickly synchronize data between computing devices.
Currently, blockchains can be divided into: public chains and federated chains. A public chain refers to a blockchain that is readable by any device worldwide, or that any device can participate in the consensus verification process of a transaction. The alliance chain, also called a community blockchain (consortium block chains), means that the alliance is composed of participating members of a specified blockchain, and business transaction information between the members is recorded in the blockchain, so that the usage scale and authority are limited. In embodiments of the present disclosure, a blockchain may be referred to generally as a federated chain unless specifically indicated.
Second, blockchain nodes.
The blockchain in the embodiments of the present disclosure is participated by a plurality of blockchain nodes (hereinafter may be simply referred to as nodes). The node is a device with communication function and storage function, such as a device with block chain data. Each node may either receive information or generate information. Communication and data synchronization is maintained between different nodes by maintaining a common blockchain. Specifically, in the blockchain system, any node can generate new blockchain data according to data related to transactions sent by a client, and issue the new blockchain data to other nodes in a broadcast mode, and the other nodes can verify the blockchain data. When all nodes in the blockchain system reach consensus, new blockchain data may be added to the blockchain.
Alternatively, a node in an embodiment of the present disclosure may be understood as a processing unit. In one implementation, a node may be a physical device, such as a server or computer. In another implementation, the node may be a virtual computer; virtual computers are a collective term for the operating environment that software in all types of virtualized devices virtualizes, and the concept includes virtual machines and containers. In other implementations, a node in an embodiment of the present disclosure may be a process or a thread; the thread is the minimum unit of the operation system capable of carrying out operation scheduling, is contained in the process and is the actual operation unit in the process; a process is a program in a computer that is a basic unit of resource allocation and scheduling by a system with respect to one run activity on a certain data set.
In embodiments of the present disclosure, the plurality of nodes on the blockchain are located the same, and the functions that the plurality of nodes on the blockchain can perform are substantially the same. Although the embodiments of the present disclosure refer to these nodes as a first intersection node and a second intersection node, this is divided in the current intersection scenario, which does not constitute a limitation on the functions that can be implemented by the first intersection node and the second intersection node. For example, when node a requests a data intersection from node B, node a may be determined to be a second intersection node and node B may be determined to be a first intersection node, such that the two perform the corresponding steps. When the node B requests the data intersection from the node a, the node B may be determined as a second intersection node, and the node a may be determined as a first intersection node, so that the two perform the corresponding steps.
It should be noted that, in the embodiment of the present disclosure, the plurality of nodes on the blockchain may manage, in addition to the blockchain ledger that can be commonly checked out, the unpublished data that is held by each node independently and isolated from each other, and accordingly, the intersection process of the embodiment of the present disclosure performs intersection on the unpublished data, for example, the first intersection data and the second intersection data mentioned in the embodiment of the present disclosure are unpublished data that are managed by different nodes respectively. The portions of these unpublished data for performing data interchange are also referred to as interchange waiting information hereinafter.
It should be further noted that, the to-be-submitted information may include a plurality of elements, and in the embodiment of the present disclosure, the content of one element in the to-be-submitted information managed by the first to-be-submitted node is referred to as first to-be-submitted data, and the content of one element in the to-be-submitted information managed by the second to-be-submitted node is referred to as second to-be-submitted data. For convenience of description, the content of one element in the to-be-submitted information is also referred to as submitted data hereinafter. The first and second data may be the same or different, and for example, when node a requests data exchange from node B, node a may be determined as a second exchange node and node B may be determined as a first exchange node, and in this case, the exchange data in node a is referred to as second exchange data, and the exchange data in node B is referred to as first exchange data. When the node B requests the data intersection from the node a, the node B may be determined as a second intersection node, and the node a may be determined as a first intersection node, and at this time, the intersection data in the node B may be referred to as second intersection data, and the intersection data in the node a may be referred to as first intersection data.
Optionally, in an embodiment of the present disclosure, in response to a request for intersection of one of a plurality of nodes in the blockchain, a node involved in the request for intersection may be determined as a plurality of intersection nodes, and further, among the intersection nodes, a first intersection node and a second intersection node are partitioned.
Fig. 2 schematically illustrates a flow chart of a data intersection method according to an embodiment of the disclosure.
Referring to fig. 2, the data interchange method of this embodiment includes steps S210 to S240, and although the steps in fig. 2 are sequentially shown as indicated by arrows, the steps are not necessarily sequentially executed in the order indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, or the order of their execution may not necessarily be sequential, but may be performed in rotation or alternating with at least some of the other steps or sub-steps of other steps.
In step S210, a second secret sharing value is generated according to the second intersection data and the second key through an unintentional pseudo-random function model.
In step S220, a first secret sharing value is obtained through an unintentional pseudo-random function model according to the second intersection data and the first secret key sent by the first intersection node. The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
In an embodiment of the present disclosure, the first intersection data (or the second intersection data) may refer to a content of one element in the to-be-intersection information managed by the first intersection node (or the second intersection node), for example, the first intersection data (or the second intersection data) may include an identification card number or the like. The information to be exchanged in the first exchanging node (or the second exchanging node) may include a plurality of elements, for example, these elements may include an address or the like in addition to the identification card number, and may be specifically determined according to actual needs, which is not limited herein. That is, in the embodiment of the present disclosure, the number of the first intersection data (or the second intersection data) in the first intersection node (or the second intersection node) is not limited to one, and may be plural, depending on the number of elements in the information to be intersected.
An unintentional Pseudo-Random Function model (OPRF) is a two-party protocol model. In the protocol, one is the sender S (e.g., the first intersection node in the embodiment of the disclosure), and one is the receiver R (e.g., the second intersection node in the embodiment of the disclosure), after the OPRF protocol is run, the sender S may obtain a random key, and the sender S uses the element held by the sender S as the input of the OPRF, and may obtain a series of pseudo-random function calculation results. The receiver R takes the element it holds as input to the OPRF and can also obtain a series of pseudo-random function calculations. In this process, if the sender S and receiver R inputs and the random key used are the same, then the same value will be output via the model of the unintentional pseudorandom function. In addition, the receiver R locally compares the two pseudo-random function calculation results, the sender S cannot see the input of the receiver R in the whole course, and the receiver R cannot see the input of the sender, so that the data privacy of the two parties can be ensured.
In particular, in embodiments of the present disclosure, a first intersection node may obtain a second key when triggering an unintentional pseudorandom function model and process it as the first key (e.g., twice-encrypted, etc.) to send to the second intersection node. The second keys are in one-to-one correspondence with the elements in the intersection node, that is, one second key is generated for each element. The second key may be formed of a plurality of random keys, each of which may be a key that each of the intersection nodes acquires when triggering the model of the unintentional pseudorandom function, the random keys being mutually distributed by the plurality of intersection nodes to form the second key. The random key is related to the content of the element in the intersection node, taking two intersection nodes as an example, when the content of the element of the information to be intersected in the two intersection nodes is the same, the two elements can obtain the same random key when triggering an unintentional pseudo-random function model, so that after the two intersection nodes mutually dispatch the random keys, the second keys formed by the random keys are the same, that is, when the intersection data of the two intersection nodes are the same, the second keys held by the two intersection nodes are the same.
The first intersection node may obtain a third secret sharing value of the first intersection data through an unintentional pseudo-random function model based on the first intersection data and the second secret key of the first intersection node. Correspondingly, the second intersection node can obtain a second secret sharing value of the second intersection data through an unintentional pseudo-random function model based on the second intersection data and the second secret key of the second intersection node. If the first intersection data is the same as the second intersection data, the second secret sharing value and the third secret sharing value should be the same. In order to ensure that the data security in the first intersection node is not compromised, in the embodiment of the present disclosure, the third secret sharing value is not sent to the second intersection node, but the second secret key (i.e., the first secret key) after being encrypted twice in the first intersection node is sent to the second intersection node.
The second intersection node may attempt to restore the first intersection node to obtain a calculation process of the third secret sharing value through an unintentional pseudo-random function model according to the embodiment of the present disclosure based on the obtained first key and its own second intersection data, but this process is not disclosed to the second intersection node, and the second key used when the first intersection node obtains the third secret sharing value is not known by the second intersection node, and the second intersection node can only obtain the first secret sharing value. If and only if the first intersection data is the same as the second intersection data, the first intersection node can be truly restored by the careless pseudo-random function model to obtain a calculation process of a third secret sharing value, and at the moment, the first secret sharing value is the same as the third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, if and only if the first intersection data and the second intersection data are the same, the first secret sharing value, the second secret sharing value and the third secret sharing value are the same, so when the first secret sharing value and the second secret sharing value are compared, if the first secret sharing value and the second secret sharing value are the same, the first intersection data and the second intersection data can be reversely deduced. In addition, the first secret sharing value, the second secret sharing value and the third secret sharing value are all obtained by local calculation at each intersection node and are not involved in data transmission, so that the three are prevented from being leaked in the transmission process.
Specifically, in step S230, the second secret sharing value is xored with the first secret sharing value.
In step S240, it is determined whether there is a data intersection between the second intersection data and the first intersection data according to the result of the exclusive or operation.
In the embodiment of the disclosure, when the second secret sharing value is the same as the first secret sharing value, the result of the exclusive or operation between the second secret sharing value and the first secret sharing value is 0, so that it may be determined that the second intersection data is the same as the first intersection data, that is, there is an intersection between the second intersection data and the first intersection data.
Optionally, in the steps described above, except the result of the exclusive or operation, the result may not be disclosed to the second intersection node, for example, the calculation process described above may be performed in a specific calculation container, so as to ensure data security and avoid data leakage. At this time, after the second intersection node initiates data intersection, only the result of the exclusive or operation, that is, a "0" or a nonsensical random number, can be obtained, according to this, it can be determined whether the second intersection data and the first intersection data have intersections, and all the real data can be effectively kept secret in this process.
In summary, the data interchange adopting the embodiment of the disclosure can solve the problem of data leakage during data interchange in the traditional scheme, thereby ensuring data security.
The data intersection method in the embodiment of the present disclosure is further described below with reference to fig. 2 to 6.
Fig. 3 schematically illustrates a flow chart of generating a first key according to an embodiment of the disclosure.
Referring to fig. 3, in some embodiments, the data exchange method further includes a step S310 of generating a first key, and the step S310 includes a step S311 and a step S313.
In step S311, a plurality of random keys are obtained, the plurality of random keys including a random key generated by the current first transaction node when the inadvertent pseudorandom function model is triggered, and a random key generated by the other transaction node when the inadvertent pseudorandom function model is triggered.
In step S312, the second key is constituted by a plurality of random keys.
In step S313, an encryption operation is performed by an unintentional pseudo random function model and polynomial interpolation based on the second key to generate the first key.
In an embodiment of the present disclosure, a random key may be generated by a key generation module based on each element in the information to be resolved in the resolving node. Wherein, the random keys generated by the elements with the same content are the same, namely the random keys generated by the same intersection data are the same.
Alternatively, each intersection node may generate and dispatch a random key to other intersection nodes. For example, the intersection node a may generate a random key k1 for the intersection node B and the intersection node C and may be assigned to the intersection node B and the intersection node C, and the intersection node B may generate a random key k2 for the intersection node a and the intersection node C and may be assigned to the intersection node a and the intersection node C and may generate a random key k3 for the intersection node B and the intersection node a and may be assigned to the intersection node a and the intersection node B.
Since the random keys generated by the same intersection data are the same, the second key composed of these random keys is the same, that is, when the contents of the element X1 (or intersection data X11) in the intersection node a, the intersection node B, and the intersection node C are the same, the random key k1 generated by the intersection node a, the random key k2 generated by the intersection node B, and the random key k3 generated by the intersection node C are the same, and after the three are mutually distributed, the intersection node a may be composed of the random key k2 and the random key k3 as the second key composed of the random key k1 and the random key k3 as the intersection node B.
In an embodiment of the present disclosure, the second key may be composed of a plurality of random keys together, and further, the encryption operation may be performed based on the second key, the unintentional pseudo-random function model, and the polynomial interpolation method, and specifically, the perturbation value hint of the unintentional pseudo-random function model may be calculated.
Fig. 4 schematically illustrates a flow diagram for generating a first key in connection with a polynomial difference method according to an embodiment of the present disclosure.
Referring to fig. 4, in some embodiments, step S313 includes steps S3131 to S3134.
In step S3131, a third secret sharing value is generated for the first intersection data by an unintentional pseudorandom function model based on the second key.
For example, in an embodiment of the present disclosure, each random key in the second key may be input into an unintentional pseudo-random function model with the first intersection data, respectively, and the resulting values are exclusive-or summed to obtain the third secret sharing value.
Alternatively, the plurality of intersection nodes may generate and mutually assign random keys in pairs, for example, in one intersection node, the plurality of random keys in the second key thereof are either the random keys assigned thereto by each intersection node before the intersection node or the random keys assigned thereto by each intersection node after the intersection node. At this time, the unintentional pseudorandom function model may generate the third secret sharing value sh by the following formula i
Wherein, the liquid crystal display device comprises a liquid crystal display device,Fk ij (x) Representing the exclusive or summation of values of an unintentional pseudorandom function with a plurality of random keys generated from j intersection nodes preceding intersection node Wi, ++>Fk ji (x) Representing the value of an unintentional pseudorandom function being solved by a plurality of random keys generated by j intersection nodes from the intersection node Wi and being exclusive-ored and summed. Where i and j are both positive integers and k represents a random key.
In step S3132, a first set of element points is generated, each element of the first set of element points including at least one first intersection data and a third secret sharing value generated based on the first intersection data.
In step S3133, the disturbance value rint is determined using polynomial interpolation based on the first set of element points.
In the embodiment of the disclosure, the disturbance value is generated by a polynomial interpolation method, so that the second key can be hidden, thereby preventing the second key from being leaked.
FIG. 5 schematically illustrates a flow chart for determining disturbance values in connection with a polynomial difference method according to an embodiment of the present disclosure.
Referring to fig. 5, in some embodiments, the first set of element points includes n elements, and step S3133 includes steps S3133a and S3133b. Wherein n is a positive integer.
In step S3133a, generating an n-1 medium polynomial based on the first set of element points by using a polynomial interpolation method;
In step S3133b, the coefficients of the polynomial are taken as the perturbation values.
For example, the first set of element points P is as follows:
P={(x 1 ,sh 1 ),(x 1 ,sh 2 ),...,(x i ,sh i )}.
wherein x is i Represents the ith element in the first intersection node, sh i A third secret sharing value representing the ith element.
Alternatively, the first set of element points may be further encrypted by an unintentional pseudo-random function, e.g., may be encrypted by the following formula:
wherein x is n Represents the nth element in the first intersection node, sh n A third secret sharing value representing an nth element, F (k, x n ) It means that the nth element is inadvertently pseudo-random by the random key k. Polynomial interpolation is carried out on the first element point set to obtain an n-1 order polynomial p (x) i ):
Further, the coefficient obtained by expanding this polynomial is regarded as the disturbance value rint.
It should be noted that, the random key k may be the random key k described above or may be a random key k obtained separately, which may be specifically determined according to actual needs, and is not limited herein.
In step S3134, the first key (krint) is generated through an encryption operation according to the second key and the disturbance value, and the encryption operation may be specifically determined according to actual needs, which is not limited herein. The corresponding careless pseudorandom function is then F (K, rint, z), where z is the reference of the careless pseudorandom function. Let the second intersection data be the element q i When the first intersection data (element x i Content) and second intersection data (element q i Content of (c) is identical, element q i As z is brought in, the following result will be obtained, i.e. the first secret sharing value:
therefore, when the first intersection data and the second intersection data are the same, the first secret sharing value is sh i The same as the third secret sharing value, both of which are sh i
In embodiments of the present disclosure, each time an inadvertent pseudorandom function calculation is performed, a random key is generated that varies in real time with the content of the corresponding element.
Fig. 6 schematically illustrates a flow chart of parallel data interchange according to an embodiment of the disclosure.
Referring to fig. 6, in some embodiments, the number of first intersection nodes is a plurality, each first intersection node generates at least one first key, step S220 includes step S221.
In step S221, a plurality of first secret sharing values are generated by combining each first key according to the second intersection data through an unintentional pseudo-random function model.
Step S230 includes step S231 and step S232.
In step S231, the second secret sharing value and each first secret sharing value are subjected to a first exclusive-or operation to obtain a plurality of first operation results.
In step S232, a second exclusive-or operation is performed on the plurality of first operation results to obtain a second operation result.
Step S240 includes step S241.
In step S241, when the second operation result is zero, it is determined that there is a data intersection between the second intersection data and the first intersection data in each first intersection node. Otherwise, there is no intersection.
For example, let element q in the second intersection node i The second secret sharing value is sh i ' the first secret sharing value obtained by the element is sh i Then, the exclusive-or operation can be performed by the following formula:
if the exclusive or result is 0, the first intersection data and the second intersection data are the same, and if not, the exclusive or result is a nonsensical random number, and the first intersection data and the second intersection data are not intersected.
In the embodiment of the disclosure, the second intersection data may be intersected with the first intersection data in the plurality of first intersection nodes in parallel in the above manner, that is, for the intersection node a, the intersection node B, and the intersection node C, the intersection node B and the intersection node C may send respective first keys to the intersection node a at the same time, and the intersection node a may input the second intersection data into the unintentional pseudo-random function model based on the two first keys, so as to obtain two first secret sharing values, and perform exclusive or operation on the two first secret sharing values and the second secret sharing value at the same time, if the result is 0, it indicates that the three are identical, that is, the second intersection data has intersection with the first intersection data of each of the intersection node B and the intersection node C. Compared with the traditional scheme, the intersection efficiency is greatly improved only by a serial mode (namely, the intersection A1 of the intersection node A and the intersection node B is calculated firstly, and then the intersection A1 and the intersection of the intersection node C are calculated).
In some embodiments, each intersection-participating node is correspondingly configured with a blockchain ledger channel configured to: and enabling the intersection participation node to perform data uplink operation through the blockchain ledger channel correspondingly configured with the intersection participation node. And data isolation is performed among different blockchain ledger channels.
In this way, the channels are isolated from each other and kept secret from each other, thereby realizing data confidentiality. Each intersection node cannot cross-channel access to data within the other participant channels.
All intermediate data related in the process can be stored in a uplink manner through the block chain account book channel, so that each data can be traced, tampered and data reliability is guaranteed.
In the embodiment of the disclosure, the analysis of the external request may be implemented through an api interface, such as a Restful-style HTTP interface, a GRPC interface, and the like. Encryption algorithms in the blockchain may include cryptographic algorithms including, but not limited to, SM2 and SM3, and the like.
By adopting the data intersection method of the embodiment of the disclosure, a parallel data intersection mode can be realized, the confidentiality of data in the intersection process is improved, the whole process of execution of the intermediate calculation result uplink implementation algorithm is transparent and traceable, and the problem that the intermediate calculation data is unreliable in calculation result caused by artificial malicious tampering is prevented.
Based on the data intersection method, the disclosure also provides a data intersection device based on the block chain. The device will be described in detail below in connection with fig. 7.
The plurality of nodes in the blockchain comprise a plurality of intersection nodes, the plurality of intersection nodes comprise a first intersection node and a second intersection node, the first intersection node comprises first intersection data, the second intersection node comprises second intersection data, and each intersection node is provided with a data intersection device.
Fig. 7 schematically shows a block diagram of a data interchange device according to an embodiment of the disclosure.
As shown in fig. 7, the data processing apparatus 700 of this embodiment includes a first processing module 710, a second processing module 720, an exclusive-or module 730, and an output module 740.
The first processing module 710 is configured to generate a second secret sharing value according to the second intersection data and the second key through an unintentional pseudo-random function model. In an embodiment, the first processing module 710 may be configured to perform the step S210 described above, which is not described herein.
The second processing module 720 is configured to obtain a first secret sharing value according to the second intersection data and the first key sent by the first intersection node through an unintentional pseudo-random function model. In an embodiment, the second processing module 720 may be configured to perform the step S220 described above, which is not described herein.
The exclusive or module 730 is configured to exclusive or the second secret sharing value with the first secret sharing value. In an embodiment, the exclusive or module 730 may be used to perform the step S230 described above, which is not described herein.
The output module 740 determines whether there is a data intersection between the second intersection data and the first intersection data according to the result of the exclusive or operation. In one embodiment, the output module 740 may be configured to perform step S240 described above, and will not be described in detail herein.
The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
According to an embodiment of the present disclosure, any of the first processing module 710, the second processing module 720, the exclusive or module 730, and the output module 740 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first processing module 710, the second processing module 720, the exclusive or module 730, and the output module 740 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the first processing module 710, the second processing module 720, the exclusive or module 730, and the output module 740 may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
In the embodiment of the disclosure, the second intersection node may attempt to restore the first intersection node to obtain the calculation process of the third secret sharing value through the unintentional pseudo-random function model of the embodiment of the disclosure based on the obtained first key and the second intersection data of the second intersection node, but this process is not disclosed to the second intersection node, and the second key used when the first intersection node obtains the third secret sharing value is not known by the second intersection node, and the second intersection node can only obtain the first secret sharing value. If and only if the first intersection data is the same as the second intersection data, the first intersection node can be truly restored by the careless pseudo-random function model to obtain a calculation process of a third secret sharing value, and at the moment, the first secret sharing value is the same as the third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, if and only if the first intersection data and the second intersection data are the same, the first secret sharing value, the second secret sharing value and the third secret sharing value are the same, but all the three are different. In addition, the first secret sharing value, the second secret sharing value and the third secret sharing value are all obtained by local calculation at each intersection node, so that the three secret sharing values can be prevented from being leaked in the transmission process. And comparing the first secret sharing value with the second secret sharing value, and if the first secret sharing value and the second secret sharing value are the same, indicating that the first intersection data and the second intersection data are the same.
In summary, with the data intersection device of the embodiment of the disclosure, the plurality of intersection nodes cannot acquire real data of each other in the intersection process, the method can solve the problem of data leakage during data intersection in the traditional scheme, thereby ensuring data security.
In some embodiments, the data interchange method further includes a step of generating a first key, the generating the first key including:
a plurality of random keys are obtained, wherein the plurality of random keys comprise random keys generated by a current first transaction node when the inadvertent pseudorandom function model is triggered, and random keys generated by other transaction nodes when the inadvertent pseudorandom function model is triggered.
The second key is constituted by a plurality of random keys.
An encryption operation is performed by an unintentional pseudo-random function model and polynomial interpolation based on the second key to generate the first key.
In some embodiments, performing an encryption operation based on the second key by an inadvertent pseudo-random function model and polynomial interpolation to generate the first key includes:
and generating a third secret sharing value for the first intersection data through an unintentional pseudo-random function model based on the second secret key.
A first set of element points is generated, each element of the first set of element points including at least one first intersection data and a third secret sharing value generated based on the first intersection data.
Based on the first set of element points, a perturbation value is determined using polynomial interpolation.
The first key is generated based on the second key and the perturbation value.
In some embodiments, the first set of element points includes n elements, and determining the perturbation value based on the first set of element points using polynomial interpolation includes:
based on the first element point set, generating an n-1 medium polynomial by using a polynomial interpolation method.
The coefficients of the polynomial are taken as disturbance values.
Wherein n is a positive integer.
In some embodiments, the number of first intersection nodes is a plurality, each first intersection node generates at least one first key, and the obtaining the first secret sharing value through the inadvertent pseudo-random function model according to the second intersection data and the first key sent by the first intersection node includes:
and according to the second intersection data, combining each first secret key, and generating a plurality of first secret sharing values through an unintentional pseudorandom function model.
Exclusive or operation is carried out on the second secret sharing value and the first secret sharing value, and the exclusive or operation comprises the following steps:
And performing first exclusive OR operation on the second secret sharing value and each first secret sharing value to obtain a plurality of first operation results.
And performing a second exclusive-or operation on the plurality of first operation results to obtain a second operation result.
Determining whether the second intersection data and the first intersection data have a data intersection according to the result of the exclusive or operation comprises:
when the second operation result is zero, determining that a data intersection exists between the second intersection data and the first intersection data in each first intersection node.
In some embodiments, each intersection-participating node is correspondingly configured with a blockchain ledger channel configured to: and enabling the intersection participation node to perform data uplink operation through the blockchain ledger channel correspondingly configured with the intersection participation node.
And data isolation is performed among different blockchain ledger channels.
Fig. 8 schematically illustrates a block diagram of an electronic device adapted to implement a data interchange method, according to an embodiment of the disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 800 may also include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 804. The electronic device 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs that, when executed, implement a data interchange method according to the embodiments of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: 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 portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 802 and/or RAM 803 and/or one or more memories other than ROM 802 and RAM 803 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code means for causing a computer system to carry out the data interchange method provided by the embodiments of the disclosure when the computer program product is run on the computer system.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or from a removable medium 811 via a communication portion 809. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, 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 block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, 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.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (10)

1. A data intersection method based on a blockchain, wherein the blockchain comprises a plurality of intersection nodes, the plurality of intersection nodes comprise a first intersection node and a second intersection node, the first intersection node comprises first intersection data, the second intersection node comprises second intersection data, and the data intersection method comprises the following steps performed by the second intersection node:
generating a second secret sharing value through an unintentional pseudo-random function model according to the second intersection data and the second secret key;
acquiring a first secret sharing value through the unintentional pseudo-random function model according to the second intersection data and a first secret key sent by the first intersection node;
Performing exclusive OR operation on the second secret sharing value and the first secret sharing value;
determining whether a data intersection exists between the second intersection data and the first intersection data according to the result of the exclusive OR operation;
the second key is obtained by each intersection solving node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection solving node based on the second key.
2. The data interchange method according to claim 1, characterized in that said data interchange method further comprises the step of generating said first key, said generating said first key comprising:
obtaining a plurality of random keys, wherein the plurality of random keys comprise random keys generated by the current first transaction node when triggering the careless pseudo-random function model and random keys generated by other transaction solving nodes when triggering the careless pseudo-random function model;
forming the second key from a plurality of the random keys;
and based on the second key, performing encryption operation through the unintentional pseudo-random function model and polynomial interpolation method to generate the first key.
3. The data interchange method according to claim 2, characterized in that said encrypting operation by said unintentional pseudo-random function model and polynomial interpolation based on said second key to generate said first key comprises:
generating a third secret sharing value for the first intersection data through the unintentional pseudo-random function model based on the second secret key;
generating a first element point set, wherein each element of the first element point set comprises at least one first intersection data and a third secret sharing value generated based on the first intersection data;
determining a disturbance value by using a polynomial interpolation method based on the first element point set;
and generating the first key according to the second key and the disturbance value.
4. The data interchange method according to claim 3, wherein said first set of element points includes n elements, said determining a disturbance value based on said first set of element points using polynomial interpolation, comprising:
generating an n-1 medium polynomial by using a polynomial interpolation method based on the first element point set;
taking the coefficient of the polynomial as the disturbance value;
Wherein n is a positive integer.
5. The data interchange method according to claim 1, wherein the number of the first interchange nodes is plural, each of the first interchange nodes generates at least one first key, and the obtaining a first secret sharing value according to the second interchange data and the first key sent by the first interchange node through the unintentional pseudo-random function model includes:
generating a plurality of first secret sharing values through the unintentional pseudo-random function model by combining each first secret key according to the second intersection data;
the exclusive or operation of the second secret sharing value and the first secret sharing value includes:
performing first exclusive OR operation on the second secret sharing value and each first secret sharing value to obtain a plurality of first operation results;
performing a second exclusive-or operation on the plurality of first operation results to obtain a second operation result;
the determining whether the second intersection data and the first intersection data have a data intersection according to the result of the exclusive or operation includes:
and when the second operation result is zero, determining that a data intersection exists between the second intersection data and the first intersection data in each first intersection node.
6. The data interchange method according to claim 1, wherein each of the interchange participating nodes is correspondingly configured with a blockchain ledger channel, and the blockchain ledger channel is configured to: enabling the intersection participation node to perform data uplink operation through a block chain account channel correspondingly configured with the intersection participation node;
and the different blockchain ledger channels are isolated by data.
7. A blockchain-based data intersection device, wherein a plurality of nodes in the blockchain include a plurality of intersection nodes, the plurality of intersection nodes include a first intersection node and a second intersection node, the first intersection node includes first intersection data, the second intersection node includes second intersection data, each intersection node is provided with the data intersection device, the data intersection device includes:
the first processing module is used for generating a second secret sharing value through an unintentional pseudo-random function model according to the second intersection data and the second secret key;
the second processing module is used for acquiring a first secret sharing value through the unintentional pseudo-random function model according to the second intersection data and the first secret key sent by the first intersection node;
The exclusive or module is used for carrying out exclusive or operation on the second secret sharing value and the first secret sharing value;
the output module is used for determining whether a data intersection exists between the second intersection data and the first intersection data according to the exclusive OR operation result;
the second key is obtained by each intersection solving node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection solving node based on the second key.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the data interchange method according to any of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to perform the data interchange method according to any of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements a data interchange method according to any of claims 1-6.
CN202310340134.7A 2023-03-31 2023-03-31 Data intersection method and device based on block chain Pending CN116455618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310340134.7A CN116455618A (en) 2023-03-31 2023-03-31 Data intersection method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310340134.7A CN116455618A (en) 2023-03-31 2023-03-31 Data intersection method and device based on block chain

Publications (1)

Publication Number Publication Date
CN116455618A true CN116455618A (en) 2023-07-18

Family

ID=87123113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310340134.7A Pending CN116455618A (en) 2023-03-31 2023-03-31 Data intersection method and device based on block chain

Country Status (1)

Country Link
CN (1) CN116455618A (en)

Similar Documents

Publication Publication Date Title
TWI701623B (en) Logistics information transmission method, system and device based on blockchain
US20180212751A1 (en) End-To-End Secure Operations Using a Query Matrix
EP3075098B1 (en) Server-aided private set intersection (psi) with data transfer
CN110800250B (en) Controlled release of encrypted private keys
EP3114602B1 (en) Method and apparatus for verifying processed data
CN112131316B (en) Data processing method and device applied to block chain system
KR102145701B1 (en) Prevent false display of input data by participants in secure multi-party calculations
CN108154038B (en) Data processing method and device
CN112150141A (en) Block chain consensus method, device and system
CN113032840A (en) Data processing method, device, equipment and computer readable storage medium
CN114826733B (en) File transmission method, device, system, equipment, medium and program product
Li et al. An efficient blind filter: Location privacy protection and the access control in FinTech
WO2022156594A1 (en) Federated model training method and apparatus, electronic device, computer program product, and computer-readable storage medium
CN112765642A (en) Data processing method, data processing apparatus, electronic device, and medium
CN113179158A (en) Multi-party combined data processing method and device for controlling bandwidth
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN112800479A (en) Multi-party combined data processing method and device by using trusted third party
CN112949866A (en) Poisson regression model training method and device, electronic equipment and storage medium
CN116975125A (en) Data statistics method, device, system, storage medium and program product
CN114514550A (en) Partitioning requests into blockchains
CN111798236A (en) Transaction data encryption and decryption method, device and equipment
CN115599959A (en) Data sharing method, device, equipment and storage medium
CN116455618A (en) Data intersection method and device based on block chain
CN111125734B (en) Data processing method and system
CN114357472A (en) Data labeling method, system, electronic device and readable 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