SM2 proxy re-encryption dual method and device for medical cloud data security sharing
By using the SM2 proxy re-encryption dual method, combined with the SM2 elliptic curve and SM4 symmetric encryption algorithms, a proxy re-encryption key bound to a specific message and recipient is generated. This solves the problems of uncontrolled permissions and resource overhead in medical cloud data sharing, and enables efficient and secure data sharing on resource-constrained terminals.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for medical cloud data sharing suffer from problems such as the conflict between privacy protection and sharing efficiency, the risk of uncontrolled permissions, insufficient security, and excessive computing and storage costs, making it difficult to achieve real-time and convenient data sharing on resource-constrained terminals.
By employing the SM2 proxy re-encryption dual method, a proxy re-encryption key bound to a specific message and recipient is generated. This is combined with the SM2 elliptic curve and SM4 symmetric encryption algorithms to achieve non-transferable fine-grained authorization and low resource overhead, ensuring secure data sharing.
It enables efficient and secure sharing of medical cloud data on resource-constrained terminals, prevents unauthorized dissemination of permissions, meets compliance requirements, reduces computing and storage overhead, and has a high level of security.
Smart Images

Figure CN122001641A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security technology, specifically relating to an SM2 proxy re-encryption dual method and device for secure sharing of medical cloud data. Background Technology
[0002] With the rapid development of "Internet + Healthcare," cloud-based medical information systems have become a crucial infrastructure for medical data storage and cross-institutional collaboration. According to the "2023 China Medical Cloud Market Report," the penetration rate of medical cloud services in my country has reached 45%, and the demand for sharing and exchanging key data such as electronic medical records and image reports in the cloud continues to grow rapidly. Against this backdrop, how to achieve secure, efficient, and controllable sharing of medical data while protecting patient privacy has become a core issue that urgently needs to be addressed.
[0003] However, traditional technologies face three main challenges in achieving medical data sharing: First, there is a significant contradiction between privacy protection and sharing efficiency. Traditional technologies typically employ a "download-decrypt-reencrypt" model, requiring the data owner (patient) to complete all decryption and reencryption operations locally, with computational and bandwidth costs accounting for over 60% of terminal resources. This makes the model unsuitable for resource-constrained mobile terminals such as smartphones and wearable devices, hindering real-time and convenient medical data sharing. Second, existing proxy re-encryption schemes pose a risk of uncontrolled access. In traditional proxy re-encryption (PRE) mechanisms, the re-encryption key used to convert ciphertext is generated by the patient and held by a cloud proxy. This key has universal applicability and can convert any ciphertext of the patient. This leads to the possibility of unauthorized transfer or abuse of the key, resulting in the illegal dissemination of patient data access rights and violating the principle of least privilege stipulated in the Personal Information Protection Law. Third, security strength and compliance requirements need to be improved. Most existing PRE (Precision, Reliability, and Implementation) solutions only achieve the security level of Chosen-Plaintext Attack (CPA), failing to defend against more realistic proactive attacks in cloud environments (such as Chosen-Ciphertext Attack (CCA)). Their security models are not robust enough. Furthermore, these solutions generally employ internationally accepted cryptographic algorithms and do not comply with the standards of my country's commercial cryptography management system, making it difficult to meet the mandatory requirements of critical industries such as healthcare and government for independent control and compliance assessment of cryptographic technologies.
[0004] To address the issue of uncontrolled access, the academic community has proposed a dual-form proxy re-encryption (PRE+). Its core principle is to transfer the authority and logic for generating the re-encryption key from the data owner to the data encryptor (i.e., the patient themselves), and to uniquely bind the generated key to a specific message and a designated recipient. This fundamentally eliminates the possibility of arbitrary key transfer, ensuring non-transferability.
[0005] However, existing PRE+ solutions still have limitations that restrict their practical application in medical scenarios: First, they generally rely on computationally expensive bilinear pairing operations, with a single pairing operation taking approximately 12 times longer than SM2 elliptic curve scalar multiplication, making it difficult to achieve real-time response on various medical terminals; second, each piece of medical data requires an independent and complete key generation and management process, which generates significant storage and management overhead when the amount of medical data is large; finally, they fail to fully consider the high-frequency and multi-role sharing characteristics of medical data, resulting in insufficient protection against specific attacks in the system design.
[0006] Therefore, there is an urgent need for a new security solution that can integrate the advantages of PRE+ access control and be deeply optimized for medical cloud data sharing scenarios, so as to truly achieve the core goals of non-transferable fine-grained authorization, low resource consumption, high level of security and full compliance. Summary of the Invention
[0007] To address the aforementioned problems in the existing technology, this invention provides an SM2 proxy re-encryption dual method and apparatus for secure sharing of medical cloud data.
[0008] The technical problem to be solved by this invention is achieved through the following technical solution: In a first aspect, the present invention provides an SM2 proxy re-encryption dual method for secure sharing of medical cloud data, comprising: S10. A third-party organization initializes and publishes the system parameters; the system parameters include those defined based on the SM2 algorithm. Cyclic group of addition and its generators SM4 symmetric encryption algorithm, and multiple cryptographic hash functions; S20, Data owner user A generates their own SM2 public / private key pair. and identity identifier Data receiver user B generates their own SM2 public / private key pair. and identity identifier ; S30, User A, based on their own identity... Private key and current timestamp A reusable session key is generated using cryptographic hash functions and elliptic curve operations. ; S40. User A generates a message random number. And calculate the temporary public key component. Using the session key Encrypted messages Obtain the core ciphertext Using the message random number With its own public key Calculate the encapsulation key and encrypt the session key using the encapsulation key. get And generate a public key that binds to the encrypted component and user A. and the integrity verification label of the encrypted timestamp This ultimately forms the original ciphertext. And upload it to the cloud server; S50, User A generates a random number based on the message. User A's public key And user B's public key Generate proxy re-encryption key Authorize user B to access the message and the proxy re-encryption key Send to the cloud server; S60. The cloud server verifies the integrity of the original ciphertext and re-encrypts the key using the proxy. With the original ciphertext Combine to generate re-encrypted ciphertext And send it to user B; S70, User B decrypts the re-encrypted ciphertext. Get messages ; S80. When user A views the message At that time, user A accessed the original ciphertext. Decrypt to obtain the message .
[0009] Optionally, the third-party organization initializes and discloses system parameters, including: S101, Third-party organizations based on input security parameters Choose a large prime number Determine the finite field specified in the SM2 standard. Generate a Cyclic group of addition ,make for Generators; S102. Define three secure cryptographic hash functions: ; ; ; in, Modulus The positive integer field; S103. Select SM4 as the symmetric encryption algorithm and set the session key validity period. ; S104, System parameters disclosed by third-party organizations .
[0010] Optionally, the session key The generation method is as follows: ; in, for A positive integer, , This represents the current timestamp when the session key was generated. This indicates a concatenation operation. This indicates a scalar multiplication operation.
[0011] Optionally, step S40 specifically includes: S401, Generate message random number , And calculate the temporary public key component. ; S402, Computational Shared Secret ,in This represents user A's public key; using the shared secret Derived Encapsulation Key ;in It is one of the plurality of cryptographic hash functions; S403, Using the encapsulation key Encrypt the session key ,get ; S404, Using the session key Encrypted messages ,get ; S405, Computational Integrity Label ,in Indicates message The corresponding encrypted timestamp, It is one of the plurality of cryptographic hash functions; S406, Forming the original ciphertext and the original ciphertext Uploaded to the cloud server.
[0012] Optionally, the proxy re-encryption key The generation method is as follows: ; in, Indicates a temporary parameter. .
[0013] Optionally, step S60 specifically includes: S601, the cloud server, based on the original ciphertext Recalculate and will and If compared, Then the cloud server will perform the subsequent re-encryption steps; S602, The cloud server re-encrypts the agent key. With the original ciphertext Combine to generate re-encrypted ciphertext ,in ; S603, re-encrypt the ciphertext Send to user B.
[0014] Optionally, user B decrypts the re-encrypted ciphertext. Get messages include: S701, Calculation ,in This represents user B's private key; S702, Utilization Derived Encapsulation Key and obtain the recovered session key. ; S703, Message for Decryption Calculation ; S704, User B verifies the re-encrypted ciphertext. Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
[0015] Optionally, step S80 includes: S801, Calculation ,in This represents user A's private key; S802, Utilization Derived Encapsulation Key and obtain the recovered session key. ; S803, Message for Decryption Calculation ; S804, User A verifies the original ciphertext. Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
[0016] Secondly, the present invention provides an SM2 proxy re-encryption dual device for secure sharing of medical cloud data, used to execute the above-described SM2 proxy re-encryption dual method for secure sharing of medical cloud data, including: An initialization module, deployed at a third-party organization, is used to generate and publish system parameters; The key generation module is used to generate SM2 public and private key pairs for data owner user A. and identity identifier Generate your own SM2 public / private key pair for data recipient user B. and identity identifier and generate session keys. ; The data encryption module, deployed on the data owner's end, is used to generate a message random number. And calculate the temporary public key component. Using the session key Encrypted messages Obtain the core ciphertext Using the message random number Public key of user A Calculate the encapsulation key and encrypt the session key using the encapsulation key. get And generate a public key that binds to the encrypted component and user A. and the integrity verification label of the encrypted timestamp This ultimately forms the original ciphertext. And upload it to the cloud server; The proxy re-encryption key generation module, deployed on the data owner's end, is used to generate a random number based on the message. User A's public key And user B's public key Generate proxy re-encryption key Authorize user B to access the message and the proxy re-encryption key Send to the cloud server; The re-encryption ciphertext generation module, deployed on a cloud server, is used to verify the original ciphertext. The integrity of the key is ensured, and the proxy is re-encrypted. With the original ciphertext Combine to generate re-encrypted ciphertext And send it to user B; The re-encrypted ciphertext decryption module, deployed on the data user's end, is used to decrypt the re-encrypted ciphertext. Get messages ; The original ciphertext decryption module, deployed on the data owner's terminal, is used to decrypt the original ciphertext. Decrypt and retrieve the message. .
[0017] Optionally, the key generation module includes a data owner terminal module and a data receiver terminal module, which operate independently on the data owner terminal and the data receiver terminal, respectively.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Non-transferability: The SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in this invention is based on message random numbers. User A's public key And user B's public key To generate proxy re-encryption keys To authorize user B to access messages Thus Designed to work with specific messages (generated by a message random number). (binding) and specific recipient (by public key) (Binding) Strong association. This mechanism ensures that, even if the cloud server (proxy) collaborates with authorized user B, it cannot generate messages for other unauthorized message recipients (such as users) without the participation of the data owner user A's private key. ) valid proxy re-encryption key This fundamentally prevents the unauthorized dissemination or transfer of access rights, strictly adhering to the "least necessary" authorization principle and effectively addressing the potential risk of uncontrolled access in traditional solutions. Furthermore, this invention re-encrypts the key via a proxy. The generation permissions and core computations remain with the data owner, and are combined with a proxy to re-encrypt the key. The dual binding design with message and receiver (coming soon) By binding to specific messages and specific recipients, it ensures that any transfer of permissions must be explicitly authorized and participated in by the data owner, thereby eliminating unauthorized permission diffusion paths in the system design.
[0019] 2. Low resource overhead: The SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in this invention is based on the identity identifier of data owner user A. Private key and current timestamp A reusable session key is generated using cryptographic hash functions and elliptic curve operations. This allows user A to use the same session key. Encrypting multiple messages avoids the significant key management and encryption computation overhead associated with one-time pad encryption, significantly reducing the overall overhead of encrypting multiple messages. Furthermore, the re-encryption operation performed by the cloud server in this invention requires only a single lightweight elliptic curve point addition operation, taking extremely short time (≤0.5μs). This low computational and low storage overhead allows the method of this invention to run efficiently on resource-constrained medical terminals such as smartphones and wearable devices, achieving a good balance between secure sharing and practical efficiency.
[0020] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description
[0021] Figure 1 This is a flowchart of an SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in an embodiment of the present invention; Figure 2 This is a system model diagram of a remote consultation scenario provided in an embodiment of the present invention; Figure 3 This is a flowchart of a remote consultation scenario provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an SM2 proxy re-encryption dual device for secure sharing of medical cloud data provided in an embodiment of the present invention. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.
[0023] In order to integrate the advantages of PRE+ access control and achieve non-transferable fine-grained authorization, low resource overhead, high level of security and fully compliant medical cloud data sharing, this invention provides an SM2 proxy re-encryption dual method and device for secure sharing of medical cloud data.
[0024] First, the SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in this embodiment of the invention will be described in detail. See also... Figure 1 The method includes the following steps: S10. A third-party organization initializes and publishes the system parameters; the system parameters include those defined based on the SM2 algorithm. Cyclic group of addition and its generators SM4 symmetric encryption algorithm, and multiple cryptographic hash functions.
[0025] Specifically, this step is performed by a neutral third-party organization (such as a health service center). This third-party organization is only responsible for generating and publishing system parameters and verifying user identities; it does not hold, generate, or store any user's private keys, thus fundamentally avoiding the risks of centralized key escrow. This step specifically includes: S101, Third-party organizations based on input security parameters Choose a large prime number Determine the finite field specified in the SM2 standard. Generate a Cyclic group of addition ,make for The generator.
[0026] here, It is Large prime numbers in bits, and According to the preset coefficients of the national cryptographic standard SM2 and Determine the equation of the elliptic curve: Construct a based on this elliptic curve Cyclic group of addition , The elements of are points on the elliptic curve and their operations satisfy the commutative and associative laws. Select . A standard generator G.
[0027] Understandably, my country's independently developed SM2 elliptic curve public-key cryptography algorithm and SM4 block cipher algorithm, as national cryptographic standards, possess high performance and high security. The SM2 standard, at the same security strength, significantly improves efficiency compared to international algorithms such as RSA, with its scalar multiplication operation being much faster than bilinear pairing; the SM4 algorithm, with hardware acceleration, can achieve extremely high data throughput. This lays a solid foundation for building efficient and compliant cryptographic application solutions.
[0028] S102. Define three secure cryptographic hash functions: ; ; ; in, Modulus The positive integer field.
[0029] Understandable, Map a bit string of arbitrary length to a modulo In the embodiments of the present invention, a positive integer, Used to transform elliptic curve groups (i.e., additive cyclic groups) The shared secret in element form is converted into an SM4-recognizable encapsulation key; Will The elements in the mapping are mapped to 128-bit bit strings to adapt to the SM4 key length and generate session keys; In this embodiment of the invention, a bit string of arbitrary length is mapped to a 256-bit bit string. Used to generate integrity verification tags by concatenating ciphertext components, public keys, and timestamps.
[0030] S103. Select SM4 as the symmetric encryption algorithm and set the session key validity period. It should be noted that the validity period can be adjusted according to actual needs, such as setting short-term consultations at 3 days and long-term chronic disease management at 30 days.
[0031] S104, System parameters disclosed by third-party organizations Here, a third-party organization regularly updates the system parameters and, in the event of a security vulnerability in the national cryptographic standard SM2, urgently triggers an update of the system parameters to ensure system security.
[0032] S20, Data owner user A generates their own SM2 public / private key pair. and identity identifier Data receiver user B generates their own SM2 public / private key pair. and identity identifier .
[0033] Specifically, in this embodiment of the invention, user A is typically a patient, whose role is the data owner, and user B is typically a doctor, whose role is the data receiver. In this invention, the key generation process for users A and B is completely decentralized. Specifically, as follows: S201. User A generates their own SM2 public / private key pair. and identity identifier .
[0034] User A randomly selects an integer. ( ) as its private key , And its public key is calculated using elliptic curve scalar multiplication. User A will give the private key The key is securely stored in a trusted execution environment on the mobile phone or in hardware that is resistant to physical theft, such as an encrypted USB key, and its public key is made public. and identity markers This identity identifier The identity information of user A is calculated using the national cryptographic SM3 hash algorithm to achieve identity identification and privacy protection.
[0035] S202, User B generates their own SM2 public / private key pair. and identity identifier .
[0036] Accordingly, user B randomly selects an integer. ( ) as its private key And calculate its public key. User B can share their private key. The key is stored on an encrypted hard drive provided with the doctor's workstation and its public key is made public. and identity markers This identity identifier It is generated by calculating the authoritative professional information such as User B's professional certificate number using the national cryptographic SM3 hash algorithm, and is used by third-party institutions for identity verification.
[0037] S30, User A, based on their own identity... Private key and current timestamp A reusable session key is generated using cryptographic hash functions and elliptic curve operations. .
[0038] Among them, session key The generation method is as follows: ; in, for A positive integer, , This represents the current timestamp when the session key was generated. This indicates a concatenation operation. This indicates a scalar multiplication operation.
[0039] In this embodiment of the invention, the session key This is used for batch encryption of messages (i.e., medical data), thereby solving the overhead problem of one-time key encryption. The specific process is as follows: First, the identity identifier... With current timestamp (Accurate to the second) Concatenate and input. To obtain the intermediate value This binds user identity to time, ensuring session keys are secure. The uniqueness of the key; subsequently, user A uses their private key. (i.e., integer) Performing an elliptic curve scalar multiplication on this intermediate value yields the points on the elliptic curve group. This operation introduces user A's private key. This ensures the session key. This can only be generated by user A (i.e., the data owner); finally, enter this point into... Generate a 128-bit session key. This mechanism will identify users. Private key and current timestamp Binding ensures the session key is secured. The uniqueness and security of the session key. After expiration, users can enter a new timestamp. A new session key is generated, and the original session key becomes invalid.
[0040] S40. User A generates a message random number. And calculate the temporary public key component. Using session keys Encrypted messages Obtain the core ciphertext Using message random numbers With its own public key Calculate the encapsulation key and use it to encrypt the session key. get And generate a public key that binds to the encrypted component and user A. and the integrity verification label of the encrypted timestamp This ultimately forms the original ciphertext. And upload it to the cloud server.
[0041] Specifically, for a given message When user A needs to send this message When uploading to the cloud, step S40 is executed. This step specifically includes: S401, Generate message random number , And calculate the temporary public key component. It is understandable that each encrypted message generates a unique message random number. This ensures that the ciphertext obtained by encrypting the same message multiple times is different, thus guaranteeing semantic security. S402, Computational Shared Secret ,in Represents user A's public key; utilizes shared secrets Derived Encapsulation Key ;in It is one of several cryptographic hash functions; S403, Use the encapsulation key Encrypted session key ,get To protect SK from unauthorized access; S404, Using Session Key Encrypted messages Obtain the core ciphertext ; S405, Computational Integrity Label ,in Indicates message The corresponding encrypted timestamp, It is one of several cryptographic hash functions; understandably, The calculation method binds the ciphertext with the encrypted timestamp. This effectively prevents ciphertext from being altered or replayed. S406, Forming the original ciphertext The original ciphertext is then transmitted via the Transport Security Layer 1.3 protocol. Uploaded to the cloud server.
[0042] It is understood that this invention employs a two-layer encrypted message processing architecture. In the encryption phase, the encapsulation key is first used... Encrypted session key Then use the session key Encrypted messages This architecture ensures that controlled sharing of large amounts of medical data can be achieved by handling only a small encapsulation key during the authorization transfer process. Furthermore, this invention employs an enhanced security integrity verification tag design; the constructed integrity tag binds to the ciphertext component and the public key. With encrypted timestamps, it supports IND-CCA security under a random oracle model, which can resist chosen ciphertext attacks and prevent data tampering and replay.
[0043] S50, User A based on message random number User A's public key And user B's public key Generate proxy re-encryption key Authorize user B to access messages and re-encrypt the agent's key. Send to the cloud server.
[0044] Specifically, when user A needs to authorize user B (usually a doctor) to access messages... When this happens, the user generates a message in step S50. Re-encrypt the key with User B's agent The specific process is as follows: S501, Identity Verification: User A verifies User B's identity through a third-party interface. Its public key The valid binding relationship is verified by calculating the following method: Is it equivalent to a digital certificate? The hash value pre-stored in, among which Includes authoritative professional information of user B (such as physician's professional information); if the verification is successful, proceed to the next step; otherwise, the operation is interrupted. S502, User A based on message random number User A's public key And user B's public key Generate proxy re-encryption key Among them, the proxy re-encryption key The generation method is as follows: ; in, Indicates a temporary parameter. .because , ,therefore, .
[0045] S503, Generate the proxy re-encryption key Then, user A used the AES-256 encryption algorithm to encrypt and protect it, and then securely transmitted the encrypted proxy re-encryption key to the cloud server.
[0046] Understandably, this step is based on message random numbers. User A's public key And user B's public key To generate proxy re-encryption keys Thus Designed to work with specific messages (generated by a message random number). (binding) and specific recipient (by public key) (Binding) Strong association. This mechanism fundamentally prevents the unauthorized dissemination or transfer of access permissions, strictly adheres to the "least necessary" authorization principle, and effectively solves the potential risk of uncontrolled access in traditional solutions.
[0047] S60, cloud server verifies original encrypted text The integrity of the key will be ensured, and the proxy will re-encrypt the key. With the original ciphertext Combine to generate re-encrypted ciphertext And send it to user B.
[0048] Here, the cloud server acts as a semi-trusted proxy, performing only lightweight conversions. Specifically, this includes: S601, cloud server based on original ciphertext Recalculate and will and If compared, If so, the cloud server will perform subsequent re-encryption steps; if If so, the cloud server will refuse the operation and rewrite the log; S602, the cloud server will proxy the re-encryption key. With the original ciphertext Combine to generate re-encrypted ciphertext ,in ; S603, Re-encrypt the ciphertext Send it to user B, or push it to the doctor's workstation.
[0049] S70, User B decrypts and re-encrypts the ciphertext. Get messages .
[0050] Specifically, when user B needs to view this message If so, perform the following decryption operation to obtain the message. : S701, Calculation ,in This represents user B's private key, i.e. This calculation method can eliminate the connection with the private key. The relevant information is used to recover the shared secret K that was encrypted by user A. S702, Utilization Derived Encapsulation Key and obtain the recovered session key. ; S703, decryption yields the message. ; S704, User B verifies and re-encrypts ciphertext Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
[0051] Specifically, user B recalculates the integrity label. and will With re-encrypted ciphertext In The two are compared; if they match, the verification is successful, and the decrypted message is successfully obtained. That is, to receive the message If there is a discrepancy, a security alert mechanism will be triggered, an exception log will be recorded, and a "data anomaly" message will be sent to the user.
[0052] S80, When user A views the message At that time, user A accessed the original ciphertext. Decrypt to obtain the message Specifically, this includes: S801, Calculation ,in This represents user A's private key, i.e. ; S802, Utilization Derived Encapsulation Key and obtain the recovered session key. ; S803, Message for Decryption Calculation ; S804, User A verifies the original ciphertext Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
[0053] Specifically, user A recalculates the integrity label. and will With the original ciphertext In The two are compared; if they match, the verification is successful, and the decrypted message is obtained. That is, to receive the message If there is a discrepancy, a security alert mechanism will be triggered, an exception log will be recorded, and a "data anomaly" message will be sent to the user.
[0054] Compared with existing technologies, the SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided by this invention has the advantages of non-transferable permissions and low resource overhead. Specifically: 1. Non-transferability: The SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in this invention is based on message random numbers. User A's public key And user B's public key To generate proxy re-encryption keys To authorize user B to access messages Thus Designed to work with specific messages (generated by a message random number). (binding) and specific recipient (by public key) (Binding) Strong association. This mechanism ensures that, even if the cloud server (proxy) collaborates with authorized user B, it cannot generate messages for other unauthorized message recipients (such as users) without the participation of the data owner user A's private key. ) valid proxy re-encryption key This fundamentally prevents the unauthorized dissemination or transfer of access rights, strictly adhering to the "least necessary" authorization principle and effectively addressing the potential risk of uncontrolled access in traditional solutions. Furthermore, this invention re-encrypts the key via a proxy. The generation permissions and core computations remain with the data owner, and are combined with a proxy to re-encrypt the key. The dual binding design with message and receiver (coming soon) By binding to specific messages and specific recipients, it ensures that any transfer of permissions must be explicitly authorized and participated in by the data owner, thereby eliminating unauthorized permission diffusion paths in the system design.
[0055] 2. Low resource overhead: The SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in this invention is based on the identity identifier of data owner user A. Private key and current timestamp A reusable session key is generated using cryptographic hash functions and elliptic curve operations. This allows user A to use the same session key. Encrypting multiple messages avoids the significant key management and encryption computation overhead associated with one-time pad encryption, significantly reducing the overall overhead of encrypting multiple messages. Furthermore, the re-encryption operation performed by the cloud server in this invention requires only a single lightweight elliptic curve point addition operation, taking extremely short time (≤0.5μs). This low computational and low storage overhead allows the method of this invention to run efficiently on resource-constrained medical terminals such as smartphones and wearable devices, achieving a good balance between secure sharing and practical efficiency.
[0056] The following section provides a detailed explanation of the SM2 proxy re-encryption dual method for secure sharing of medical cloud data provided in this invention, taking medical data sharing in a remote consultation scenario as an example.
[0057] See Figure 2 and Figure 3 , Figure 2 The system model in the remote consultation scenario is shown, including a Health Service Center (HSC), which is a third-party institution, Patient A (i.e., the data owner, i.e., user A, referred to as Patient A here), and Doctor B (i.e., the data receiver, i.e. user B, referred to as Doctor B here). The entities communicate through the secure transport layer protocol TLS 1.3. Figure 3 A flowchart illustrating a remote consultation scenario is shown.
[0058] 1. The health service center initializes and publishes system parameters.
[0059] 1.1) Input security parameters =256, and select the parameters specified in the national cryptographic standard SM2, including large prime numbers. , level Coefficients of the equation of an elliptic curve and and generator Coordinates:
[0060] =
[0061] =
[0062]
[0063]
[0064]
[0065] 1.2) Define three secure cryptographic hash functions: The SM3 algorithm is used, i.e. ; The SHA-256 algorithm is used, and the first 128 bits of its output are truncated. (Truncation of the first 128 characters); The SM3 algorithm is used, i.e. .
[0066] 1.3) Select SM4 as the symmetric encryption algorithm and set the session key validity period. The system parameters will be disclosed on the same day.
[0067] 2. Patient A generates their own SM2 public / private key pair. and identity identifier Doctor B generates their own SM2 public / private key pair. and identity identifier .
[0068] 2.1) Patient A (ID number: 440106199001011234) generated: Randomly select a private key:
[0069] Calculate the public key: ; Calculate identity identifier
[0070] 2.2) Doctor B (Practitioner ID: 110440106001234) generated: Randomly select a private key:
[0071] Calculate the public key: ; Calculate identity identifier
[0072] 3. Patient A generates a session key. : Get current timestamp ; Calculate the intermediate value ; Calculation points ; Calculate session key .
[0073] 4. Patient A's encrypted MRI impact report (i.e., as a message) ): information "MRI report: Patient A, male, 34 years old, no obvious abnormalities found in the brain..." (klen=2048bit), encrypted timestamp = ; 4.1) Generate message random numbers
[0074] Calculate the temporary public key component ; 4.2) Computing shared secrets ; Derived encapsulation key: ; 4.3) Encrypted Session Key ,get ; 4.4) Encrypted Messages , ; 4.5) Calculate integrity labels:
[0075] 4.6) Forming the original ciphertext And upload it to the cloud server.
[0076] 5. Patient A generates a proxy re-encryption key. .
[0077] 5.1) Authentication: Verification is performed by calling the interface provided by the health service center. , Digital certificate The pre-stored hash value; if verification is successful, proceed to the next step; 5.2) Calculation ; 5.3) Calculate the proxy re-encryption key
[0078] 5.4) Encrypt using AES-256 and send to the cloud server.
[0079] 6. Re-encrypt the cloud server and generate re-encrypted ciphertext. .
[0080] 6.1) Cloud server recalculation and verify If they are equal, proceed with the next steps; otherwise, the cloud server will refuse the operation and rewrite the log. 6.2) Generate re-encrypted ciphertext
[0081]
[0082] 6.3) Re-encrypt the ciphertext Pushed to Doctor B's workstation.
[0083] 7. Doctor B decrypts the re-encrypted ciphertext. : 7.1) Calculation ; 7.2) Calculation ; ; 7.3) Decrypt to obtain the message =“MRI report: Patient A, male, 34 years old, no obvious abnormalities were found in the brain…”; 7.4) Recalculate integrity labels and verify With re-encrypted ciphertext In If they are equal, then the decrypted message is obtained. It is used for remote consultations.
[0084] 8. Patient A decrypts the original ciphertext. : 8.1) Calculation ; 8.2) Derived Encapsulation Key: ; Restore session key:
[0085] 8.3) Calculate the decrypted message ; 8.4) Recalculate integrity labels and verify With the original ciphertext In If they are equal, then the decrypted message is obtained. Complete the message viewing.
[0086] Understandably, this invention, based on the Decisional Diffie-Hellman (DDH) problem, proves its indistinguishability under Chosen-Ciphertext Attack (IND-CCA) security level under a random oracle model, thus resisting active attacks in cloud environments. This invention effectively prevents data from being tampered with or replayed during transmission or storage by binding ciphertext, public keys, and timestamps with integrity verification tags, comprehensively ensuring the confidentiality, integrity, and controllability of medical data. Furthermore, this invention employs the SM2 / SM4 national cryptographic algorithm, complying with the Cybersecurity Law 2.0 and the requirements for cryptographic applications in the medical industry.
[0087] Corresponding to the above-described SM2 proxy re-encryption dual method for secure sharing of medical cloud data, this embodiment of the invention also provides an SM2 proxy re-encryption dual device for secure sharing of medical cloud data, such as... Figure 4 As shown, the device may include: The initialization module, deployed at a third-party organization, is used to generate and publish system parameters; details are as follows: 1) A third-party organization, based on the input security parameters Choose a large prime number Determine the finite field specified in the SM2 standard. Generate a Cyclic group of addition ,make for Generators; 2) Define three secure cryptographic hash functions: ; ; ; in, Modulus The positive integer field; 3) Select SM4 as the symmetric encryption algorithm and set the session key validity period. ; 4) Third-party organizations disclose system parameters .
[0088] The key generation module is used to generate SM2 public and private key pairs for data owner user A. and identity identifier Generate your own SM2 public / private key pair for data recipient user B. and identity identifier and generate session keys. ; Here, session key The generation method is as follows: ; in, for A positive integer, , This represents the current timestamp when the session key was generated. This indicates a concatenation operation. This indicates a scalar multiplication operation.
[0089] Furthermore, the key generation module includes a data owner terminal module and a data receiver terminal module, which operate independently on the data owner terminal and the data receiver terminal, respectively.
[0090] The data encryption module, deployed on the data owner's end, is used to generate a message random number. And calculate the temporary public key component. Using session keys Encrypted messages Obtain the core ciphertext Using message random numbers Public key of user A Calculate the encapsulation key and use it to encrypt the session key. get And generate a public key that binds to the encrypted component and user A. and the integrity verification label of the encrypted timestamp This ultimately forms the original ciphertext. And uploaded to the cloud server; details are as follows: 1) Generate message random numbers , And calculate the temporary public key component. ; 2) Computing shared secrets ,in Represents user A's public key; utilizes shared secrets Derived Encapsulation Key ;in It is one of several cryptographic hash functions; 3) Use the encapsulation key Encrypted session key ,get ; 4) Use session keys Encrypted messages ,get ; 5) Calculate integrity labels ,in Indicates message The corresponding encrypted timestamp, It is one of several cryptographic hash functions; 6) Forming the original ciphertext and the original ciphertext Uploaded to the cloud server.
[0091] The proxy re-encryption key generation module, deployed on the data owner's end, is used to generate random numbers based on messages. User A's public key And user B's public key Generate proxy re-encryption key Authorize user B to access messages and re-encrypt the agent's key. Send to the cloud server; specifically, the agent re-encrypts the key. The generation method is as follows: ; in, Indicates a temporary parameter. .
[0092] The re-encryption ciphertext generation module, deployed on a cloud server, is used to verify the original ciphertext. of Validity, and after verification, the agent will re-encrypt the key. With the original ciphertext Combine to generate re-encrypted ciphertext And send it to user B; details are as follows: 1) The cloud server uses the original encrypted data. Recalculate and will and If compared, Then the cloud server will perform the subsequent re-encryption steps; 2) The cloud server will proxy the re-encryption key. With the original ciphertext Combine to generate re-encrypted ciphertext ,in ; 3) Re-encrypt the ciphertext Send to user B.
[0093] The re-encrypted ciphertext decryption module, deployed on the data user's end, is used to decrypt re-encrypted ciphertext. Get messages Specifically, this includes: 1) Calculation ,in This represents user B's private key; 2) Utilize Derived Encapsulation Key and obtain the recovered session key. ; 3) Calculate the decrypted message ; 4) User B verifies and re-encrypts the ciphertext. Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
[0094] The original ciphertext decryption module is deployed on the data owner's terminal and is used to decrypt the original ciphertext. Decrypt and retrieve the message. The details are as follows: 1) Calculation ,in This represents user A's private key; 2) Utilize Derived Encapsulation Key and obtain the recovered session key. ; 3) Calculate the decrypted message ; 4) User A verifies the original ciphertext Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
[0095] The SM2 proxy re-encryption dual device for secure sharing of medical cloud data provided by this invention achieves precise access control and anti-proliferation at the system level through modular design and functional isolation. Specifically, the proxy re-encryption key generation module deployed on the data owner's end of the device is based on the message random number generated during the encryption phase. User A's public key and user B's public key To generate proxy re-encryption keys This key is mathematically strongly bound to a specific message and a specific recipient; this mechanism ensures that even if the cloud server (proxy) collaborates with authorized user B, it is impossible to generate a key for other unauthorized message recipients (such as user A) without the participation of the data owner user A's private key. ) valid proxy re-encryption key This fundamentally prevents the unauthorized dissemination or transfer of access rights, strictly adhering to the "least necessary" authorization principle and effectively addressing the potential risk of uncontrolled access in traditional solutions. Furthermore, this invention re-encrypts the key via a proxy. The generation permissions and core computations remain with the data owner, and are combined with a proxy to re-encrypt the key. The dual binding design with message and receiver (coming soon) By binding to specific messages and specific recipients, it ensures that any transfer of permissions must be explicitly authorized and participated in by the data owner, thereby eliminating unauthorized permission diffusion paths in the system design.
[0096] Furthermore, the device of this invention significantly reduces resource consumption on both the terminal and the cloud through efficient algorithm implementation and module collaboration: On the data owner terminal, the key generation module integrates a reusable session key generation mechanism, enabling the same session key to encrypt multiple medical data, avoiding the key management and repeated encryption overhead of one-time pad encryption; on the cloud, the re-encryption ciphertext generation module only needs to perform a lightweight elliptic curve point addition operation and integrity verification once, without the need for complex bilinear pairing, with a single operation time of extremely short duration (≤0.5μs) and extremely low server resource consumption. Each terminal module is implemented based on the national cryptographic SM2 / SM4 algorithm, balancing security and computational efficiency, enabling the device to be stably deployed on resource-constrained terminals such as smartphones and portable medical devices, as well as in large-scale concurrent medical cloud environments, achieving a balance between secure sharing and operational efficiency.
[0097] It should be noted that, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiment.
[0098] It should be noted that the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention.
[0099] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0100] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings and the disclosure in carrying out the claimed invention. In the description of the invention, the word "comprising" does not exclude other components or steps, "a" or "an" does not exclude a plurality, and "a plurality" means two or more, unless otherwise explicitly specified. Furthermore, while different embodiments may describe certain measures, this does not mean that these measures cannot be combined to produce good results.
[0101] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for secure sharing of medical cloud data using SM2 proxy re-encryption duality, characterized in that, include: S10. A third-party organization initializes and publishes the system parameters; the system parameters include those defined based on the SM2 algorithm. Cyclic group of addition and its generators SM4 symmetric encryption algorithm, and multiple cryptographic hash functions; S20, Data owner user A generates their own SM2 public / private key pair. and identity identifier Data receiver user B generates their own SM2 public / private key pair. and identity identifier ; S30, User A, based on their own identity... Private key and current timestamp A reusable session key is generated using cryptographic hash functions and elliptic curve operations. ; S40. User A generates a message random number. And calculate the temporary public key component. Using the session key Encrypted messages Obtain the core ciphertext Using the message random number With its own public key Calculate the encapsulation key and encrypt the session key using the encapsulation key. get And generate a public key that binds to the encrypted component and user A. and the integrity verification label of the encrypted timestamp This ultimately forms the original ciphertext. And upload it to the cloud server; S50, User A generates a random number based on the message. User A's public key And user B's public key Generate proxy re-encryption key Authorize user B to access the message and the proxy re-encryption key Send to the cloud server; S60. The cloud server verifies the integrity of the original ciphertext and re-encrypts the key using the proxy. With the original ciphertext Combine to generate re-encrypted ciphertext And send it to user B; S70, User B decrypts the re-encrypted ciphertext. Get messages ; S80. When user A views the message At that time, user A accessed the original ciphertext. Decrypt to obtain the message .
2. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 1, characterized in that, The third-party organization initializes and discloses system parameters, including: S101, Third-party organizations based on input security parameters Choose a large prime number Determine the finite field specified in the SM2 standard. Generate a Cyclic group of addition ,make for Generators; S102. Define three secure cryptographic hash functions: ; ; ; in, Modulus The positive integer field; S103. Select SM4 as the symmetric encryption algorithm and set the session key validity period. ; S104, System parameters disclosed by third-party organizations .
3. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 2, characterized in that, The session key The generation method is as follows: ; in, for A positive integer, , This represents the current timestamp when the session key was generated. This indicates a concatenation operation. This indicates a scalar multiplication operation.
4. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 3, characterized in that, Step S40 specifically includes: S401, Generate message random number , And calculate the temporary public key component. ; S402, Computational Shared Secret ,in This represents user A's public key; using the shared secret Derived Encapsulation Key ;in It is one of the plurality of cryptographic hash functions; S403, Using the encapsulation key Encrypt the session key ,get ; S404, Using the session key Encrypted messages ,get ; S405, Computational Integrity Label ,in Indicates message The corresponding encrypted timestamp, It is one of the plurality of cryptographic hash functions; S406, Forming the original ciphertext and the original ciphertext Uploaded to the cloud server.
5. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 4, characterized in that, The proxy re-encryption key The generation method is as follows: ; in, Indicates a temporary parameter. .
6. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 5, characterized in that, Step S60 specifically includes: S601, the cloud server, based on the original ciphertext Recalculate and will and If compared, Then the cloud server will perform the subsequent re-encryption steps; S602, The cloud server re-encrypts the agent key. With the original ciphertext Combine to generate re-encrypted ciphertext ,in ; S603, re-encrypt the ciphertext Send to user B.
7. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 6, characterized in that, User B decrypts the re-encrypted ciphertext. Get messages include: S701, Calculation ,in This represents user B's private key; S702, Utilization Derived Encapsulation Key and obtain the recovered session key. ; S703, Message for Decryption Calculation ; S704. User B verifies the re-encrypted ciphertext. Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
8. The SM2 proxy re-encryption dual method for secure sharing of medical cloud data according to claim 4, characterized in that, Step S80 includes: S801, Calculation ,in This represents user A's private key; S802, Utilization Derived Encapsulation Key and obtain the recovered session key. ; S803, Message for Decryption Calculation ; S804, User A verifies the original ciphertext. Upon successful verification of the integrity of the data, the decrypted message is retrieved. Received news .
9. An SM2 proxy re-encryption dual device for secure sharing of medical cloud data, characterized in that, The method for implementing the SM2 proxy re-encryption dual method for secure sharing of medical cloud data as described in any one of claims 1 to 8 includes: An initialization module, deployed at a third-party organization, is used to generate and publish system parameters; The key generation module is used to generate SM2 public and private key pairs for data owner user A. and identity identifier Generate your own SM2 public / private key pair for data recipient user B. and identity identifier and generate session keys. ; The data encryption module, deployed on the data owner's end, is used to generate a message random number. And calculate the temporary public key component. Using the session key Encrypted messages Obtain the core ciphertext Using the message random number Public key of user A Calculate the encapsulation key and encrypt the session key using the encapsulation key. get And generate a public key that binds to the encrypted component and user A. and the integrity verification label of the encrypted timestamp This ultimately forms the original ciphertext. And upload it to the cloud server; The proxy re-encryption key generation module, deployed on the data owner's end, is used to generate a random number based on the message. User A's public key And user B's public key Generate proxy re-encryption key Authorize user B to access the message and the proxy re-encryption key Send to the cloud server; The re-encryption ciphertext generation module, deployed on a cloud server, is used to verify the original ciphertext. The integrity of the key is ensured, and the proxy is re-encrypted. With the original ciphertext Combine to generate re-encrypted ciphertext And send it to user B; The re-encrypted ciphertext decryption module, deployed on the data user's end, is used to decrypt the re-encrypted ciphertext. Get messages ; The original ciphertext decryption module, deployed on the data owner's terminal, is used to decrypt the original ciphertext. Decrypt and retrieve the message. .
10. The SM2 proxy re-encryption dual device for secure sharing of medical cloud data according to claim 9, characterized in that, The key generation module includes a data owner terminal module and a data receiver terminal module, which operate independently on the data owner terminal and the data receiver terminal, respectively.