A method, system and device for secure processing of carbon data and a storage medium

By processing energy and carbon data through a two-layer encryption architecture, the security and computability issues of energy and carbon data in the carbon management process are solved, achieving high data security and trustworthiness, supporting large-scale, high-frequency data sharing and management, and promoting transparency and trust mechanisms in the carbon market.

CN117527245BActive Publication Date: 2025-11-18STATE GRID ELECTRIC POWER RES INST +5
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210899299.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2025-11-18
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

Existing technologies have low carbon data security and lack protection from source to end in the carbon management process. In particular, the computability of interactive data is insufficient when data is stored securely in power systems and carbon management systems, resulting in a lack of transparency and trust mechanisms in the carbon market, and serious problems of carbon credit hoarding and insufficient quotas.

Method used

The system employs a two-layer encryption architecture. First, a lightweight encryption algorithm is used to process the plaintext energy and carbon data, generating the first encrypted data which is then uploaded to the blockchain for storage. Then, in the cloud, a smart contract and the BFV fully homomorphic encryption algorithm are used to perform a second encryption process on the decrypted plaintext energy and carbon data, ensuring the security and computability of the data during storage and circulation.

Benefits of technology

It improves the security and scalability of carbon data, enables high-quality data circulation and computability, ensures the transparency and trust mechanism of the carbon market, avoids data tampering and leakage, and supports large-scale, high-frequency data sharing and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117527245B_ABST
    Figure CN117527245B_ABST
Patent Text Reader

Abstract

The application discloses a kind of carbon data security processing method, system, equipment and storage medium, the method includes: receiving carbon data plaintext;Carbon data plaintext is handled using lightweight encryption algorithm, obtain first data ciphertext, and first data ciphertext is uploaded to block chain and is stored;First data ciphertext is decrypted and verified, and in response to the successful verification of first data ciphertext, the carbon data plaintext obtained by decryption is encrypted by smart contract, and second data ciphertext is obtained;Second data ciphertext is processed, and the obtained result is sent to load node.The present application is based on double-layer encryption architecture, i.e.first carbon data plaintext is lightweightly encrypted, and the form of carbon data plaintext is encrypted again after decryption verification, with the advantages of high data security, strong scalability, data credibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of carbon data processing technology, specifically to a method, system, device, and storage medium for secure carbon data processing. Background Technology

[0002] This provides strong support for the construction of a clean, low-carbon, safe, and efficient energy system. With the increasing penetration rate of new energy sources, the issues of safety, stability, and cost control are becoming increasingly prominent in the process of building a new power load management system. As the "artery" of the carbon management system's safe and reliable operation, the informatization, digitalization, and intelligentization of the processes of collection, storage, management, and circulation of carbon data are necessary conditions for fully ensuring the efficient and safe execution of carbon trading and carbon accounting. This provides a data foundation and decision-making basis for carbon emission reduction and further promotes the coordinated development of energy sources, grids, loads, and storage.

[0003] Ensuring the security and reliability of carbon data during carbon management has garnered significant attention from researchers. The security and reliability of carbon data facilitates the orderly conduct of carbon emission accounting, quota allocation, verification, and compliance settlement, promoting the healthy development of the carbon market. It is a crucial foundation for my country's carbon emission management and the healthy development of its carbon market, and a top priority in the construction of my country's carbon market. Furthermore, the accuracy and reliability of carbon data are beneficial for strengthening carbon emission statistical accounting capabilities, analyzing and issuing early warnings for carbon emission control targets, and establishing an ecosystem carbon sink monitoring and accounting system, thus laying a solid foundation for the upcoming total carbon emission control measures.

[0004] As a core element of carbon emission regulation and carbon trading, addressing the privacy and security issues of energy carbon data is urgent. Promoting the coordinated operation of power generation, grid, load, and storage relies on data sharing within and outside the power management system, which imposes compliance requirements on energy carbon data privacy. Due to issues such as authorization by diverse load parties, security concerns, and other factors, widespread circulation and sharing of energy carbon data cannot be achieved. How to provide the necessary data while protecting its privacy and ensuring high quality, truly realizing data-driven operations, requires the application of privacy-preserving computing technologies to guarantee the computability of energy carbon data. Currently, the protection of energy carbon data in applications such as carbon trading and carbon emission regulation has attracted widespread attention from scholars, but related research results are limited.

[0005] The lack of transparent and open trading information in the carbon market hinders the establishment of a trust mechanism. Information asymmetry also leads to carbon credit hoarding and insufficient carbon allowances. Existing research on the protection of energy and carbon data in carbon trading and emission regulation largely relies on blockchain technology, driven by the trend towards decentralization, transparency, and trustworthiness in carbon management. However, this research focuses on leveraging the inherent characteristics of blockchain to improve the transparency and trustworthiness of the trading process, lacking research on the protection of energy and carbon data from source to end in the carbon management process. Furthermore, there is limited research on ensuring the computability of interactive data when considering secure data storage in both power systems and carbon management systems. Summary of the Invention

[0006] The purpose of this invention is to provide a method, system, device and storage medium for secure carbon data processing, so as to solve the problem of low data security caused by unilateral encryption in the prior art.

[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0008] In a first aspect, the present invention provides a method for securely processing energy and carbon data, comprising:

[0009] Receive plaintext energy carbon data;

[0010] A lightweight encryption algorithm is used to process the plaintext energy and carbon data to obtain the first ciphertext, and the first ciphertext is uploaded to the blockchain for storage.

[0011] The first data ciphertext is decrypted and verified. In response to the successful verification of the first data ciphertext, the decrypted plaintext energy and carbon data is encrypted through a smart contract to obtain the second data ciphertext.

[0012] The second encrypted data is processed, and the result is sent to the load node.

[0013] Furthermore, a lightweight encryption algorithm is used to process the plaintext energy carbon data to obtain the first ciphertext, which includes:

[0014] The public and private keys are generated using the RSA asymmetric encryption algorithm;

[0015] A digital signature is obtained by encrypting the plaintext digest using a private key. The plaintext digest is obtained by processing the plaintext energy and carbon data.

[0016] The first ciphertext of the energy carbon data is obtained by encrypting the plaintext, plaintext digest, and digital signature using a public key.

[0017] Furthermore, the generation of public and private keys using the RSA asymmetric encryption algorithm includes:

[0018] Two large prime numbers p and q are randomly generated, and p and q are distinct.

[0019] Calculate n = pq, and let

[0020] Randomly generate a pair with Let e ​​be a coprime integer. And satisfy

[0021] calculate We obtain the public key PU = {e, n} and the private key PR = {d, n};

[0022] In this context, p and q are kept secret throughout the process, the gcd() function returns the greatest common divisor of two or more certificates, and ≡ is the symbol for congruence in number theory.

[0023] Furthermore, obtaining the digital signature and the first encrypted data includes:

[0024] The plaintext digest is encrypted using the private key PR1 to obtain a digital signature;

[0025] The first ciphertext of the energy carbon data is obtained by encrypting the plaintext, plaintext digest, and digital signature using the public key PU2.

[0026] PR1 is the private key of the energy and carbon data source, and PU2 is the public key of the energy and carbon data management end.

[0027] Furthermore, the decryption and verification process for the first data ciphertext includes:

[0028] The first ciphertext of data is decrypted using the private key PR2 to obtain the digital signature and the plaintext of the energy carbon data;

[0029] The digital signature is decrypted using the public key PU1 to obtain the plaintext digest;

[0030] The SHA256 algorithm is used to perform hash operations on the plaintext energy carbon data to obtain a plaintext digest.

[0031] The plaintext digest obtained through hashing is compared with the plaintext digest obtained through decryption. If the results match, the verification is successful; otherwise, the verification fails.

[0032] PU1 is the public key of the energy and carbon data source, and PR2 is the private key of the energy and carbon data management end.

[0033] Furthermore, the plaintext digest is obtained by performing a hash operation on the plaintext energy carbon data using the SHA256 algorithm.

[0034] Furthermore, the plaintext energy and carbon data obtained through decryption is encrypted via a smart contract as follows: the smart contract executes the BFV fully homomorphic encryption algorithm to encrypt the plaintext energy and carbon data obtained through decryption.

[0035] Furthermore, the second encrypted data is processed, and the result is sent to the load node, including using a secure multi-party computation protocol based on BFV fully homomorphic encryption.

[0036] Process the second encrypted data to obtain the result y. Use the homomorphic computation algorithm Evaluate(·) to process the result y to obtain y′. Send y′ to the load node participating in energy and carbon data management.

[0037] Furthermore, the method for obtaining the plaintext energy carbon data includes:

[0038] Real-time collection of users' raw energy and carbon data;

[0039] The raw energy and carbon data is preprocessed to obtain plaintext energy and carbon data.

[0040] Secondly, the present invention provides an energy carbon data security processing system, comprising:

[0041] The edge terminal is used to receive plaintext carbon data; it is also used for...

[0042] A lightweight encryption algorithm is used to process the plaintext energy and carbon data to obtain the first ciphertext, and the first ciphertext is uploaded to the blockchain for storage.

[0043] In the cloud, it is used to decrypt and verify the first encrypted data. Upon successful verification of the first encrypted data, a smart contract is used to encrypt the decrypted plaintext energy and carbon data to obtain the second encrypted data. It is also used for...

[0044] The second encrypted data is processed, and the result is sent to the load node.

[0045] Furthermore, the cloud includes:

[0046] The load node is used to decrypt and verify the first data ciphertext. In response to the successful verification of the first data ciphertext, it encrypts the decrypted plaintext energy and carbon data through a smart contract to obtain the second data ciphertext.

[0047] The server is used to process the second encrypted data and send the result to the load node.

[0048] Furthermore, it also includes the load end;

[0049] The load end is used to collect users' raw energy and carbon data in real time; and is used for...

[0050] The raw energy and carbon data is preprocessed to obtain plaintext energy and carbon data.

[0051] Thirdly, the present invention provides a carbon data security processing device, including a processor and a storage medium;

[0052] The storage medium is used to store instructions;

[0053] The processor is configured to operate according to the instructions to perform the steps of the method described in the first aspect.

[0054] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in the first aspect.

[0055] According to the above technical solution, the embodiments of the present invention have at least the following effects: This application is based on a two-layer encryption architecture, that is, first performing lightweight encryption on the plaintext of energy carbon data, and then decrypting and verifying it before encrypting the plaintext of energy carbon data again. Compared with the single security of existing data security storage solutions on the data stream (i.e., encryption from the data source to the edge or encryption of the data source in the cloud), it has the advantages of high data security, strong scalability, and data trustworthiness. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the processing method of a specific embodiment of the present invention;

[0057] Figure 2 This is a flowchart illustrating the processing method of a specific embodiment of the present invention. Detailed Implementation

[0058] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0059] Energy and carbon data are fundamental for understanding carbon emissions, making informed decisions, evaluating effectiveness, and implementing scientific governance. Secure storage based on blockchain ensures the authenticity of energy and carbon data, reducing errors in carbon accounting caused by data falsification by carbon reduction companies, improper data collection, and missing records. Furthermore, energy and carbon data directly reflects the production status of carbon reduction companies; combining encryption technology with smart contracts further guarantees the security of energy and carbon data circulation.

[0060] Example 1

[0061] To ensure the safe and stable operation of the carbon management system, this invention focuses on the security and reliability of energy and carbon data. It covers the entire lifecycle of important data from load-side devices such as carbon emission devices, including generation, use, transfer, and destruction. Combining the basic encryption principles of blockchain, it supports blockchain-based energy and carbon data storage with distributed cloud storage, and proposes a secure energy and carbon data processing method that can guarantee the overall operational security of low-carbon equipment.

[0062] like Figures 1 to 2 As shown, the energy carbon data security processing method of the present invention mainly includes three steps: energy carbon data acquisition, edge data encryption, and cloud data secondary encryption.

[0063] The energy carbon data security processing method provided in this application includes the following steps: receiving plaintext energy carbon data; processing the plaintext energy carbon data using a lightweight encryption algorithm to obtain a first ciphertext data, and uploading the first ciphertext data to the blockchain for storage; decrypting and verifying the first ciphertext data; in response to successful verification of the first ciphertext data, encrypting the decrypted plaintext energy carbon data data through a smart contract to obtain a second ciphertext data; processing the second ciphertext data, and sending the obtained result to the load node.

[0064] This application is based on a two-layer encryption architecture, which first performs lightweight encryption on the plaintext energy carbon data, and then encrypts the plaintext energy carbon data again after decryption and verification. Compared with the single security of existing data security storage solutions on the data stream (i.e., encryption from the data source to the edge or encryption of the data source in the cloud), it has the advantages of high data security, strong scalability, and data trustworthiness.

[0065] The process before receiving plaintext energy and carbon data also includes: energy and carbon data acquisition.

[0066] The main task of this section is to measure and collect raw energy and carbon data from load-side devices such as carbon-emitting equipment. Its main function is to use measuring devices deployed at load-side devices to collect energy and carbon data such as fuel consumption and related emission factors; then preprocess the collected energy and carbon data; and finally send the processed energy and carbon data to the edge-source end of the carbon management system, where it is stored by a distributed edge storage server. Specifically, this section mainly includes the following specific operations and steps:

[0067] Step 1.1: Low-carbon operators collect raw energy and carbon data from users in real time through measuring devices installed on each carbon emission device.

[0068] Step 1.2: Preprocess the raw energy and carbon data, that is, extract the energy and carbon data that need to be protected for privacy, such as information on carbon emission devices and carbon emissions, as plaintext energy and carbon data.

[0069] Step 1.3: Send the carbon data in plaintext to the edge of the carbon management system for subsequent encryption processing.

[0070] In one embodiment of this application, the following steps are implemented at the edge: receiving plaintext energy carbon data; processing the plaintext energy carbon data using a lightweight encryption algorithm to obtain first ciphertext data; and uploading the first ciphertext data to the blockchain for storage.

[0071] The edge data encryption process is as follows:

[0072] The main task of this part is to encrypt plaintext energy and carbon data at the edge of the carbon management system using lightweight asymmetric encryption technology before uploading the data to the blockchain. The main functions of this part are: to obtain a plaintext digest by hashing the plaintext energy and carbon data; to generate a digital signature by encrypting the plaintext digest using a public and private key generated by a key generator; to encrypt the plaintext data, plaintext digest, and digital signature to generate the first ciphertext data; and to upload the first ciphertext data to the blockchain, thereby achieving persistent storage of the collected energy and carbon data. Specifically, this part mainly includes the following specific operations and steps:

[0073] Step 2.1: After obtaining the plaintext of energy carbon data from the edge source, the plaintext is hashed using the SHA256 algorithm to obtain the plaintext digest.

[0074] Step 2.2: The key generator mainly uses the RSA asymmetric encryption algorithm to generate PU1, PR1 (i.e., the public and private keys of the carbon data source) and PU2, PR2 (i.e., the public and private keys of the carbon data management end). The RSA key generation algorithm is as follows:

[0075] 1) Randomly generate two large prime numbers p and q, where p and q are distinct;

[0076] 2) Calculate n = pq, and simultaneously let

[0077] 3) Randomly generate a match Let e ​​be a coprime integer. And satisfy

[0078] 4) Calculation Right now

[0079] 5) Obtain the public key PU = {e, n} and the private key PR = {d, n}.

[0080] In this process, p and q remain confidential. The gcd() function returns the greatest common divisor of two or more equivalences. ≡ is the symbol for congruence in number theory; both sides of it must be congruent, meaning their modulo operations yield the same result.

[0081] Step 2.3: Encrypt the plaintext digest using the private key PR1 to obtain the digital signature of the energy carbon data source, and attach the digital signature to the plaintext data. Use the public key PU2 to encrypt the plaintext energy carbon data, plaintext digest, and digital signature to form the first ciphertext data.

[0082] Step 2.4: Upload the first encrypted data to the edge layer blockchain to ensure the immutability and reliability of the encrypted data, and facilitate the subsequent secure management of energy and carbon data.

[0083] Step 2.5: After the first encrypted data is successfully uploaded, the encrypted data is transmitted to the cloud server through cloud-edge collaboration technology.

[0084] In this application, the following functions are implemented through the cloud: decrypting and verifying the first data ciphertext; in response to the successful verification of the first data ciphertext, encrypting the decrypted plaintext energy and carbon data through a smart contract to obtain the second data ciphertext; processing the second data ciphertext and sending the result to the load node.

[0085] Cloud-based data encryption specifically includes:

[0086] The main task of this section is to process the first encrypted data transmitted in the second part and to ensure data security during the cloud storage and management of carbon data using a secure multi-party computation protocol based on fully homomorphic encryption. The main function of this section is that after the cloud server receives the first encrypted data transmitted from the edge, it decrypts and verifies the first encrypted data to ensure that it has not been maliciously tampered with during transmission. After successful verification of the first encrypted data, the BFV fully homomorphic encryption smart contract is invoked to encrypt the plaintext data on the cloud blockchain, and the processed second encrypted data is transmitted to the cloud server for secure multi-party computation. The cloud server then performs homomorphic computation on the result obtained after the secure multi-party computation and returns the result to each load node participating in carbon management.

[0087] Throughout the process, the cloud server is unaware of the plaintext energy carbon data and can only process the encrypted data. This ensures that other load nodes and the cloud server involved in energy carbon data management are unaware of the plaintext energy carbon data, thereby protecting energy carbon data privacy.

[0088] Specifically, this section mainly includes the following specific operations and steps:

[0089] Step 3.1: After receiving the first encrypted data transmitted from the edge terminal, the cloud server stores the first encrypted data in the server and sends the first encrypted data and its contained encrypted address to the load node of the carbon data owner in the carbon management system.

[0090] Step 3.2: The load node invokes the verification smart contract to perform the decryption and verification operations of the first data ciphertext, as follows:

[0091] 1) The load node uses the private key PR2 to decrypt the first data ciphertext to obtain the digital signature and the data plaintext;

[0092] 2) The load node uses the public key PU1 to decrypt the digital signature and obtain the plaintext digest;

[0093] 3) The load node uses the same hash algorithm to perform another hash operation on the received plaintext data to obtain a new plaintext digest;

[0094] 4) Compare the plaintext digest obtained from decryption with the newly generated plaintext digest after hashing. If they match, it means that the plaintext of the carbon data has not been tampered with, and the verification is successful.

[0095] Step 3.3: After successful verification, the BFV fully homomorphic encrypted smart contract is automatically invoked to perform encryption operations on the plaintext energy carbon data, as follows:

[0096] 1) Load nodes P1, P2, ..., P participating in carbon management n The public-private key pair (pk, sk) (i = 1, 2, ..., n) is calculated using the key generation algorithm KeyGen(·). The private key sk is generated using SecretKeyGen(λ), where λ is the security factor. The public key pk is generated using PublicKeyGen(sk).

[0097] 2) Load nodes P1, P2, ..., P participating in carbon management n Send their respective energy and carbon data in plaintext x i (i = 1, 2, ..., n) are encrypted using the BFV fully homomorphic encryption algorithm to obtain the second ciphertext c. i The algorithm is as follows:

[0098]

[0099]

[0100] Among them, plaintext space n > 2 and n is a power of 2, t is the plaintext modulus (t > 1). Ciphertext space The ciphertext modulo is q, where q is a prime number and satisfies q≡1 (mod 2n) and q>t. σ is a discrete Gaussian distribution The standard deviation of λ. λ is the safety factor, and ω is the base of the logarithm. This indicates that the private key s is a uniform sample of a finite set R2. p0=pk[0], p1=pk[0]. ct∈R q .

[0101] 3) The load nodes participating in carbon management receive their respective second data ciphertext c i Then, the second encrypted data c i Send to the cloud server.

[0102] Step 3.4: The cloud server receives the second encrypted data c sent by each load node. i Then, a secure multi-party computation protocol is used for processing to obtain the result y→f(c1, c2, ..., c i ).

[0103] Step 3.5: The cloud server performs homomorphic computation on the result y obtained from the secure multi-party computation protocol. The homomorphic computation algorithm is Evaluate(pk, c1, c2, ..., c...). n For multiple second data ciphertexts c1, c2, ..., c n This describes the process of using the public key pk to perform an arbitrary algebraic operation f. Through homomorphic computation, the result Evaluate(y′) → (y′1, y′2, ..., y′) can be obtained. n The result y′ is then returned to each load node involved in carbon management.

[0104] All load nodes in the carbon management system receive encrypted energy and carbon data processed by the cloud server. Due to the nature of fully homomorphic encryption, carbon managers can directly operate on the encrypted data, ensuring the security of energy and carbon data for each load node.

[0105] It is worth noting that this application is based on blockchain hybrid encryption technology, that is, processing plaintext data through the RSA asymmetric encryption algorithm to improve the security of data source collection and storage; and then encrypting plaintext data through BFV fully homomorphic encryption smart contracts to ensure the security and computability of data during storage and circulation, thereby achieving data availability while protecting data storage security; compared with traditional edge-source encryption or cloud encryption, the data has higher security and computability, and is more suitable for large-scale, high-frequency, multi-entity application scenarios.

[0106] To verify the effectiveness of the method proposed in this patent, security proofs are provided for the two encryption scenarios involved in this patent.

[0107] (1) Edge security proof

[0108] The edge layer primarily employs the RSA algorithm, a type of asymmetric encryption. In RSA cryptography, the public key PU is publicly available, meaning the values ​​of e and n can be obtained by a third party. The problem of cracking RSA cryptography is to find a way to deduce the value of d from the known values ​​of e and n, thus obtaining the private key to decrypt the ciphertext. From the principles of RSA, we know that (de)mod((p-1)(q-1))=1, which leads to the derivation d≡e. -1 (mod((p-1)(q-1))) or de≡1(mod((p-1)(q-1))). Therefore, the essential problem in cracking the password is to find (p-1) and (q-1) using the values ​​of p and q. That is, by finding the values ​​of p and q, we can find the value of d and obtain the private key. When p and q are large prime numbers, factoring their product p×q into factors p and q is a well-known mathematical problem, thus ensuring the difficulty of cracking the private key and consequently guaranteeing the security of the data.

[0109] (1) Cloud security proof

[0110] The cloud primarily employs a secure multi-party computation protocol based on BFV fully homomorphic encryption to ensure data security and computability. To facilitate proof of the proposed security, based on the characteristics of blockchain networks, the network type is set as a synchronous network, meaning there are no asynchronous clocks between load nodes, and the channel mode is a trusted secure channel. The adversaries are semi-honest participants, and the cloud server acts as a third party serving as the computing center. The following will demonstrate the security of identity verification and the security of smart contract encryption / decryption.

[0111] 1) Security of authentication

[0112] If a malicious attacker attempts to forge or steal the identity of a load node, he must forge a signature certificate based on the ECDSA algorithm generated by the blockchain system's CA or an authoritative institution. This is computationally infeasible, meaning that the identity of a node in the blockchain is trustworthy.

[0113] 2) Security of smart contract encryption / decryption

[0114] Since the security of smart contract encryption / decryption protocols can be generalized to the security of fully homomorphic encryption algorithms, the security of the BFV fully homomorphic encryption algorithm can be proven through the Indistinguishable Choice Plaintext Attack (IND-CPA) model.

[0115] The challenger runs the public key generation algorithm (PublicKeyGen(sk)): input s = sk, selects... And e←χ, output pk=([-(as+e)] q a) thus obtaining the public key pk. The adversary A chooses plaintext m. iLet i = 0, ..., n. A query is made to the cryptographic oracle. After receiving the ciphertext response, adversary A submits the chosen plaintext m in multiple stages. i Let i = 0, ..., n, and obtain the ciphertext c corresponding to different plaintexts. i , i = 0, ..., n. At this point, adversary A selects two plaintexts, m0 and m1, and sends them to the challenger. The challenger selects b ∈ {0, 1} and sends the challenge ciphertext ct = ([Δm... b +p0u+e1] q [p1u+e2] q The attack is sent to adversary A. Adversary A outputs b′, and the attack succeeds when b′ = b. Since the fully homomorphic encryption scheme used in this patent is based on the RLWE problem, adversary A's advantage can be reduced to the advantage of solving the RLWE problem. If the advantage of adversary A is negligible, then for any polynomial-time adversary A, the probability of a successful attack is Adv. IND-CPA(A) satisfy Therefore, the BFV fully homomorphic encryption algorithm is IND-CPA secure.

[0116] In summary, both levels of encryption used in this application are secure.

[0117] Example 2

[0118] Based on the same inventive concept as Embodiment 1, this embodiment provides an energy carbon data security processing system, which includes:

[0119] On the load side, it is used to collect users' raw energy and carbon data in real time; and to preprocess the raw energy and carbon data to obtain plaintext energy and carbon data.

[0120] At the edge, it receives plaintext energy and carbon data; and uses a lightweight encryption algorithm to process the plaintext energy and carbon data to obtain the first ciphertext data, and uploads the first ciphertext data to the blockchain for storage.

[0121] The load node is used to decrypt and verify the first data ciphertext. In response to the successful verification of the first data ciphertext, it encrypts the decrypted plaintext energy and carbon data through a smart contract to obtain the second data ciphertext.

[0122] The server is used to process the second encrypted data and send the result to the load node.

[0123] Example 3

[0124] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0125] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0126] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0127] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0128] As is known from common technical knowledge, this invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this invention or its equivalents are included in this invention.

Claims

1. A method for securely processing carbon data, characterized in that, include: Receive plaintext energy carbon data; A lightweight encryption algorithm is used to process the plaintext energy and carbon data to obtain the first ciphertext, and the first ciphertext is uploaded to the blockchain for storage. The first data ciphertext is decrypted and verified. In response to the successful verification of the first data ciphertext, the decrypted plaintext energy and carbon data is encrypted through a smart contract to obtain the second data ciphertext. The second encrypted data is processed, and the result is sent to the load node; The plaintext energy carbon data is processed using a lightweight encryption algorithm to obtain the first ciphertext, which includes: The public and private keys are generated using the RSA asymmetric encryption algorithm; A digital signature is obtained by encrypting the plaintext digest using a private key. The plaintext digest is obtained by processing the plaintext energy and carbon data. The first ciphertext of the energy carbon data is obtained by encrypting the plaintext, plaintext digest, and digital signature using a public key. The public and private keys generated using the RSA asymmetric encryption algorithm include: Randomly generate two large prime numbers and ,and , Different; calculate At the same time, ; Randomly generate a pair with Coprime integers ,make And satisfy ; calculate Obtain the public key private key ; in, and The entire process was kept confidential. The function returns the greatest common divisor of two or more certificates; In number theory, is the symbol for congruence. Obtaining the digital signature and the first encrypted data includes: Using private key Encrypt the plaintext digest to obtain a digital signature; Using public key Encrypt the plaintext, plaintext digest, and digital signature of the energy carbon data to obtain the first ciphertext data; in, For the private key of the carbon data source, The public key for the carbon data management terminal; The decryption and verification process for the first data ciphertext includes: Using private key Decrypt the first encrypted data to obtain the digital signature and plaintext energy and carbon data; Using public key Decrypt the digital signature to obtain the plaintext digest; The SHA256 algorithm is used to perform hash operations on the plaintext energy carbon data to obtain a plaintext digest. The plaintext digest obtained through hashing is compared with the plaintext digest obtained through decryption. If the results match, the verification is successful; otherwise, the verification fails. in, For the public key of the carbon data source, This is the private key for the carbon data management terminal.

2. The energy and carbon data security processing method according to claim 1, characterized in that, The plaintext digest is obtained by hashing the plaintext energy and carbon data using the SHA256 algorithm.

3. The energy and carbon data security processing method according to claim 1, characterized in that, Encrypting the plaintext energy and carbon data obtained through decryption via a smart contract involves the smart contract executing the BFV fully homomorphic encryption algorithm to encrypt the plaintext energy and carbon data obtained through decryption.

4. The energy and carbon data security processing method according to claim 1, characterized in that, The second encrypted data is processed, and the result is sent to the load node, including: The second ciphertext is processed using a secure multi-party computation protocol based on BFV fully homomorphic encryption to obtain the result. Using homomorphic computation algorithm Regarding the results Process and obtain ,Will Send to the load nodes that participate in energy and carbon data management.

5. The energy and carbon data security processing method according to claim 1, characterized in that, The method for obtaining the plaintext energy and carbon data includes: Real-time collection of users' raw energy and carbon data; The raw energy and carbon data is preprocessed to obtain plaintext energy and carbon data.

6. A carbon data security processing system, characterized in that, The method for securely processing energy and carbon data according to any one of claims 1-5 includes: The edge terminal is used to receive plaintext carbon data; it is also used for... A lightweight encryption algorithm is used to process the plaintext energy and carbon data to obtain the first ciphertext, and the first ciphertext is uploaded to the blockchain for storage. In the cloud, it is used to decrypt and verify the first encrypted data. Upon successful verification of the first encrypted data, a smart contract is used to encrypt the decrypted plaintext energy and carbon data to obtain the second encrypted data. It is also used for... The second encrypted data is processed, and the result is sent to the load node.

7. The energy and carbon data security processing system according to claim 6, characterized in that, The cloud includes: The load node is used to decrypt and verify the first data ciphertext. In response to the successful verification of the first data ciphertext, it encrypts the decrypted plaintext energy and carbon data through a smart contract to obtain the second data ciphertext. The server is used to process the second encrypted data and send the result to the load node.

8. The energy and carbon data security processing system according to claim 6, characterized in that, It also includes the load end; The load end is used to collect users' raw energy and carbon data in real time; and is used for... The raw energy and carbon data is preprocessed to obtain plaintext energy and carbon data.

9. A carbon data security processing device, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Privacy encryption method, electronic equipment, storage medium and chip

    CN114448641A

  • Encryption device, encryption method, encryption program, computer-readable recording medium with the encryption program recorded, decoder, decoding method, decoding program, the computer-readable recording medium with the decoding program recorded, encryption decoding system, encrypted logic revising device, random number generating device, replacement device, quantum encryption device, and encryption device

    JP2003046501A