CN119397578A - Blockchain data management method and system - Google Patents

Blockchain data management method and system Download PDF

Info

Publication number
CN119397578A
CN119397578A CN202411570761.0A CN202411570761A CN119397578A CN 119397578 A CN119397578 A CN 119397578A CN 202411570761 A CN202411570761 A CN 202411570761A CN 119397578 A CN119397578 A CN 119397578A
Authority
CN
China
Prior art keywords
encrypted
electronic file
blockchain
access
operation log
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.)
Withdrawn
Application number
CN202411570761.0A
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.)
Jiangsu Yueouhong Technology Co ltd
Original Assignee
Jiangsu Yueouhong 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 Jiangsu Yueouhong Technology Co ltd filed Critical Jiangsu Yueouhong Technology Co ltd
Priority to CN202411570761.0A priority Critical patent/CN119397578A/en
Publication of CN119397578A publication Critical patent/CN119397578A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • 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/604Tools and structures for managing or administering access control systems
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • G06F21/645Protecting data integrity, e.g. using checksums, certificates or signatures using a third party
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Automation & Control Theory (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a blockchain data management method and a blockchain data management system, which relate to the technical field of blockchains and comprise the steps of receiving and preprocessing an electronic file, encrypting the file by using a public key and calculating a hash value, packaging the encrypted file and the hash value into blockchain transactions and broadcasting, obtaining blockinformation and safely storing a private key, verifying the integrity of the electronic file, recording a full life cycle operation log, storing the log in a link-up and link-down combination mode, conducting electronic file audit, and realizing access authority automatic management based on an intelligent contract. The method improves the safety, traceability and management efficiency of the electronic file.

Description

Block chain data management method and system
Technical Field
The present invention relates to blockchain technologies, and in particular, to a blockchain data management method and system.
Background
The authenticity and the integrity of the electronic file are difficult to ensure in the traditional centralized storage mode. Because the data is stored in a single database in a centralized way, the data is easy to be hacked or tampered by internal personnel, once the data is illegally modified, the data is difficult to discover and trace, and the credibility of the electronic file cannot be ensured.
Second, existing electronic archive management systems lack an effective full lifecycle tracking mechanism. The operations such as uploading, accessing and modifying the electronic files lack complete recording and auditing means, so that the operation history of the files is difficult to accurately restore, and postmortem responsibility and safety management are not facilitated.
Conventional systems are more inflexible in terms of access control and rights management. The access strategy cannot be flexibly adjusted according to the actual service requirement by adopting a static authority configuration mode, and the authority change needs manual intervention, so that the authority management confusion and security loopholes are easy to occur. These problems severely restrict the standardization and credibility of electronic archive management.
Disclosure of Invention
The embodiment of the invention provides a block chain data management method and a block chain data management system, which can solve the problems in the prior art.
In a first aspect of an embodiment of the present invention,
Provided is a blockchain data management method, including:
The method comprises the steps of receiving an electronic file uploaded by a user, preprocessing the electronic file, including format unification and metadata extraction, utilizing an asymmetric encryption algorithm to generate a public key and a private key pair, encrypting the electronic file by using the public key to obtain an encrypted electronic file, calculating a hash value of the encrypted electronic file, packaging the hash value and the encrypted electronic file together into a blockchain transaction, broadcasting the blockchain transaction to a blockchain network, verifying by a consensus node in the blockchain network and packaging the blockchain transaction into a block, obtaining block height and timestamp information of the block after the block is added to the blockchain, encrypting the private key, the block height and the timestamp information, and storing the encrypted private key, the encrypted block height and the encrypted timestamp information in an isolated safe storage area;
The method comprises the steps of receiving an electronic file verification request initiated by a user, wherein the verification request comprises identification information of an electronic file to be verified, positioning a corresponding block and a transaction on a block chain according to the identification information, extracting encrypted electronic files and hash values from the transaction, recalculating the hash values of the encrypted electronic files, comparing the recalculated hash values with the hash values extracted from the transaction, and if the two hash values are consistent, confirming that the encrypted electronic files are not tampered;
Based on the non-tamperable characteristic of a blockchain, recording a full life cycle operation log of an electronic file, comprising uploading, accessing, modifying, verifying and the like, storing the operation log in a chain-up and chain-down combined mode, and concretely comprising the steps of storing a hash value of the operation log on the blockchain, encrypting the complete operation log and storing the complete operation log in a distributed storage system, acquiring the hash value of the operation log on the blockchain and an encrypted operation log in the distributed storage system when the electronic file is required to be checked, verifying the integrity and the authenticity of the encrypted operation log, decrypting the encrypted operation log, generating an operation track and an access history report of the electronic file according to the decrypted operation log, and realizing automatic management of the access authority of the electronic file based on an intelligent contract, wherein the automatic management comprises the steps of setting an access strategy, recording an access request and automatically executing access control.
The pretreatment further comprises:
the electronic file is subjected to virus scanning and sensitive information detection, and is converted into a uniform file format;
Extracting metadata of the electronic archive, including file name, creation time, author and file size;
generating a unique identifier of the electronic archive; the unique identifier is stored in association with the metadata.
The asymmetric encryption algorithm adopts an elliptic curve encryption algorithm and specifically comprises the following steps:
Generating a private key as a large random number;
Calculating a public key by elliptic curve point multiplication; encrypting the electronic archive using the public key;
and fragmenting the private key, and distributing the private key fragments to a plurality of trusted nodes for storage by adopting a threshold key sharing scheme.
The electronic archive integrity verification further comprises:
calculating the merck tree root of the encrypted electronic file; comparing the merck tree root with the merck tree root stored on the blockchain;
If the two merck tree roots are consistent, further verifying each data block of the electronic archive, calculating a hash value of each data block and verifying the position of the data block in the merck tree;
The integrity of the encrypted electronic archive is only confirmed when all data blocks pass verification.
The storage mode of the chain-on-chain-off combination specifically comprises the following steps:
Encrypting the sensitive information, and combining the encrypted sensitive information and the non-sensitive information into a complete operation log;
The method comprises the steps of calculating a hash value of a complete operation log, submitting the hash value to a block chain, storing the complete operation log in a distributed storage system, and recording index information of a storage position on the block chain;
the operation log in the distributed storage system is periodically subjected to integrity check, if abnormality is found, data is immediately recovered from other nodes and index information on the blockchain is updated.
Automated management based on the smart contract implementation further includes:
Defining an access control strategy of the electronic archive in the intelligent contract, wherein the access control strategy comprises role definition, authority level and access condition;
when an access request is received, the intelligent contract automatically verifies the identity and the role of the requesting user, and judges whether to authorize access or not according to a preset access control strategy;
And recording the access request, the judgment result and the token information to the blockchain to ensure traceability.
The adoption of a multi-level encryption scheme specifically comprises the following steps:
Dividing the electronic archive into a plurality of data blocks, and encrypting each data block by using different symmetric encryption keys;
The method comprises the steps of encrypting all symmetric encryption keys by using a public key of an asymmetric encryption algorithm, constructing a Merkle tree containing all encrypted data blocks and the encryption keys, submitting a Merkle tree root hash value and the encrypted symmetric keys to a blockchain;
the asymmetrically encrypted private key is split and distributed to a plurality of authorizing nodes using a threshold cryptographic scheme.
Automated management based on smart contracts further includes a dynamic access control mechanism:
The intelligent contract automatically evaluates whether the user attribute meets the access strategy when the user requests to access the file;
if yes, generating a disposable decryption key and transmitting the decryption key to a user through a secure channel;
the method comprises the steps of realizing a self-adaptive access control strategy, dynamically adjusting an access rule according to an access mode and security threat, analyzing the access mode by utilizing a machine learning algorithm, detecting abnormal access behaviors and triggering a corresponding security response mechanism.
In a second aspect of an embodiment of the present invention,
Providing a blockchain data management system, comprising:
The first unit is used for receiving the electronic file uploaded by the user, and preprocessing the electronic file, including format unification and metadata extraction; the method comprises the steps of generating a public key and a private key pair by utilizing an asymmetric encryption algorithm, encrypting an electronic file by using the public key to obtain an encrypted electronic file, calculating a hash value of the encrypted electronic file, packaging the hash value and the encrypted electronic file together into a blockchain transaction, broadcasting the blockchain transaction to a blockchain network, verifying by a consensus node in the blockchain network and packaging the blockchain transaction into a block, acquiring the block height and timestamp information of the block after the block is added to the blockchain, and storing the private key, the block height and the timestamp information in an isolated safe storage area after being encrypted;
the second unit is used for receiving an electronic file verification request initiated by a user, wherein the verification request comprises identification information of an electronic file to be verified, positioning a corresponding block and a corresponding transaction on a block chain according to the identification information, extracting encrypted electronic files and hash values from the transaction, recalculating the hash values of the encrypted electronic files, comparing the recalculated hash values with the hash values extracted from the transaction, and if the two hash values are consistent, confirming that the encrypted electronic files are not tampered;
The third unit is used for recording the full life cycle operation log of the electronic file based on the non-tamperable characteristic of the blockchain, comprising uploading, accessing, modifying, verifying and the like, storing the operation log in a link-up and link-down combined mode, and concretely comprises the steps of storing the hash value of the operation log on the blockchain, encrypting the complete operation log and storing the complete operation log in a distributed storage system, acquiring the hash value of the operation log on the blockchain and the encrypted operation log in the distributed storage system when the electronic file is required to be checked, verifying the integrity and the authenticity of the encrypted operation log, decrypting the encrypted operation log, generating the operation track and the access history report of the electronic file according to the decrypted operation log, and realizing the automatic management of the access authority of the electronic file based on an intelligent contract, wherein the automatic management comprises the steps of setting an access strategy, recording the access request and automatically executing the access control.
In a third aspect of an embodiment of the present invention,
There is provided an electronic device including:
A processor;
A memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method described previously.
In a fourth aspect of an embodiment of the present invention,
There is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method as described above.
The beneficial effects of the application are as follows:
1. Through the combination of the block chain technology and the asymmetric encryption algorithm, the safe storage and tamper resistance of the electronic file are realized. The method is characterized in that the public key is utilized to encrypt and store the file content, the private key is safely isolated and stored, the authenticity and the integrity of the electronic file are ensured through the non-tamperable characteristic of the blockchain and a hash verification mechanism, and meanwhile, the reliability and the disaster recovery capability of the electronic file storage are improved based on the characteristic of the blockchain distributed storage.
2. The operation log is stored in a mode of combining the links, so that the credibility of log data is guaranteed, and the storage efficiency is improved. The hash value of the operation log is uplink to ensure that the operation log is not tamper-resistant, the whole log is encrypted and stored in a distributed system to save the storage space on the chain, and the operation record of the whole life cycle of the electronic file can be traced through hash verification and decryption, so that the whole electronic file audit function is realized.
3. The electronic file access authority is automatically managed based on the intelligent contract, and the safety and management efficiency of the system are improved. The intelligent contract can automatically execute a preset access strategy, record access requests in real time, effectively control access rights of files, reduce labor management cost and reduce risk of human misoperation.
Drawings
FIG. 1 is a flow chart of a block chain data management method according to an embodiment of the invention;
FIG. 2 is a block chain data management system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. 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.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
FIG. 1 is a flowchart of a blockchain data management method according to an embodiment of the invention, as shown in FIG. 1, the method includes:
S101, receiving an electronic file uploaded by a user, preprocessing the electronic file, including format unification and metadata extraction, generating a public key and a private key pair by utilizing an asymmetric encryption algorithm, encrypting the electronic file by using the public key to obtain an encrypted electronic file, calculating a hash value of the encrypted electronic file, packaging the hash value and the encrypted electronic file together into a blockchain transaction, broadcasting the blockchain transaction to a blockchain network, verifying by a consensus node in the blockchain network and packaging the blockchain transaction into a block, adding the block to the blockchain, acquiring block height and timestamp information of the block, encrypting the private key, the block height and the timestamp information, and storing the encrypted private key, the encrypted block height and the encrypted timestamp information in an isolated safe storage area;
S102, receiving an electronic file verification request initiated by a user, wherein the verification request comprises identification information of an electronic file to be verified, positioning a corresponding block and a corresponding transaction on a block chain according to the identification information, extracting encrypted electronic files and hash values from the transaction, recalculating the hash values of the encrypted electronic files, comparing the recalculated hash values with the hash values extracted from the transaction, and if the two hash values are consistent, confirming that the encrypted electronic files are not tampered;
S103, recording a full life cycle operation log of an electronic file based on the non-tamperable characteristic of a blockchain, wherein the operation log comprises uploading, accessing, modifying, verifying and the like, storing the operation log in a link-up and link-down combined mode, specifically comprising the steps of storing a hash value of the operation log on the blockchain, encrypting the complete operation log and storing the complete operation log in a distributed storage system, acquiring the hash value of the operation log on the blockchain and an encrypted operation log in the distributed storage system when the electronic file is required to be checked, verifying the integrity and the authenticity of the encrypted operation log, decrypting the encrypted operation log, generating an operation track and an access history report of the electronic file according to the decrypted operation log, and realizing automatic management of the access authority of the electronic file based on an intelligent contract, wherein the automatic management comprises the steps of setting an access strategy, recording an access request and automatically executing access control.
The block chain data management method firstly receives an electronic file uploaded by a user. And preprocessing the received electronic file, including format unification and metadata extraction. Format unification is the unified conversion of electronic files of different formats into standard formats, such as PDF. Metadata extraction is to extract key information such as title, author, creation time, etc. from an electronic archive.
Next, a pair of public and private keys is generated using an asymmetric encryption algorithm, such as RSA. And encrypting the preprocessed electronic file by using the generated public key to obtain the encrypted electronic file. For example, for a PDF format contract file, the 2048 bit RSA public key is used to encrypt, resulting in encrypted binary data.
Then, the hash value of the encrypted electronic file is calculated, and hash algorithms such as SHA256 are adopted. And packaging the calculated hash value and the encrypted electronic file together into a blockchain transaction. The transaction data structure contains fields such as transaction ID, encrypted electronic file, hash value, etc.
The encapsulated blockchain transaction is broadcast to a blockchain network. And after the transaction is received, the consensus node in the network verifies, and after the verification is passed, the transaction is packed into the candidate block. The final new block is determined by a consensus algorithm, such as PoW, and added to the blockchain.
After a block is successfully added to the blockchain, the block height and timestamp information for the block is obtained. For example, the block height is 10086 and the timestamp is 1621234567. The previously generated private key is encrypted using a symmetric encryption algorithm such as AES together with the block height, time stamp information and then stored in an isolated secure storage area such as the hardware security module HSM.
When an electronic archive verification request initiated by a user is received, the request contains a unique identification of the electronic archive to be verified, such as an archive ID. Corresponding blocks and transactions are located on the blockchain based on the identification information. The encrypted electronic archive and hash value are extracted from the located transaction.
And (3) recalculating the hash value of the encrypted electronic file, and adopting the same hash algorithm as that used in storage. The calculated new hash value is compared with the original hash value extracted from the transaction. If the two hash values are identical, it can be confirmed that the encrypted electronic file is not tampered with on the blockchain.
And acquiring a corresponding private key from the secure storage area, decrypting the encrypted electronic file by using the private key, and recovering the original electronic file. For example, the encrypted PDF file is decrypted using the stored RSA private key, resulting in the original contract file.
Based on the non-tamperable characteristic of the blockchain, an operation log of the whole life cycle of the electronic file is recorded. The log content includes detailed information of operations such as uploading, accessing, modifying, verifying, etc., such as operation type, operation time, operator, etc. The operation log is stored in a chain-on-chain and chain-off combination mode, namely, the complete operation log is encrypted and then stored in a distributed storage system such as IPFS, the hash value of the operation log is calculated, and the hash value is stored on a blockchain.
When the electronic archive audit is required, firstly, the hash value of the operation log is obtained from the blockchain, and the encrypted complete operation log is obtained from the distributed storage system. And (3) recalculating the hash value of the encrypted operation log, comparing the hash value with the hash value stored in the blockchain, and verifying the integrity and the authenticity of the operation log. And decrypting the operation log by using a preset key, and generating a detailed operation track and an access history report of the electronic file according to the decrypted log content.
And realizing the automatic management of the access rights of the electronic files based on the intelligent contracts. An access policy, such as access rights of users of different roles, is set in the smart contract. When a user requests to access the electronic file, the intelligent contract automatically records the access request and judges whether to allow access according to a preset access strategy. If access is allowed, the smart contract automatically executes corresponding access control logic, authorizing the user to access the electronic archive.
The method has the beneficial effects that:
1. The authenticity and the integrity of the electronic file are ensured through the blockchain technology, the falsification and the forging are prevented, and the credibility and the legal effectiveness of the electronic file are improved.
2. By adopting encryption storage and access control, the security and privacy of the electronic file are protected, and flexible authority management is realized.
3. And the full life cycle operation log is recorded, so that traceability and auditability of the electronic file are realized, and supervision and compliance management are facilitated.
In an alternative embodiment, the preprocessing further comprises:
the electronic file is subjected to virus scanning and sensitive information detection, and is converted into a uniform file format;
Extracting metadata of the electronic archive, including file name, creation time, author and file size;
generating a unique identifier of the electronic archive; the unique identifier is stored in association with the metadata.
In the pretreatment process of the electronic file, firstly, virus scanning and sensitive information detection are carried out on the electronic file. The latest antivirus software can be used for comprehensively scanning the file to detect whether known or unknown malicious programs such as viruses, trojan horses and the like exist. And the sensitive information detection is used for identifying whether the file contains sensitive contents such as personal privacy, business confidentiality and the like in a keyword matching mode, a regular expression mode and the like. If a virus or sensitive information is found, the system gives a warning and performs isolation processing.
The electronic archive is then converted into a unified file format. Depending on the original file type, the system may call the corresponding format conversion module, e.g., converting doc to pdf, xls to csv, etc. The format, style and other information of the original file are reserved in the conversion process, so that the integrity of the content is ensured. The unified format is beneficial to subsequent processing and long-term storage.
Metadata information is then extracted from the electronic archive. The system will parse the file attributes, extract the basic information such as file name, creation time, last modification time, author, file size, etc. For structured documents, content metadata such as titles, summaries, keywords, etc. may also be extracted. The extracted metadata is stored in an XML format, so that subsequent management and retrieval are facilitated.
A unique identifier is then generated for each electronic archive. A UUID algorithm may be used to generate a 32-bit hexadecimal string, such as 550e8400-e29b-41d4-a716-446655440000. The identifier has a global uniqueness and can be used for unique identification and association of the archive.
Finally, the unique identifier is stored in association with the metadata in a database. A profile metadata table may be created using a relational database containing fields for unique identifier, filename, creation time, etc. And the unique identifier is used as a main key to realize one-to-one correspondence between the metadata and the electronic file.
The pretreatment method has the following beneficial effects:
1. Through virus scanning and sensitive information detection, the safety and compliance of the electronic file are guaranteed, and the risk of information leakage is avoided.
2. The file format is unified, metadata is extracted, the efficiency of subsequent management and utilization is improved, and long-term storage of files is facilitated.
3. And generating a unique identifier and storing the unique identifier in association with metadata, so that the accurate positioning and tracing of the electronic file are realized, and the integrity management of the file is facilitated.
In an alternative embodiment, the encryption algorithm adopts elliptic curve encryption algorithm, and specifically includes:
Generating a private key as a large random number;
Calculating a public key by elliptic curve point multiplication; encrypting the electronic archive using the public key;
and fragmenting the private key, and distributing the private key fragments to a plurality of trusted nodes for storage by adopting a threshold key sharing scheme.
In this embodiment, the asymmetric encryption algorithm employs an elliptic curve encryption algorithm to protect the security of the electronic archive. The specific implementation steps are as follows:
first, a safe elliptic curve and base point are selected. The choice of elliptic curve is critical to the security of the encryption system. Standard curves that have been extensively studied and validated, such as the NIST recommended P-256 curve, are typically selected. The curve is defined over a prime number domain, with a modulus of 256 bits. The base point G is selected as a generator on the elliptic curve, the order of G being a large prime number n.
Next, the private key is generated as a large random number. The private key d is a random integer less than n. To ensure the security and randomness of the private key, a cryptographically secure random number generator (CSPRNG) may be used to generate the private key. For example, a 256-bit random number may be generated as a private key using an operating system provided/dev/urandom or CryptGenRandom function.
The public key is then calculated by elliptic curve point multiplication. The public key Q is the scalar product of the private key d and the base point G, i.e. q=d×g. This operation is performed on the elliptic curve, with the result that another point on the curve is obtained. The public key Q consists of two coordinates, x and y, typically expressed in the form of (x, y).
Encrypting the electronic archive using the public key. The encryption process employs an Elliptic Curve Integrated Encryption Scheme (ECIES). First, a temporary private key k is generated for each encryption. R=k×g is then calculated, which is a temporary public key. The shared key s=k×q is then calculated using the public key Q of the receiving party. And (5) inputting the S into a Key Derivation Function (KDF) to obtain the symmetric encryption key and the MAC key. And encrypting the plaintext by using the symmetric encryption key to obtain a ciphertext C. And finally, calculating the MAC value T of the ciphertext. The encryption result consists of R, C and T.
For example, assume that the electronic archive content to be encrypted is "Hello, world-. First a temporary private key k=987654321 is generated. Calculate r=k×g= (0 x. ). S=k×q is then calculated. A KDF is used to derive a 128-bit AES key and a 256-bit HMAC-SHA256 key from S. Encrypting the plaintext by using an AES-CTR mode to obtain ciphertext C. HMAC-SHA256 value T for C was calculated. The final ciphertext is R C T.
And fragmenting the private key, and distributing the private key fragments to a plurality of trusted nodes for storage by adopting a threshold key sharing scheme. The Shamir' S SECRET SHARING scheme is used here for private key fragmentation. A threshold t and a total number of shares n are selected, satisfying t < = n. A polynomial f (x) of degree t-1 is constructed, where f (0) is equal to the private key d. N different values of x are randomly selected, and corresponding y=f (x) is calculated to obtain n key slices (x, y). The n slices are distributed to n trusted nodes for storage, respectively.
For example, a threshold t=3 is set, and the total share n=5. Let private key d=123456789. The quadratic polynomial f (x) =123456789+87654321 x+56789012x2 is randomly constructed. X=1, 2,3,4,5 is selected and the corresponding y value is calculated. Resulting in 5 key fragments (1, 267900122), (2, 468232477), (3, 724453854), (4, 1036564253), (5, 1404563674). The 5 fragments are sent to 5 trusted nodes for storage, respectively.
The scheme has the following beneficial effects:
1. By adopting the elliptic curve encryption algorithm, the key length is greatly reduced and the encryption efficiency is improved while the security is ensured. Compared with RSA algorithm, elliptic curve algorithm can reach the same security strength with shorter key, thus reducing the cost of storage and transmission.
2. The temporary key and the key derivative function are introduced, so that forward security is realized. Even if the temporary key of a certain communication is leaked, the security of other communication is not affected. Meanwhile, the derived symmetric keys are different every time, so that the security of the system is enhanced.
3. The private key is subjected to fragment management by adopting a threshold key sharing scheme, so that the security of the private key is protected, and the usability of the system is improved. The private key can be recovered only by t fragments, and single-point faults are avoided. Meanwhile, an attacker can obtain the private key only by breaking t nodes at the same time, so that the attack difficulty is greatly improved.
In an alternative embodiment, the archive integrity verification further comprises:
calculating the merck tree root of the encrypted electronic file; comparing the merck tree root with the merck tree root stored on the blockchain;
If the two merck tree roots are consistent, further verifying each data block of the electronic archive, calculating a hash value of each data block and verifying the position of the data block in the merck tree;
The integrity of the encrypted electronic archive is only confirmed when all data blocks pass verification.
The integrity verification process of the electronic file specifically comprises the following implementation contents:
The encrypted electronic file is firstly subjected to block processing, and the whole file is divided into a plurality of data blocks according to a fixed size (for example, 4 KB). And calculating the SHA-256 hash value of each data block to generate a corresponding hash character string. In a specific case, assuming that a certain electronic file size is 12KB, the electronic file size can be divided into 3 data blocks of 4KB, and hash values hash1, hash2 and hash3 are calculated respectively.
And then merging the hash values of two adjacent data blocks, recalculating the merged hash values, and sequentially constructing the merck tree upwards. In the above case, the hash12 is obtained by combining and calculating the hash1 and the hash2, and the final merck root hash123 is obtained by combining and calculating the hash12 and the hash 3.
And comparing the calculated merck tree root with the merck tree root stored in advance on the blockchain. If the two values are completely consistent, the next verification is carried out, and if the two values are inconsistent, the electronic file is tampered, and the verification is not passed.
For a verified electronic archive, the integrity of each data block needs to be further verified. The hash value is recalculated for each data block and verified as to whether its position in the merck tree is correct. Taking the above case as an example, it is first verified whether hash1 is located at the first position of the bottommost layer of the merck tree, then it is verified whether hash2 is located at the second position, and finally it is verified whether hash3 is located at the third position.
Only if all the data blocks pass the verification, the integrity of the encrypted electronic file can be finally confirmed. Failure of any one data block to verify means that the archive has been tampered with. The whole verification process adopts a layered verification mode, so that the whole integrity is verified, and the local integrity is ensured.
The scheme has the following beneficial effects:
Firstly, the Merker tree structure is adopted for verification, tampered data blocks can be rapidly positioned, and verification efficiency is improved. By means of hierarchical verification, the specific position can be accurately identified even if part of the data blocks are tampered.
And secondly, the Merker tree root is stored by combining the blockchain, and the reliability of the verification standard is ensured by utilizing the characteristic that the blockchain is not tamperable. Anyone cannot tamper with the merck tree root on the blockchain, thereby ensuring the credibility of the verification result.
And finally, a block verification mode is adopted, so that the overall integrity is verified, the local integrity is ensured, and the verification result is more comprehensive and reliable. Even if only one data block is tampered, the data block can be accurately detected, and verification omission is avoided.
In an alternative embodiment, the storage mode of the link-down combination specifically includes:
Encrypting the sensitive information, and combining the encrypted sensitive information and the non-sensitive information into a complete operation log;
The method comprises the steps of calculating a hash value of a complete operation log, submitting the hash value to a block chain, storing the complete operation log in a distributed storage system, and recording index information of a storage position on the block chain;
the operation log in the distributed storage system is periodically subjected to integrity check, if abnormality is found, data is immediately recovered from other nodes and index information on the blockchain is updated.
The embodiment provides a storage mode for combining a chain with a chain, which specifically comprises the following steps:
First, the operation log is divided into sensitive information and non-sensitive information. The sensitive information may include user privacy data, account passwords and other contents needing special protection, and the non-sensitive information is a common operation record which can be disclosed. For example, for a user log, the user name and IP address may be used as non-sensitive information, while the password belongs to sensitive information.
Next, the sensitive information is subjected to encryption processing. A symmetric encryption algorithm such as AES or an asymmetric encryption algorithm such as RSA may be employed. Taking the AES-256 algorithm as an example, the sensitive data is encrypted using a 256-bit key to obtain ciphertext. And combining the encrypted sensitive information ciphertext with the non-sensitive information plaintext to form a complete operation log.
Then, a hash value of the complete operation log is calculated. Hash algorithms such as SHA-256 may be used to compute a hash value of a fixed length with the oplog content as input. This hash value may uniquely identify the log for subsequent integrity checks.
And submitting the calculated hash value to a blockchain for verification. A public chain supporting intelligent contracts such as ethernet may be selected, and the intelligent contracts may be written to record log hash values. The contract can be provided with data structures such as mapping and the like, and the mapping relation is established between the log ID and the hash value.
At the same time, the complete oplog is stored in a distributed storage system, such as IPFS. IPFS generate a content-addressed hash value for the stored content. The IPFS address hash value is used as index information and is also recorded on the blockchain to be associated with the log hash value.
And performing integrity check on the operation log in the distributed storage system regularly. The log hash value is first obtained from the blockchain, then the complete log content is read from IPFS, and the hash value is recalculated and compared. If an inconsistency is found, the description log may be tampered with.
Once an anomaly is found, the correct log copy is immediately obtained from the other IPFS nodes for recovery. At the same time, IPFS address index information on the blockchain is updated, pointing to the correct copy location. Thus, the damaged data can be repaired in time.
In the whole process, sensitive data always exists in an encrypted form, and even if a distributed storage system is invaded, plaintext cannot be obtained. And the non-sensitive data can be conveniently searched and analyzed. Only hash values and index information are stored on the blockchain, so that the amount of data on the chain is greatly reduced. Meanwhile, the reliable storage and certification of the log are ensured by utilizing the non-tamperable characteristic of the blockchain.
The scheme has the following beneficial effects:
1. the safe storage of the sensitive data and the efficient utilization of the non-sensitive data are realized, and a good balance is achieved between the safety and the practicability.
2. Through the combination of the on-chain certificate and the under-chain storage, the credibility of data is ensured, the storage pressure of the block chain is reduced, and the overall efficiency of the system is improved.
3. The distributed storage and periodic verification mechanism is adopted, so that the availability and the integrity of data are enhanced, and the fault tolerance and the reliability of the system are improved.
In an alternative embodiment, the automated management of the smart contract implementation further comprises:
Defining an access control strategy of the electronic archive in the intelligent contract, wherein the access control strategy comprises role definition, authority level and access condition;
when an access request is received, the intelligent contract automatically verifies the identity and the role of the requesting user, and judges whether to authorize access or not according to a preset access control strategy;
And recording the access request, the judgment result and the token information to the blockchain to ensure traceability.
The electronic archive automation management based on intelligent contracts firstly needs to deploy intelligent contracts in a blockchain system, wherein the intelligent contracts comprise role definition, authority level, access conditions and other access control strategies. Roles can be categorized as system administrators, archive administrators, general users, etc., each with a different level of authority. The authority level includes the operation authority of reading, modifying, deleting, etc. The access conditions include time restrictions, IP address restrictions, etc.
The system registers the user information to the blockchain through the identity authentication module, wherein the user information comprises the basic information such as a user name, a password hash value, a public key and the like. For example, when a user registers three times, the system writes information such as the user name "zhangsan", the password hash value "7e240de74fb1ed08fa08d38063f6a6a91462a815", the role "normal user", and the like into the blockchain. And simultaneously, corresponding roles and authorities are allocated to the users.
When a user initiates an access request, the request contains information such as a user identity, a resource ID of the access request, an operation type and the like. The smart contract first verifies the authenticity of the user's identity by comparing the identity information provided by the user to information stored on the blockchain. For example, the user requests access to profile a001 for three times, and the system verifies that the identity information it provides matches the in-chain registration information.
After the verification is passed, the intelligent contract judges whether to authorize the access according to a preset access control strategy. The determination process includes checking whether the user character has permission to access the resource, checking whether the current time is within a time range in which access is allowed, checking whether the user IP address is within an allowed range, etc. If the ordinary user requests to modify the archive A001, the system checks to find that the ordinary user has only the read right, so that the access is refused.
For requests to allow access, the smart contract generates an access token containing information such as user identity, resource ID, expiration date, etc. The token is signed by adopting an asymmetric encryption algorithm, so that the token is ensured to be untampered. For example, TOKEN-2023120110-A001-READ is generated for Zhang Santa, and the validity period is 1 hour.
The system records access request information (request time, user identity, request resource, etc.), judgment result (permission/rejection), token information, etc. on the blockchain. Such as record "2023-12-01 10:00:00 user zhangsan requests access to A001, authorized access, TOKEN-2023120110-A001-READ".
The access control method has the advantages of 1) automatically executing an access control strategy through an intelligent contract, reducing manual intervention, improving management efficiency, 2) recording access history by utilizing the non-tamperable characteristic of a blockchain, ensuring traceability of access behaviors, and 3) protecting an access token based on cryptography, and ensuring security of access authorization.
In an alternative embodiment, the multi-level encryption scheme specifically includes:
Dividing the electronic archive into a plurality of data blocks, and encrypting each data block by using different symmetric encryption keys;
The method comprises the steps of encrypting all symmetric encryption keys by using a public key of an asymmetric encryption algorithm, constructing a Merkle tree containing all encrypted data blocks and the encryption keys, submitting a Merkle tree root hash value and the encrypted symmetric keys to a blockchain;
the asymmetrically encrypted private key is split and distributed to a plurality of authorizing nodes using a threshold cryptographic scheme.
In an electronic file management system, an electronic file to be processed is first divided according to a preset size, for example, a 100MB PDF document is divided into 100 data blocks according to a 1MB size per block. For each data block, the system dynamically generates a different symmetric encryption key, and encrypts with the AES-256 algorithm. Specifically, a first data block is encrypted using Key Key1, a second data block is encrypted using Key Key2, and so on.
Next, the system generates a pair of public and private key pairs using an RSA-2048 asymmetric encryption algorithm. And encrypting all the generated symmetric encryption keys (Key 1, key2 and the like) by using an RSA public Key to obtain an encrypted cipher text form Key set. For each encrypted data block and the corresponding encryption key, calculating the SHA-256 hash value of the encrypted data block and constructing a Merkle hash tree. For example, for data block 1, hash 1=sha256 (encrypted data block 1||encryption Key 1) is calculated, and data block 2, hash 2=sha256 (encrypted data block 2||encryption Key 2) is calculated. And then pairing adjacent hash values pairwise to calculate upper-layer hash, and finally obtaining Merkle tree root hash value RootHash.
The system submits Merkle tree root hash value RootHash and the encrypted symmetric key set as transaction data to the blockchain network. The blockchain network uses a consensus mechanism to verify and confirm the transaction and then permanently store the data. Thus, confidentiality of data is guaranteed, and verifiability of data integrity is realized.
To achieve secure key management, the system employs a (t, n) threshold scheme to segment the RSA private key. Specifically, the private key is divided into n parts and distributed to n different authorized nodes for keeping, wherein any t authorized nodes can cooperatively reconstruct the complete private key. For example, using the (3, 5) scheme, the private key is divided into 5 shares and distributed to 5 authorized nodes, respectively, wherein any 3 nodes can reconstruct the private key. Thus, even if an individual node fails or is attacked, the normal operation of the system is not affected.
When access to the encrypted electronic archive is required, the user first initiates an application to the authorizing node. After identity authentication and authority verification, at least t authorized nodes cooperate to reconstruct an RSA private key for decrypting the symmetric key. And then decrypting the corresponding data block by using the decrypted symmetric key to finally obtain the original electronic file.
The scheme has the following beneficial effects:
1. the access control of finer granularity is realized through multi-level encryption and block encryption, the data security is improved, and the security of other data blocks is not affected even if part of data is leaked.
2. The block chain and Merkle tree are utilized to realize data integrity verification and tamper resistance, and the trusted storage and verification of the electronic file are ensured.
3. The adoption of the threshold password scheme avoids single-point fault risks, improves the usability and fault tolerance of the system, and simultaneously prevents the risk that the private key is stolen by a single node.
In an alternative embodiment, the smart contract implemented automation management further includes a dynamic access control mechanism:
The intelligent contract automatically evaluates whether the user attribute meets the access strategy when the user requests to access the file;
if yes, generating a disposable decryption key and transmitting the decryption key to a user through a secure channel;
the method comprises the steps of realizing a self-adaptive access control strategy, dynamically adjusting an access rule according to an access mode and security threat, analyzing the access mode by utilizing a machine learning algorithm, detecting abnormal access behaviors and triggering a corresponding security response mechanism.
An automation management system based on intelligent contracts firstly establishes a mapping relation between user attributes and access strategies. The user attribute comprises information such as identity, job level, department attribution, security level and the like, and is stored in an attribute key value pair mode. The access policy is defined by a set of rules including required attribute conditions, attribute combination logic, etc.
The system encodes user attribute information into attribute vectors, one binary bit for each attribute. The access policy is encoded as a policy tree structure, leaf nodes of the tree are attribute conditions, and internal nodes are logical operators. The smart contract stores the encoded attribute vector and the policy tree.
When a user initiates an access request, the smart contract first verifies the legitimacy of the user's identity. And after the verification is passed, extracting attribute vectors of the user, and carrying out matching calculation with an access strategy tree of the file. The system traverses the strategy tree, evaluates the satisfaction condition of the attribute conditions layer by layer and carries out logic combination to finally obtain the access right judging result.
For requests that satisfy the access policy, the system generates a one-time decryption key based on the timestamp and the random number. And encrypting the key by adopting an asymmetric encryption algorithm, and transmitting the key to a user through a secure channel. The system records access events on the blockchain at the same time, and the access events comprise information such as user identification, time stamp, file identification, access type and the like.
The system continuously collects user access behavior data including access time distribution, access file types, access frequency, and the like. And adopting cluster analysis to identify a normal access mode, and discovering the behavior deviating from the normal mode based on an anomaly detection algorithm. When abnormal access is detected, security responses such as access restriction, secondary authentication and the like are triggered.
Based on the analysis result of the access behavior, the system dynamically adjusts the access control policy. Access restrictions are added for high risk users, and access rights are properly relaxed for trusted users. Policy adjustment is performed by smart contracts, ensuring transparency and non-tamper ability of the adjustment process.
In the specific implementation case, the user A has attribute vectors [1, 0,1] which indicate that the user A has manager identity, technical departments and common security levels. The access policy for archive X is "(administrator AND technical division) OR high-level security level", encoded as a policy tree. The system determines that user a satisfies the access condition, generates a decryption key "7d8f9e2a" and encrypts the transmission. The record access log contains information such as user A identification, timestamp "2023-12-01:30:25", archive X identification, and the like.
The method has the beneficial effects that 1) fine attribute access control is realized, data access safety is guaranteed, 2) automatic policy execution and key distribution improve system efficiency, and 3) dynamic self-adaptive access control improves system safety and flexibility.
FIG. 2 is a schematic diagram of a blockchain data management system according to an embodiment of the invention, as shown in FIG. 2, the system includes:
The first unit is used for receiving the electronic file uploaded by the user, and preprocessing the electronic file, including format unification and metadata extraction; the method comprises the steps of generating a public key and a private key pair by utilizing an asymmetric encryption algorithm, encrypting an electronic file by using the public key to obtain an encrypted electronic file, calculating a hash value of the encrypted electronic file, packaging the hash value and the encrypted electronic file together into a blockchain transaction, broadcasting the blockchain transaction to a blockchain network, verifying by a consensus node in the blockchain network and packaging the blockchain transaction into a block, acquiring the block height and timestamp information of the block after the block is added to the blockchain, and storing the private key, the block height and the timestamp information in an isolated safe storage area after being encrypted;
the second unit is used for receiving an electronic file verification request initiated by a user, wherein the verification request comprises identification information of an electronic file to be verified, positioning a corresponding block and a corresponding transaction on a block chain according to the identification information, extracting encrypted electronic files and hash values from the transaction, recalculating the hash values of the encrypted electronic files, comparing the recalculated hash values with the hash values extracted from the transaction, and if the two hash values are consistent, confirming that the encrypted electronic files are not tampered;
The third unit is used for recording the full life cycle operation log of the electronic file based on the non-tamperable characteristic of the blockchain, comprising uploading, accessing, modifying, verifying and the like, storing the operation log in a link-up and link-down combined mode, and concretely comprises the steps of storing the hash value of the operation log on the blockchain, encrypting the complete operation log and storing the complete operation log in a distributed storage system, acquiring the hash value of the operation log on the blockchain and the encrypted operation log in the distributed storage system when the electronic file is required to be checked, verifying the integrity and the authenticity of the encrypted operation log, decrypting the encrypted operation log, generating the operation track and the access history report of the electronic file according to the decrypted operation log, and realizing the automatic management of the access authority of the electronic file based on an intelligent contract, wherein the automatic management comprises the steps of setting an access strategy, recording the access request and automatically executing the access control.
In a third aspect of an embodiment of the present invention,
There is provided an electronic device including:
A processor;
A memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method described previously.
In a fourth aspect of an embodiment of the present invention,
There is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method as described above.
The present invention may be a method, apparatus, system, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for performing various aspects of the present invention.
It should be noted that the above embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present invention.

Claims (10)

1. A method of blockchain data management, comprising:
The method comprises the steps of receiving an electronic file uploaded by a user, preprocessing the electronic file, including format unification and metadata extraction, utilizing an asymmetric encryption algorithm to generate a public key and a private key pair, encrypting the electronic file by using the public key to obtain an encrypted electronic file, calculating a hash value of the encrypted electronic file, packaging the hash value and the encrypted electronic file together into a blockchain transaction, broadcasting the blockchain transaction to a blockchain network, verifying by a consensus node in the blockchain network and packaging the blockchain transaction into a block, obtaining block height and timestamp information of the block after the block is added to the blockchain, encrypting the private key, the block height and the timestamp information, and storing the encrypted private key, the encrypted block height and the encrypted timestamp information in an isolated safe storage area;
The method comprises the steps of receiving an electronic file verification request initiated by a user, wherein the verification request comprises identification information of an electronic file to be verified, positioning a corresponding block and a transaction on a block chain according to the identification information, extracting encrypted electronic files and hash values from the transaction, recalculating the hash values of the encrypted electronic files, comparing the recalculated hash values with the hash values extracted from the transaction, and if the two hash values are consistent, confirming that the encrypted electronic files are not tampered;
Based on the non-tamperable characteristic of a blockchain, recording a full life cycle operation log of an electronic file, comprising uploading, accessing, modifying, verifying and the like, storing the operation log in a chain-up and chain-down combined mode, and concretely comprising the steps of storing a hash value of the operation log on the blockchain, encrypting the complete operation log and storing the complete operation log in a distributed storage system, acquiring the hash value of the operation log on the blockchain and an encrypted operation log in the distributed storage system when the electronic file is required to be checked, verifying the integrity and the authenticity of the encrypted operation log, decrypting the encrypted operation log, generating an operation track and an access history report of the electronic file according to the decrypted operation log, and realizing automatic management of the access authority of the electronic file based on an intelligent contract, wherein the automatic management comprises the steps of setting an access strategy, recording an access request and automatically executing access control.
2. The method of claim 1, wherein the preprocessing further comprises:
the electronic file is subjected to virus scanning and sensitive information detection, and is converted into a uniform file format;
Extracting metadata of the electronic archive, including file name, creation time, author and file size;
generating a unique identifier of the electronic archive; the unique identifier is stored in association with the metadata.
3. The method according to claim 1, wherein the asymmetric encryption algorithm employs an elliptic curve encryption algorithm, and specifically comprises:
Generating a private key as a large random number;
Calculating a public key by elliptic curve point multiplication; encrypting the electronic archive using the public key;
and fragmenting the private key, and distributing the private key fragments to a plurality of trusted nodes for storage by adopting a threshold key sharing scheme.
4. The method of claim 1, wherein the electronic archive integrity verification further comprises:
calculating the merck tree root of the encrypted electronic file; comparing the merck tree root with the merck tree root stored on the blockchain;
If the two merck tree roots are consistent, further verifying each data block of the electronic archive, calculating a hash value of each data block and verifying the position of the data block in the merck tree;
The integrity of the encrypted electronic archive is only confirmed when all data blocks pass verification.
5. The method according to claim 1, wherein the storage means of the link-up-link-down combination specifically comprises:
Encrypting the sensitive information, and combining the encrypted sensitive information and the non-sensitive information into a complete operation log;
The method comprises the steps of calculating a hash value of a complete operation log, submitting the hash value to a block chain, storing the complete operation log in a distributed storage system, and recording index information of a storage position on the block chain;
the operation log in the distributed storage system is periodically subjected to integrity check, if abnormality is found, data is immediately recovered from other nodes and index information on the blockchain is updated.
6. The method of claim 1, wherein the intelligent contract-based implementation of automation management further comprises:
Defining an access control strategy of the electronic archive in the intelligent contract, wherein the access control strategy comprises role definition, authority level and access condition;
when an access request is received, the intelligent contract automatically verifies the identity and the role of the requesting user, and judges whether to authorize access or not according to a preset access control strategy;
And recording the access request, the judgment result and the token information to the blockchain to ensure traceability.
7. The method according to claim 1, characterized in that a multi-level encryption scheme is employed, comprising in particular:
Dividing the electronic archive into a plurality of data blocks, and encrypting each data block by using different symmetric encryption keys;
The method comprises the steps of encrypting all symmetric encryption keys by using a public key of an asymmetric encryption algorithm, constructing a Merkle tree containing all encrypted data blocks and the encryption keys, submitting a Merkle tree root hash value and the encrypted symmetric keys to a blockchain;
the asymmetrically encrypted private key is split and distributed to a plurality of authorizing nodes using a threshold cryptographic scheme.
8. The method of claim 1, wherein the intelligent contract-based implementation of automation management further comprises a dynamic access control mechanism:
The intelligent contract automatically evaluates whether the user attribute meets the access strategy when the user requests to access the file;
if yes, generating a disposable decryption key and transmitting the decryption key to a user through a secure channel;
the method comprises the steps of realizing a self-adaptive access control strategy, dynamically adjusting an access rule according to an access mode and security threat, analyzing the access mode by utilizing a machine learning algorithm, detecting abnormal access behaviors and triggering a corresponding security response mechanism.
9. A blockchain data management system for implementing the method of any of the preceding claims 1-8, comprising:
The first unit is used for receiving the electronic file uploaded by the user, and preprocessing the electronic file, including format unification and metadata extraction; the method comprises the steps of generating a public key and a private key pair by utilizing an asymmetric encryption algorithm, encrypting an electronic file by using the public key to obtain an encrypted electronic file, calculating a hash value of the encrypted electronic file, packaging the hash value and the encrypted electronic file together into a blockchain transaction, broadcasting the blockchain transaction to a blockchain network, verifying by a consensus node in the blockchain network and packaging the blockchain transaction into a block, acquiring the block height and timestamp information of the block after the block is added to the blockchain, and storing the private key, the block height and the timestamp information in an isolated safe storage area after being encrypted;
the second unit is used for receiving an electronic file verification request initiated by a user, wherein the verification request comprises identification information of an electronic file to be verified, positioning a corresponding block and a corresponding transaction on a block chain according to the identification information, extracting encrypted electronic files and hash values from the transaction, recalculating the hash values of the encrypted electronic files, comparing the recalculated hash values with the hash values extracted from the transaction, and if the two hash values are consistent, confirming that the encrypted electronic files are not tampered;
The third unit is used for recording the full life cycle operation log of the electronic file based on the non-tamperable characteristic of the blockchain, comprising uploading, accessing, modifying, verifying and the like, storing the operation log in a link-up and link-down combined mode, and concretely comprises the steps of storing the hash value of the operation log on the blockchain, encrypting the complete operation log and storing the complete operation log in a distributed storage system, acquiring the hash value of the operation log on the blockchain and the encrypted operation log in the distributed storage system when the electronic file is required to be checked, verifying the integrity and the authenticity of the encrypted operation log, decrypting the encrypted operation log, generating the operation track and the access history report of the electronic file according to the decrypted operation log, and realizing the automatic management of the access authority of the electronic file based on an intelligent contract, wherein the automatic management comprises the steps of setting an access strategy, recording the access request and automatically executing the access control.
10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 8.
CN202411570761.0A 2024-11-06 2024-11-06 Blockchain data management method and system Withdrawn CN119397578A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411570761.0A CN119397578A (en) 2024-11-06 2024-11-06 Blockchain data management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411570761.0A CN119397578A (en) 2024-11-06 2024-11-06 Blockchain data management method and system

Publications (1)

Publication Number Publication Date
CN119397578A true CN119397578A (en) 2025-02-07

Family

ID=94422697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411570761.0A Withdrawn CN119397578A (en) 2024-11-06 2024-11-06 Blockchain data management method and system

Country Status (1)

Country Link
CN (1) CN119397578A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119759932A (en) * 2025-03-06 2025-04-04 深圳市实信达科技开发有限公司 A blockchain-based archive information analysis and management system and method
CN119892491A (en) * 2025-03-21 2025-04-25 北京络可英网络科技有限公司 Method and system for storing and verifying decentralized talent background survey data
CN120074935A (en) * 2025-03-03 2025-05-30 北京真视通科技股份有限公司 Synchronous browsing system and method for paperless conference system
CN120110790A (en) * 2025-04-30 2025-06-06 湖南工程学院 Medical image encryption and secure storage method and system based on blockchain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120074935A (en) * 2025-03-03 2025-05-30 北京真视通科技股份有限公司 Synchronous browsing system and method for paperless conference system
CN119759932A (en) * 2025-03-06 2025-04-04 深圳市实信达科技开发有限公司 A blockchain-based archive information analysis and management system and method
CN119892491A (en) * 2025-03-21 2025-04-25 北京络可英网络科技有限公司 Method and system for storing and verifying decentralized talent background survey data
CN120110790A (en) * 2025-04-30 2025-06-06 湖南工程学院 Medical image encryption and secure storage method and system based on blockchain

Similar Documents

Publication Publication Date Title
AU2017269734B2 (en) Cryptologic rewritable blockchain
EP3356988B1 (en) Method and system for verifiable searchable symmetric encryption
US20220253538A1 (en) Method and system for data security, validation, verification and provenance within independent computer systems and digital networks
EP3149651B1 (en) System and method for secure review of audit logs
US10650164B2 (en) System and method for obfuscating an identifier to protect the identifier from impermissible appropriation
KR102055116B1 (en) Data security service
CN112800450B (en) Data storage method, system, device, equipment and storage medium
CN119397578A (en) Blockchain data management method and system
Manthiramoorthy et al. Comparing several encrypted cloud storage platforms
KR20000047643A (en) System for electronic repository of data enforcing access control on data search and retrieval
US11604888B2 (en) Digital storage and data transport system
Junghanns et al. Engineering of secure multi-cloud storage
CN117240452A (en) A blockchain-based secure sharing method for plateau data
Said et al. A multi-factor authentication-based framework for identity management in cloud applications
CN114942729A (en) Data safety storage and reading method for computer system
Ramprasath et al. Protected data sharing using attribute based encryption for remote data checking in cloud environment
Keerthana et al. Slicing, Tokenization, and Encryption Based Combinational Approach to Protect Data-at-Rest in Cloud Using TF-Sec Model
Fugkeaw et al. EVSEB: Efficient and Verifiable Searchable Encryption with Boolean Search for Encrypted Cloud Logs
Shah et al. Third party public auditing scheme for security in cloud storage
Kumari et al. A Review on Challenges of Security for Secure Data Storage in Cloud
EP4123486A1 (en) Systems and methods for improved researcher privacy in distributed ledger-based query logging systems
US20250181742A1 (en) Digital storage and data transport system using file fragments assigned to data storage packets
Lindqvist Privacy preserving audit proofs
Abdulrahman et al. Privacy preservation, sharing and collection of patient records using cryptographic techniques for cross-clinical secondary analytics
Zhao et al. Obric: Oblivious Keyword Search in Hyperledger Fabric Platform

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20250207