Private data protection method and device, equipment, medium and program product
By constructing a multi-node private chain and using proxy re-encryption technology, the problems of key escrow and plaintext leakage are solved, enabling secure sharing and integrity protection of private data.
Patent Information
- Application Number
- CN202511467237.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-02-24
AI Technical Summary
Existing privacy data protection schemes have risks of key escrow and plaintext leakage, which can lead to privacy data breaches.
A multi-node private chain is constructed. The group's proxy nodes generate proxy re-encryption system parameters. The first user generates the first public key and private key, and the second user generates the second public key and private key. The group's proxy nodes receive and re-encrypt the first user's ciphertext, which can be decrypted by the second user. The signature data is bound to the ciphertext to prevent plaintext leakage.
This avoids the risks of key escrow, ensures that private data is shared in encrypted form, reduces the risk of plaintext leakage, and improves data security and integrity.
Smart Images

Figure CN121567348A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information security technology, specifically to a method, apparatus, device, medium, and program product for protecting privacy data. Background Technology
[0002] In related technologies, a protection scheme primarily employs SM2 digital signatures combined with centralized encrypted storage of AES-256-GCM for sensitive privacy information. Specifically, a key management center manages AES and SM2 key pairs. The data owner obtains the SM2 private key and AES symmetric key from the key management center, signs the plaintext using the SM2 private key, and then encrypts the concatenated plaintext and signature using the AES symmetric key to obtain ciphertext. The data owner uploads the ciphertext to an evaluation platform. The evaluation platform obtains the AES symmetric key, decrypts the ciphertext, verifies the validity of the data owner's signature, and then stores the decrypted plaintext and the concatenated signature data in an encrypted database. If a data user needs to access the plaintext, the evaluation platform decrypts the concatenated data and extracts the plaintext, making it accessible to the user.
[0003] Current solutions for protecting privacy data have risks such as key escrow and plaintext leakage, which can lead to privacy data leaks. Summary of the Invention
[0004] To address the shortcomings of related technologies, this disclosure provides a privacy data protection method, apparatus, device, medium, and program product.
[0005] To achieve the above objectives, in a first aspect, this disclosure provides a privacy data protection method, which pre-constructs a private chain comprising multiple nodes, wherein the nodes include a first user, a second user, and a group proxy node, wherein the group proxy node is used to generate proxy re-encryption system parameters, the first user is used to generate a first public key and a first private key, the second user is used to generate a second public key and a second private key, and the first public key and the second public key are stored in the group proxy node, the method comprising: The group agent node receives the encrypted data packet sent by the first user. The encrypted data packet includes a first ciphertext, which is obtained by the first user encrypting the privacy data and the signature data of the privacy data using the first private key. The group agent node re-encrypts the first ciphertext into a second ciphertext using the re-encryption key, which is used by the second user to extract the privacy data from the second ciphertext using the second private key. The re-encryption key is generated by the first user based on the first private key, the second public key, and the agent re-encryption system parameters.
[0006] Secondly, this disclosure provides a privacy data protection device that pre-constructs a private chain including multiple nodes, wherein the nodes include a first user, a second user, and a group agent node. The group agent node generates agent re-encryption system parameters. The first user generates a first public key and a first private key, and the second user generates a second public key and a second private key. The first public key and the second public key are stored in the group agent node. The device includes: The acquisition module is used for the group agent node to receive the encrypted data packet sent by the first user. The encrypted data packet includes a first ciphertext, which is obtained by the first user encrypting the privacy data and the signature data of the privacy data using the first private key. The re-encryption module is used by the group agent node to re-encrypt the first ciphertext into a second ciphertext using the re-encryption key, and by the second user to extract the privacy data from the second ciphertext using the second private key. The re-encryption key is generated by the first user based on the first private key, the second public key, and the agent re-encryption system parameters.
[0007] Thirdly, this disclosure provides a privacy data processing method, applied to obtaining privacy data from a second ciphertext in the method provided in the first aspect; the method includes: The second user obtains the second ciphertext from the private chain; The second user decrypts the second ciphertext using the second private key to obtain the decrypted data; The second user obtains the proxy public key from the private chain and uses the proxy public key to verify the validity of the signature data in the decrypted data; If the signature data is verified, the second user extracts the privacy data from the decrypted data.
[0008] Fourthly, this disclosure provides an electronic device, comprising: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the method described in the first or third aspect.
[0009] Fifthly, this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first or third aspect.
[0010] In a sixth aspect, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first or third aspect.
[0011] Using the above technical solution, the first user's first private key does not need to be uploaded to the group's agent node, avoiding the risk of key escrow. The group's agent node re-encrypts the first ciphertext generated by the first user, converting it into second ciphertext that the second user can decrypt using their second private key. In this way, private data can be shared by the data owner with the data user in ciphertext form, solving the problem of plaintext leakage.
[0012] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0013] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart illustrating a privacy data protection method according to an exemplary embodiment of the present disclosure.
[0014] Figure 2 This is another flowchart illustrating a privacy data protection method according to an exemplary embodiment of the present disclosure.
[0015] Figure 3 This is another flowchart illustrating a privacy data protection method according to an exemplary embodiment of the present disclosure.
[0016] Figure 4 This is a flowchart illustrating a privacy data processing method according to an exemplary embodiment of the present disclosure.
[0017] Figure 5 This is a block diagram illustrating a privacy data protection device according to an exemplary embodiment of the present disclosure.
[0018] Figure 6 This is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0019] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0020] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0021] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the relevant concepts or technologies is given first: SM2 is a Chinese national cryptographic algorithm that uses a public-key encryption and private-key decryption mechanism. It features a 256-bit key length and recommended curve parameters based on the prime number field. The encryption, decryption, and proxy re-encryption provided in this disclosure can be based on the SM2 algorithm.
[0022] SM3 is a cryptographic hash function standard formulated by China's national cryptographic standards. In this embodiment, hash comparison can be performed using SM3.
[0023] EUF-CMA security: Existential Unforgeability under Adaptive Chosen-Message Attacks, is the core security attribute of digital signatures, and SM2 signatures in the scheme must meet this requirement.
[0024] IND-CPA security: Indistinguishability under Chosen-Plaintext Attack, is the core security attribute of encryption algorithms. The SM2 encryption and one-way PRE in the scheme must meet this requirement.
[0025] AHP weight matrix: The core parameter in the Analytic Hierarchy Process (AHP) can be used to determine the weight of each qualitative indicator in 5G evaluation. For example, the indicator weights in the scoring data M in this embodiment can come from the AHP weight matrix to support the subsequent calculation of the total score.
[0026] PBFT consensus: Practical Byzantine Fault Tolerance consensus mechanism, which can tolerate ≤1 / 3 node failures and is suitable for the trusted environment of private blockchains.
[0027] This disclosure involves four types of roles: Evaluation Expert (EXP), Group Agent Node (PROXY), Evaluation Statistician (STAT), and Private Chain Node Cluster. These four roles are described below.
[0028] Evaluation experts (hereinafter referred to as experts) generate structured scoring data for qualitative indicators of 5G scenarios, and complete signing and encryption before uploading. These qualitative indicators include policy matching degree, technology adaptability, and operational feasibility. The keys involved on the evaluation expert's side include the SM2 signature private key (sk...). exp SM2 public key (pk) exp The algorithms involved in the evaluation by experts include the SM2 cryptographic algorithm and the SM3 hash algorithm.
[0029] The group's proxy node acts as an agent for the proxy re-encryption process, performing ciphertext conversion without handling any plaintext data. The keys involved on the group's proxy node side include the proxy re-encryption system public key (PK). sys ), Proxy private key (sk proxy (For re-encryption only). The algorithms involved on the group agent node side include an SM2-based agent re-encryption algorithm.
[0030] The evaluator (hereinafter referred to as the evaluator) decrypts the ciphertext re-encrypted by the agent, verifies the expert signature, and calculates the total score for the 5G scenario evaluation based on the weight matrix. The keys involved on the evaluator's side include the SM2 decryption private key (sk...). stat ), decrypt public key (pk) stat The algorithms involved in the evaluation statistics include SM2 signature verification and weighted summation calculation.
[0031] The private blockchain node cluster enables immutable storage of encrypted, signed, and re-encrypted records, providing consensus and auditing capabilities. The node types involved in the private blockchain node cluster include: 1 Orderer (for record keeping and ordering transactions), 3 Endorsers (for endorsement and cryptographic verification), and 1 Auditor (for on-chain traceability). The algorithm involved in the private blockchain node cluster includes an optimized PBFT consensus mechanism.
[0032] Current 5G industry application evaluations are generally based on a weighted fusion model (such as the analytic hierarchy process) of quantitative indicators (e.g., 5G air interface latency and uplink bandwidth) and qualitative indicators. Among these, expert scoring data in the qualitative indicators is highly sensitive privacy information, so a scheme combining SM2 digital signatures with AES-256-GCM centralized encrypted storage is currently used to protect the data.
[0033] Specifically, the group key management system generates SM2 key pairs (pk) for experts. exp , sk exp ) and AES-256-GCM symmetric key K exp Experts generated structured scoring data M based on qualitative indicators for 5G scenarios. The signature value σ was then obtained by signing M using SM2. exp Then use the symmetric key K exp For M||σ exp Perform AES-256-GCM encryption to generate ciphertext C. exp =Enc(K exp , M||σ exp Next, the experts will analyze the encrypted text C. exp Uploaded to the group's assessment platform, the platform obtains the key by calling the key decryption mechanism DEM. exp Decrypting ciphertext C exp Post-verification expert signature σ expThe validity of M||σ exp The data is stored in an encrypted database; when the statistician needs to calculate the average score, the platform decrypts the data and extracts the score value, which the statistician then combines with the weight matrix to calculate the final score.
[0034] The disadvantages of this protection scheme include: Key escrow risk: The key management center centrally manages all experts' AES keys. exp This poses risks such as single point of failure leading to key leakage and unauthorized decryption by administrators, violating the principle of least privilege in cryptography.
[0035] Privacy risk: The platform needs to decrypt M||s to verify the signature, which means that the scoring data exists in plaintext on the platform side, which poses a semantic security risk of data theft by insiders.
[0036] Missing granularity in statistical authorization: The plaintext M involves a weighted summation model, so the M obtained by the statistician after decryption contains both the expert's score and the model itself, resulting in overexposure of the data.
[0037] The foundation of trust in data integrity is weak: centralized databases can only prevent tampering at the storage layer, but cannot resist malicious data replacement on the platform side, such as modifying an expert's score. Furthermore, they lack the ability to trace tampering throughout the entire data lifecycle, and once a dispute arises, it is impossible to prove the originality of the data through technical means.
[0038] As mentioned in the background section, current privacy protection solutions suffer from risks such as key escrow and plaintext leakage, leading to the leakage of private data. To protect the security of private data, this disclosure provides a privacy data protection method, apparatus, device, medium, and program product. The first user's private key is kept solely by themselves, eliminating the risk of escrow. Therefore, apart from the second user being able to decrypt and obtain the private data, other users (including agents) cannot obtain the private data and signature data, reducing the risk of plaintext leakage.
[0039] In the privacy data protection method provided in this disclosure embodiment, a private chain including multiple nodes is pre-built. The nodes include a first user, a second user, and a group agent node. The group agent node is used to generate agent re-encryption system parameters, the first user is used to generate a first public key and a first private key, the second user is used to generate a second public key and a second private key, and the first public key and the second public key are stored in the group agent node.
[0040] Figure 1 This is a flowchart illustrating a privacy data protection method according to an exemplary embodiment of this disclosure. Figure 1 As shown, the method may include the following steps: Step S11: The group agent node receives the encrypted data packet sent by the first user. The encrypted data packet includes the first ciphertext, which is obtained by the first user encrypting the privacy data and the signature data of the privacy data using the first private key.
[0041] Before step S11, the first user signs the privacy data using the first public key to obtain signed data; the first user encrypts the signed data and the privacy data using the first private key to generate the first ciphertext; the first user sends the encrypted data packet to the group agent node, and the encrypted data packet includes the first ciphertext.
[0042] Understandably, the first user signs and then encrypts the data, ensuring that the signed data is transmitted in encrypted form. This allows data users (such as the second user) to obtain the signed data at the same time as obtaining the private data, thus verifying the source of the private data and preventing it from being tampered with by other users.
[0043] In some embodiments, the encrypted data packet also includes a timestamp, a hash value of the signature data, and a first public key. That is, the first public key can be transmitted from the first user to the group agent node when transmitting the encrypted data packet. The first private key is only kept by the first user; the group agent node cannot obtain the first private key and therefore cannot decrypt the first ciphertext, so privacy data is not exposed to the group agent node. The timestamp can be used by the group agent node to verify whether the timestamp is within the valid time window of the evaluation task. If the verification passes, step S12 is executed; if the verification fails, the group agent node refuses to execute subsequent operations, generates an error log, and uploads it to the blockchain. The hash value of the signature data is used for subsequent fast on-chain verification, avoiding the computational cost of full signature verification.
[0044] Step S12: The group agent node re-encrypts the first ciphertext into a second ciphertext using the re-encryption key, which is used by the second user to extract privacy data from the second ciphertext using the second private key. The re-encryption key is generated by the first user based on the first private key, the second public key, and the agent re-encryption system parameters.
[0045] Using the above technical solution, the first user's first private key does not need to be uploaded to the group's agent node, avoiding the risk of key escrow. The group's agent node re-encrypts the first ciphertext generated by the first user, converting it into second ciphertext that the second user can decrypt using their second private key. In this way, private data can be shared by the data owner with the data user in ciphertext form, solving the problem of plaintext leakage.
[0046] In some embodiments, the group proxy node is also used to generate a proxy public key and a proxy private key. The proxy public key is exposed to the private blockchain. After the first ciphertext is re-encrypted into the second ciphertext using the re-encryption key, as described above... Figure 2 As shown, the method also includes: Step S21: The group agent node signs the set of the first ciphertext and the second ciphertext using the agent's private key to obtain the agent signature.
[0047] Step S22: The group agent node generates a re-encrypted data packet based on the agent signature, the second ciphertext, the unique identifier of the re-encryption key, and the hash value of the first ciphertext.
[0048] The proxy private key is used only to generate the proxy signature, while the proxy public key is used to verify the validity of the proxy signature. Setting a proxy signature can protect against tampering during re-encryption operations.
[0049] Specifically, in order to enable a second user to decrypt the first ciphertext without the first user sharing the first private key, the first user generates a re-encryption key based on the first private key, the second public key, and the parameters of the proxy re-encryption system. The group proxy node re-encrypts the first ciphertext into the second ciphertext using the re-encryption key, so that the second user can decrypt the second ciphertext using the second private key and obtain the private data therein.
[0050] In some embodiments, the node further includes an endorsement node and an ordering node, the endorsement node storing encrypted data packets sent by the first user, and the method further includes: The group's agent node sends the re-encrypted data packet to the endorsement node for verification. If the verification passes, the endorsement node generates an endorsement signature for the re-encrypted data packet and submits the endorsement signature, the encrypted data packet, and the re-encrypted data packet to the sorting node for generating an ordered transaction list.
[0051] Specifically, the verification of the endorsing node includes: verifying the format of the second ciphertext, verifying the validity of the proxy signature based on the proxy public key, and confirming whether the first ciphertext and the second ciphertext are related.
[0052] The aforementioned verification is used by the endorsing node to ensure the legitimacy of the re-encrypted data packet. After successful verification, the endorsing node simulates the transaction, generates the execution result, and signs it. In some embodiments, the endorsing node generates a response message and sends it to the group agent node. Upon receiving the response message from the endorsing node, the group agent node also first verifies the endorsing node's signature to ensure the information's legitimacy. Then, the group agent node submits the endorsement signature, the encrypted data packet, and the re-encrypted data packet to the sorting node.
[0053] In some embodiments, the entire data uploading process generates a notarized log, which is stored separately on the blockchain. Therefore, the data uploading process can be traced, and the data uploaded to the blockchain cannot be tampered with, which helps to solve the problem of weak trust foundation for data integrity.
[0054] In some embodiments, after the re-encrypted data packet is uploaded to the blockchain, the second user may execute the privacy data processing method described below. Specifically, the privacy data processing method is as follows: Figure 3 As shown, it includes: Step S31: The second user obtains the second ciphertext from the private chain.
[0055] Step S32: The second user decrypts the second ciphertext using the second private key to obtain the decrypted data.
[0056] Step S33: The second user obtains the proxy public key from the private chain and verifies the validity of the signature data in the decrypted data using the proxy public key.
[0057] Step S34: If the signature data verification is successful, the second user extracts the privacy data from the decrypted data.
[0058] In this embodiment, the signature data is bound to the first ciphertext, ensuring that the converted second ciphertext also contains the signature data. This allows the second user to verify the data source by checking the signature data after decrypting the ciphertext. Specifically, if the signature data verification passes, it indicates the privacy data originates from the first user, and the second user can use the privacy data. If the signature data verification fails, it indicates the privacy data source is unknown, and the second user can discard the privacy data or report an anomaly to the private blockchain. This embodiment, through the structure of binding signature data to ciphertext (the first and second ciphertexts), prevents nodes other than the second user from directly obtaining the signature data, thus preventing tampering and exposing the signature data. Furthermore, the signature verification process does not require operation by the group's proxy nodes, helping to reduce the risk of the group's proxy nodes leaking privacy data. This protects the privacy data and its source, improving the security of the privacy data.
[0059] In some embodiments, a second user obtains multiple different second ciphertexts corresponding to multiple different first users, and the second user decrypts these second ciphertexts to obtain the privacy data corresponding to each first user. For example... Figure 4 As shown, privacy data processing methods also include: Step S41: The second user extracts the score and indicator weight of each first user from multiple privacy data from different first users.
[0060] Step S42: The second user calculates the weighted sum of the score and the indicator weight to obtain the total indicator score, which represents the total score of different first users for the 5G scenario.
[0061] Step S43: The second user packages the total indicator score and the signature data of the total indicator score and uploads them to the private chain for authorized nodes on the private chain to query.
[0062] This embodiment is applied to protect the indicator weights and scores of 5G scenarios to prevent such data leakage. Since this type of data does not require manual decryption by experts, but is directly decrypted by a second user after being re-encrypted, the weighted calculation is performed to obtain the result, thus reducing statistical latency in high-concurrency scenarios and improving the efficiency of 5G evaluation.
[0063] To help those skilled in the art better understand the methods described above, the following detailed explanation will be based on an example of applying the methods to a traceable security system that includes experts, group agent nodes, statisticians, and private chain node clusters.
[0064] The execution process of this embodiment is divided into five stages: system initialization, scoring data generation and encryption, proxy re-encryption, private chain on-chain notarization, and statistician decryption and calculation.
[0065] Phase 1: System initialization.
[0066] Step 1-1: Proxy Re-encryption System Parameter Generation: The group proxy node (PROXY) generates the SM2-based proxy re-encryption system parameters params=(p, G, q, e, H), where p is a large prime number (usually ≥256 bits); p defines the finite field containing the elliptic curve; G is the base point of the elliptic curve; q is the order of G, used to limit the private key space; e is a bilinear mapping; and H is the secure hash function SM3. Simultaneously, the group proxy node generates a proxy key pair (pk...). proxy , sk proxy ), pk proxy From public to private chain, sk proxy Secure storage, including PK proxy Equivalent to a proxy public key, sk proxy It is equivalent to a proxy private key.
[0067] Step 1-2: User key distribution.
[0068] (1) The evaluation expert EXP generates a personal SM2 key pair (pk exp , sk exp ), pk exp Submitted to the group's proxy node, sk exp The expert EXP is securely stored in a high-security password product and cannot be exported; among them, pk exp Equivalent to the first user's first public key, sk exp It is equivalent to the first user's first private key.
[0069] (2) The statistician STAT generates an SM2 key pair (pk stat , sk stat ), pk stat Submitted to the group's proxy node, skstat The STAT is securely stored in a highly secure cryptographic product by the statistician, and can only be accessed by decryption operations. Among these, pk... stat This is equivalent to the second user's second public key, sk stat It is equivalent to the second user's second private key.
[0070] Steps 1-3: Re-encryption key pre-generation: Expert EXP based on params, using the statistician STAT's pk stat Combined with SM3 hashing, a re-encryption key rk is generated. exp→stat This is used for subsequent ciphertext conversion and is not disclosed to any user. The re-encryption key is represented as: rk exp→stat = sk exp ×(H(sk exp ×pk stat )-1 mod p).
[0071] Steps 1-4: Private Chain Chaincode Deployment: Deploy custom chaincode on the Endorser node (or endorsement node) of the private chain, which includes 3 core functions: 1) Invoke_Upload(): Receives ciphertext, signature, and re-encrypted record, and performs cryptographic verification (such as SM3 hash comparison and ciphertext format validity). 2) Invoke_ReEnc(): Records the proxy re-encryption operation log, including re-encryption timestamp, proxy signature, etc. 3) Query_Data(): Supports authorized roles (such as Audit nodes) to query on-chain ciphertext and signature records.
[0072] Phase 2: Experts generate scoring data and encrypt its signature.
[0073] Step 2-1: Construction of Structured Scoring Data M: Based on the evaluation needs of 5G scenarios (such as 5G smart mine inspection scenarios), experts generate structured data M containing business and technical dimensions. The format strictly adapts to the weight model of 5G evaluation, so that each expert does not need to build the complete weight model in M when constructing the scoring data, reducing the data granularity exposed to statisticians. Here, M is equivalent to the privacy data mentioned above.
[0074] Here is an example of the scoring data M: M={ Scene identifier: SC-5G-MINE-001 (bound to 5G cell ID: PCI-123) Indicator ID: IND-TECH-04 (Technology Compatibility Indicator: Equipment Coordination Latency Compatibility) Score: s=8 (0-10 point scale, conforming to GB / T 43439-2023 maturity grading) Indicator weight: ω = 0.25 (from the AHP judgment matrix) QoS association identifier: QoS-URLLC (corresponding to 5G air interface latency ≤10ms requirement), Timestamp: T=2024-12-01 10:15:30.123 (accurate to milliseconds, to prevent replay) } Step 2-2: SM2 Digital Signature Generation: Experts use private key sk exp Call SM2 to sign the scoring data M, generating a signature result σ that conforms to GB / T 35273-2020. exp =(R, S).
[0075] Steps 2-3: SM2 public key encryption: Experts use their own public key to perform a PK (penetrate-by-proxy) operation. exp For M||σ exp Perform SM2 asymmetric encryption to generate ciphertext C. exp =SM2Enc(pk exp , M||σ exp ), where || represents data concatenation; the encryption process uses a combination of random numbers and elliptic curve multiplication to ensure that the same plaintext will result in different encryption results each time, which helps to resist chosen-plaintext attacks.
[0076] Steps 2-4: Data Upload Preprocessing: Experts Generate Encrypted Data Packets P exp =(C exp , pk exp , T, hash σ_exp ), where T is the timestamp, and hash σ_exp =SM3(σ exp This is used for subsequent on-chain fast verification, avoiding the computational cost of full signature verification; P exp Data is uploaded to the group agent node via a 5G URLLC link (optionally, the air interface can use symmetric cryptographic algorithms such as SM4 to encrypt the uploaded data).
[0077] Phase 3: Group agent node side performs agent re-encryption.
[0078] Step 3-1: Encrypted data packet verification: The group agent node receives the encrypted data packet P exp Then, first verify the hash. σ_exp With SM3(σ exp The system checks the consistency of the timestamp T and then verifies whether the timestamp T is within the effective time window of the evaluation task (e.g., ±30 minutes to defend against replay attacks). If any verification fails, the system refuses to execute subsequent operations, generates an error log, and uploads it to the blockchain.
[0079] Step 3-2: Proxy Re-encryption Ciphertext Conversion: After successful verification, the proxy node calls the re-encryption key rk. exp→stat For ciphertext C exp Perform proxy re-encryption operation: 1) Analysis of C exp The standard formats (C1, C2, C3) for Elliptic Curve Ciphertext Component SM2 encryption. 2) Calculate C based on system parameter params stat =ReEnc(rk exp→stat C exp ) = (C1', C2, C3), where C1' = rk exp→stat ×C1, C2 and C3 remain unchanged; 3) Generate proxy signature σ proxy = SM2Sign(sk proxy SM3(C exp || C stat This is used to prove that the re-encryption operation was performed by a legitimate proxy node and cannot be forged.
[0080] Step 3-3: Re-encryption data packet generation: The proxy node generates a re-encryption data packet P. stat = (C stat , σ proxy ,rk id hash C_exp ), where rk id For rk exp→stat A unique identifier for tracing the source of the key; hash C_exp =SM3(C exp ) used on-chain with C exp Correlation verification; P stat It is transmitted to the private chain Endorser node. Optionally, P stat When transmitting to the private chain Endorser node, security can be improved through a 5G secure tunnel, such as IPsec.
[0081] Phase 4: On-chain evidence storage of node clusters in the private blockchain.
[0082] Step 4-1: Transaction Proposal Submission: Endorser Node Receives Re-encrypted Data Packet P stat = (C stat , σ proxy ,rk id hash C_exp After that, the chaincode Invoke_Upload() function is called to perform the following verification: (1) Ciphertext format verification: Check Cstat Whether the components (C1', C2, C3) conform to the SM2 encryption standard, and whether C1' is a valid point on the curve; (2) Proxy signature verification: using pk proxy Verify SM2 signature σ proxy The validity of the encryption is ensured to guarantee that the re-encryption operation has not been tampered with; (3) Correlation verification: compare hash C_exp With SM3(C exp To confirm whether C is equal to C, we need to determine if they are equal. stat With C exp The correspondence.
[0083] Step 4-2: Endorsement and Consensus: After successful verification, each Endorser node re-encrypts the data packet P. stat Generate endorsement signature σ end = Sign(sk end , P stat ), P stat || σ end || P exp The transactions are packaged into a transaction proposal and submitted to the Orderer node. The Orderer node sorts the transactions in ascending order of timestamps and generates block B, which includes the following information: B = (Proxy re-encryption v) Hash , Tx List Timestamp, Orderer Sig ), Among them, proxy re-encryption v Hash =SM3(previous block hash), ensuring the chain structure is immutable; Tx List It is an ordered set of all 5G evaluation and scoring transactions that have been endorsed and verified by Endorser nodes within a single block, stored in an array-like structure; the Timestamp is an absolute timestamp generated by the private chain Orderer node based on a trusted clock when generating the block. Each transaction (Tx) corresponds to an expert's scoring data for a 5G scenario indicator. After the block is broadcast to all nodes, an optimized PBFT consensus is used, and consensus is passed if at least 2 out of 3 Endorser nodes confirm it.
[0084] Step 4-3: On-chain Evidence Storage and Indexing: After consensus is reached, block B is written to the private chain ledger, and a mapping index between the scenario ID and the ciphertext ID is generated for quick querying by statisticians; Audit nodes automatically back up block copies for subsequent audit traceability; the entire on-chain process generates an evidence storage log L. L = (Block_Hash, Node_List, Consensus_Time). L is stored separately on the chain and cannot be tampered with.
[0085] Phase 5: Statisticians decrypt, verify, and evaluate the calculations.
[0086] Step 5-1: Ciphertext Query and Retrieval: The statistician queries the corresponding P based on the scenario ID using the private chain's Query_Data() function. stat With P exp After the private blockchain verifies the statistician's permissions through identity authentication, it returns C. stat With C exp .
[0087] Step 5-2: SM2 private key decryption: The statistician calls the private key sk stat For ciphertext C stat Perform SM2 decryption to obtain the decrypted data M || σ exp = SM2Dec(sk stat C stat ).
[0088] Step 5-3: Expert signature verification: The statistician verifies the signature of P. exp Get PK exp , use pk exp Verify σ exp The validity of the signature verification, i.e., the execution of SM2 Verify(pk) exp , M, σ exp If the return value is True, it confirms that M was generated by the expert himself and has not been tampered with; if the signature verification fails, the data is marked as abnormal, an abnormal log is generated and uploaded to the chain.
[0089] Step 5-4: Weighted calculation and uploading the result to the blockchain: (1) The statistician extracts the score s and indicator weight ω from M, and combines them with the scores (s1, s2,..., s) of other experts in this scenario. n ) and corresponding weights (ω1, ω2,..., ω n According to the calculation model, the total score of the indicator is S = Σ(s i ×ω i (i=1,2,...,n); (2) The statistician generates the evaluation result package R. stat = (S, expert list, computation log), using the private key sk stat The evaluation results package R stat Signature generation σ stat , will R stat || σ stat Upload to the private blockchain for evidence storage; (3) Private chain Endorser node verification σ stat Then, R statThe results are written into the evaluation results channel, and only authorized roles (such as the corresponding unit or group management) can query them, so as to achieve traceability of results and controllable permissions.
[0090] The method provided in this embodiment will be further explained below in conjunction with the evaluation and scoring of 5G smart mine inspection scenarios.
[0091] First, this method can be implemented in 5G networks, such as using a 5G R17 URLLC configuration. Security encryption can employ 128-bit SM4.
[0092] As mentioned above, the base node configuration of the private chain is 1 Orderer + 3 Endorsers + 1 Audit.
[0093] The evaluation task is to score the equipment collaboration latency adaptability index in a 5G smart mine inspection scenario. There are 5 experts, with a weight ω=0.25 and an evaluation period of 72 hours.
[0094] The implementation steps are explained below.
[0095] (1) Initialization: The proxy node generates the proxy re-encryption parameter params, and the 5 experts generate their respective public keys pk. exp1 To PK exp5 and their respective private keys sk exp1 To sk exp5 Statistician-generated (pk) stat , sk stat Five experts each generated their own re-encryption key rk. exp1→stat to rk exp5→stat .
[0096] (2) Expert scoring and encryption: For expert 1, generate scoring information M1, for example M1={SC-5G-MINE-001, IND-TECH-04, s=8, ω=0.25, QoS-URLLC, T=2024-12-01 10:15:30.123}, and generate σ exp1 =(R1, S1), encrypted to obtain C exp1 Upload Pexp1. Other experts follow similar procedures.
[0097] (3) Proxy re-encryption: Proxy node verifies P exp1 Then, use rk exp1→stat Generate C stat1 , signature σ proxy1 Upload P stat1 The rest of the P exp2 To P exp5 similar.
[0098] (4) On-chain evidence storage: Endorser node verifies P stat1 , generate σ end1 ~σ end3 After the Orderer node sorts the data, it generates block B1, which is then uploaded to the blockchain after consensus is reached.
[0099] (5) Statistical calculation: The statistician queries C stat1 ~C stat5 Decrypt to obtain M1~M5. After successful signature verification, extract the scoring values, for example, s1=8, s2=9, s3=7, s4=8, s5=9. Calculate the weighted average score S= (8+9+7+8+9)×0.25 / 5 ×5=8.2, and generate R. stat And upload it to the blockchain.
[0100] In this embodiment, when experts generate scoring data, they will use the SM2 signature σ. exp After being packaged with plaintext M, it is encrypted using an SM2 public key, forming a three-in-one encrypted structure of signature-plaintext-ciphertext. This allows the signature information to be preserved when the agent re-encrypts, and the statistician can directly verify the signature using the expert's public key after decryption, without the need for third-party intervention. This avoids the platform's access to plaintext (protecting privacy) and ensures that statistical data comes from legitimate experts (preventing forgery), filling the technical gap in the traceability of encrypted data identity in 5G evaluation scenarios.
[0101] To address the issues that existing private blockchain solutions only perform data format verification (such as score range) and cannot verify cryptographic validity (such as signatures and re-encryption correlation), leading to problems such as forged ciphertext being able to be uploaded to the blockchain and re-encrypted records being untraceable, the following three cryptographic verification functions are integrated into the chaincode: Verify_vHash(): Verifies the proxy's re-encrypted v Hash With P exp / P stat Consistency is ensured to guarantee the legitimacy of re-encryption operations; Verify_Signature(): Pre-verify SM2 signature (σ exp / σ proxy / σ end The validity of the signature is verified, and transactions with forged signatures are rejected. Check_PRE_Validity(): Validates C stat The validity of elliptic curve points (such as whether C1' is on the SM2 curve) is checked to prevent invalid ciphertext from being uploaded to the chain.
[0102] By embedding cryptographic security into the private blockchain consensus process, false data stored on the chain is avoided, and a hierarchical transfer from cryptographic trust to consensus trust is achieved, ensuring the cryptographic-level reliability of on-chain data.
[0103] In summary, this disclosed embodiment achieves semantic security, identity verification, and immutability of scoring data through a combination of SM2 digital signature authentication, proxy re-encryption authorization, and private chain ciphertext storage. It also avoids the escrow risks of key management systems, ensuring that only experts hold the decryption private key, and the group acts solely as an agent for ciphertext conversion without accessing plaintext data. Based on the proxy re-encryption mechanism, it achieves signature-ciphertext binding (i.e., the re-encrypted ciphertext can still verify the original signature), solving the problem of statisticians being unable to confirm the data source after decrypting the ciphertext, and adapting to the high-concurrency scenarios of 5G mMTC. By integrating ciphertext format verification (such as the structural legality of the proxy re-encrypted ciphertext), signature validity pre-verification (on-chain comparison of SM3 hash values), and endorsement strategies for re-encrypted transactions (requiring signature confirmation from 2 / 3 of the Endorser nodes), it constructs a trust transmission channel between the consensus layer and the application layer, preventing fraudulent ciphertext from being uploaded to the chain.
[0104] Based on the same inventive concept, this disclosure also provides a privacy data protection device, which pre-constructs a private chain including multiple nodes. The nodes include a first user, a second user, and a group agent node. The group agent node generates agent re-encryption system parameters. The first user generates a first public key and a first private key, and the second user generates a second public key and a second private key. The first and second public keys are stored in the group agent node. Figure 5 As shown, the privacy data protection device 50 includes: The acquisition module 51 is used by the group agent node to receive the encrypted data packet sent by the first user. The encrypted data packet includes the first ciphertext, which is obtained by the first user encrypting the privacy data and the signature data of the privacy data using the first private key.
[0105] The re-encryption module 52 is used by the group agent node to re-encrypt the first ciphertext into the second ciphertext using the re-encryption key, and is used by the second user to extract privacy data from the second ciphertext using the second private key. The re-encryption key is generated by the first user based on the first private key, the second public key and the agent re-encryption system parameters.
[0106] Using the above technical solution, the first user's first private key does not need to be uploaded to the group's agent node, avoiding the risk of key escrow. The group's agent node re-encrypts the first ciphertext generated by the first user, converting it into second ciphertext that the second user can decrypt using their second private key. In this way, private data can be shared by the data owner with the data user in ciphertext form, solving the problem of plaintext leakage.
[0107] Furthermore, the privacy data protection device 50 also includes a re-encryption module, which is used by the group agent node to sign the set of the first ciphertext and the second ciphertext using the agent private key to obtain the agent signature; the group agent node generates a re-encrypted data packet based on the agent signature, the second ciphertext, the unique identifier of the re-encryption key and the hash value of the first ciphertext.
[0108] Furthermore, the privacy data protection device 50 also includes an on-chain module, which is configured for the group agent node to send the re-encrypted data packet to the endorsement node for the endorsement node to perform verification; if the verification passes, the endorsement node generates an endorsement signature for the re-encrypted data packet and submits the endorsement signature, the encrypted data packet and the re-encrypted data packet to the sorting node for the sorting node to generate an ordered transaction list.
[0109] Furthermore, the privacy data including device 50 also includes a decryption module, used by the second user to obtain the second ciphertext from the private chain; the second user decrypts the second ciphertext using the second private key to obtain decrypted data; the second user obtains a proxy public key from the private chain and verifies the validity of the signature data in the decrypted data using the proxy public key; if the signature data verification is successful, the second user extracts privacy data from the decrypted data.
[0110] Furthermore, the privacy data device 50 also includes a score calculation module, which is used by the second user to extract the score value and indicator weight of each first user from multiple privacy data from different first users; the second user calculates the weighted sum of the score value and indicator weight to obtain the total indicator score, which represents the total score value of different first users for the 5G scenario; the second user packages the total indicator score and the signature data of the total indicator score and uploads it to the private chain for authorized nodes on the private chain to query.
[0111] Regarding the privacy data protection device 50 in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0112] Based on the same inventive concept, this disclosure also provides an electronic device, comprising: A memory on which computer programs are stored; A processor is configured to execute the computer program in the memory to implement the above-described privacy data protection method or privacy data processing method.
[0113] Figure 6 This is a block diagram illustrating an electronic device 600 according to an exemplary embodiment. For example... Figure 6As shown, the electronic device 600 may include a processor 601 and a memory 602. The electronic device 600 may also include one or more of a multimedia component 603, an input / output (I / O) interface 604, and a communication component 605.
[0114] The processor 601 controls the overall operation of the electronic device 600 to complete all or part of the steps in the aforementioned privacy data protection method. The memory 602 stores various types of data to support the operation of the electronic device 600. This data may include, for example, instructions for any application or method operating on the electronic device 600, and application-related data. The memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 603 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used for outputting and / or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 602 or transmitted via communication component 605. The audio component also includes at least one speaker for outputting audio signals. I / O interface 604 provides an interface between processor 601 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 605 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0115] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the privacy data protection method described above.
[0116] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the privacy data protection method described above. For example, the computer-readable storage medium may be the memory 602 including the program instructions described above, which may be executed by the processor 601 of the electronic device 600 to complete the privacy data protection method or privacy data processing method described above.
[0117] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described privacy data protection method or privacy data processing method when executed by the programmable device.
[0118] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0119] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0120] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for protecting privacy data, characterized in that, A private blockchain with multiple nodes is pre-built. These nodes include a first user, a second user, and a group proxy node. The group proxy node is used to generate proxy re-encryption system parameters. The first user is used to generate a first public key and a first private key. The second user is used to generate a second public key and a second private key. The first public key and the second public key are stored in the group proxy node. The method includes: The group agent node receives the encrypted data packet sent by the first user. The encrypted data packet includes a first ciphertext, which is obtained by the first user encrypting the privacy data and the signature data of the privacy data using the first private key. The group agent node re-encrypts the first ciphertext into a second ciphertext using a re-encryption key, which is used by the second user to extract the privacy data from the second ciphertext using the second private key. The re-encryption key is generated by the first user based on the first private key, the second public key, and the agent re-encryption system parameters.
2. The privacy data protection method according to claim 1, characterized in that, The group proxy node is also used to generate a proxy public key and a proxy private key. The proxy public key is made public to the private chain. After re-encrypting the first ciphertext into the second ciphertext using the re-encryption key, the method further includes: The group agent node signs the set of the first ciphertext and the second ciphertext using the agent private key to obtain the agent signature; The group agent node generates a re-encrypted data packet based on the agent signature, the second ciphertext, the unique identifier of the re-encryption key, and the hash value of the first ciphertext.
3. The privacy data protection method according to claim 2, characterized in that, The node further includes an endorsement node and a sorting node, wherein the endorsement node stores the encrypted data packet sent by the first user, and the method further includes: The group agent node sends the re-encrypted data packet to the endorsement node for verification. If the verification passes, the endorsement node generates an endorsement signature for the re-encrypted data packet and submits the endorsement signature, the encrypted data packet, and the re-encrypted data packet to the sorting node for generating an ordered transaction list.
4. The privacy data protection method according to claim 3, characterized in that, The verification includes: verifying the format of the second ciphertext, verifying the validity of the proxy signature based on the proxy public key, and confirming whether the first ciphertext and the second ciphertext are related.
5. A method for processing privacy data, characterized in that, Applied to obtaining the privacy data from the second ciphertext in the privacy data protection method as described in any one of claims 1 to 4; The method includes: The second user obtains the second ciphertext from the private chain; The second user decrypts the second ciphertext using the second private key to obtain the decrypted data; The second user obtains the proxy public key from the private chain and uses the proxy public key to verify the validity of the signature data in the decrypted data; If the signature data is verified, the second user extracts the privacy data from the decrypted data.
6. The privacy data processing method according to claim 5, characterized in that, The privacy data includes the scoring values and indicator weights generated by the first user for qualitative indicators of the 5G scenario; The method further includes: The second user extracts the score and indicator weight of each first user from multiple privacy data sources from different first users; The second user calculates the weighted sum of the score and the indicator weight to obtain the total indicator score, which represents the total score of the different first users for the 5G scenario; The second user packages the total score of the indicator and the signature data of the total score of the indicator and uploads them to the private chain for authorized nodes on the private chain to query.
7. A privacy data protection device, characterized in that, A private blockchain comprising multiple nodes is pre-constructed. These nodes include a first user, a second user, and a group proxy node. The group proxy node generates proxy re-encryption system parameters. The first user generates a first public key and a first private key, and the second user generates a second public key and a second private key. The first public key and the second public key are stored in the group proxy node. The device includes: The acquisition module is used for the group agent node to receive the encrypted data packet sent by the first user. The encrypted data packet includes a first ciphertext, which is obtained by the first user encrypting the privacy data and the signature data of the privacy data using the first private key. The re-encryption module is used by the group agent node to re-encrypt the first ciphertext into a second ciphertext using a re-encryption key, and by the second user to extract the privacy data from the second ciphertext using the second private key. The re-encryption key is generated by the first user based on the first private key, the second public key, and the parameters of the agent re-encryption system.
8. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the method of any one of claims 1-4, or the method of claim 5 or 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method of any one of claims 1-4, or the method of claim 5 or 6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method of any one of claims 1-4, or the method of claim 5 or 6.