CN119293845A - A method and system for protecting power data privacy based on blockchain and homomorphic encryption - Google Patents
A method and system for protecting power data privacy based on blockchain and homomorphic encryption Download PDFInfo
- Publication number
- CN119293845A CN119293845A CN202411351145.6A CN202411351145A CN119293845A CN 119293845 A CN119293845 A CN 119293845A CN 202411351145 A CN202411351145 A CN 202411351145A CN 119293845 A CN119293845 A CN 119293845A
- Authority
- CN
- China
- Prior art keywords
- data
- ciphertext
- private key
- blockchain
- homomorphic encryption
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/008—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/085—Secret sharing or secret splitting, e.g. threshold schemes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Power Engineering (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method and a system for protecting privacy of electric power data by using a blockchain and homomorphic encryption, which belong to the technical field of electric power data privacy protection and comprise the steps that a data provider encrypts electric power data by using Paillier homomorphic encryption, uploads a ciphertext hash value to the blockchain, digitally signs the ciphertext, and divides a secret key so that each data consumer receives the ciphertext, the signature and a secret key fragment; and after the data source and integrity verification, the data demand party performs cooperative decryption to obtain a plaintext. The invention obviously improves the safety of the secret key through the distributed storage of the secret key sharing scheme, avoids single-point faults, improves the fault tolerance of the whole system, optimizes the flexibility of data transaction, improves the encryption and decryption efficiency, improves the speed and performance of data processing, ensures the instantaneity of data transaction, reduces the resource consumption and improves the user experience for a large number of data transaction processes.
Description
Technical Field
The invention relates to the technical field of power data privacy protection, in particular to a power data privacy protection method and system for blockchain and homomorphic encryption.
Background
Along with the acceleration of the digital revolution of the smart power grid, the collection, storage and analysis of the power data become important parts for developing the power industry, the value of the power data is increasingly outstanding, the island of the data is broken, and the intrinsic value of the released data is particularly important. However, domestic power data transactions are in the development stage, and many problems remain to be solved in the transaction process. The data is taken as a digital asset, the digital asset has the characteristics of replicability, namely use and the like, the electric power data relates to user privacy, is a civil affair, and causes electric power data transaction difficulty, so that the electric power data privacy protection is particularly important. However, conventional power data transactions also have a certain centralization problem, and all power data is subject to a third party intermediary, which creates a certain security risk, increasing the risk of data leakage and misuse. Moreover, it is necessary to ensure the integrity and privacy of the power data in transaction, and to avoid data tampering or information errors caused by attacks.
However, the blockchain is used as an emerging distributed account book, and has the characteristics of being transparent, decentralised, non-tamperable, traceable and the like, thereby being beneficial to protecting the energy data transaction privacy and improving the transaction efficiency. The homomorphic encryption technology is used as an asymmetric encryption method, has homomorphic property, namely the operation on ciphertext is equivalent to the operation on plaintext, so that 'computable invisibility' of data is realized, and the block chain is combined with the homomorphic encryption technology to exert corresponding advantages, so that the problems of energy data transaction can be solved, privacy protection in the process of electric power data transaction is completed, and decentralization of energy data transaction is realized. Therefore, the application aims to combine the blockchain and homomorphic encryption technologies with each other and designs a novel power data privacy protection technology.
Disclosure of Invention
In order to solve the problems, the invention aims to provide a block chain and homomorphic encryption power data privacy protection technology, which can realize fault tolerance, enhance the privacy of individual users in an aggregation scheme, ensure the safe execution of transactions and improve the transaction efficiency.
In order to achieve the technical purpose, the application provides a block chain and homomorphic encryption power data privacy protection method, which is characterized by comprising the following steps:
The data provider encrypts the electric data by utilizing Paillier homomorphic encryption, uploads a ciphertext hash value to a blockchain, digitally signs the ciphertext, and segments a key so that each data requiring party receives the ciphertext, the signature and key fragments, wherein a public-private key pair for signing is generated by utilizing a DSA algorithm, the ciphertext is signed by a private key of the public-private key pair for signing;
and after the data source and integrity verification, the data demand party performs cooperative decryption to obtain a plaintext.
Preferably, in encrypting the power data using the Paillier homomorphic encryption, the data provider generates a public-private key pair for encrypting the data, and encrypts the original data with the public key to obtain a ciphertext, wherein the public key of the public-private key pair is pk d = (n, g), the private key is sk d = (λ, μ),
Wherein, p and q are randomly generated two large prime numbers, lcm (the term of lcm) is a least common multiple function, g is a random positive integerThe L (x) function is defined asN represents an integer obtained by multiplying two large prime numbers p and q, x represents an arbitrary number,Representing the multiplicative group of modulo n 2, i.e., the set of all integers smaller than n 2 and prime to n 2, mod represents the modulo operation, i.e., the remainder of the division of two numbers.
Preferably, in digitally signing the ciphertext, a public-private key pair (pk s,sks) for signing is generated using DSA algorithm, and ciphertext S is signed sigS =sig (sk s, S) using private key sk s.
Preferably, in the process of verifying the data origin, the data origin is verified by verifying the validity of the signature, wherein the verification process of the validity is expressed as:
Where q is a prime number of length N bits, p is a number of length L selected and p-1 is a multiple of q, ω represents a value calculated by an inverse of S for signature authentication, u 1 represents a value calculated by ω and ciphertext hash value H (S), u 2 represents a value calculated by ω and r, u 1 and u 2 are both used to check validity of a signature, y represents a part of a digital signature public key, H (S) represents taking a hash value of ciphertext, S, r represent a part of signature, and S represents ciphertext after homomorphic encryption, respectively.
Preferably, in the process of verifying the data integrity, after the verification of the data source is passed, the verification of the data integrity is completed by checking whether the hash value of the ciphertext data is consistent with the stored value on the chain, wherein if the hash value is inconsistent during the verification, the data is tampered by an attacker or lost in the data transmission process is indicated, an abnormal warning is sent to a data sender by the data demand, and a data packet is reacquired, and if the comparison is successful, the data is indicated not to be tampered in the transmission process.
Preferably, in the process of performing cooperative decryption, any k receivers cooperatively decrypt, take out (x 1,,f(x1)),(x2,,f(x2)),…,(xk,f(xk)) to obtain:
The use of matrix multiplication is expressed as:
From the above equation, a 0,a1,a2,…,ak-1 is found, the polynomial f (x) =a 0+a1x+a2x2+…+ak-1xk -1 is reconstructed, and x=0 is substituted into the recovery key sk d=a0.
Preferably, in the process of obtaining the plaintext, ciphertext decryption is performed through the recovered private key, and the obtained plaintext is expressed as:
Preferably, during the Paillier homomorphic encryption and decryption process, the CRT is used to encrypt and decrypt the Paillier homomorphic encryption and decryption process under the condition of having the private key The lower modular exponentiation translates toAndTherefore, encryption and decryption efficiency is improved.
The invention discloses a block chain and homomorphic encryption power data privacy protection system, which is used for realizing the power data privacy protection method, and comprises the following steps:
The encryption module is used for providing an encryption function for a data provider, enabling the data provider to encrypt electric data by utilizing Paillier homomorphic encryption, uploading a ciphertext hash value to a blockchain, digitally signing the ciphertext, dividing a key so that each data consumer receives the ciphertext, the signature and key fragments, generating a public-private key pair for signature by utilizing a DSA algorithm, signing the ciphertext by a private key of the public-private key pair for signature, and dividing a private key by shamir keys according to the public-private key pair for encrypting the data generated by the data provider to obtain a plurality of private key fragments;
And the decryption module is used for providing decryption functions for a plurality of data requesters, and after each data requester verifies the data source and the integrity, the plurality of data requesters perform cooperative decryption to obtain a plaintext.
Preferably, the encryption module is further configured to encrypt the original data according to a public-private key pair generated by the data provider and obtain a ciphertext by encrypting the original data with the public key, where the public key of the public-private key pair is pk d = (n, g), the private key is sk d = (λ, μ),
Wherein, p and q are randomly generated two large prime numbers, lcm (the term of lcm) is a least common multiple function, g is a random positive integerThe L (x) function is defined asN represents an integer obtained by multiplying two large prime numbers p and q, x represents an arbitrary number,Representing the multiplicative group of modulo n 2, i.e., the set of all integers smaller than n 2 and prime to n 2, mod represents the modulo operation, i.e., the remainder of the division of two numbers.
The invention discloses the following technical effects:
The invention adopts the block chain mode to ensure that nodes added into the block chain can unconditionally trust each other, thereby achieving the purpose of decentralization;
the invention realizes an identity privacy protection mechanism, protects the true identities of both transaction parties through a pseudonymous algorithm, reduces the risk of revealing the user privacy, and thereby improves the privacy and the safety of the transaction;
the invention obviously improves the safety of the secret key through the distributed storage of the secret key sharing scheme, avoids single-point faults, can not independently decrypt data even if the secret key of a certain participant is stolen, improves the fault tolerance of the whole system, and optimizes the flexibility of data transaction;
Aiming at a large number of data transaction processes, the encryption and decryption efficiency is improved, the speed and performance of data processing are improved, the instantaneity of data transaction is ensured, the resource consumption is reduced, and the user experience is improved;
the transaction data Hash value is stored on the blockchain, the characteristics of the blockchain enable the transaction data to be unable to be tampered, and traceability of data transaction is guaranteed through a digital signature technology.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block chain and homomorphic encryption power data privacy protection framework diagram in accordance with the present invention;
FIG. 2 is a block chain and homomorphic encryption based energy data privacy protection function in accordance with the present invention;
FIG. 3 is a block chain and homomorphic encryption power data privacy protection flow chart in accordance with the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
As shown in fig. 1-3, the existing power data transaction privacy protection method mainly has the following disadvantages:
1) Traditional power data transaction adopts a third party centralization platform, and a third party intermediary can have all transaction data, so that the trust of the third party intermediary must be ensured, and once the third party intermediary has malicious operation, the transaction data can be revealed or the private buying and selling of the transaction data can be caused, so that irreversible injury can be caused.
2) Traditional power data transactions are often aimed at privacy protection of power data, and often do not pay attention to privacy protection of identity information of both parties of the transaction, which may lead to a series of potential security and privacy problems, especially in cases involving sensitive data and important business transactions. Therefore, a method for protecting the identity information of both parties to a transaction and protecting the data from disclosure is needed.
3) Traditional power data transaction modes may employ a single key management approach, i.e., the key of the entire system is centrally stored in one place. This way there is a risk of a single point of failure and once the location of the key store is attacked or fails, the security of the whole system is severely compromised. How to improve the fault tolerance of the whole system is one of the problems faced at present.
4) In the electric power data transaction, because a large amount of data needs to be processed, and the real-time requirement is high, the requirements on the safety and privacy of the data are high, so that in order to improve the efficiency and the safety of the electric power data transaction, an efficient encryption and decryption algorithm and a technical means are needed, and the electric power data transaction method is one of the problems which are important to pay attention at present
In order to solve the problems in the prior art, the invention provides a data privacy protection technology based on blockchain and homomorphic encryption, and the involved participating subjects mainly comprise a data provider and a data demander, and each participating subject needs to protect own true identity when performing data transaction. Meanwhile, the data provider is to ensure that the transaction data is sent in a ciphertext form, upload the ciphertext hash value to the blockchain, digitally sign the ciphertext, divide the secret key, and each data consumer can only receive the ciphertext, the signature and the secret key fragments. And the data demand party performs data source and integrity verification and cooperates decryption to obtain a plaintext.
Blockchain in narrow sense, the blockchain is a data structure for linking data blocks according to time sequence and guarantees an emerging distributed account book which cannot be tampered and counterfeited in a cryptographic way, in broad sense, the blockchain technology utilizes the chain data structure to store and verify data for the bottom layer, adopts a consensus mechanism to achieve consistency, guarantees the security of data transmission and access on the basis of cryptography, and utilizes an emerging distributed infrastructure and calculation paradigm of intelligent contracts to program and operate the data.
Homomorphic encryption is a cryptographic technique based on the theory of computational complexity of mathematical problems. The homomorphically encrypted data is processed to obtain an output, and the output is decrypted, the result of which is the same as the output result obtained by processing the unencrypted original data by the same method.
Key sharing is a method for distributing, storing and recovering secret keys (giving up other secret information), wherein a key manager splits the secret keys into a series of mutually related secret information (called sub-keys) and distributes the sub-keys to each member in a certain group, so that after each member in some groups (authorized sets) takes out their sub-key, the secret key can be recovered by a given method, and other groups (unauthorized sets) cannot recover the secret key. The use of a key kiosk in an information system in a real environment can prevent loss, corruption, and attack from an adversary of the system key, reduce the responsibility of the key holder (individual or server), and also reduce the success rate of adversary decrypting the key.
Digital signature-digital signature is a section of digital string which can not be forged by others only the sender of information, and is also a valid proof of the authenticity of the information sent by the sender of information.
The invention discloses a data privacy protection technology based on blockchain and homomorphic encryption, which specifically comprises the following contents:
1. blockchain-based point-to-point data transactions:
Blockchain-based data transactions are a way of decentralized point-to-point data transactions. The system model mainly comprises a data provider, a data demander and a blockchain decentralization transaction platform. The data provider mainly provides data, obtains additional value through transaction, breaks data island, and needs to ensure the protection of personal identity in the transaction process, and simultaneously ensures the integrity and availability of the data. The data demand party is the party desiring to acquire the data, and the data is utilized to the maximum extent by mining the potential value of the data. The block chain decentralization transaction platform realizes the non-falsification and traceability of data and transaction through a block chain technology, does not store transaction data, and only stores a data Hash value.
In the data transaction process, the data provider and the data demand party generate a pseudonym according to the own real identity by utilizing a random function and a hash algorithm, protect the real identities of the transaction parties, register the real identities with a blockchain and become legal transaction users. The data provider uploads the data index information, so that the data demand party can conveniently judge whether the data is required by the data demand party or not, and if the data demand party meets the self requirement, the data demand party submits a transaction request and purchases the data.
2. Homomorphic encryption based data privacy protection:
1) Homomorphic encryption of power data:
the data provider encrypts the power data using Paillier homomorphic encryption. First, the data provider generates a public-private key pair for encrypting data as shown in formula (1):
wherein, p and q are randomly generated two large prime numbers, lcm (the term of lcm) is a least common multiple function, g is a random positive integer The L (x) function is defined asN represents an integer obtained by multiplying two large prime numbers p and q, x represents an arbitrary number,Representing the multiplicative group of modulo n 2, i.e., the set of all integers smaller than n 2 and prime to n 2, mod represents the modulo operation, i.e., the remainder of the division of two numbers.
At this time, a public-private key pair of the paillier homomorphic encryption algorithm is obtained, the public key is Pk d = (n, g), and the private key is sk d = (λ, μ). Then, the original data is encrypted by using the public key pkd to obtain a ciphertext, as shown in formula (2):
S=gMrn(mod n2) (2)
Wherein M represents the original data, S represents the ciphertext, r is a random number, and r < n.
2) Digital signature:
The data provider generates a public-private key pair (pk s,sks) for signing using DSA algorithm, signs the ciphertext S using private key sk s sigS =sig (sk s, S).
First a hash function SHA-256 is selected, and then a key length l=2048 and a prime length N are selected. A prime number q of length N bits is selected, N must be less than or equal to the length of the hash output. The number p of one L-bit length is chosen such that p-1 is a multiple of q. A number g is found such that g≡2 (p-1)/q (mod p). Once the parameters (p, q, g) are generated, the public and private keys can be calculated. First, a random x of 0< x < q is selected. Next, y is calculated, where y≡g x (mod p). Resulting in public key pk s = (p, q, g, y) and private key sk s = x. Signing the ciphertext by using the generated public and private key, as shown in formula (3):
Wherein k is a random number, 0< k < q, S is ciphertext after homomorphic encryption, H (S) is a Hash value process of the ciphertext, and a digital signature sigS = (r, S) is obtained. And uploading the obtained Hash value Hashs =h (S) to the blockchain network.
3) Shamir key segmentation:
shamir key sharing is a (k, n) threshold key sharing scheme based on the lagrangian interpolation formula.
In order to avoid a single key management mode, similarly, an attacker attempting to acquire a data packet in the transmission process is avoided, even if the data packet is acquired, the plain text cannot be decrypted, shamir key segmentation is performed on the private key sk d, n private key fragments, namely sk d1,skd2...skdn, are obtained, and each data receiver only receives the private key fragments sk di and does not store the complete private key. The following scheme is a specific process of key segmentation:
First, let a 0=skd take k-1 random numbers a 0,a1,a2,…,ak-1, construct the following polynomial:
f(x)=a0+a1x+a2x2+…+ak-1xk-1 (4)
Next, n numbers x 1,x2,...,xk-1,xk are substituted into the polynomials to obtain f (x 1),f(x2),…,f(xn). And finally, skd1=(x1,,f(x1)),skd2=(x2,,f(x2)),…,skdn=(xn,f(xn)) is respectively sent to n participants.
Ciphertext S, signature sigS, private key fragment sk di are sent to the data consumer, data packet c= (S, sigS, sk di).
4) And (3) message authentication:
a) Data source verification:
after the data demand side receives the data packet C, checking whether the ciphertext is sent by the data provider, namely checking the validity of the signature. As formula (5):
Where ω represents a value calculated by an inverse of S for signature authentication, u 1 represents a value calculated by ω and a ciphertext hash value H (S), u 2 represents a value calculated by ω and r, u 1 and u 2 are both used to check the validity of a signature, y represents a part of a digital signature public key, and H (S) represents a hash value of a ciphertext;
If v=r, the signature validity verification is passed, and the data packet is indicated to come from the data provider, so that the data source verification is completed.
B) Data integrity verification:
After the data authentication passes, the data integrity is verified. By checking whether the hash value of the ciphertext data is consistent with the stored value on the chain. If the data is not consistent in verification, the situation that the data is tampered by an attacker or lost in the data transmission process is indicated, an abnormal warning is sent to a data sender by the data demand and the data packet is acquired again, and if the comparison is successful, the situation that the data is not tampered in the transmission process is indicated, and the data integrity verification is completed.
5) Collaborative decryption:
The data demand party operates the ciphertext by utilizing homomorphic confidentiality, and verifies whether the data meets the demand of the data demand party or not, so that the false data is prevented from being provided by the sender. The multiple data requesters cooperate to recover the key and decrypt the plaintext.
Any k receivers cooperate to decrypt, take out (x 1,,f(x1)),(x2,,f(x2)),…,(xk,f(xk)), and obtain formula (6):
expressed using matrix multiplication as formula (7):
From the above equation, a 0,a1,a2,…,ak-1 is found, the polynomial f (x) =a 0+a1x+a2x2+…+ak-1xk-1 is reconstructed, and x=0 is substituted into the recovery key sk d=a0. Decrypting the ciphertext using the recovered private key, as in equation (8):
in the Paillier cryptosystem, the main overhead of encryption and decryption is that in And performing modular exponentiation operation. In the case of possession of a private key, using a CRT willThe lower modular exponentiation translates toAndTherefore, encryption and decryption efficiency is improved.
3. A blockchain and homomorphic encryption power data privacy protection implementation:
And according to the construction of the first partial data privacy protection model, writing a corresponding intelligent contract and a corresponding Python algorithm to realize automatic execution of data transaction and privacy protection thereof. A block chain and homomorphically encrypted power data privacy preserving framework diagram is shown in fig. 1.
3.1, Privacy protection scheme function based on blockchain and homomorphic encryption:
the block chain-based and homomorphic encryption privacy protection scheme is mainly divided into the following four core functions, namely identity protection, data privacy protection, integrity and source protection and data decryption.
Identity protection-identity protection refers to ensuring that the true identity of the data provider and the data demander is not compromised. For both the data provider and the data demander, pseudonyms are generated using pseudonym algorithms, which can be used as their identity on the blockchain without exposing their real identity information. Mapping the generated pseudonym with real identity information, and registering the pseudonym on a blockchain as a legal transaction user. The registration process should be completed by the contract creator, ensuring the trustworthiness and security of the registration process. In the transaction process, the parties participating in the transaction can use the pseudonyms registered on the blockchain to carry out identity verification without directly exposing the real identity information of the parties, thereby ensuring that the real identities of the parties in the transaction are not revealed.
And the data privacy protection is that the data provider encrypts the power data by a homomorphic encryption method optimized by China remainder theorem, so that the data is ensured not to leak plaintext in the transmission and storage processes. The data provider takes the Hash value from the encrypted data, and then uploads the Hash value to the blockchain so as to ensure whether the follow-up verification data is tampered in the transmission process. The data provider carries out digital signature on the encrypted data so as to realize verification of message source and ensure the integrity and credibility of the data. And the data provider performs key segmentation on the encrypted private key and sends the encrypted data, the digital signature and the private key fragments to the data demander.
Integrity and origin protection data integrity and origin verification is to verify whether data is sent out by a data provider and whether the data is tampered in the transmission process after the data packet is received by a data requiring party. Firstly, a data demand party acquires a data Hash value uploaded by a data provider through inquiring a block chain, recalculates the Hash value according to a received ciphertext, compares whether the two Hash values are consistent, and if so, indicates that the data is not tampered in the transmission process. The data demand party compares the decrypted digital signatures, and if the signature verification is successful, the data demand party indicates that the data is sent by the data provider.
And the data decryption step of enabling the data demand party to only decrypt the private key fragments correspondingly, and after the data demand party receives the private key fragments, respectively storing and combining the private key fragments with other data demand parties to restore the complete private key, and decrypting the received ciphertext data according to the complete private key to obtain a data plaintext.
3.2, A blockchain and homomorphic encryption Power data privacy protection procedure
1) Each user participating in the energy data transaction generates a pseudonym and registers with the blockchain. Firstly, generating a random factor, combining the random factor with the true identity, and calculating through a hash function to obtain a pseudonym pd i, so as to protect the true identity of a user participating in a transaction. The user calls registerUser () function to register as a legitimate transaction user.
2) The data provider sets the key size key_size=2048 to ensure the security performance, then generates Paillier public-private key pair (pk d,skd), encrypts plaintext by using public key, and because Paillier algorithm exists based on the residual assumption of complex order, has good compatibility to integer, the data is amplified before being encrypted, then encrypted and the same multiple reduction is carried out when decrypting.
3) The data provider performs a hash algorithm on the encrypted data, uploads the hash value to the blockchain, then generates a public-private key pair (pk s,sks) of the DSA digital signature algorithm, sets key_size=2048 as well, signs the ciphertext hash value by using DSA algorithm private key sk s to obtain a signature sigS, and the data provider divides the Paillier algorithm private key sk d key to obtain n private key fragments sk d1,skd2…skdn. The ciphertext S, signature sigS, private key fragment sk di are sent to the data consumer.
4) After the data demand side receives the data packet, firstly decrypting the signature, verifying whether the data is sent by the data demand side, obtaining a Hash value of data transmission, comparing the Hash value with the Hash value in the block chain to verify whether the data is lost or tampered in the transmission process, and if the data is wrong, requesting the data provider to retransmit the data packet.
5) After the data desiring party completes the verification of the data integrity and the data originality, the data desiring parties cooperate to recover the Paillier private key sk d to decrypt the plaintext, and similarly, the data is reduced to the original multiple during decryption.
The invention designs a data privacy protection scheme based on the combination of the Paillier homomorphic encryption algorithm and the key sharing, and enhances the privacy of individual users in the aggregation scheme while realizing fault tolerance by adding a flexible aggregation threshold. The distributed energy data transaction information protection scheme based on the blockchain ensures the safe execution of the transaction and improves the transaction efficiency.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411351145.6A CN119293845A (en) | 2024-09-26 | 2024-09-26 | A method and system for protecting power data privacy based on blockchain and homomorphic encryption |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411351145.6A CN119293845A (en) | 2024-09-26 | 2024-09-26 | A method and system for protecting power data privacy based on blockchain and homomorphic encryption |
Publications (1)
Publication Number | Publication Date |
---|---|
CN119293845A true CN119293845A (en) | 2025-01-10 |
Family
ID=94153965
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411351145.6A Pending CN119293845A (en) | 2024-09-26 | 2024-09-26 | A method and system for protecting power data privacy based on blockchain and homomorphic encryption |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119293845A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN120185793A (en) * | 2025-05-19 | 2025-06-20 | 湖北方源东力电力科学研究有限公司 | A smart meter data protection method based on homomorphic encryption algorithm |
-
2024
- 2024-09-26 CN CN202411351145.6A patent/CN119293845A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN120185793A (en) * | 2025-05-19 | 2025-06-20 | 湖北方源东力电力科学研究有限公司 | A smart meter data protection method based on homomorphic encryption algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113364576B (en) | A blockchain-based data encryption storage and sharing method | |
US10530585B2 (en) | Digital signing by utilizing multiple distinct signing keys, distributed between two parties | |
CN104821880B (en) | One kind is without certificate broad sense agent signcryption method | |
CN109547209B (en) | Two-party SM2 digital signature generation method | |
US20230224147A1 (en) | Generating shared private keys | |
US20240097894A1 (en) | Threshold key exchange | |
EP4423961A1 (en) | Generating shared keys | |
CN117411613A (en) | A verifiable outsourced encryption method based on blockchain | |
CN119293845A (en) | A method and system for protecting power data privacy based on blockchain and homomorphic encryption | |
CN110519040B (en) | Anti-quantum computation digital signature method and system based on identity | |
JP2025506640A (en) | Method and structure for establishing a digital identity - Patents.com | |
US20240372732A1 (en) | Generating digital signature shares | |
CN109831305B (en) | Anti-quantum computation signcryption method and system based on asymmetric key pool | |
JP2024541936A (en) | Threshold Signature Scheme | |
Abo-Alian et al. | Auditing-as-a-service for cloud storage | |
CN110048852B (en) | Quantum communication service station digital signcryption method and system based on asymmetric key pool | |
Ebrahimi et al. | Enhancing cold wallet security with native multi-signature schemes in centralized exchanges | |
US20250125972A1 (en) | Generating digital signatures | |
Tanwar | Basics of cryptographic primitives for blockchain development | |
CN109787772B (en) | Anti-quantum computation signcryption method and system based on symmetric key pool | |
Lee et al. | Toward a secure single sign-on mechanism for distributed computer networks | |
CN119402187B (en) | Ciphertext storage method and system based on signature witness and identity encryption | |
CN109951287B (en) | Anti-quantum computation signcryption method and system based on private key pool | |
Das | A hybrid algorithm for secure cloud computing | |
CN120012147A (en) | A data encryption transmission method and system based on PSI calculation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |