Data encryption and sharing method based on block chain
Through blockchain technology and smart contracts, the problems of low security, high trust cost and complex operations in data sharing methods are solved, efficient, secure and flexible sharing of data is achieved, and the trust cost is reduced, providing full traceability operation record.
Patent Information
- Application Number
- CN202411030428.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-13
AI Technical Summary
The existing data sharing methods have problems such as low security, high trust cost and complex operations, which are difficult to meet the current high-standard needs for data security and privacy protection.
Blockchain technology and smart contracts are adopted to ensure data security and flexibility through methods such as generating public-private key pairs, encryption processing, segmented storage keys, smart contracts on-chain storage, automatic access control and multi-party computing.
It realizes efficient, secure and flexible data sharing, reduces trust costs, and provides traceable operation records throughout the process, enhancing the flexibility of data security and sharing process.
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of blockchain technology, data encryption and sharing, and specifically to an innovative method for realizing secure data encryption and flexible sharing by utilizing the tamper-proof and smart contract characteristics of blockchain. Background Art
[0002] With the rapid development of information technology, data sharing has become a key factor in promoting social progress and economic development. However, traditional data sharing methods have serious security risks such as data leakage and tampering, and it is difficult to meet the current high standards for data security and privacy protection. Blockchain technology, as an emerging technology born from the field of digital cryptocurrency, integrates multiple technologies such as P2P networks, cryptography, consensus mechanisms, and smart contracts to achieve a decentralized, distributed, and information-untamperable trust establishment mechanism, providing a new idea for solving the problem of data security sharing. Summary of the invention
[0003] 1. Technical issues The present invention aims to solve the problems of low security, high trust cost, and complex operation in existing data sharing methods, and provides a blockchain-based data encryption and sharing method to achieve efficient, secure, and flexible data sharing.
[0004] Unique public-private key pairs are distributed to users. The private key is kept by the user, and the public key is used for data encryption and identity authentication during the sharing process.
[0005] The system generates necessary system parameters, such as blockchain network configuration, smart contract templates, etc., laying the foundation for subsequent data on-chain and sharing operations.
[0006] The data owner uses the private key to encrypt sensitive data and generate ciphertext. At the same time, in order to enhance security, the encryption key can be stored in a split manner to ensure that even if part of the key is leaked, the entire data system will not be compromised.
[0007] The encrypted data and related information (such as data hash value, access control policy, etc.) are stored in the blockchain account book through smart contracts. The integrity and credibility of the data are ensured by utilizing the immutability of the blockchain.
[0008] Smart contracts are used to automatically verify and execute user data access control policies. Data requesters must obtain consent from the data owner and conduct identity authentication and permission verification through smart contracts on the blockchain.
[0009] If the attributes or conditions of the data requester meet the access control policy set by the data owner, the smart contract will automatically execute the data sharing operation, allowing the data requester to obtain the encrypted data and its decryption key (or the secret share of the decryption key).
[0010] After obtaining the encrypted data and its decryption key (or secret share), the data requester reaches a consensus with the nodes on the blockchain (such as multi-party computing, secret sharing and other mechanisms) to synthesize a complete decryption key.
[0011] The encrypted data is decrypted using the synthesized decryption key to obtain the plaintext data for access and use. During the entire process, all operations are recorded on the blockchain, making the entire process traceable and tamper-proof.
[0012] Improve data security: Through the combination of blockchain's immutability and encryption technology, the high security of data during transmission and storage is ensured.
[0013] Reduce trust costs: Utilize the decentralized nature of blockchain to reduce trust dependence in the data sharing process and reduce trust costs.
[0014] Enhanced data sharing flexibility: Through smart contracts, the user data access control policy can be customized and automatically verified, making data sharing more flexible and convenient.
[0015] Achieve full traceability: All operations are recorded on the blockchain, providing strong evidence for dispute resolution and responsibility tracing during data sharing.
Claims
1. System initialization and key generation: - Initialize the blockchain network and configure network parameters; - Generate a unique public-private key pair for each user in the system. The private key is kept by the user, and the public key is used for identity authentication during data encryption and sharing; - Generate necessary system parameters, such as blockchain network configuration, smart contract templates, etc.
2. Data encryption and on-chain storage: - The data owner uses his or her own private key to encrypt sensitive data and generate ciphertext; - The encrypted data and its related information (including data hash value, access control policy, etc.) are stored in the blockchain ledger through smart contracts to ensure the data is tamper-proof and trustworthy.
3. Data access control policy setting: - Data owners set data access control policies through smart contracts, including the attributes and conditions of data requesters that are allowed to access; - Access control policies are stored on the blockchain for automatic verification during subsequent data sharing.
4. Data sharing request and verification: - The data requester initiates a data sharing request to the blockchain network and submits their own identity attributes and access conditions; - Smart contracts in the blockchain network automatically verify whether the identity attributes and access conditions of the data requester meet the access control policy set by the data owner; - If the verification passes, the data requester is allowed to obtain the encrypted data and its decryption key (or the secret share of the decryption key).
5. Data decryption and access: - The data requester uses the decryption key (or the secret share of the decryption key) to decrypt the encrypted data and obtain the plaintext data; - The data requester accesses and uses the plaintext data, and all operations in the entire process are recorded on the blockchain, making the entire process traceable.
6. The method according to claim 1, characterized in that The data encryption process also includes the following steps: - Separate storage of encryption keys to enhance data security; - Before the data is stored on the chain, the data is hashed to generate a data hash value, and the data hash value is stored on the chain together with the encrypted data.
7. The method according to claim 1, characterized in that The data access control policy setting process also includes the following steps: - Data owners set access control policies through the blockchain network interface or API interface; - Access control policies include but are not limited to the identity attributes, time attributes, geographic location attributes and other conditions of the data requester.
8. The method according to claim 1, characterized in that The data sharing request and verification process also includes the following steps: - The data requester initiates a data sharing request through the blockchain network interface or API interface; - After receiving the data sharing request, the smart contract automatically queries and verifies the access control policy from the blockchain ledger; - If the attributes or conditions of the data requester satisfy the access control policy, the smart contract generates and sends a shared response containing the encrypted data and its decryption key (or a secret share of the decryption key) to the data requester.
9. The method according to claim 1, characterized in that: The following steps are also included: - Regularly audit and verify the data in the blockchain ledger to ensure the integrity and credibility of the data; - Provides data access log query function, allowing data owners to view all operation records during the data sharing process.
