CN107172043B - A kind of smart power grid user sale of electricity method based on homomorphic cryptography - Google Patents
A kind of smart power grid user sale of electricity method based on homomorphic cryptography Download PDFInfo
- Publication number
- CN107172043B CN107172043B CN201710338519.4A CN201710338519A CN107172043B CN 107172043 B CN107172043 B CN 107172043B CN 201710338519 A CN201710338519 A CN 201710338519A CN 107172043 B CN107172043 B CN 107172043B
- Authority
- CN
- China
- Prior art keywords
- community
- gateway
- user
- power purchase
- data
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F15/00—Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity
- G07F15/06—Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity with means for prepaying basic charges, e.g. rent for meters
-
- 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/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/3297—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 time stamps, e.g. generation of time stamps
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Supply And Distribution Of Alternating Current (AREA)
Abstract
本发明涉及智能电网售电,尤其涉及一种基于同态加密的智能电网用户售电方法,其过程包括电力公司将购电请求数据发送至社区网关,社区网关先验证购电请求数据无误后下发至各个用户,用户将购电需求数据通过同态加密的方法进行加密后,发送至社区网关,社区网关将各用户的购电需求数据求和后发送至电力公司,电力公司收到社区网关上传的购电需求数据后进行解密恢复数据。本发明利用哈希函数、双线性对、以及同态加密的方式对用户的真实购电需求数据进行了掩盖,并认证数据发送者的身份,使用户以外的社区网关和电力公司均不能获得该用户的具体购电需求数据,有效防止了用户隐私被公开,保护了市场交易的公平性。
The present invention relates to smart grid electricity sales, and in particular to a method for smart grid user electricity sales based on homomorphic encryption. Send to each user, the user encrypts the power purchase demand data through homomorphic encryption, and then sends it to the community gateway, the community gateway sums the power purchase demand data of each user and sends it to the power company, and the power company receives it from the community gateway After uploading the power purchase demand data, decrypt and restore the data. The present invention uses hash function, bilinear pairing, and homomorphic encryption to cover up the user's real power purchase demand data, and authenticates the identity of the data sender, so that neither the community gateway nor the power company other than the user can obtain the data. The user's specific electricity purchase demand data effectively prevents the user's privacy from being disclosed and protects the fairness of market transactions.
Description
技术领域technical field
本发明涉及智能电网售电,尤其涉及一种基于同态加密的智能电网用户售电方法。The invention relates to smart grid electricity sales, in particular to a smart grid user electricity sales method based on homomorphic encryption.
背景技术Background technique
智能电网,建立在集成的、高速双向通信网络基础之上,利用先进的传感和测量技术、先进的设备技术、先进的控制方法以及先进的决策支持系统技术等,实现电网可靠、安全、经济、高效、环境友好和使用安全的高效运行。随着智能电网的日益发展,电力公司不再需要工作人员上门服务,而只是通过与终端的网络通讯实现各种业务往来,在此过程中,信息传输的安全性是人们关注的焦点,对用户隐私的保护也成为电力公司的首要问题。Smart grid, based on an integrated, high-speed two-way communication network, uses advanced sensing and measurement technology, advanced equipment technology, advanced control methods, and advanced decision support system technology to achieve reliable, safe, and economical power grids. , High efficiency, environmental friendliness and safe and efficient operation. With the increasing development of the smart grid, power companies no longer need staff to provide door-to-door service, but only realize various business transactions through network communication with the terminal. During this process, the security of information transmission is the focus of attention. The protection of privacy has also become a primary issue for power companies.
对传输信息进行加密操作,对电力公司与用户之间信息交互起到了一定的保障作用,同态加密是现有的信息加密方法中较为常见且较为有效的方法,申请号为201410396335.X的专利文件中公开了一种智能电网中具有隐私保护的计费方法,由智能电表实时记录用户的使用电量,采用同态加密的方法将数据加密后发送至聚合器,聚合器将收到的一位用户多次使用的电量密文通过求和运算再进行解密得到该用户累计用电量明文,聚合器再将电量明文发送至计费部门进行用电费用的计算,该专利文件虽采用了同态加密的方式对数据进行加密,但只是通过公-私钥对与加密算法实现整个数据传输的加密与解密,在数据传输过程中并不能做到保证其安全性。Encryption of transmitted information plays a certain role in guaranteeing information interaction between power companies and users. Homomorphic encryption is a relatively common and effective method among existing information encryption methods. The patent application number is 201410396335.X The document discloses a billing method with privacy protection in the smart grid. The smart meter records the power consumption of the user in real time, and uses the method of homomorphic encryption to encrypt the data and send it to the aggregator. The aggregator will receive a The power ciphertext used by the user for many times is decrypted through summation and then decrypted to obtain the plaintext of the user's accumulated power consumption. The aggregator then sends the plaintext of the power consumption to the billing department for calculation of electricity costs. The encryption method encrypts the data, but only realizes the encryption and decryption of the entire data transmission through the public-private key pair and the encryption algorithm, and cannot guarantee its security during the data transmission process.
发明内容Contents of the invention
针对现有技术中存在的问题,本发明提供一种基于同态加密的智能电网用户售电方法,其过程包括电力公司将购电请求数据发送至社区网关,社区网关先验证购电请求数据无误后下发至各个用户,用户将购电需求数据通过同态加密的方法进行加密后,发送至社区网关,社区网关将各用户的购电需求数据求和后发送至电力公司,电力公司收到社区网关上传的购电需求数据后进行解密恢复数据;Aiming at the problems existing in the prior art, the present invention provides a smart grid user electricity selling method based on homomorphic encryption. The process includes that the power company sends the electricity purchase request data to the community gateway, and the community gateway first verifies that the electricity purchase request data is correct After that, it is sent to each user, and the user encrypts the power purchase demand data through homomorphic encryption, and then sends it to the community gateway. The community gateway sums the power purchase demand data of each user and sends it to the power company, and the power company receives After the power purchase demand data uploaded by the community gateway, the data is decrypted and restored;
具体包括以下步骤:Specifically include the following steps:
(1)系统初始化:(1) System initialization:
电力公司应选取一些参数,包括阶为q的循环群G、GT以及一个双线性对对所有成立;计算产生一个同态加密公钥对(f,g)和对应的私钥λ,其中a,b为中的元素,为阶为q的素数群,P、P0为循环群G中的元素;The power company should choose some parameters, including the cyclic group G with order q, GT and a bilinear pair to all set up; calculate Generate a homomorphic encryption public key pair (f, g) and the corresponding private key λ, where a, b are elements in the is the prime number group whose order is q, P and P 0 are the elements in the cyclic group G;
四个哈希函数包括H1:{0,1}*→G,H3:GT×GT→{0,1}*,{0,1}*表示任意比特长的二进制序列组成的集合;根据选取的参数,电力公司、网关以及用户分别得到自己的私钥和公钥;The four hash functions include H 1 : {0, 1} * → G, H 3 : G T ×G T → {0, 1} * , {0, 1} * represents a set composed of binary sequences of arbitrary bit length; according to the selected parameters, the power company, gateway and user obtain their own private key respectively and the public key;
(2)购电请求:(2) Power purchase request:
电力公司向社区网关发送购电请求数据,包括电力公司的身份IDu、社区网关的身份IDg、价格信息Infop、秘钥ruP0、时间戳TS和签名σu;The power company sends power purchase request data to the community gateway, including the identity ID u of the power company, the identity ID g of the community gateway, price information Info p , secret key r u P 0 , time stamp TS and signature σ u ;
(3)社区网关验证(3) Community gateway verification
当社区网关收到购电请求数据后,先根据时间戳TS和签名σu验证数据的真实性和完整性,再发送给社区内的各个用户;When the community gateway receives the power purchase request data, it first verifies the authenticity and integrity of the data according to the timestamp TS and the signature σu , and then sends it to each user in the community;
(4)用户回复:(4) User replies:
用户利用同态加密技术掩盖真实购电需求数据得到Bi,并生成数字签名σi和消息鉴别码MAC(Bi)之后向社区网关回复;The user uses homomorphic encryption technology to cover up the real power purchase demand data to obtain Bi, and generates a digital signature σ i and a message authentication code MAC(B i ) to reply to the community gateway;
(5)社区网关聚合:(5) Community gateway aggregation:
社区网关将收到的所有用户的购电需求数据聚合,得到聚合的签名σ,聚合购电需求数据B,秘钥组{riP0}、和消息鉴别码MACf,向电力公司发送;The community gateway aggregates the received power purchase demand data of all users, obtains the aggregated signature σ, aggregates the power purchase demand data B, the secret key group {r i P 0 }, and the message authentication code MAC f , and sends it to the power company;
(6)电力公司解密:(6) Decryption by the power company:
电力公司收到社区网关发送的聚合购电需求数据后,对数据进行解密恢复售电份额b(x)并验证。After the power company receives the aggregated power purchase demand data sent by the community gateway, it decrypts the data and restores the power sales share b (x) and verifies it.
进一步的,社区网关与用户是在基于单跳网络拓扑结构(single-hop)的智能电表通信网络(AMI)进行通讯。Further, the community gateway communicates with the user in the smart meter communication network (AMI) based on a single-hop network topology (single-hop).
进一步的,电力公司与社区网关之间是基于5G网络进行通讯。Furthermore, the communication between the power company and the community gateway is based on the 5G network.
进一步的,步骤(1)中的私钥和公钥,按照如下方式生成:Further, the private key and public key in step (1) are generated as follows:
(a)电力公司IDu从中任意选择一个元素sku作为私钥,并计算PKu=skuP0作为公钥;(a) Electric company ID u from Randomly select an element sk u as the private key, and calculate PK u = sk u P 0 as the public key;
(b)社区网关IDg从中任意选择一个元素skg作为私钥,并计算PKg=skgP0作为公钥;(b) Community gateway ID g from Randomly select an element sk g as the private key, and calculate PK g = sk g P 0 as the public key;
(c)用户IDi从中任意选择一个元素ski作为私钥,并计算PKi=skiP0作为公钥;(c) User ID i from Randomly select an element sk i as the private key, and calculate PK i = sk i P 0 as the public key;
(d)电力公司发布公开参数其中U、V为循环群G中随机选取的元素。(d) The power company releases public parameters Among them, U and V are randomly selected elements in the cyclic group G.
进一步的,步骤(2)与步骤(3)中的价格信息Infop、签名σu以及对购电请求数据的验证按照如下过程进行:Further, the verification of the price information Info p , the signature σ u and the power purchase request data in step (2) and step (3) is carried out as follows:
(a)价格信息Infop={p1,p2,...,pk},其中k是时隙总数,p为任一时隙内的售电价格;(a) Price information Info p ={p 1 , p 2 ,...,p k }, where k is the total number of time slots, and p is the electricity sale price in any time slot;
(b)签名σu=skuH1(IDu||IDg||Infop||ruP0||TS),社区网关用σu来验证购电请求数据的真实性和完整性;(b) Signature σ u =sk u H 1 (ID u ||ID g ||Info p ||r u P 0 ||TS), the community gateway uses σ u to verify the authenticity and integrity of the power purchase request data ;
(d)社区网关收到购电请求数据之后,先验证时间戳TS,之后验证等式是否成立。(d) After the community gateway receives the power purchase request data, it first verifies the timestamp TS, and then verifies the equation Whether it is established.
进一步的,步骤(4)中的掩盖真实购电需求数据,其过程如下进行:Further, the process of masking the real power purchase demand data in step (4) is as follows:
(a)计算秘钥ri为一个随机数,且rg为一个随机数,且 (a) Calculate the secret key r i is a random number, and r g is a random number, and
(b)应用同态加密算法掩盖真实购电需求数据得到之后得到集合Bi=(Bi,1,Bi,2,...,Bi,k),其中是阶为f2的合数阶群中一个随机数,f为一个素数,bi,x表示真实购电需求数据;(b) Using the homomorphic encryption algorithm to cover up the real power purchase demand data to obtain Then get the set B i =(B i,1 ,B i,2 ,...,B i,k ), where is a random number in the composite order group with order f 2 , f is a prime number, b i, x represent the real power purchase demand data;
(c)生成消息鉴别码 (c) Generate message authentication code
(d)生成数字签名σi=skiH1(H(ki)||IDg||IDu||riP0||TS)。(d) Generate a digital signature σ i =sk i H 1 (H(k i )||ID g ||ID u ||r i P 0 ||TS).
进一步的,步骤(5)中的社区网关聚合,按照如下过程进行:Further, the community gateway aggregation in step (5) is performed according to the following process:
(a)在单跳网络拓扑结构(single-hop)的智能电表通信网络(AMI)下,聚合的签名σ=∑1≤i≤nσi,n表示本方法中用户的数量;(a) Under the smart meter communication network (AMI) of the single-hop network topology (single-hop), the aggregated signature σ=∑ 1≤i≤n σ i , n represents the number of users in this method;
(b)各时隙聚合购电需求数据其中 之后得到集合B=(B(1),B(2),...,B(k)),(1≤x≤k),rg为一个随机数,且 (b) aggregate power purchase demand data in each time slot in Then get the set B=(B (1) , B (2) ,..., B (k) ), (1≤x≤k), r g is a random number, and
(c)消息鉴别码MAC(B)=Π1≤i≤nMAC(Bi),同时,社区网关任意选择一个元素R,得到消息鉴别码MACf=(MAC1,MAC2),其中 MAC2=UH(B)VH (R),其中, (c) Message authentication code MAC(B)=Π 1≤i≤n MAC(B i ), meanwhile, the community gateway randomly selects an element R to obtain message authentication code MAC f =(MAC 1 , MAC 2 ), where MAC 2 =U H(B) V H (R) , where,
进一步的,步骤(6)中电力公司解密按照如下过程进行:Further, in step (6), the power company decrypts according to the following process:
(b)根据同态加密算法,用私钥λ,恢复各时隙聚合购电需求数据其中L为的函数,x为该函数的自变量;(b) According to the homomorphic encryption algorithm, use the private key λ to restore the aggregated power purchase demand data of each time slot where L is function, x is the argument of the function;
(c)验证等式是否成立,若成立,则验证通过;(c) Verification Equation Whether it is established, and if it is established, the verification is passed;
(d)计算和验证MAC2=UH(B’)VH(R’),B’为电力公司收到的社区网关发送的聚合购电需求数据, (d) calculation And verification MAC 2 =U H(B') V H(R') , B' is the aggregated power purchase demand data sent by the community gateway received by the power company,
本发明的一种基于同态加密的智能电网用户售电方法,具有以下有益效果:A method for selling electricity to smart grid users based on homomorphic encryption of the present invention has the following beneficial effects:
依据哈希函数的单向性和双线对的特性,以公钥签名私钥验证的方式,确保了电力公司、社区网关、用户信息的不可抵赖性和数据完整性;依据同态加密的特性,隐藏了用户的真实信息,从而保护了发送者的隐私,确保了机密性;用户自己除外,社区网关和电力公司都不能得到用户购电需求的具体细节,电力公司解密之后也只能得到多个用户购电需求的总和而不是每个用户的具体购电需求数据,这既减少了带宽占用,减少了解密时的计算复杂程度,同时又认证发送者的身份,从而简化了系统,有效防止了用户隐私被公开,提高了安全性和传输效率,保护了市场交易的公平性。According to the one-way and two-wire pair characteristics of the hash function, the non-repudiation and data integrity of the power company, community gateway, and user information are ensured by means of public key signature and private key verification; according to the characteristics of homomorphic encryption , which hides the real information of the user, thereby protecting the privacy of the sender and ensuring confidentiality; except for the user himself, neither the community gateway nor the power company can obtain the specific details of the user's electricity purchase needs, and the power company can only get more details after decrypting. The sum of each user's power purchase demand rather than the specific power purchase demand data of each user, which not only reduces the bandwidth occupation, but also reduces the computational complexity of decryption, and at the same time authenticates the identity of the sender, thus simplifying the system and effectively preventing This ensures that user privacy is disclosed, improves security and transmission efficiency, and protects the fairness of market transactions.
附图说明Description of drawings
为了更清楚的说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见的,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings that need to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明一种基于同态加密的智能电网用户售电方法的网络结构图;Fig. 1 is a network structure diagram of a smart grid user electricity selling method based on homomorphic encryption in the present invention;
图2为本发明一种基于同态加密的智能电网用户售电方法的工作流程图。Fig. 2 is a working flow chart of a method for selling electricity to smart grid users based on homomorphic encryption in the present invention.
具体实施方式Detailed ways
下面将结合本发明中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通的技术人员在没有做出创造性劳动的前提下所获得的所有其它实施例,都属于本发明的保护范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
如图1与图2所示为本实施例的一种基于同态加密的智能电网用户售电方法,其过程为包括电力公司将购电请求数据发送至社区网关,社区网关先验证购电请求数据无误后下发至n个用户,n个用户将购电需求数据通过同态加密的方法进行加密后,发送至社区网关,社区网关将n个用户的购电需求数据求和后发送至电力公司,电力公司收到社区网关上传的购电需求数据后进行解密恢复数据。社区网关与用户是在基于单跳网络拓扑结构(single-hop)的智能电表通信网络(AMI)下进行通讯。优选的,电力公司与社区网关之间是基于5G网络进行通讯。As shown in Figure 1 and Figure 2, a homomorphic encryption-based smart grid user electricity sales method of this embodiment is shown. The process includes the power company sending the electricity purchase request data to the community gateway, and the community gateway first verifies the electricity purchase request. After the data is correct, it is sent to n users. After the n users encrypt the power purchase demand data through homomorphic encryption, they send it to the community gateway. The community gateway sums the power purchase demand data of n users and sends it to the power Companies and power companies decrypt and restore the data after receiving the power purchase demand data uploaded by the community gateway. The community gateway and the user communicate under the smart meter communication network (AMI) based on the single-hop network topology (single-hop). Preferably, the communication between the power company and the community gateway is based on a 5G network.
具体的,智能电网用户售电方法的具体步骤如下:Specifically, the specific steps of the smart grid user electricity selling method are as follows:
(1)系统初始化:(1) System initialization:
电力公司应选取一些参数,包括阶为q的循环群G、GT以及一个双线性对对所有成立;计算产生一个同态加密公钥对(f,g)和对应的私钥λ,其中a,b为中的元素,为阶为q的素数群,P、P0为循环群G中的元素;The power company should choose some parameters, including the cyclic group G with order q, GT and a bilinear pair to all set up; calculate Generate a homomorphic encryption public key pair (f, g) and the corresponding private key λ, where a, b are elements in the is the prime number group whose order is q, P and P 0 are the elements in the cyclic group G;
四个哈希函数包括H1:{0,1}*→G,H3:GT×GT→{0,1}*,{0,1}*表示任意比特长的二进制序列组成的集合;根据选取的参数,电力公司、网关以及用户分别得到自己的私钥和公钥。The four hash functions include H 1 : {0, 1} * → G, H 3 : G T ×G T → {0, 1} * , {0, 1} * represents a set composed of binary sequences of arbitrary bit length; according to the selected parameters, the power company, gateway and user obtain their own private key respectively and public key.
以上步骤中的私钥和公钥,按照如下方式生成:The private key and public key in the above steps are generated as follows:
(a)电力公司IDu从中任意选择一个元素sku作为私钥,并计算PKu=skuP0作为公钥;(a) Electric company ID u from Randomly select an element sk u as the private key, and calculate PK u = sk u P 0 as the public key;
(b)社区网关IDg从中任意选择一个元素skg作为私钥,并计算PKg=skgP0作为公钥;(b) Community gateway ID g from Randomly select an element sk g as the private key, and calculate PK g = sk g P 0 as the public key;
(c)用户IDi从中任意选择一个元素ski作为私钥,并计算PKi=skiP0作为公钥;(c) User ID i from Randomly select an element sk i as the private key, and calculate PK i = sk i P 0 as the public key;
(d)电力公司发布公开参数其中U、V为循环群G中随机选取的元素。(d) The power company releases public parameters Among them, U and V are randomly selected elements in the cyclic group G.
(2)购电请求:(2) Power purchase request:
电力公司向社区网关发送购电请求数据,包括电力公司的身份IDu、社区网关的身份IDg、价格信息Infop、秘钥ruP0、时间戳TS和签名σu。The power company sends power purchase request data to the community gateway, including the ID u of the power company, the ID g of the community gateway, price information Info p , secret key r u P 0 , time stamp TS and signature σ u .
(3)社区网关验证:(3) Community gateway verification:
当社区网关收到购电请求数据后,先根据时间戳TS和签名σu验证数据的真实性和完整性,再发送给社区内的各个用户。When the community gateway receives the power purchase request data, it first verifies the authenticity and integrity of the data according to the timestamp TS and the signature σu , and then sends it to each user in the community.
具体的,步骤(2)与步骤(3)中的价格信息Infop、签名σu以及对购电请求数据的验证按照如下过程进行:Specifically, the verification of price information Info p , signature σ u and power purchase request data in step (2) and step (3) is carried out as follows:
(a)价格信息Infop={p1,p2,...,pk},其中k是时隙总数,p为任一时隙内的售电价格;(a) Price information Info p ={p 1 , p 2 ,...,p k }, where k is the total number of time slots, and p is the electricity sale price in any time slot;
(b)签名σu=skuH1(IDu||IDg||Infop||ruP0||TS),社区网关用σu来验证购电请求数据的真实性和完整性;(b) Signature σ u =sk u H 1 (ID u ||ID g ||Info p ||r u P 0 ||TS), the community gateway uses σ u to verify the authenticity and integrity of the power purchase request data ;
(d)社区网关收到购电请求数据之后,先验证时间戳TS,之后验证等式是否成立。(d) After the community gateway receives the power purchase request data, it first verifies the timestamp TS, and then verifies the equation Whether it is established.
(4)用户回复:(4) User replies:
用户利用同态加密技术掩盖真实购电需求数据得到Bi,并生成数字签名σi和消息鉴别码MAC(Bi)之后向社区网关回复。The user uses homomorphic encryption technology to cover up the real power purchase demand data to get Bi, and generates a digital signature σ i and a message authentication code MAC(B i ) to reply to the community gateway.
具体的,掩盖真实购电需求数据过程如下进行:Specifically, the process of covering up the real power purchase demand data is as follows:
(a)计算秘钥ri为一个随机数,且rg为一个随机数,且 (a) Calculate the secret key r i is a random number, and r g is a random number, and
(b)应用同态加密算法掩盖真实购电需求数据得到之后得到集合Bi=(Bi,1,Bi,2,...,Bi,k),其中是阶为f2的合数阶群中一个随机数,f为一个素数,bi,x表示真实购电需求数据;(b) Using the homomorphic encryption algorithm to cover up the real power purchase demand data to obtain Then get the set B i =(B i,1 ,B i,2 ,...,B i,k ), where is a random number in the composite order group with order f 2 , f is a prime number, b i, x represent the real power purchase demand data;
(c)生成消息鉴别码 (c) Generate message authentication code
(d)生成数字签名σi=skiH1(H(ki)||IDg||IDu||riP0||TS)。(d) Generate a digital signature σ i =sk i H 1 (H(k i )||ID g ||ID u ||r i P 0 ||TS).
(5)社区网关聚合:(5) Community gateway aggregation:
社区网关将收到的所有用户的购电需求数据聚合,得到聚合的签名σ,聚合购电需求数据B,秘钥组{riP0}、和消息鉴别码MACf,向电力公司发送。The community gateway aggregates the received power purchase demand data of all users, obtains the aggregated signature σ, aggregates the power purchase demand data B, the secret key group {r i P 0 }, and the message authentication code MAC f , and sends it to the power company.
具体的,社区网关聚合按照如下过程进行:Specifically, community gateway aggregation is carried out according to the following process:
(a)在单跳网络拓扑结构(single-hop)的智能电表通信网络(AMI)下,聚合的签名σ=∑1≤i≤nσi,n表示本方法中用户的数量;(a) Under the smart meter communication network (AMI) of the single-hop network topology (single-hop), the aggregated signature σ=∑ 1≤i≤n σ i , n represents the number of users in this method;
(b)各时隙聚合购电需求数据其中 之后得到集合B=(B(1),B(2),...,B(k)),(1≤x≤k),rg为一个随机数,且 (b) aggregate power purchase demand data in each time slot in Then get the set B=(B (1) , B (2) ,..., B (k) ), (1≤x≤k), r g is a random number, and
(c)消息鉴别码MAC(B)=Π1≤i≤nMAC(Bi),同时,社区网关任意选择一个元素R,得到消息鉴别码MACf=(MAC1,MAC2),其中 MAC2=UH(B)VH (R),其中, (c) Message authentication code MAC(B)=Π 1≤i≤n MAC(B i ), meanwhile, the community gateway randomly selects an element R to obtain message authentication code MAC f =(MAC 1 , MAC 2 ), where MAC 2 =U H(B) V H (R) , where,
(6)电力公司解密:(6) Decryption by the power company:
电力公司收到社区网关发送的聚合购电需求数据后,对数据进行解密恢复售电份额b(x)并验证。After the power company receives the aggregated power purchase demand data sent by the community gateway, it decrypts the data and restores the power sales share b (x) and verifies it.
具体的,电力公司解密按照如下过程进行:Specifically, the power company decrypts according to the following process:
(b)根据同态加密算法,用私钥λ,恢复各时隙聚合购电需求数据其中L为的函数,x为该函数的自变量;(b) According to the homomorphic encryption algorithm, use the private key λ to restore the aggregated power purchase demand data of each time slot where L is function, x is the argument of the function;
(c)验证等式是否成立,若成立,则验证通过;(c) Verification Equation Whether it is established, and if it is established, the verification is passed;
(d)计算和验证MAC2=UH(B’)VH(R’),B’为电力公司收到的社区网关发送的聚合购电需求数据, (d) calculation And verification MAC 2 =U H(B') V H(R') , B' is the aggregated power purchase demand data sent by the community gateway received by the power company,
本实施例中所应用的数学理论包括:The mathematical theory applied in this embodiment includes:
1、双线性对1. Bilinear pairing
本发明中,双线性对是一个满足双线性、非退化性和可计算性的映射,它把素数阶群中的两个元素映射到素数阶群中的一个元素。In the present invention, bilinear pairing is a mapping that satisfies bilinearity, nondegenerateness, and computability, and it maps two elements in the prime order group to one element in the prime order group.
2、哈希函数2. Hash function
哈希函数就是把任意长度的输入变换成固定长度的输出这样一种单向函数,这个输出称为该输入的哈希值。安全的哈希函数应该满足:(1)输出长度是固定的,一般至少取128比特,以抵抗生日攻击;(2)对每一个给定的输入,其哈希值可以很容易的计算出来;(3)给定哈希函数的描述和一个哈希值,找到相应的输入是计算上不可行的;(4)给定哈希函数的描述,找到具有相同哈希值的两个不同的输入是计算上不可行的。A hash function is a one-way function that transforms an input of any length into a fixed-length output, which is called the hash value of the input. A secure hash function should satisfy: (1) The output length is fixed, generally at least 128 bits, to resist birthday attacks; (2) For each given input, its hash value can be easily calculated; (3) Given a description of a hash function and a hash value, it is computationally infeasible to find the corresponding input; (4) Given a description of a hash function, it is computationally infeasible to find two different inputs with the same hash value is computationally infeasible.
3、同态加密3. Homomorphic encryption
同态加密是基于数学难题的计算复杂性理论的密码学技术。对经过同态加密的数据进行处理得到一个输出,将这一输出进行解密,其结果与用同一方法处理未加密的原始数据得到的输出结果是一样的。先计算后解密可等价于先解密后计算。利用同态加密技术可以先对多个密文进行计算之后再解密,不必对每一个密文解密而花费高昂的计算代价,可以实现让解密方只能获得最后的结果而无法获得每一个密文的消息。Homomorphic encryption is a cryptographic technique based on computational complexity theory of mathematical puzzles. Processing the homomorphically encrypted data yields an output that, when decrypted, yields the same output as the original unencrypted data. Computing first and then decrypting is equivalent to decrypting and then computing. Using homomorphic encryption technology, multiple ciphertexts can be calculated first and then decrypted. It is not necessary to decrypt each ciphertext and spend a high calculation cost. It can be realized that the decryption party can only obtain the final result and cannot obtain each ciphertext. news.
整个基于同态加密的智能电网用户售电方法,利用哈希函数、双线性对、以及同态加密的方式对用户的真实购电需求数据进行了掩盖,并认证数据发送者的身份,使用户以外的社区网关和电力公司均不能获得该用户的具体购电需求数据,有效防止了用户隐私被公开,保护了市场交易的公平性。The entire smart grid user electricity sales method based on homomorphic encryption uses hash function, bilinear pairing, and homomorphic encryption to cover up the user's real electricity purchase demand data, and authenticate the identity of the data sender, so that Neither the community gateway nor the power company other than the user can obtain the user's specific power purchase demand data, which effectively prevents the user's privacy from being disclosed and protects the fairness of market transactions.
以上借助具体实施例对本发明做了进一步描述,但是应该理解的是,这里具体的描述,不应理解为对本发明的实质和范围的限定,本领域内的普通技术人员在阅读本说明书后对上述实施例做出的各种修改,都属于本发明所保护的范围。The present invention has been further described above with the help of specific embodiments, but it should be understood that the specific description herein should not be construed as limiting the spirit and scope of the present invention. Various modifications made in the embodiments all belong to the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710338519.4A CN107172043B (en) | 2017-05-15 | 2017-05-15 | A kind of smart power grid user sale of electricity method based on homomorphic cryptography |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710338519.4A CN107172043B (en) | 2017-05-15 | 2017-05-15 | A kind of smart power grid user sale of electricity method based on homomorphic cryptography |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107172043A CN107172043A (en) | 2017-09-15 |
CN107172043B true CN107172043B (en) | 2018-09-04 |
Family
ID=59816207
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710338519.4A Active CN107172043B (en) | 2017-05-15 | 2017-05-15 | A kind of smart power grid user sale of electricity method based on homomorphic cryptography |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107172043B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108400862A (en) * | 2018-01-16 | 2018-08-14 | 国电南瑞科技股份有限公司 | A kind of intelligent power trusted end-user data fusion encryption method |
CN108986324B (en) * | 2018-08-01 | 2021-02-26 | 石家庄科林电气股份有限公司 | Charging and refunding method for public rental house hydropower gas meter |
CN109831292A (en) * | 2019-04-03 | 2019-05-31 | 成都中科微信息技术研究院有限公司 | A kind of method for secret protection of intelligent electric meter information |
CN113256886B (en) * | 2021-04-15 | 2022-12-09 | 桂林电子科技大学 | Smart grid power consumption statistics and billing system and method with privacy protection |
CN115801474B (en) * | 2023-02-13 | 2023-06-20 | 天聚地合(苏州)科技股份有限公司 | Power transaction method and system based on privacy calculation, power utilization end and power generation end |
CN116049897B (en) * | 2023-03-30 | 2023-12-01 | 北京华隐熵策数据科技有限公司 | Verifiable privacy protection federal learning method based on linear homomorphic hash and signcryption |
-
2017
- 2017-05-15 CN CN201710338519.4A patent/CN107172043B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107172043A (en) | 2017-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107172043B (en) | A kind of smart power grid user sale of electricity method based on homomorphic cryptography | |
CN111131148B (en) | A smart grid-oriented privacy-protectable data aggregation method and system | |
CN109525386B (en) | A Method of Private Intersection Sum Based on Paillier Homomorphic Encryption | |
CN104270249B (en) | It is a kind of from the label decryption method without certificate environment to identity-based environment | |
CN112636896B (en) | Non-interactive verifiable multi-type encrypted data aggregation method facing smart power grid | |
CN110120939B (en) | Encryption method and system capable of repudiation authentication based on heterogeneous system | |
CN110830236B (en) | Identity-based encryption method based on global hash | |
CN111294366A (en) | Statistical analysis method for aggregation of encrypted data for resisting secret key leakage in smart power grid | |
CN104301108B (en) | It is a kind of from identity-based environment to the label decryption method without certificate environment | |
CN105245326B (en) | A kind of smart grid security communication means based on combination pin | |
CN104734857B (en) | Close algorithm is signed in a kind of multi-receiver mixing of no Bilinear map | |
CN107483209B (en) | Secure signcryption method based on heterogeneous system | |
CN110113150B (en) | Encryption method and system based on non-certificate environment and capable of repudiation authentication | |
Wang et al. | An efficient privacy‐preserving aggregation and billing protocol for smart grid | |
CN110278088A (en) | A kind of SM2 collaboration endorsement method | |
CN102811125A (en) | Certificateless multi-receiver signcryption method based on multivariate cryptosystem | |
CN110299987A (en) | A kind of millionaires' problem solution based on homomorphic cryptography | |
CN105610773A (en) | Communication encryption method of electric energy meter remote meter reading | |
CN111769937A (en) | A Two-Party Authenticated Key Agreement Protocol for Smart Grid Advanced Measurement System | |
CN106790259A (en) | A kind of asymmetric across cryptographic system re-encryption, decryption method and system | |
Wang et al. | Fully accountable data sharing for pay-as-you-go cloud scenes | |
CN104113420A (en) | Identity based aggregate signcryption method | |
CN110519226B (en) | Quantum communication server secret communication method and system based on asymmetric key pool and implicit certificate | |
CN109104278A (en) | A kind of encrypting and decrypting method | |
CN113783683A (en) | Cloud platform privacy protection verifiable data aggregation method based on sensor network |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Room 1005, Tongda international building, 41 Tangyan Road, Zhangba Street office, hi tech Zone, Xi'an City, Shaanxi Province Patentee after: Xi'an xuyao Network Technology Co.,Ltd. Address before: Room 1005, Tongda international building, 41 Tangyan Road, Zhangba Street office, hi tech Zone, Xi'an City, Shaanxi Province Patentee before: Xi'an Xu Yao Network Technology Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
TR01 | Transfer of patent right |
Effective date of registration: 20200721 Address after: Room 1005, Tongda international building, 41 Tangyan Road, Zhangba Street office, hi tech Zone, Xi'an City, Shaanxi Province Patentee after: Xi'an Xu Yao Network Technology Co.,Ltd. Address before: 710121 Xi'an, Shaanxi, Changan District West Chang'an Avenue Patentee before: XI'AN University OF POSTS & TELECOMMUNICATIONS |
|
TR01 | Transfer of patent right |