CN118445855A - Private data processing method, device, equipment and medium based on blockchain - Google Patents

Private data processing method, device, equipment and medium based on blockchain Download PDF

Info

Publication number
CN118445855A
CN118445855A CN202410470853.5A CN202410470853A CN118445855A CN 118445855 A CN118445855 A CN 118445855A CN 202410470853 A CN202410470853 A CN 202410470853A CN 118445855 A CN118445855 A CN 118445855A
Authority
CN
China
Prior art keywords
key
transaction account
digital
transaction
encryption
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
CN202410470853.5A
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.)
Xinjiang University
Original Assignee
Xinjiang University
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 Xinjiang University filed Critical Xinjiang University
Priority to CN202410470853.5A priority Critical patent/CN118445855A/en
Publication of CN118445855A publication Critical patent/CN118445855A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a private data processing method, device, equipment and medium based on a blockchain, which comprises the following steps: the first transaction account node generates a zero-knowledge proof contract, a proof key and a verification key which meet the digital resource exchange requirement, and uploads the zero-knowledge proof contract, the proof key and the verification key to the blockchain network; the second transaction account generates a trusted certificate meeting the request according to the zero-knowledge proof contract and the corresponding proof key; the first transaction account node verifies the trusted certificate based on the verification key, and after verification, a transaction request is sent to the second transaction account node; the second transaction account node encrypts the digital transaction resource of the second transaction account node by adopting the public key to generate a ciphertext, and sends the ciphertext to the first transaction account node after being secondarily encrypted by the re-encryption node; and the first transaction account node decrypts the re-encrypted ciphertext through the private key to obtain the plaintext of the digital transaction resource of the second transaction account node. By adopting the invention, the security of private data transaction is improved.

Description

Private data processing method, device, equipment and medium based on blockchain
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, apparatus, device, and medium for processing private data based on blockchain.
Background
With the development of digitization, more and more traditional assets, such as papers, drawings, music, etc., begin to develop towards digitization, and the demands of digital assets in terms of authorization are also increasing. Conventional authorization methods have many limitations including reliance on intermediaries, opacity of information, and risk of tampering.
Through distributed account book, cryptography and intelligent contract technology of the blockchain, an decentralized, transparent, safe and tamper-proof authorization system can be established, and a reliable solution is provided for authorization of digital transaction resources. The transparent nature of blockchain disclosure results in user privacy information having to be stored publicly in the blockchain, which undoubtedly results in leakage of user privacy information.
Thus, how to complete authorization of private data between users without revealing sensitive information related to the personal privacy of the users is a problem that needs to be addressed.
Disclosure of Invention
The embodiment of the invention provides a private data processing method, a device, computer equipment and a storage medium based on a blockchain, so as to improve the security of private data transaction.
In order to solve the above technical problems, an embodiment of the present application provides a blockchain-based privacy data processing method, which is applied to a blockchain, wherein the blockchain includes at least two transaction account nodes and a re-encryption node, and the blockchain-based privacy data processing method includes:
the first transaction account node generates a zero-knowledge proof contract meeting the digital resource exchange requirement, generates a proof key and a verification key, and uploads the zero-knowledge proof contract and the proof key to a blockchain network along with an authorization request of digital resource exchange;
after receiving the authorization request of digital resource exchange broadcasted by the blockchain network, the second transaction account generates a trusted certificate meeting the authorization request of the digital resource exchange according to the zero-knowledge proof contract and the corresponding proof key;
the first transaction account node verifies the trusted certificate based on the verification key, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node;
after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node by adopting a public key to generate a ciphertext, generating a re-encryption key, and sending the ciphertext and the re-encryption key to the re-encryption node;
The re-encryption node carries out secondary encryption on the ciphertext through the re-encryption key to obtain a re-encryption ciphertext, and sends the re-encryption ciphertext to the first transaction account node;
And the first transaction account node decrypts the re-encrypted ciphertext through a private key to obtain a plaintext of the digital transaction resource of the second transaction account node.
Optionally, the authorization request for the digital resource exchange includes: requirements for digital transaction resources and an authorized amount that is willing to pay.
Optionally, after receiving the authorization request of the digital resource exchange broadcasted by the blockchain network, the second transaction account generates, according to the zero-knowledge proof contract and the corresponding proof key, a trusted proof that meets the authorization request of the digital resource exchange, including:
acquiring the zero-knowledge proof contract and the corresponding proof key;
According to the requirements of the zero knowledge proof contract on the digital exchange resources, corresponding values are transmitted to obtain a promised value of the digital exchange resources;
and operating the promise value of the digital exchange resource and the proving key to obtain the trusted proving.
Optionally, after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node by using a public key, generating a ciphertext, and generating the re-encryption key includes:
After the transaction request is received, the public key of the second transaction account node is adopted to carry out encryption operation on the digital transaction resource to obtain a ciphertext of the digital transaction resource;
And calculating and generating the re-encryption key by adopting the private key of the second transaction account node and the public key of the first transaction account node.
Optionally, the blockchain-based privacy data processing method further includes:
The first transaction account and the second transaction account generate a pair of public and private key pairs for encrypting data and upload the public keys into a blockchain network.
In order to solve the above technical problem, an embodiment of the present application further provides a private data processing apparatus based on a blockchain, including:
the authorization request generation module is used for generating a zero-knowledge proof contract meeting the digital resource exchange requirement by the first transaction account node, generating a proof key and a verification key, and uploading the zero-knowledge proof contract and the proof key to the blockchain network along with the authorization request of the digital resource exchange;
The trusted proof generation module is used for generating trusted proof meeting the digital resource exchange authorization request according to the zero-knowledge proof contract and the corresponding proof key after receiving the digital resource exchange authorization request broadcasted by the blockchain network by the second transaction account;
The trusted proving verification module is used for verifying the trusted proving based on the verification key by the first transaction account node, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node;
The digital resource encryption module is used for encrypting the digital transaction resources of the second transaction account node by adopting a public key after the second transaction account node receives the transaction request, generating a ciphertext, generating a re-encryption key and sending the ciphertext and the re-encryption key to the re-encryption node;
The secondary encryption module is used for carrying out secondary encryption on the ciphertext through the re-encryption key by the re-encryption node to obtain a re-encryption ciphertext, and sending the re-encryption ciphertext to the first transaction account node;
And the digital resource decryption module is used for decrypting the re-encrypted ciphertext through the private key by the first transaction account node to obtain the plaintext of the digital transaction resource of the second transaction account node.
Optionally, the trusted attestation generation module includes:
an information obtaining unit, configured to obtain the zero-knowledge proof contract and a corresponding proof key;
the data input unit is used for inputting corresponding values according to the requirements of the digital exchange resources in the zero-knowledge proof contract to obtain a promised value of the digital exchange resources;
And the trusted certification generation unit is used for calculating the promise value of the digital exchange resource and the certification key to obtain the trusted certification.
Optionally, the digital resource encryption module includes:
The ciphertext calculation unit is used for carrying out encryption operation on the digital transaction resource by adopting the public key of the second transaction account node after receiving the transaction request to obtain a ciphertext of the digital transaction resource;
And the re-encryption key calculation unit is used for calculating and generating the re-encryption key by adopting the private key of the second transaction account node and the public key of the first transaction account node.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the steps of the above blockchain-based privacy data processing method are implemented when the processor executes the computer program.
To solve the above technical problem, embodiments of the present application further provide a computer readable storage medium storing a computer program, which when executed by a processor, implements the steps of the blockchain-based privacy data processing method described above.
The embodiment of the invention provides a blockchain-based privacy data processing method, a blockchain-based privacy data processing device, a blockchain-based privacy data processing computer device and a blockchain-based privacy data processing storage medium, wherein a zero-knowledge proving contract meeting the digital resource exchange requirement is generated through a first transaction account node, a proving key and a verifying key are generated, and the zero-knowledge proving contract and the proving key are uploaded to a blockchain network along with an authorization request of the digital resource exchange; after receiving the authorization request of digital resource exchange broadcasted by the blockchain network, the second transaction account generates a trusted certificate meeting the authorization request of digital resource exchange according to the zero knowledge certification contract and the corresponding certification key; the first transaction account node verifies the trusted certificate based on the verification key, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node; after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node by adopting a public key to generate a ciphertext, generating a re-encryption key, and sending the ciphertext and the re-encryption key to the re-encryption node; the re-encryption node carries out secondary encryption on the ciphertext through the re-encryption key to obtain a re-encryption ciphertext, and sends the re-encryption ciphertext to the first transaction account node; and the first transaction account node decrypts the re-encrypted ciphertext through the private key to obtain the plaintext of the digital transaction resource of the second transaction account node. Under the condition of ensuring the safety of the digital transaction resources, the data resource transaction is carried out, and the safety of the private data transaction is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a blockchain-based privacy data processing method of the present application;
FIG. 3 is a schematic block chain based private data processing apparatus according to one embodiment of the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, as shown in fig. 1, fig. 1 is a schematic diagram of an application environment of a private data processing method based on a blockchain in an embodiment of the present application, where the private data processing method based on a blockchain provided by the present application may be applied in an application environment as shown in fig. 1, the blockchain is composed of a plurality of nodes capable of communicating with each other, each node may be regarded as a block storage, each block storage is used for storing data, all data are contained between data nodes, the block storage data has a complete history record and may be rapidly restored and expanded, the blockchain is divided into public chains, private chains and alliance chains, any node is open, each mechanism/node may participate in the blockchain calculation, and any mechanism/node may download to obtain complete blockchain data, the private chains may not wish to participate in the system, and may not be externally disclosed for internal data management and audit or test of a specific mechanism, the alliance chains participate in each node, all peer-to-peer data may completely exit, all hash mechanisms may not need to completely, and a hash function may be completely and completely exchange all data with a public key in a digital system to implement a hash function, and a hash function has a full-size, and a hash function has a full-of a basic data storage structure, and a hash function is used for storing data.
Referring to fig. 2, fig. 2 shows a blockchain-based private data processing method according to an embodiment of the present invention, and the application environment of the method in fig. 1 is taken as an example for explanation, which is described in detail as follows:
S201: the first transaction account node generates a zero-knowledge proof contract that meets the digital resource exchange requirements, and generates a proof key and a validation key, and uploads the zero-knowledge proof contract and the proof key to the blockchain network along with an authorization request for the digital resource exchange.
Specifically, the digital switching resource authorization request includes the following additional information: the digital exchange resource requires an authorized amount that is willing to be paid. Illustratively, the digital switching resource authorization request is: a patient suffering from a specific disease needs each index data of blood as a research sample; the authorized amount that is willing to pay is: 100 yuan. And the first transaction account generates a zero-knowledge proof contract meeting the requirements of various blood index data, and a corresponding proof key pk and a verification key vk according to various blood index data meeting the requirements. Finally, the zero knowledge proof contract and the corresponding proof key are issued to the blockchain.
In a specific alternative manner, before step S201, that is, before the first transaction account node issues the digital exchange resource authorization request to the blockchain, the blockchain-based privacy data processing method further includes: the first transaction account node and the second transaction account node need to complete registration, and specifically include:
The first transaction account node and the second transaction account node apply for the Ethernet address, and after the Ethernet address is obtained, the encrypted money wallet is registered and connected to the Ethernet blockchain network.
The first transaction account node and the second transaction account node also need to generate a pair of public and private key pairs for encrypting data and upload the public keys into the blockchain network.
Optionally, the authorization request for the digital resource exchange includes: requirements for digital transaction resources and an authorized amount that is willing to pay.
S202: after receiving the authorization request of digital resource exchange broadcasted by the blockchain network, the second transaction account generates a trusted certificate meeting the authorization request of digital resource exchange according to the zero-knowledge proof contract and the corresponding proof key.
Specifically, the second transaction account needs to transmit correct data into a zero knowledge proof contract, a witness w is generated through calculation, and then a trusted proof pi of the authorization request is obtained through calculation of the witness w and the proof key.
In a specific alternative embodiment, after receiving the authorization request for digital resource exchange broadcast by the blockchain network, the second transaction account generates a trusted proof of the authorization request for digital resource exchange according to the zero-knowledge proof contract and the corresponding proof key, including:
Acquiring a zero knowledge proof contract and a corresponding proof key;
According to the requirement of the zero knowledge proof contract on the digital exchange resource, the corresponding value is transmitted to obtain a promised value of the digital exchange resource;
And operating the promise value of the digital exchange resource and the proving key to obtain the trusted proving.
S203: the first transaction account node verifies the trusted proof based on the verification key, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node.
Specifically, after receiving the trusted proof pi sent by the second transaction account node, the first transaction account node performs verification calculation with the trusted proof pi through a verification key vk, and if the calculation result is true, the data of the second transaction account node is considered to meet the requirement of digital exchange resources; if the calculation result is false, the data of the second transaction account node is not considered to meet the requirement of the digital exchange resource, and the process can be expressed as follows: verify (vk, pi) → (true or false), where verify represents the validation function. If the verification result is true, the first transaction account node sends a transaction request, a sender in the transaction request is the first transaction account node, a receiver is the second transaction account node, and the amount is an authorized amount which is willing to be paid in the additional information of the authorization request of the digital transaction resource.
S204: after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node by adopting the public key, generating a ciphertext, generating a re-encryption key, and sending the ciphertext and the re-encryption key to the re-encryption node.
Specifically, the second transaction account node firstly uses the registered public key to carry out encryption operation with the digital exchange resource to obtain the digital exchange resource ciphertext m. Next, the second transaction account node executes a re-encryption key generation algorithm, and calculates a re-encryption key Rk by using the private key of the second transaction account node and the public key of the first transaction account as parameters. And finally, the second transaction account node sends the digital transaction resource ciphertext and the re-encryption key Rk to the re-encryption node. Since the re-encryption node does not have the private key of the second transaction account node, the ciphertext of the digital transaction resource of the second transaction account node cannot be decrypted.
In an optional embodiment, after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node with the public key to generate the ciphertext, and generating the re-encryption key includes:
After the transaction request is received, encrypting the digital transaction resource by adopting a public key of the second transaction account node to obtain a ciphertext of the digital transaction resource;
And calculating by adopting the private key of the second transaction account node and the public key of the first transaction account node to generate a re-encryption key.
S205: the re-encryption node performs secondary encryption on the ciphertext through the re-encryption key to obtain a re-encryption ciphertext, and sends the re-encryption ciphertext to the first transaction account node.
Specifically, the re-encryption node performs a re-encryption calculation REENCRYPT (Rk, m) to obtain a secondarily encrypted ciphertext e, wherein REENCRYPT is a re-encryption function.
S206: and the first transaction account node decrypts the re-encrypted ciphertext through the private key to obtain the plaintext of the digital transaction resource of the second transaction account node.
Specifically, the first transaction account execution Decrypt (e, sk) gets the digital swap resource plaintext, where Decrypt is the decryption function.
In a specific implementation manner of this embodiment, before each node joins the blockchain, a pair of public and private key pairs needs to be generated, and the public key is uploaded to the blockchain through an intelligent contract, so that subsequent encryption and decryption of the digital exchange resource are facilitated, and the data security of the digital exchange resource is protected. The first transaction account node issues a digital switching resource authorization request to the blockchain and generates a zero-knowledge proof contract and corresponding proof and verification keys that meet the digital switching resource requirements. Wherein the digital switching resource grant request includes the following additional information: the digital exchange resource requires an authorized amount that is willing to be paid. The first transaction account node needs to write the requirements of the digital exchange resource into a set of intelligent contracts and generate a certification key and a verification key corresponding to the intelligent contracts through a zero knowledge certification algorithm. The node in each blockchain of the digital exchange resource authorization request of the first transaction account node can see that if a certain node has the digital exchange resource which meets the requirement and is satisfied with the authorization amount which is willing to pay, a trusted proof which meets the authorization request is generated through a zero-knowledge proof contract and a corresponding proof key. In particular, key data of the digital switching resource is transferred into a zero knowledge proof contract, and a proof is generated by a proof key. The first transaction account node cannot obtain any information of the digital switching resource from the certificate, but can verify the certificate by means of the verification key, thereby knowing whether the digital switching resource meets the requirements. Therefore, the reliability of the data is verified while the data security of the digital exchange resource is protected. And if the verification result meets the authorization request, the first transaction account node sends a transaction request and sends the amount promised in the digital exchange resource authorization request to the second transaction account node. After receiving the transaction request, the second transaction account node encrypts the digital exchange resource by using the public key to generate a ciphertext, and sends the ciphertext to the re-encryption node together with the re-encryption key, wherein the re-encryption key is calculated by the public key of the first transaction account node and the private key of the second transaction account node. Since the digital switching resource is encrypted by the public key of the first transaction account node, the re-encryption node has no private key, so that the plaintext data of the digital switching resource cannot be obtained. And then the re-encryption node encrypts the ciphertext for the second time through the re-encryption key and sends the encrypted ciphertext to the first transaction account. And decrypting the encrypted ciphertext by using a private key of the first transaction account node to obtain a digital exchange resource plaintext. Therefore, by implementing the embodiment, the privacy security of the digital switching resource can be protected, the digital switching resource can be visible to the appointed object, and the credible authorization of the digital switching resource can be realized.
In this embodiment, the first transaction account node generates a zero-knowledge proof contract that meets the digital resource exchange requirement, generates a proof key and a verification key, and uploads the zero-knowledge proof contract and the proof key to the blockchain network along with an authorization request for digital resource exchange; after receiving the authorization request of digital resource exchange broadcasted by the blockchain network, the second transaction account generates a trusted certificate meeting the authorization request of digital resource exchange according to the zero knowledge certification contract and the corresponding certification key; the first transaction account node verifies the trusted certificate based on the verification key, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node; after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node by adopting a public key to generate a ciphertext, generating a re-encryption key, and sending the ciphertext and the re-encryption key to the re-encryption node; the re-encryption node carries out secondary encryption on the ciphertext through the re-encryption key to obtain a re-encryption ciphertext, and sends the re-encryption ciphertext to the first transaction account node; and the first transaction account node decrypts the re-encrypted ciphertext through the private key to obtain the plaintext of the digital transaction resource of the second transaction account node. Under the condition of ensuring the safety of the digital transaction resources, the data resource transaction is carried out, and the safety of the private data transaction is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Fig. 3 shows a schematic block diagram of a blockchain-based privacy data processing apparatus in one-to-one correspondence with the blockchain-based privacy data processing method of the above embodiment. As shown in fig. 3, the blockchain-based privacy data processing device includes an authorization request generation module 31, a trusted attestation generation module 32, a trusted attestation verification module 33, a digital resource encryption module 34, a secondary encryption module 35, and a digital resource decryption module 36. The functional modules are described in detail as follows:
The authorization request generation module 31 is configured to generate a zero-knowledge proof contract that meets the digital resource exchange requirement by using the first transaction account node, generate a proof key and a verification key, and upload the zero-knowledge proof contract and the proof key to the blockchain network along with the authorization request of the digital resource exchange;
The trusted proof generating module 32 is configured to generate, after receiving the authorization request for digital resource exchange broadcast by the blockchain network, a trusted proof that meets the authorization request for digital resource exchange according to a zero-knowledge proof contract and a corresponding proof key by the second transaction account;
The trusted proof verification module 33 is configured to verify the trusted proof by the first transaction account node based on the verification key, and if the verification result meets the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node;
the digital resource encryption module 34 is configured to encrypt the digital transaction resource of the second transaction account node by using the public key after the second transaction account node receives the transaction request, generate a ciphertext, generate a re-encryption key, and send the ciphertext and the re-encryption key to the re-encryption node;
The secondary encryption module 35 is configured to perform secondary encryption on the ciphertext by the re-encryption node through the re-encryption key to obtain a re-encrypted ciphertext, and send the re-encrypted ciphertext to the first transaction account node;
the digital resource decryption module 36 is configured to decrypt the re-encrypted ciphertext by the first transaction account node through the private key, and obtain a plaintext of the digital transaction resource of the second transaction account node.
Optionally, the trusted attestation generation module 32 includes:
The information acquisition unit is used for acquiring a zero-knowledge proving contract and a corresponding proving key;
The data input unit is used for inputting corresponding values according to the requirements of the digital exchange resources in the zero knowledge proof contract to obtain a promised value of the digital exchange resources;
And the trusted certification generation unit is used for calculating the promise value of the digital exchange resource and the certification key to obtain the trusted certification.
Optionally, the digital resource encryption module 34 includes:
The ciphertext calculation unit is used for carrying out encryption operation on the digital transaction resources by adopting the public key of the second transaction account node after receiving the transaction request to obtain the ciphertext of the digital transaction resources;
And the re-encryption key calculation unit is used for calculating and generating a re-encryption key by adopting the private key of the second transaction account node and the public key of the first transaction account node.
For specific limitations on the blockchain-based privacy data processing device, reference may be made to the above limitations on the blockchain-based privacy data processing method, and no further description is given here. The various modules in the blockchain-based privacy data processing device described above may be implemented in whole or in part in software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only a computer device 4 having a component connection memory 41, a processor 42, a network interface 43 is shown in the figures, but it is understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an Application SPECIFIC INTEGRATED Circuit (ASIC), a Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a digital Processor (DIGITAL SIGNAL Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used for storing an operating system and various application software installed on the computer device 4, such as program codes of a blockchain-based privacy data processing method, and the like. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute a program code stored in the memory 41 or process data, such as a program code for executing a blockchain-based privacy data processing method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
The present application also provides another embodiment, namely, a computer-readable storage medium storing an interface display program executable by at least one processor to cause the at least one processor to perform the steps of the blockchain-based privacy data processing method as described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. A blockchain-based private data processing method, applied to a blockchain, the blockchain including at least two transaction account nodes and a re-encryption node, the blockchain-based private data processing method comprising:
the first transaction account node generates a zero-knowledge proof contract meeting the digital resource exchange requirement, generates a proof key and a verification key, and uploads the zero-knowledge proof contract and the proof key to a blockchain network along with an authorization request of digital resource exchange;
after receiving the authorization request of digital resource exchange broadcasted by the blockchain network, the second transaction account generates a trusted certificate meeting the authorization request of the digital resource exchange according to the zero-knowledge proof contract and the corresponding proof key;
the first transaction account node verifies the trusted certificate based on the verification key, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node;
after the second transaction account node receives the transaction request, encrypting the digital transaction resource of the second transaction account node by adopting a public key to generate a ciphertext, generating a re-encryption key, and sending the ciphertext and the re-encryption key to the re-encryption node;
The re-encryption node carries out secondary encryption on the ciphertext through the re-encryption key to obtain a re-encryption ciphertext, and sends the re-encryption ciphertext to the first transaction account node;
And the first transaction account node decrypts the re-encrypted ciphertext through a private key to obtain a plaintext of the digital transaction resource of the second transaction account node.
2. The blockchain-based private data processing method of claim 1, wherein the authorization request for the digital resource exchange includes: requirements for digital transaction resources and an authorized amount that is willing to pay.
3. The blockchain-based private data processing method of claim 1, wherein the second transaction account, upon receiving an authorization request for a digital resource exchange broadcast by a blockchain network, generating a trusted proof of the authorization request for the digital resource exchange according to the zero-knowledge proof contract and the corresponding proof key comprises:
acquiring the zero-knowledge proof contract and the corresponding proof key;
According to the requirements of the zero knowledge proof contract on the digital exchange resources, corresponding values are transmitted to obtain a promised value of the digital exchange resources;
and operating the promise value of the digital exchange resource and the proving key to obtain the trusted proving.
4. The blockchain-based privacy data processing method of claim 1, wherein the second transaction account node, after receiving the transaction request, encrypts digital transaction resources of the second transaction account node with a public key, generating ciphertext, and generating a re-encryption key comprises:
After the transaction request is received, the public key of the second transaction account node is adopted to carry out encryption operation on the digital transaction resource to obtain a ciphertext of the digital transaction resource;
And calculating and generating the re-encryption key by adopting the private key of the second transaction account node and the public key of the first transaction account node.
5. The blockchain-based private data processing method of claim 1, further comprising:
The first transaction account and the second transaction account generate a pair of public and private key pairs for encrypting data and upload the public keys into a blockchain network.
6. A blockchain-based private data processing device, the blockchain-based private data processing device comprising:
the authorization request generation module is used for generating a zero-knowledge proof contract meeting the digital resource exchange requirement by the first transaction account node, generating a proof key and a verification key, and uploading the zero-knowledge proof contract and the proof key to the blockchain network along with the authorization request of the digital resource exchange;
The trusted proof generation module is used for generating trusted proof meeting the digital resource exchange authorization request according to the zero-knowledge proof contract and the corresponding proof key after receiving the digital resource exchange authorization request broadcasted by the blockchain network by the second transaction account;
The trusted proving verification module is used for verifying the trusted proving based on the verification key by the first transaction account node, and if the verification result accords with the authorization request of the digital resource exchange, the first transaction account node sends a transaction request to the second transaction account node;
The digital resource encryption module is used for encrypting the digital transaction resources of the second transaction account node by adopting a public key after the second transaction account node receives the transaction request, generating a ciphertext, generating a re-encryption key and sending the ciphertext and the re-encryption key to the re-encryption node;
The secondary encryption module is used for carrying out secondary encryption on the ciphertext through the re-encryption key by the re-encryption node to obtain a re-encryption ciphertext, and sending the re-encryption ciphertext to the first transaction account node;
And the digital resource decryption module is used for decrypting the re-encrypted ciphertext through the private key by the first transaction account node to obtain the plaintext of the digital transaction resource of the second transaction account node.
7. The blockchain-based privacy data processing device of claim 6, wherein the trust credential generation module comprises:
an information obtaining unit, configured to obtain the zero-knowledge proof contract and a corresponding proof key;
the data input unit is used for inputting corresponding values according to the requirements of the digital exchange resources in the zero-knowledge proof contract to obtain a promised value of the digital exchange resources;
And the trusted certification generation unit is used for calculating the promise value of the digital exchange resource and the certification key to obtain the trusted certification.
8. The blockchain-based privacy data processing device of claim 6, wherein the digital resource encryption module includes:
The ciphertext calculation unit is used for carrying out encryption operation on the digital transaction resource by adopting the public key of the second transaction account node after receiving the transaction request to obtain a ciphertext of the digital transaction resource;
And the re-encryption key calculation unit is used for calculating and generating the re-encryption key by adopting the private key of the second transaction account node and the public key of the first transaction account node.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the blockchain-based privacy data processing method of any of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the blockchain-based privacy data processing method of any of claims 1 to 5.
CN202410470853.5A 2024-04-18 2024-04-18 Private data processing method, device, equipment and medium based on blockchain Pending CN118445855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410470853.5A CN118445855A (en) 2024-04-18 2024-04-18 Private data processing method, device, equipment and medium based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410470853.5A CN118445855A (en) 2024-04-18 2024-04-18 Private data processing method, device, equipment and medium based on blockchain

Publications (1)

Publication Number Publication Date
CN118445855A true CN118445855A (en) 2024-08-06

Family

ID=92328980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410470853.5A Pending CN118445855A (en) 2024-04-18 2024-04-18 Private data processing method, device, equipment and medium based on blockchain

Country Status (1)

Country Link
CN (1) CN118445855A (en)

Similar Documents

Publication Publication Date Title
US20220191021A1 (en) Blockchain-implemented method and system
WO2021022701A1 (en) Information transmission method and apparatus, client terminal, server, and storage medium
US10880100B2 (en) Apparatus and method for certificate enrollment
US8495383B2 (en) Method for the secure storing of program state data in an electronic device
CN111542820A (en) Method and apparatus for trusted computing
CN109361508A (en) Data transmission method, electronic equipment and computer readable storage medium
Xu et al. An efficient blockchain‐based privacy‐preserving scheme with attribute and homomorphic encryption
WO2021098152A1 (en) Blockchain-based data processing method, device, and computer apparatus
CN109768969A (en) Authority control method and internet-of-things terminal, electronic equipment
CN116095671B (en) Resource sharing method based on meta universe and related equipment thereof
CN115442037A (en) Account management method, device, equipment and storage medium
CN114584347A (en) Verification short message receiving and sending method, server, terminal and storage medium
CN118445855A (en) Private data processing method, device, equipment and medium based on blockchain
Liu et al. Video data integrity verification method based on full homomorphic encryption in cloud system
CN114844695B (en) Business data circulation method, system and related equipment based on block chain
CN116756780B (en) Alliance chain data access control method based on CP-ABE algorithm and related equipment
CN110601841B (en) SM2 collaborative signature and decryption method and device
CN116226932A (en) Service data verification method and device, computer medium and electronic equipment
CN117708798A (en) Method and system for controlling blockchain terminal equipment based on cryptography
CN114244502A (en) Signature key generation method and device based on SM9 algorithm and computer equipment
CN117641504A (en) Trusted access method, system, equipment and readable storage medium for edge node equipment
CN111641507A (en) Software communication system structure component registration management method and device

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