CN113342802A - Method and device for storing block chain data - Google Patents

Method and device for storing block chain data Download PDF

Info

Publication number
CN113342802A
CN113342802A CN202010136128.6A CN202010136128A CN113342802A CN 113342802 A CN113342802 A CN 113342802A CN 202010136128 A CN202010136128 A CN 202010136128A CN 113342802 A CN113342802 A CN 113342802A
Authority
CN
China
Prior art keywords
private key
data
encrypted
block chain
transaction
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
CN202010136128.6A
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.)
Xuketianxia Beijing Technology Co ltd
Original Assignee
Xuketianxia Beijing Technology Co ltd
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 Xuketianxia Beijing Technology Co ltd filed Critical Xuketianxia Beijing Technology Co ltd
Priority to CN202010136128.6A priority Critical patent/CN113342802A/en
Publication of CN113342802A publication Critical patent/CN113342802A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)

Abstract

The application discloses a method and a device for storing block chain data, and relates to the technical field of block chains. The method comprises the following steps: generating an account for a current user in a block chain, and creating assets under the account, wherein the assets correspond to any type of data; randomly generating a pair of keys for encryption and decryption for the data, wherein the keys comprise a first public key and a first private key; encrypting the data by using the first public key, generating a corresponding hash value for the encrypted data by a hash algorithm, and encrypting the first private key by using the personal public key of the current user; storing the encrypted data in a distributed file system, and storing the hash value and the encrypted first private key as transaction information in a blockchain. The device includes: the device comprises a creating module, a generating module, an encrypting module and a storing module. The method and the device solve the problems of low efficiency, high cost storage and complex asset transfer of the block chain, and are more widely applied.

Description

Method and device for storing block chain data
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for blockchain data storage.
Background
In current blockchain data storage, data is usually stored directly to a block, or only hash values are stored in the block, and information to be stored is stored to a centralized database.
However, the above storage method has some disadvantages. When data is directly stored in a block, the storage efficiency is low, the cost is high, and the same data requires that all or part of nodes in the network are repeatedly stored, which severely limits the size and type of data that can be stored in the block chain, such as the inability to store larger pictures and videos. When the data to be stored is stored in the centralized database, the storage becomes a short board in decentralized application, such as single point failure, decentralized requirement, and the like. In addition, no matter the data is stored in the block or the centralized database, the problem of data privacy is faced, anyone can acquire plaintext data, and the practical requirement of privacy protection cannot be met.
Disclosure of Invention
It is an object of the present application to overcome the above problems or to at least partially solve or mitigate the above problems.
According to an aspect of the present application, there is provided a method of blockchain data storage, comprising:
generating an account for a current user in a block chain, and creating assets under the account, wherein the assets correspond to any type of data;
randomly generating a pair of keys for encryption and decryption for the data, wherein the keys comprise a first public key and a first private key;
encrypting the data by using the first public key, generating a corresponding hash value for the encrypted data by a hash algorithm, and encrypting the first private key by using the personal public key of the current user;
storing the encrypted data in a distributed file system, and storing the hash value and the encrypted first private key as transaction information in a blockchain.
Optionally, the method further comprises:
when the assets are transferred, the encrypted first private key is obtained from the block chain, the first private key is obtained by decrypting the first private key through the personal private key of the current user, and the first private key is added to the transaction information and stored in the block chain after being encrypted through the personal public key of the asset transfer receiver.
Optionally, the method further comprises:
after the transaction of the asset transfer is completed, when the current user or the receiver initiates an inquiry request, inquiring the transaction information in a block chain by using a personal private key of the user or the receiver; or the like, or, alternatively,
after the transaction of the asset transfer is completed, when an authorized third party initiates an inquiry request, the transaction information is inquired in the blockchain using the private key.
Optionally, the method further comprises:
when an unauthorized user initiates an authentication request, the legitimacy of the transfer asset transaction is verified by way of zero knowledge proof.
Optionally, the distributed file system is a decentralized distributed file system or a centralized distributed file system.
According to another aspect of the present application, there is provided an apparatus for blockchain data storage, including:
the system comprises a creating module, a judging module and a processing module, wherein the creating module is configured to generate an account for a current user in a block chain, and create an asset under the account, and the asset corresponds to any type of data;
a generation module configured to randomly generate a pair of keys for encryption and decryption for the data, including a first public key and a first private key;
an encryption module configured to encrypt the data using the first public key, generate a corresponding hash value for the encrypted data through a hash algorithm, and encrypt the first private key using the personal public key of the current user;
a storage module configured to store the encrypted data in a distributed file system, the hash value and the encrypted first private key being stored as transaction information in a blockchain.
Optionally, the encryption module is further configured to:
when the assets are transferred, the encrypted first private key is obtained from the block chain, the first private key is obtained by decrypting the first private key through the personal private key of the current user, and the first private key is added to the transaction information and stored in the block chain after being encrypted through the personal public key of the asset transfer receiver.
Optionally, the apparatus further comprises:
a query module configured to query the transaction information in a blockchain using its own personal private key when the current user or the recipient initiates a query request after the transaction of the asset transfer is completed; or configured to use a private key to query the transaction information in a blockchain when an authorized third party initiates a query request after completion of a transaction of the asset transfer.
Optionally, the apparatus further comprises:
a verification module configured to verify the legitimacy of the transfer asset transaction by way of a zero knowledge proof when an unauthorized user initiates a verification request.
Optionally, the distributed file system is a decentralized distributed file system or a centralized distributed file system.
According to yet another aspect of the application, there is provided a computing device comprising a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.
According to yet another aspect of the application, a computer-readable storage medium, preferably a non-volatile readable storage medium, is provided, having stored therein a computer program which, when executed by a processor, implements a method as described above.
According to yet another aspect of the application, there is provided a computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method described above.
The technical scheme provided by the application includes that an account is generated for a current user in a blockchain, an asset is created under the account, the asset corresponds to any type of data, a pair of keys for encryption and decryption are randomly generated for the data, the key comprises a first public key and a first private key, the data is encrypted by using the first public key, a corresponding hash value is generated for the encrypted data through a hash algorithm, the first private key is encrypted by using a personal public key of the current user, the encrypted data is stored in a distributed file system, the hash value and the encrypted first private key are stored in the blockchain as transaction information, so that the data does not need to be stored in the blockchain, the problems of low efficiency and high cost storage of the blockchain are solved, and the asset is any type of data and is not limited to virtual currency, and various universal digital assets such as pictures, audio, video, code files and the like are supported, the limitation is overcome, and the application is wider. In addition, the problem of transferring complex assets is solved by storing the first private key used in data decryption in the transaction.
The above and other objects, advantages and features of the present application will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Some specific embodiments of the present application will be described in detail hereinafter by way of illustration and not limitation with reference to the accompanying drawings. The same reference numbers in the drawings identify the same or similar elements or components. Those skilled in the art will appreciate that the drawings are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram of a method of blockchain data storage according to one embodiment of the present application;
FIG. 2 is a flow diagram of a method of blockchain data storage according to another embodiment of the present application;
FIG. 3 is a block diagram of an apparatus for blockchain data storage according to another embodiment of the present application;
FIG. 4 is a block diagram of a computing device according to another embodiment of the present application;
fig. 5 is a diagram of a computer-readable storage medium structure according to another embodiment of the present application.
Detailed Description
Fig. 1 is a flow chart of a method of blockchain data storage according to one embodiment of the present application. Referring to fig. 1, the method includes:
101: generating an account for the current user in the block chain, and creating an asset under the account, wherein the asset corresponds to any type of data;
in this embodiment, optionally, the created asset refers to any valuable asset, including but not limited to: text, pictures, video, virtual currency, etc., such as original articles, photographic works, etc.
102: randomly generating a pair of keys for encryption and decryption for the data, wherein the keys comprise a first public key and a first private key;
103: encrypting data by using a first public key, generating a corresponding hash value for the encrypted data by a hash algorithm, and encrypting a first private key by using a personal public key of a current user;
104: and storing the encrypted data in a distributed file system, and storing the hash value and the encrypted first private key as transaction information in a block chain.
In this embodiment, optionally, the method further includes:
when transferring assets, the encrypted first private key is obtained from the block chain, the first private key is obtained by decrypting the encrypted first private key by using the personal private key of the current user, and the encrypted first private key is added to the transaction information and stored in the block chain after being encrypted by using the personal public key of the asset transfer receiver.
In this embodiment, optionally, the method further includes:
after the transaction of asset transfer is completed, when the current user or receiver initiates an inquiry request, inquiring transaction information in a block chain by using a personal private key of the user or the receiver; or the like, or, alternatively,
after the transaction for the asset transfer is complete, when an authorized third party initiates an inquiry request, the transaction information is inquired in the blockchain using the private key.
In this embodiment, optionally, the method further includes:
when an unauthorized user initiates an authentication request, the legitimacy of the transfer asset transaction is verified by means of zero knowledge proof.
In this embodiment, optionally, the distributed file system is a decentralized distributed file system or a centralized distributed file system.
The above method provided by this embodiment generates an account for a current user in a blockchain, creates an asset under the account, where the asset corresponds to any type of data, randomly generates a pair of keys for encryption and decryption for the data, where the keys include a first public key and a first private key, encrypts the data using the first public key, generates a corresponding hash value for the encrypted data through a hash algorithm, encrypts the first private key using a personal public key of the current user, stores the encrypted data in a distributed file system, stores the hash value and the encrypted first private key as transaction information in the blockchain, so that the data does not need to be stored in the blockchain, the problem of inefficient and costly storage of the blockchain itself is solved, and the asset is any type of data, and is not limited to virtual currency, and various universal digital assets such as pictures, audio, video, code files and the like are supported, the limitation is overcome, and the application is wider. In addition, the problem of transferring complex assets is solved by storing the first private key used in data decryption in the transaction. Furthermore, privacy protection is carried out on the transaction address and the transaction amount through zero knowledge proof, the privacy problem caused by transparency of the block chain is solved, and privacy protection of related beneficiaries can be realized in the process of creating assets and transferring the assets.
Fig. 2 is a flow chart of a method of blockchain data storage according to another embodiment of the present application. Referring to fig. 2, the method includes:
201: generating an account for the current user in the block chain, and creating an asset under the account, wherein the asset corresponds to any type of data;
the generation of an account is equivalent to the current user creating an identity, for example, creating an address by using bitcoin, thereby facilitating the subsequent operations such as transaction. The created assets mentioned above refer to any valuable assets, and the corresponding data of the assets can be of any type, including but not limited to: text, pictures, video, and virtual currency, such as original articles, photographic works, and the like.
202: randomly generating a pair of keys for encryption and decryption for the data, wherein the keys comprise a first public key and a first private key;
the first public key is used for encrypting the data, and the first private key is used for decrypting the encrypted data.
203: encrypting data by using a first public key, generating a corresponding hash value for the encrypted data by a hash algorithm, and encrypting a first private key by using a personal public key of a current user;
204: storing the encrypted data in a distributed file system, and storing the hash value and the encrypted first private key as transaction information in a block chain;
the distributed File System may be a decentralized distributed File System, such as an IPFS (Inter-planet File System), or a centralized distributed File System, such as an HDFS (Hadoop Distribution File System), and is not particularly limited.
For example, an asset created by a current user is a picture with the size of 1M, the picture is encrypted by using a first public key to generate encrypted data with the size of 0.8M, the encrypted data is stored in a distributed file system, a corresponding hash value is generated for the encrypted data, a first private key is encrypted by using a personal public key of the current user, and then the hash value including only dozens of bytes and the encrypted first private key are stored in a blockchain as transaction information, so that the situation that complex data are directly stored in the blockchain is avoided, the storage space utilization rate of the blockchain is greatly improved, and the cost is reduced. The user can obtain the asset through the hash value and the first private key, if desired.
205: when transferring assets, obtaining an encrypted first private key from the block chain, decrypting the encrypted first private key by using a personal private key of a current user to obtain the first private key, encrypting the encrypted first private key by using a personal public key of an asset transfer receiver, adding the encrypted first private key into transaction information and storing the encrypted first private key in the block chain;
the current user transfers the asset to the receiver, and obtains the personal public key of the receiver in advance, so that the first private key can be encrypted by the current user. The process of executing the Transaction may be implemented by using a UTXO (un-spent Transaction Output) model, or may be implemented by using an account model, which is not specifically limited in this embodiment.
It is worth mentioning that the platform for complex assets in the prior art does not support asset transfer at present, and if the mode of transferring digital money in the block chain is borrowed, other problems are brought, and the practicability is poor. For example, if 1M asset data is transferred, it is not preferable because once the transfer requires billing, and the asset is transferred one thousand times and then 1G of storage space is needed, which results in a large amount of data duplication and redundancy. By storing the encrypted first private key in the transaction, the asset data does not need to be repeatedly created, but only the first private key needs to be transferred, and the first private key is much smaller than the asset data, so that the problem of transferring complex assets is solved.
206: after the transaction of asset transfer is completed, when the current user or receiver initiates an inquiry request, inquiring the transaction information in a block chain by using a personal private key of the user or the receiver; or after the transaction of the asset transfer is completed, when an authorized third party initiates an inquiry request, inquiring the transaction information in the block chain by using the special key;
the transaction information is privacy information of the transaction, and comprises addresses of a sender and a receiver, transaction amount and the like. The current user and the receiver are participants of the transaction, and therefore have a right to view the privacy information, and in addition, an authorized third party also has a right to view the privacy information, and the third party may be an authorized government regulatory department, an auditing department, and the like, which is not specifically limited in this embodiment.
207: when an unauthorized user initiates an authentication request, the legitimacy of the transfer asset transaction is verified by means of zero knowledge proof.
In this embodiment, the zero-knowledge proof can prove the validity of the transaction without revealing any information of the transaction, so that even if an unauthorized user cannot inquire privacy information of the transaction, the validity of the transaction can still be verified through the zero-knowledge proof.
The above method provided by this embodiment generates an account for a current user in a blockchain, creates an asset under the account, where the asset corresponds to any type of data, randomly generates a pair of keys for encryption and decryption for the data, where the keys include a first public key and a first private key, encrypts the data using the first public key, generates a corresponding hash value for the encrypted data through a hash algorithm, encrypts the first private key using a personal public key of the current user, stores the encrypted data in a distributed file system, stores the hash value and the encrypted first private key as transaction information in the blockchain, so that the data does not need to be stored in the blockchain, the problem of inefficient and costly storage of the blockchain itself is solved, and the asset is any type of data, and is not limited to virtual currency, and various universal digital assets such as pictures, audio, video, code files and the like are supported, the limitation is overcome, and the application is wider. In addition, the problem of transferring complex assets is solved by storing the first private key used in data decryption in the transaction. Furthermore, privacy protection is carried out on the transaction address and the transaction amount through zero knowledge proof, the privacy problem caused by transparency of the block chain is solved, and privacy protection of related beneficiaries can be realized in the process of creating assets and transferring the assets.
Fig. 3 is a block chain data storage apparatus structure diagram according to another embodiment of the present application. Referring to fig. 3, the apparatus includes:
a creating module 301 configured to generate an account for a current user in a blockchain, and create an asset under the account, where the asset corresponds to any type of data;
a generation module 302 configured to randomly generate a pair of keys for encryption and decryption for data, including a first public key and a first private key;
an encryption module 303 configured to encrypt data using the first public key, generate a corresponding hash value for the encrypted data through a hash algorithm, and encrypt a first private key using a personal public key of a current user;
a storage module 304 configured to store the encrypted data in the distributed file system, the hash value and the encrypted first private key being stored in the blockchain as transaction information.
In this embodiment, optionally, the encryption module is further configured to:
when transferring assets, the encrypted first private key is obtained from the block chain, the first private key is obtained by decrypting the encrypted first private key by using the personal private key of the current user, and the encrypted first private key is added to the transaction information and stored in the block chain after being encrypted by using the personal public key of the asset transfer receiver.
In this embodiment, optionally, the apparatus further includes:
the inquiry module is configured to use the personal private key of the inquiry module to inquire the transaction information in the block chain when the current user or the receiver initiates an inquiry request after the transaction of the asset transfer is completed; or configured to use the private key to query transaction information in the blockchain when an authorized third party initiates a query request after completion of a transaction for the asset transfer.
In this embodiment, optionally, the apparatus further includes:
a verification module configured to verify the legitimacy of the transfer asset transaction by way of a zero knowledge proof when an unauthorized user initiates a verification request.
In this embodiment, optionally, the distributed file system is a decentralized distributed file system or a centralized distributed file system.
The apparatus provided in this embodiment may perform the method provided in any of the above method embodiments, and details of the process are described in the method embodiments and are not described herein again.
The above apparatus provided in this embodiment creates an account for a current user in a blockchain, creates an asset under the account, where the asset corresponds to any type of data, randomly generates a pair of keys for encryption and decryption for the data, where the keys include a first public key and a first private key, encrypts the data using the first public key, generates a corresponding hash value for the encrypted data through a hash algorithm, encrypts the first private key using a personal public key of the current user, stores the encrypted data in a distributed file system, stores the hash value and the encrypted first private key as transaction information in the blockchain, so that the data does not need to be stored in the blockchain, the problem of inefficient and costly storage of the blockchain itself is solved, and the asset is any type of data, and is not limited to virtual currency, and various universal digital assets such as pictures, audio, video, code files and the like are supported, the limitation is overcome, and the application is wider. In addition, the problem of transferring complex assets is solved by storing the first private key used in data decryption in the transaction. Furthermore, privacy protection is carried out on the transaction address and the transaction amount through zero knowledge proof, the privacy problem caused by transparency of the block chain is solved, and privacy protection of related beneficiaries can be realized in the process of creating assets and transferring the assets.
The above and other objects, advantages and features of the present application will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Embodiments also provide a computing device, referring to fig. 4, comprising a memory 1120, a processor 1110 and a computer program stored in said memory 1120 and executable by said processor 1110, the computer program being stored in a space 1130 for program code in the memory 1120, the computer program, when executed by the processor 1110, implementing the method steps 1131 for performing any of the methods according to the invention.
The embodiment of the application also provides a computer readable storage medium. Referring to fig. 5, the computer readable storage medium comprises a storage unit for program code provided with a program 1131' for performing the steps of the method according to the invention, which program is executed by a processor.
The embodiment of the application also provides a computer program product containing instructions. Which, when run on a computer, causes the computer to carry out the steps of the method according to the invention.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, cause the computer to perform, in whole or in part, the procedures or functions described in accordance with the embodiments of the application. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by a program, and the program may be stored in a computer-readable storage medium, where the storage medium is a non-transitory medium, such as a random access memory, a read only memory, a flash memory, a hard disk, a solid state disk, a magnetic tape (magnetic tape), a floppy disk (floppy disk), an optical disk (optical disk), and any combination thereof.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of blockchain data storage, comprising:
generating an account for a current user in a block chain, and creating assets under the account, wherein the assets correspond to any type of data;
randomly generating a pair of keys for encryption and decryption for the data, wherein the keys comprise a first public key and a first private key;
encrypting the data by using the first public key, generating a corresponding hash value for the encrypted data by a hash algorithm, and encrypting the first private key by using the personal public key of the current user;
storing the encrypted data in a distributed file system, and storing the hash value and the encrypted first private key as transaction information in a blockchain.
2. The method of claim 1, further comprising:
when the assets are transferred, the encrypted first private key is obtained from the block chain, the first private key is obtained by decrypting the first private key through the personal private key of the current user, and the first private key is added to the transaction information and stored in the block chain after being encrypted through the personal public key of the asset transfer receiver.
3. The method of claim 2, further comprising:
after the transaction of the asset transfer is completed, when the current user or the receiver initiates an inquiry request, inquiring the transaction information in a block chain by using a personal private key of the user or the receiver; or the like, or, alternatively,
after the transaction of the asset transfer is completed, when an authorized third party initiates an inquiry request, the transaction information is inquired in the blockchain using the private key.
4. The method of claim 2, further comprising:
when an unauthorized user initiates an authentication request, the legitimacy of the transfer asset transaction is verified by way of zero knowledge proof.
5. The method of any of claims 1-4, wherein the distributed file system is a decentralized distributed file system or a centralized distributed file system.
6. An apparatus for blockchain data storage, comprising:
the system comprises a creating module, a judging module and a processing module, wherein the creating module is configured to generate an account for a current user in a block chain, and create an asset under the account, and the asset corresponds to any type of data;
a generation module configured to randomly generate a pair of keys for encryption and decryption for the data, including a first public key and a first private key;
an encryption module configured to encrypt the data using the first public key, generate a corresponding hash value for the encrypted data through a hash algorithm, and encrypt the first private key using the personal public key of the current user;
a storage module configured to store the encrypted data in a distributed file system, the hash value and the encrypted first private key being stored as transaction information in a blockchain.
7. The apparatus of claim 6, wherein the encryption module is further configured to:
when the assets are transferred, the encrypted first private key is obtained from the block chain, the first private key is obtained by decrypting the first private key through the personal private key of the current user, and the first private key is added to the transaction information and stored in the block chain after being encrypted through the personal public key of the asset transfer receiver.
8. The apparatus of claim 7, further comprising:
a query module configured to query the transaction information in a blockchain using its own personal private key when the current user or the recipient initiates a query request after the transaction of the asset transfer is completed; or configured to use a private key to query the transaction information in a blockchain when an authorized third party initiates a query request after completion of a transaction of the asset transfer.
9. The apparatus of claim 7, further comprising:
a verification module configured to verify the legitimacy of the transfer asset transaction by way of a zero knowledge proof when an unauthorized user initiates a verification request.
10. The apparatus of any of claims 6-9, wherein the distributed file system is a decentralized distributed file system or a centralized distributed file system.
CN202010136128.6A 2020-03-02 2020-03-02 Method and device for storing block chain data Pending CN113342802A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010136128.6A CN113342802A (en) 2020-03-02 2020-03-02 Method and device for storing block chain data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010136128.6A CN113342802A (en) 2020-03-02 2020-03-02 Method and device for storing block chain data

Publications (1)

Publication Number Publication Date
CN113342802A true CN113342802A (en) 2021-09-03

Family

ID=77467281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010136128.6A Pending CN113342802A (en) 2020-03-02 2020-03-02 Method and device for storing block chain data

Country Status (1)

Country Link
CN (1) CN113342802A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116010520A (en) * 2022-12-30 2023-04-25 航天广通科技(深圳)有限公司 Secret data storage method, device, equipment and storage medium based on block chain
CN117574408A (en) * 2024-01-15 2024-02-20 杭州字节方舟科技有限公司 Production data management method and device based on block chain and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200079A (en) * 2018-01-19 2018-06-22 深圳四方精创资讯股份有限公司 Block chain method for secret protection and device based on symmetrical and asymmetric Hybrid Encryption
US20190065764A1 (en) * 2017-08-31 2019-02-28 Gavin Wood Secret Data Access Control Systems and Methods
CN110769035A (en) * 2019-09-23 2020-02-07 北京海益同展信息科技有限公司 Block chain asset issuing method, platform, service node and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190065764A1 (en) * 2017-08-31 2019-02-28 Gavin Wood Secret Data Access Control Systems and Methods
CN108200079A (en) * 2018-01-19 2018-06-22 深圳四方精创资讯股份有限公司 Block chain method for secret protection and device based on symmetrical and asymmetric Hybrid Encryption
CN110769035A (en) * 2019-09-23 2020-02-07 北京海益同展信息科技有限公司 Block chain asset issuing method, platform, service node and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116010520A (en) * 2022-12-30 2023-04-25 航天广通科技(深圳)有限公司 Secret data storage method, device, equipment and storage medium based on block chain
CN117574408A (en) * 2024-01-15 2024-02-20 杭州字节方舟科技有限公司 Production data management method and device based on block chain and electronic equipment

Similar Documents

Publication Publication Date Title
US11449641B2 (en) Integrity of communications between blockchain networks and external data sources
US10992649B2 (en) Systems and methods for privacy in distributed ledger transactions
CA3058013C (en) Managing sensitive data elements in a blockchain network
JP6547079B1 (en) Registration / authorization method, device and system
KR101974075B1 (en) Method and system for verifying ownership of a digital asset using a distributed hash table and a peer-to-peer distributed ledger
US11483161B2 (en) Method for information processing and non-transitory computer readable storage medium
US20190207770A1 (en) Methods for access control of contract data in a distributed system with distributed consensus and contract generator and validation server thereof
KR20180116278A (en) Common information secrets for secure information exchange and hierarchical and deterministic cryptographic keys
US11943350B2 (en) Systems and methods for re-using cold storage keys
KR101985179B1 (en) Blockchain based id as a service
CN110597836B (en) Information inquiry request response method and device based on block chain network
CN115225409B (en) Cloud data safety duplicate removal method based on multi-backup joint verification
KR102359826B1 (en) Digital property code management system based on blockchain and method thereof
WO2021134897A1 (en) Blockchain supply chain transaction hidden dynamic supervision system and method
CN115203749A (en) Data transaction method and system based on block chain
CN113342802A (en) Method and device for storing block chain data
CN108846671B (en) Online secure transaction method and system based on block chain
CN113722749A (en) Data processing method and device for block chain BAAS service based on encryption algorithm
CN117371011A (en) Data hiding query method, electronic device and readable storage medium
WO2024011863A9 (en) Communication method and apparatus, sim card, electronic device, and terminal device
CN111553686A (en) Data processing method and device, computer equipment and storage medium
KR102282788B1 (en) Blockchain system for supporting change of plain text data included in transaction
CN114567476B (en) Data security protection method and device, electronic equipment and medium
CN116318784B (en) Identity authentication method, identity authentication device, computer equipment and storage medium
GB2611084A (en) A security system

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