Medical data security protection method and system based on block chain
By employing a blockchain-based quantum-resistant key encapsulation and sharding storage method, the security and efficient storage issues of medical data storage systems are solved, achieving resistance to quantum computing and high availability, and ensuring data integrity and access control.
Patent Information
- Application Number
- CN202511897147.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-02-06
AI Technical Summary
Existing medical data storage systems face security threats under centralized architecture and quantum computing attacks, as well as problems such as data loss and high storage overhead.
A quantum-resistant key encapsulation mechanism is used to generate a shared key and key-encapsulated ciphertext. After encrypting the data using a symmetric encryption algorithm, the data is stored in fragments in a distributed storage system. The content hash value and recovery information are stored in the blockchain. The data is recovered through threshold reconstruction and quantum-resistant decapsulation operations.
It achieves resistance to quantum computing attacks, improves data fault tolerance and availability, reduces blockchain storage overhead, and ensures high data integrity and transparent, auditable access control.
Smart Images

Figure CN121486085A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer information security technology, and in particular to a blockchain-based method and system for protecting medical data security. Background Technology
[0002] With the digital transformation of healthcare, the rapid growth of data such as electronic health records and medical images has made their secure storage and access crucial. Currently, many healthcare systems rely on centralized cloud storage architectures to store this sensitive data and employ classic public-key cryptography schemes such as RSA and ECC to protect the data transmission and access keys. This centralized architecture exposes massive amounts of medical data to security threats such as data breaches, tampering, and single points of failure. More seriously, with the development of quantum computing technology, Shor's algorithm poses a fundamental threat to existing classic public-key cryptography schemes, rendering data protection schemes relying on these algorithms insecure in the future.
[0003] Therefore, how to provide a security protection method that can resist future quantum computing attacks while ensuring the high availability and integrity of medical data has become an urgent technical challenge. Summary of the Invention
[0004] The main objective of this invention is to provide a blockchain-based method and system for protecting medical data security, aiming to provide a security protection method that can resist future quantum computing attacks while ensuring high availability and high integrity of medical data.
[0005] To achieve the above objectives, this invention proposes a blockchain-based method for protecting medical data security, the method comprising: S1. A quantum-resistant key encapsulation mechanism and the data receiver's public key are used to generate a shared key and key-encapsulated ciphertext. S2. Using the shared key and a symmetric encryption algorithm, encrypt the medical data to obtain the ciphertext; S3. The encrypted data is processed into N data fragments, where N is an integer greater than 1. The N data fragments are configured such that the encrypted data can be reconstructed based on any K data fragments, where K is an integer greater than or equal to 1 and less than or equal to N, and K is used as a threshold parameter. S4. Divide the N data pieces and store them in a distributed storage system; S5. Store the content hash values corresponding to the N data fragments and the recovery information used to determine the threshold parameter K in the blockchain; S6. When a data requester performs data recovery, the data requester obtains the content hash value and the recovery information from the blockchain and determines the threshold parameter K; S7. Based on the content hash value, obtain at least K data fragments from the distributed storage system; S8. Reconstruct the encrypted data based on the at least K data fragments; S9. Encapsulate the ciphertext and the data receiver's private key using the aforementioned key, and recover the shared key through a quantum-resistant key decryption operation; S10. Decrypt the reconstructed ciphertext using the shared key to obtain the medical data.
[0006] Preferably, step S9 includes: after the data requester obtains authorization from the data receiver, the data receiver uses the key to encapsulate the ciphertext and the data receiver's private key to perform the quantum-resistant key decryption operation to recover the shared key; and sending the recovered shared key to the data requester.
[0007] Preferably, the method further includes: storing the key-encapsulated ciphertext in the distributed storage system; and storing the content hash value of the key-encapsulated ciphertext in the blockchain.
[0008] Preferably, the method for processing the encrypted data into N data fragments in step S3 is to use a Shamir secret sharing algorithm; and the method for reconstructing the encrypted data based on the at least K data fragments in step S8 is to use a Lagrange interpolation algorithm.
[0009] Preferably, the quantum key encapsulation resistance mechanism is the ML-KEM algorithm.
[0010] Preferably, the symmetric encryption algorithm is the AES-256 algorithm.
[0011] Preferably, the AES-256 algorithm adopts GCM mode.
[0012] Preferably, the distributed storage system is the InterPlanetary File System (IPFS).
[0013] This application also discloses a blockchain-based medical data security protection system, the system comprising: The key generation module is configured to generate a shared key and key-encapsulated ciphertext using a quantum-resistant key encapsulation mechanism and the data receiver's public key. An encryption module is configured to encrypt medical data using the shared key and a symmetric encryption algorithm to obtain ciphertext data. The data processing module is configured to process the encrypted data into N data fragments, where N is an integer greater than 1. The N data fragments are configured such that the encrypted data can be reconstructed based on any K data fragments, where K is an integer greater than or equal to 1 and less than or equal to N. A distributed storage system configured to store the N data shards; A blockchain is configured to store the content hash values corresponding to the N data shards and recovery information for determining the threshold parameter K; The recovery module is configured to, during data recovery, obtain the content hash value and the recovery information from the blockchain, determine the threshold parameter K, and obtain at least K data shards from the distributed storage system based on the content hash value; The reconstruction module is configured to reconstruct the encrypted data based on the at least K data fragments; The desealing module is configured to encapsulate ciphertext and the data receiver's private key using the key, and recover the shared key through a quantum-resistant key desealing operation; The decryption module is configured to use the shared key to decrypt the reconstructed ciphertext of the data to obtain the medical data.
[0014] Preferably, the data processing module is further configured to use a Shamir secret sharing algorithm to process the ciphertext into the N data fragments; and the reconstruction module is further configured to use a Lagrange interpolation algorithm to reconstruct the ciphertext based on the at least K data fragments.
[0015] The above technical solution has the following advantages: The method provided by this invention, by employing a quantum-resistant key encapsulation mechanism to generate and recover shared keys, ensures that the key negotiation process can resist future quantum computing attacks, achieving end-to-end quantum-resistant security. By processing the encrypted data ciphertext into N data fragments and utilizing the K and N threshold characteristics for storage and reconstruction, the fault tolerance and high availability of the data are significantly improved, avoiding data loss due to single points of failure. At the same time, storing massive amounts of data fragments in a distributed storage system, and storing only metadata such as content hash values and recovery information on the blockchain, greatly reduces the storage overhead of the blockchain and improves the system's storage efficiency. Utilizing the immutability and traceability of the blockchain, the integrity of the data index and the transparency and auditability of access control are also guaranteed. Attached Figure Description
[0016] The present invention will now be described in detail with reference to specific embodiments and accompanying drawings, wherein: Figure 1 A schematic flowchart illustrating a blockchain-based medical data security protection method provided in an embodiment of the present invention; Figure 2 A logical framework diagram of another blockchain-based medical data security protection system provided for embodiments of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and technical features described in this application can be combined with each other. The embodiments described below are preferred and are not intended to limit the invention.
[0018] In current technologies, medical data, such as electronic health records or medical images, typically relies on centralized cloud storage architectures. This exposes the data to various security threats, including data breaches, unauthorized access, and tampering. More seriously, with the development of quantum computing technology, existing classical public-key cryptosystems such as RSA and ECC face the threat of being broken by Shor's algorithm, rendering data protection schemes relying on these algorithms insecure in the future.
[0019] Example 1 This embodiment provides a blockchain-based method for protecting medical data security, aiming to address the security vulnerabilities and future threats in the existing technologies. The method begins with quantum-resistant security for keys and identity. The data recipient, such as the patient who owns the data, first needs to generate a public-private key pair. In this embodiment, this public-private key pair is generated based on a quantum-resistant key encapsulation mechanism. Specifically, it can employ the ML-KEM algorithm from the NISTFIPS 203 standard specification, through a key generation function.
[0020] Generate public key and private key Private key The data is securely stored locally by the data recipient (patient) and will not be disclosed to any other party. Among these, security parameters... The dimension of the lattice is determined. The security of the ML-KEM algorithm is based on the module-lattice fault learning (M-LWE) problem. The algorithm operates on a polynomial ring:
[0021] Among them, ring dimension Modulus .
[0022] To ensure the trusted distribution of public keys, the data recipient can share their public key. Submitted to a certificate issuing authority . After verifying the data recipient's identity, a quantum-resistant signature algorithm, such as ML-DSA, is used to digitally sign the public key and related identity information, generating a digital certificate. The data sender, such as a doctor, can then access the certificate from... Obtain the digital certificate and verify its validity, then extract the public key of the data recipient. .
[0023] In step S1, the data sender uses the quantum-resistant key encapsulation mechanism (such as ML-KEM) and the obtained public key from the data receiver. pk Execute the key encapsulation algorithm:
[0024] Generate a shared key κ and a key-encapsulated ciphertext. .
[0025] In step S2, the sender uses the shared key. And a symmetric encryption algorithm to encrypt the original medical data. Obtain the encrypted data This step can be represented as: .
[0026] To ensure data integrity and authenticity while achieving high-strength encryption, the preferred symmetric encryption algorithm is AES-256, and it adopts GCM mode, namely Galois / counter mode.
[0027] In step S3, considering the encrypted data For example, high-resolution medical images can be very large. Direct storage not only consumes a lot of space, but also results in permanent data loss if the storage node fails, lacking fault tolerance. Therefore, this embodiment uses encrypted data. Perform fault tolerance processing. Encrypt the data... Processed as Data fragmentation, These are integers greater than 1. These data shards are configured using an algorithm to give them... Threshold property, that is: it can be based on any The data fragments are used to reconstruct the encrypted data. , greater than or equal to 1 and less than or equal to 1 Integers.
[0028] In a specific implementation, the processing method is to use a... The threshold-based Shamir secret-sharing algorithm. Before executing the Shamir algorithm, the data can be encrypted first. Dividing data into multiple fixed-size blocks, such as a 128-bit data block, is denoted as: .
[0029] If the data is encrypted If the last digit of a data block is less than 128 bits, it is padded with zeros, and the number of zeros padded is recorded. For each data block... , build a Polynomial of degree:
[0030] in, The coefficients are randomly generated. are fixed prime numbers and This ensures that the data block is suitable for finite field operations. (Through...) Different index points upper polynomial Calculate the medical share by evaluating the value of the medical share. .
[0031] The share components calculated for all data blocks are combined to form N independent binary file shares. .
[0032] In step S4, generate After the data is fragmented, this Data is fragmented and stored in a distributed storage system. This system can be a content-addressed system, such as the InterPlanetary File System (IPFS), thereby leveraging its decentralized nature to improve storage redundancy, availability, and censorship resistance.
[0033] In step S5, in order to subsequently index, verify, and recover these fragments, it is necessary to... The content hash value corresponding to each data shard in the distributed storage system, and the threshold parameter used to determine the data shard. Recovery information, such as The value itself or the pointer The rules governing the values are stored in a blockchain.
[0034] In a preferred embodiment of this invention, the key generated in step S1 encapsulates the ciphertext. It is also stored in the distributed storage system. Furthermore, the key is encapsulated as ciphertext. The corresponding content hash value is also stored in the blockchain. Furthermore, to achieve fine-grained access control, authorized user identity information and metadata such as the zero-padding quantity involved in S3 can also be written into the blockchain's smart contract.
[0035] In step S6, when a data requester, such as a researcher from another hospital, needs to access the medical data, the data recovery process begins. During data recovery, the data requester first interacts with the blockchain and authenticates themselves via a smart contract. After successful authentication, the content hash value, including the hash of the data shards and the hash of the key-encapsulated ciphertext, and the recovery information, are obtained from the blockchain, and a threshold parameter is determined. .
[0036] In step S7, the data requester obtains at least [data] from the distributed storage system based on the acquired content hash value. The data fragments are divided as described above, and the ciphertext is encapsulated using the key. .
[0037] In step S8, the data requester, based on the acquired at least Data fragmentation and reconstruction of the encrypted data In the implementation corresponding to the Shamir algorithm in S3, this reconstruction step specifically employs a Lagrange interpolation algorithm. The data requester indexes each data block. ,use Shares in a data fragment Perform Lagrange interpolation to reconstruct the... Polynomial of degree:
[0038] The data requester computes a polynomial in value at To recover the corresponding data blocks. Finally, the data requester concatenates all the recovered data blocks in sequence and removes the trailing zeros based on the zero-padding information obtained from the smart contract, thereby reconstructing the complete ciphertext. This reconstruction process is computationally intensive and can be performed by the data requester itself, or outsourced to, for example, a proxy miner, to save computing resources on the requesting end.
[0039] In step S9, the ciphertext is reconstructed. After that, you need to obtain the shared key. This is to perform decryption. This step involves the data recipient's private key. To ensure the absolute security of the private key, this step specifically includes: after the data requester obtains explicit authorization from the data receiver (i.e., the patient), the data receiver (patient) encapsulates the ciphertext on its local device using the key obtained by the data requester from IPFS. and the private key of the data recipient stored locally Perform a quantum-resistant key desealing operation To securely recover the shared key. This operation can be represented as The data receiver recovers the shared key. Then, the shared key The data is sent to the requesting party through a secure channel, such as another established PQC channel.
[0040] In step S10, the data requester uses the shared key κ obtained from the data receiver to decrypt the reconstructed ciphertext. For example, AES-256-GCM decryption can be performed to obtain the original medical data M. This decryption process can be represented as follows: .
[0041] This embodiment, through the above steps, implements quantum-resistant cryptography, Threshold fault tolerance processing, distributed storage, and blockchain are organically combined. First, by employing a quantum-resistant key encapsulation mechanism and high-strength symmetric encryption, end-to-end quantum-resistant security for data encryption and key negotiation is ensured, addressing the future security threats faced by classical public-key algorithms in existing technologies. Second, by fragmenting the ciphertext and employing… Thresholds are stored in a distributed system, achieving high fault tolerance and high availability of data; even if some storage nodes fail, the data can still be fully recovered. Furthermore, by storing massive amounts of data (shards) off-chain in IPFS, and only storing the index (hash value) and metadata on the blockchain, the problem of huge storage overhead and inefficiency caused by directly storing massive amounts of data on the blockchain in existing technologies is solved. Finally, leveraging the immutability of blockchain and the characteristics of smart contracts, transparent and auditable access control for data access is achieved, while the process ensures that the data owner (patient) has absolute control over their private key.
[0042] Example 2 Please see Figure 2 This embodiment also provides a blockchain-based medical data security protection system, which is used to execute the methods in the foregoing embodiments. This system can be deployed in a network environment including a data sender 10, a data receiver 30, a data requester 40, and a certificate authority 20.
[0043] The system includes: A key generation module, which can be integrated into the device of the data sender 10, is configured to generate a shared key and key-encapsulated ciphertext using a quantum-resistant key encapsulation mechanism and a public key obtained from the data receiver 30 by the certificate authority 20.
[0044] An encryption module, which can be integrated into the device of the data sender 10, is configured to encrypt medical data using the shared key and a symmetric encryption algorithm to obtain encrypted data.
[0045] A data processing module, which can be integrated into the device of the data sender 10, is configured to process the encrypted data into N data fragments, where N is an integer greater than 1. The N data fragments are configured such that the encrypted data can be reconstructed based on any K data fragments, where K is an integer greater than or equal to 1 and less than or equal to N.
[0046] A distributed storage system 70, such as an IPFS network, is configured to store the N data fragments. As described in Embodiment 1, the distributed storage system 70 can also be used to store the key-encapsulated ciphertext.
[0047] Blockchain 80, on which smart contract 82 runs. Blockchain 80 is configured to store the content hash values corresponding to the N data shards and recovery information used to determine the threshold parameter K. As described in Embodiment 1, blockchain 80 can also be used to store the content hash value of the key-encapsulated ciphertext and authorized user identity information.
[0048] A recovery module, which can be integrated into the device of the data requester 40, is configured to, during data recovery, authenticate via smart contract 82, obtain the content hash value and the recovery information from the blockchain 80, determine the threshold parameter K, and, based on the content hash value, obtain at least K data shards from the distributed storage system 70.
[0049] A reconstruction module, which can be integrated into the device of the data requester 40 or undertaken by a proxy miner, is configured to reconstruct the encrypted data based on the at least K data shards.
[0050] A decryption module, integrated into the local device of the data receiver 30, is configured to, upon receiving an authorization request from the data requester 40, encapsulate the ciphertext and the private key of the data receiver 30 using the aforementioned key, and recover the shared key through a quantum-resistant key decryption operation.
[0051] A decryption module, which can be integrated into the device of the data requester 40, is configured to decrypt the reconstructed ciphertext of the data using the shared key obtained from the data receiver 30, to obtain the medical data.
[0052] In one specific embodiment, the data processing module is further configured to use a Shamir secret sharing algorithm to process the ciphertext into the N data fragments; and the reconstruction module is further configured to use a Lagrange interpolation algorithm to reconstruct the ciphertext based on the at least K data fragments.
[0053] Those skilled in the art should understand that the modules in the above system are divided according to function. In practical applications, the functions of multiple modules can be merged as needed, or the same function can be divided into more detailed sub-modules. For example, the key generation module, encryption module and data processing module can all be integrated into a unified data processing unit of the data sender 10.
[0054] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A blockchain-based method for protecting the security of medical data, characterized in that, The method includes: S1. A quantum-resistant key encapsulation mechanism and the data receiver's public key are used to generate a shared key and key-encapsulated ciphertext. S2. Using the shared key and a symmetric encryption algorithm, encrypt the medical data to obtain the ciphertext; S3. The encrypted data is processed into N data fragments, where N is an integer greater than 1. The N data fragments are configured such that the encrypted data can be reconstructed based on any K data fragments, where K is an integer greater than or equal to 1 and less than or equal to N, and K is used as a threshold parameter. S4. Divide the N data pieces and store them in a distributed storage system; S5. Store the content hash values corresponding to the N data fragments and the recovery information used to determine the threshold parameter K in the blockchain; S6. When a data requester performs data recovery, the data requester obtains the content hash value and the recovery information from the blockchain and determines the threshold parameter K; S7. Based on the content hash value, obtain at least K data fragments from the distributed storage system; S8. Reconstruct the encrypted data based on the at least K data fragments; S9. Encapsulate the ciphertext and the data receiver's private key using the aforementioned key, and recover the shared key through a quantum-resistant key decryption operation; S10. Decrypt the reconstructed ciphertext using the shared key to obtain the medical data.
2. The blockchain-based medical data security protection method as described in claim 1, characterized in that, Step S9 includes: after the data requester obtains authorization from the data receiver, the data receiver uses the key to encapsulate the ciphertext and the data receiver's private key to perform the quantum-resistant key decryption operation to recover the shared key; and sending the recovered shared key to the data requester.
3. The blockchain-based medical data security protection method as described in claim 1, characterized in that, The method further includes: storing the key-encapsulated ciphertext in the distributed storage system; and storing the content hash value of the key-encapsulated ciphertext in the blockchain.
4. The blockchain-based medical data security protection method as described in claim 1, characterized in that, The method for processing the encrypted data into N data fragments in step S3 is to use a Shamir secret sharing algorithm; and the method for reconstructing the encrypted data based on the at least K data fragments in step S8 is to use a Lagrange interpolation algorithm.
5. The blockchain-based medical data security protection method as described in claim 1, characterized in that, The quantum-resistant key encapsulation mechanism is the ML-KEM algorithm.
6. The blockchain-based medical data security protection method as described in claim 1, characterized in that, The symmetric encryption algorithm is the AES-256 algorithm.
7. The blockchain-based medical data security protection method as described in claim 6, characterized in that, The AES-256 algorithm uses GCM mode.
8. The blockchain-based medical data security protection method as described in claim 1, characterized in that, The distributed storage system is the InterPlanetary File System (IPFS).
9. A blockchain-based medical data security protection system, characterized in that, The system includes: The key generation module is configured to generate a shared key and key-encapsulated ciphertext using a quantum-resistant key encapsulation mechanism and the data receiver's public key. An encryption module is configured to encrypt medical data using the shared key and a symmetric encryption algorithm to obtain ciphertext data. The data processing module is configured to process the encrypted data into N data fragments, where N is an integer greater than 1. The N data fragments are configured such that the encrypted data can be reconstructed based on any K data fragments, where K is an integer greater than or equal to 1 and less than or equal to N. A distributed storage system configured to store the N data shards; A blockchain is configured to store the content hash values corresponding to the N data shards and recovery information for determining the threshold parameter K; The recovery module is configured to, during data recovery, obtain the content hash value and the recovery information from the blockchain, determine the threshold parameter K, and obtain at least K data shards from the distributed storage system based on the content hash value; The reconstruction module is configured to reconstruct the encrypted data based on the at least K data fragments; The desealing module is configured to encapsulate ciphertext and the data receiver's private key using the key, and recover the shared key through a quantum-resistant key desealing operation; The decryption module is configured to use the shared key to decrypt the reconstructed ciphertext of the data to obtain the medical data.
10. The blockchain-based medical data security protection system as described in claim 9, characterized in that, The data processing module is further configured to use a Shamir secret sharing algorithm to process the ciphertext into N data fragments; and the reconstruction module is further configured to use a Lagrange interpolation algorithm to reconstruct the ciphertext based on the at least K data fragments.
Citation Information
Patent Citations
Anti-quantum key trusteeship system and method based on alliance block chain
CN113691373A
Distributed key escrow system with password
CN115051797A
Scheduling instruction trusted storage system based on block chain
CN120692016A
Block chain data security storage method based on verifiable secret sharing
CN120785533A
Anti-quantum key packaging method and device, medium and equipment
CN121012615A