A kind of smart power grid user sale of electricity method based on homomorphic cryptography
Technical field
The present invention relates to intelligent grid sale of electricity, more particularly to a kind of smart power grid user sale of electricity side based on homomorphic cryptography
Method.
Background technology
Intelligent grid, sets up on integrated, high-speed bidirectional communication network basis, utilizes advanced sensing and measurement skill
Art, advanced equipment and technology, advanced control method and advanced DSS technology etc., realize that power network is reliable, pacify
Entirely, Effec-tive Function economic, efficient, environment-friendly and using safety.Growing with intelligent grid, Utilities Electric Co. is no longer
Need staff to make house calls, and realize that miscellaneous service comes and goes simply by the network communication with terminal, in the process, letter
The security of breath transmission is focus of concern, and the protection to privacy of user also turns into the matter of utmost importance of Utilities Electric Co..
Operation is encrypted to transmission information, Utilities Electric Co. is interacted with user-to-user information and serves certain guarantee work
With homomorphic cryptography is relatively conventional and more effective method, Application No. in existing information ciphering method
The charging method in a kind of intelligent grid with secret protection is disclosed in 201410396335.X patent document, by intelligent electricity
Table records the use electricity of user in real time, will be sent using the method for homomorphic cryptography after data encryption to polymerizer, polymerizer will
The nonexpondable electricity ciphertext of a user received be decrypted again by summation operation obtain the user add up power consumption it is bright
Text, polymerizer again sends electricity to billing department the calculating for carrying out electricity cost in plain text, though the patent document employs homomorphism
Data are encrypted the mode of encryption, but realize simply by public-private key pair and AES the encryption of whole data transfer
With decryption, it can not accomplish to ensure its security in data transmission procedure.
The content of the invention
For problems of the prior art, the present invention provides a kind of smart power grid user sale of electricity based on homomorphic cryptography
Method, its process includes Utilities Electric Co. and sends power purchase request data to community's gateway, community's gateway priori card power purchase number of request
According to each user is issued to after errorless, after power purchase demand data is encrypted user by the method for homomorphic cryptography, send extremely
Community's gateway, community's gateway is sent to Utilities Electric Co. after the power purchase demand data of each user is summed, and Utilities Electric Co. receives community
Decryption restoration data are carried out after the power purchase demand data that gateway is uploaded;
Specifically include following steps:
(1) system initialization:
Utilities Electric Co. should choose some parameters, including cyclic group G, G that rank is qTAnd a Bilinear mapG×G→
GT, to allSet up;CalculateA homomorphism is produced to add
Migong key is to (f, g) and corresponding private key λ;
Three hash functions include H:H1:{0,1}*→ G, H2:H3:GT×GT→{0,
1}*, { 0,1 }*Represent the set of the binary sequence composition of any bit long;According to the parameter of selection, Utilities Electric Co., gateway with
And user respectively obtains the private key and public key of oneself;
(2) power purchase is asked:
Utilities Electric Co. sends power purchase request data to community's gateway, includes the identity ID of Utilities Electric Co.u, community's gateway body
Part IDg, pricing information Infop, key ruP0, time stamp T S and signature sigmau;
(3) community's gateway authentication
After community's gateway receives power purchase request data, first according to time stamp T S and signature sigmauVerify data authenticity and
Integrality, is then forwarded to each user in community;
(4) user replys:
User covers true power purchase demand data using homomorphic cryptography technology and obtains Bi, and generate digital signature σiAnd message
Authentication code MAC (Bi) backward community network close reply;
(5) community's gateway polymerize:
The power purchase demand data of all users received polymerize by community's gateway, the signature sigma being polymerize, and polymerization power purchase is needed
Ask data B, key group { riP0And Message Authentication Code MACf, sent to Utilities Electric Co.;
(6) Utilities Electric Co. decrypts:
Utilities Electric Co. is received after the polymerization power purchase demand data that community's gateway is sent, and data are decrypted with recovery sale of electricity part
Volume b(x)And verify.
Further, community's gateway and user are in the intelligent electric meter based on single-hop networks topological structure (single-hop)
Communication network (AMI) is communicated.
Further, it is to be communicated based on 5G networks between Utilities Electric Co. and community's gateway.
Further, the private key and public key in step (1), are generated as follows:
(a) Utilities Electric Co. IDuFromIn arbitrarily selection one element skuAs private key, and calculate PKu=skuP0It is used as public affairs
Key;
(b) community's gateway IDgFromIn arbitrarily selection one element skgAs private key, and calculate PKg=skgP0It is used as public affairs
Key;
(c) IDiFromIn arbitrarily selection one element skiAs private key, and calculate PKi=skiP0It is used as public key;
(d) the open parameter of Utilities Electric Co.'s issue
Further, step (2) and the pricing information Info in step (3)p, signature sigmauAnd to power purchase request data
Checking is carried out as follows:
(a) pricing information Infop={ p1,p2,...,pk, wherein k is total number of timeslots;
(b) signature sigmau=sku H1(IDu||IDg||Infop||ruP0| | TS), community gateway σuTo verify that power purchase is asked
The authenticity and integrity of data;
(d) after community's gateway receives power purchase request data, time stamp T S is first verified, equation is verified afterwardsWhether set up.
Further, true power purchase demand data is covered in step (4), its process is carried out as follows:
(a) key is calculated
(b) true power purchase demand data is covered using homomorphic encryption algorithm to obtain1
≤ x≤k, obtains set B afterwardsi=(Bi,1,Bi,2,…,Bi,k);
(c) Message Authentication Code is generated
(d) generation digital signature σi=ski H1(H(ki)||IDg||IDu||riP0||TS)。
Further, community's gateway polymerization in step (5), is carried out as follows:
(a) under the intelligent electric meter communication network (AMI) of single-hop networks topological structure (single-hop), the signature of polymerization
σ=∑1≤i≤nσi;
(b) each time slot polymerization power purchase demand dataWherein Afterwards
To set B=(B(1),B(2),…,B(k)), (1≤x≤k);
(c) Message Authentication Code MAC (B)=∏1≤i≤nMAC(Bi), meanwhile, gateway arbitrarily one element R of selection in community's is obtained
To Message Authentication Code MACf=(MAC1,MAC2), wherein MAC2=UH(B)VH (R)。
Further, Utilities Electric Co.'s decryption is carried out as follows in step (6):
(a)
(b) according to homomorphic encryption algorithm, private key λ is used, recovers each time slot polymerization power purchase demand data
(c) equation is verified
Whether set up, if so, then it is verified;
(d) calculateWith checking MAC2=UH(B’)VH(R’)。
A kind of smart power grid user sale of electricity method based on homomorphic cryptography of the present invention, has the advantages that:
According to the one-way and the characteristic of two-wire pair of hash function, in the way of public key signature private key is verified, it is ensured that electricity
Power company, community's gateway, the non repudiation of user profile and data integrity;According to the characteristic of homomorphic cryptography, use is concealed
The real information at family, so as to protect the privacy of sender, it is ensured that confidentiality;Except user oneself, community's gateway and electric power
Company can not all obtain the detail of user's power purchase demand, and also can only obtain multiple user's power purchases after Utilities Electric Co.'s decryption needs
The summation rather than the specific power purchase demand data of each user asked, this both reduces bandwidth occupancy, reduces meter during decryption
Complexity is calculated, while the identity of certification sender again, so as to simplify system, effectively prevent privacy of user and be disclosed, carry
High security and efficiency of transmission, protect the fairness of marketing.
Brief description of the drawings
, below will be to embodiment or existing for the clearer explanation embodiment of the present invention or technical scheme of the prior art
There is the accompanying drawing used required in technology description to be briefly described, it is clear that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of network structure of the smart power grid user sale of electricity method based on homomorphic cryptography of the present invention;
Fig. 2 is a kind of workflow diagram of the smart power grid user sale of electricity method based on homomorphic cryptography of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the present invention, clear, complete retouch is carried out to the technical scheme in the embodiment of the present invention
State, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Based on the present invention
In embodiment, all other reality that those skilled in the art is obtained on the premise of creative work is not made
Example is applied, protection scope of the present invention is belonged to.
It is a kind of smart power grid user sale of electricity method based on homomorphic cryptography of the present embodiment, its mistake as shown in Figures 1 and 2
Journey is to include Utilities Electric Co. to send power purchase request data to community's gateway, after gateway priori card power purchase request data in community's is errorless
N user is issued to, after power purchase demand data is encrypted n user by the method for homomorphic cryptography, is sent to community network
Close, community's gateway is sent to Utilities Electric Co. after the power purchase demand data of n user is summed, and Utilities Electric Co. receives community network and shut
Decryption restoration data are carried out after the power purchase demand data of biography.Community's gateway and user are based on single-hop networks topological structure
(single-hop) communicated under intelligent electric meter communication network (AMI).It is preferred that, it is between Utilities Electric Co. and community's gateway
Communicated based on 5G networks.
Specifically, smart power grid user sale of electricity method is comprised the following steps that:
(1) system initialization:
Utilities Electric Co. should choose some parameters, including cyclic group G, G that rank is qTAnd a Bilinear mapG×G→
GT, to allSet up;CalculateA homomorphism is produced to add
Migong key is to (f, g) and corresponding private key λ;
Three hash functions include H:H1:{0,1}*→ G, H2:H3:GT×GT→{0,
1}*, { 0,1 }*Represent the set of the binary sequence composition of any bit long;According to the parameter of selection, Utilities Electric Co., gateway with
And user respectively obtains the private key and public key of oneself.
Private key and public key in above step, are generated as follows:
(a) Utilities Electric Co. IDuFromIn arbitrarily selection one element skuAs private key, and calculate PKu=skuP0It is used as public affairs
Key;
(b) community's gateway IDgFromIn arbitrarily selection one element skgAs private key, and calculate PKg=skgP0It is used as public affairs
Key;
(c) IDiFromIn arbitrarily selection one element skiAs private key, and calculate PKi=skiP0It is used as public key;
(d) the open parameter of Utilities Electric Co.'s issue
(2) power purchase is asked:
Utilities Electric Co. sends power purchase request data to community's gateway, includes the identity ID of Utilities Electric Co.u, community's gateway body
Part IDg, pricing information Infop, key ruP0, time stamp T S and signature sigmau。
(3) community's gateway authentication:
After community's gateway receives power purchase request data, first according to time stamp T S and signature sigmauVerify data authenticity and
Integrality, is then forwarded to each user in community.
Specifically, step (2) and the pricing information Info in step (3)p, signature sigmauAnd power purchase request data is tested
Card is carried out as follows:
(a) pricing information Infop={ p1,p2,...,pk, wherein k is total number of timeslots;
(b) signature sigmau=sku H1(IDu||IDg||Infop||ruP0| | TS), community gateway σuTo verify that power purchase is asked
The authenticity and integrity of data;
(d) after community's gateway receives power purchase request data, time stamp T S is first verified, equation is verified afterwardsWhether set up.
(4) user replys:
User covers true power purchase demand data using homomorphic cryptography technology and obtains Bi, and generate digital signature σiAnd message
Authentication code MAC (Bi) backward community network close reply.
It is carried out as follows specifically, covering true power purchase demand data process:
(a) key is calculated
(b) true power purchase demand data is covered using homomorphic encryption algorithm to obtain1
≤ x≤k, obtains set B afterwardsi=(Bi,1,Bi,2,…,Bi,k);
(c) Message Authentication Code is generated
(d) generation digital signature σi=ski H1(H(ki)||IDg||IDu||riP0||TS)。
(5) community's gateway polymerize:
The power purchase demand data of all users received polymerize by community's gateway, the signature sigma being polymerize, and polymerization power purchase is needed
Ask data B, key group { riP0And Message Authentication Code MACf, sent to Utilities Electric Co..
Specifically, gateway polymerization in community's is carried out as follows:
(a) under the intelligent electric meter communication network (AMI) of single-hop networks topological structure (single-hop), the signature of polymerization
σ=∑1≤i≤nσi;
(b) each time slot polymerization power purchase demand dataWherein Afterwards
To set B=(B(1),B(2),…,B(k)), (1≤x≤k);
(c) Message Authentication Code MAC (B)=∏1≤i≤nMAC(Bi), meanwhile, gateway arbitrarily one element R of selection in community's is obtained
To Message Authentication Code MACf=(MAC1,MAC2), wherein MAC1=(B | | R) ⊕ H3(MAC (B)), MAC2=UH(B)VH(R)。
(6) Utilities Electric Co. decrypts:
Utilities Electric Co. is received after the polymerization power purchase demand data that community's gateway is sent, and data are decrypted with recovery sale of electricity part
Volume b(x)And verify.
Specifically, Utilities Electric Co.'s decryption is carried out as follows:
(a)
(b) according to homomorphic encryption algorithm, private key λ is used, recovers each time slot polymerization power purchase demand data
(c) equation is verified
Whether set up, if so, then it is verified;
(d) calculateWith checking MAC2=UH(B’)VH(R’)。
Mathematical theory applied in the present embodiment includes:
1st, Bilinear map
In the present invention, Bilinear map ê:G×G→GTIt is a mapping for meeting bilinearity, non-degeneracy and computability,
It is mapped to two elements in Groups of Prime Orders an element in Groups of Prime Orders.
2nd, hash function
Hash function is exactly such a one-way function of output Input transformation into the regular length of random length, this
Output is referred to as the cryptographic Hash of the input.The hash function of safety should be met:(1) output length is fixed, is typically at least taken
128 bits, to resist birthday attack;(2) to each given input, its cryptographic Hash can be calculated easily;(3)
The description of given hash function and a cryptographic Hash, it is to calculate upper infeasible to find corresponding input;(4) hash function is given
Description, it is to calculate upper infeasible to find two with identical cryptographic Hash different inputs.
3rd, homomorphic cryptography
Homomorphic cryptography is the cryptological technique of the computational complexity theory based on difficult math question.To the number Jing Guo homomorphic cryptography
Handled according to progress and obtain an output, this output is decrypted, its result with Same Way with handling the original of unencryption
The output result that data are obtained is the same.First calculating to decrypt afterwards can be equivalent to first decrypt to calculate afterwards.Utilize homomorphic cryptography technology
Decrypted again after first being calculated multiple ciphertexts, it is not necessary to each ciphertext is decrypted and high calculation cost is spent,
It can realize and decryption side can only be obtained last result and can not obtain the message of each ciphertext.
The whole smart power grid user sale of electricity method based on homomorphic cryptography, utilizes hash function, Bilinear map and homomorphism
The mode of encryption is covered to the true power purchase demand data of user, and the identity of authentication data sender, make user with
Outer community's gateway and Utilities Electric Co. can not obtain the specific power purchase demand data of the user, effectively prevent privacy of user quilt
It is open, protect the fairness of marketing.
The present invention is further described by specific embodiment above, it should be understood that, here specifically
Description, should not be construed as the restriction to the spirit and scope of the invention, and one of ordinary skilled in the art is reading this explanation
The various modifications made after book to above-described embodiment, belong to the scope that the present invention is protected.