WO2017152423A1 - Key negotiation method, device and system - Google Patents

Key negotiation method, device and system Download PDF

Info

Publication number
WO2017152423A1
WO2017152423A1 PCT/CN2016/076170 CN2016076170W WO2017152423A1 WO 2017152423 A1 WO2017152423 A1 WO 2017152423A1 CN 2016076170 W CN2016076170 W CN 2016076170W WO 2017152423 A1 WO2017152423 A1 WO 2017152423A1
Authority
WO
WIPO (PCT)
Prior art keywords
user equipment
key
parameter
public key
signature message
Prior art date
Application number
PCT/CN2016/076170
Other languages
French (fr)
Chinese (zh)
Inventor
仲伟伟
陈璟
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201680046828.8A priority Critical patent/CN107925578B/en
Priority to PCT/CN2016/076170 priority patent/WO2017152423A1/en
Publication of WO2017152423A1 publication Critical patent/WO2017152423A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic 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

Definitions

  • BNN-IBS is used in the Internet of Things and sensor networks (English name: Bellare M; Namprempre C; Neven G; identity-based signature, Chinese: elliptic curve based by Bellare M, Namprempre C, Neven G Identity Signing Protocol) for key negotiation.
  • the BNN-IBS process includes the following steps:
  • the UE2 performs the signature ⁇ R 2 , Y 2 , z 2 > using a hash function.
  • BNN-IBS has the following problems: due to PKG generation system parameters and UE1 Both the UE and the UE2 use a hash function for encryption, which is low in encryption and cannot be used against tampering data attacks.
  • the key generation device when the key generation device sends the public key and the private key of the first user equipment to the first user equipment, the key generation device sends the public key and the private key of the second user equipment to the second Homomorphic encryption is performed on user equipment.
  • BNN-IBS when PKG sets system parameters, when PKG allocates user private key for UE1 and UE2, and when UE1 and UE2 sign, both use hash function for encryption.
  • Homomorphic encryption can resist attacks that tamper with data. The degree of encryption is higher than that of the hash function, which increases the complexity of encryption.
  • the second aspect provides a key negotiation method, which specifically includes the following steps:
  • the first user equipment generates a first signature message according to the system parameter and the public key and the private key of the first user equipment;
  • the first user equipment selects a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
  • the processing unit is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
  • the processing unit is further configured to:
  • the fifth aspect provides a user equipment, which is used to perform the key negotiation method described in the second aspect or the possible implementation manner of the second aspect, including:
  • the processing unit is further configured to:
  • the first signature message is generated according to the system parameter, the public key and the private key of the user equipment, and the third random number and the fourth random number.
  • the processing unit is further configured to:
  • a shared key that communicates with the second user equipment is obtained according to the third random number, the second signature message, and the system parameter.
  • a processing unit configured to: if the identity of the first user equipment is valid according to the first signature message and the system parameter, generate a second signature message according to the system parameter, the public key and the private key of the user equipment;
  • the sending unit is configured to send the second signature message to the first user equipment by homomorphic encryption, and by using homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computing overhead is small. , reducing the complexity of the calculation;
  • the processing unit is further configured to obtain, according to the first signature message and the system parameter, a shared key that communicates with the first user equipment.
  • the processing unit is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
  • the interface circuit is further configured to send the public key and the private key of the first user equipment to the first user equipment by using the same state encryption, and the first user equipment performs key agreement with the second user equipment, and adopts homomorphic encryption.
  • the encryption is higher, and the communication and calculation overhead is smaller, which reduces the computational complexity;
  • the key generation device in the present invention can be used to perform the method flow of the first aspect, the technical effects that can be obtained can also refer to the method in the first aspect, and the present invention will not be described herein.
  • the processor is further configured to:
  • a first interface circuit configured to receive a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public
  • the key is used by the user equipment to perform key agreement with the second user equipment
  • the user equipment in the present invention can be used to perform the method flow of the second aspect, the technical effects that can be obtained are also referred to the method of the second aspect, and the present invention is not described herein again.
  • a shared key that communicates with the second user equipment is obtained according to the third random number, the second signature message, and the system parameter.
  • FIG. 2 is a schematic diagram of a key agreement system according to an embodiment of the present invention.
  • the key generation device generates a system parameter and a master key according to a preset elliptic curve parameter, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter.
  • the system public key is used by the first user equipment to perform key agreement with the second user equipment.
  • the second user equipment receives the public key and the private key of the second user equipment sent by the key generation device, and decrypts the public key and the private key of the second user equipment.
  • the first user equipment receives the second signature message sent by the second user equipment, and decrypts the second signature message.
  • the degree of encryption is higher than that of the hash function, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
  • An RRC connection is established between the UE1 and the eNB, and an RRC connection is established between the UE2 and the eNB.
  • the step is an optional step, and is mainly used for establishing a wireless connection between the UE1 and the eNB and establishing a wireless connection between the UE2 and the eNB; the eNB acquires the identifiers of the UE1 and the UE2; and facilitates subsequent parameter transmission between each other.
  • the eNB obtains intermediate parameters p, q, p', q', a', and r' according to the elliptic curve parameter E( Fp ) and an integer.
  • the four intermediate parameters p', q', a', and r' are four parameters defined in the homomorphic encryption process to satisfy the homomorphic encryption condition. It will be appreciated by those skilled in the art that the calculation of the intermediate parameters p', q', a', r' in other manners that satisfy the homomorphic encryption condition is equally applicable to embodiments of the present invention.
  • the eNB finally obtains the system parameters ⁇ E(F p ), p, q, a', r', p', q', P>.
  • the eNB broadcasts a system parameter ⁇ E(F p ), p, q, a', r', p', q', P>.
  • the UE1 receives the system parameter ⁇ E(F p ), p, q, a', r', p', q', P> sent by the eNB.
  • the eNB is based on the system parameter ⁇ E(F p ), p, q, a', r', p', q', P>, the master key s, the public key c UE1 of the UE1 , and the first random number r UE1
  • the private key (R UE1 , d UE1 ) of UE1 is generated by formula (3) and formula (5).
  • the UE1 receives the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 sent by the eNB, and decrypts the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 .
  • the third random number x UE1 or the fourth random number y UE1 may be randomly selected or selected according to a preset formula.
  • the present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
  • the first signature messages ⁇ c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > in c UE1 , R UE1 are not operated, directly from UE1's public key c UE1 and private key (R UE1 , d UE1 ).
  • h UE1 ID UE1 + E UE1 + R UE1 + Y UE1 + a' ⁇ r' + p' * q', formula (11)
  • the UE1 sends the first signature message ⁇ c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > to the UE2 through homomorphic encryption.
  • the UE2 receives the first signature message ⁇ c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > sent by the UE1, and the first signature message ⁇ c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > decryption.
  • step S412 includes steps S4121 to S4123 .
  • the eNB is based on the system parameter ⁇ E(F p ), p, q, a', r', p', q', P>, the master key s, the public key c UE2 of the UE2 , and the second random number r UE2
  • the private key (R UE2 , d UE2 ) of UE2 is generated by formula (3) and formula (5).
  • the fifth random number x UE2 or the sixth random number y UE2 When the fifth random number x UE2 or the sixth random number y UE2 is selected, it may be randomly selected or selected according to a preset formula.
  • the present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
  • h UE2 ID UE2 + E UE2 + R UE2 + Y UE2 + a' ⁇ r' + p' * q', formula (21)
  • UE2 calculates the intermediate parameter K UE2UE1 of the shared key according to the fifth random number x UE2 , the first signature message ⁇ c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > E UE1 through formula (23) .
  • the UE2 passes the identifier ID UE2 of the UE2 , the identifier ID UE1 of the UE1 , the intermediate parameter KUE2UE1, and the system parameter ⁇ E( Fp ), p, q, a', r', p', q', P>. Equation (25) obtains the shared key SK UE1UE2 in communication with UE1.
  • step S420 includes steps S4201 to S4203:
  • UE1 calculates an intermediate parameter K UE1UE2 of the shared key according to the third random number x UE1 , the second signature message ⁇ c UE , E UE2 , R UE2 , Y UE2 , Z UE2 > E UE2 through formula (29) .
  • the degree of encryption is higher than that of the hash function, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
  • the processing unit 211 is configured to: select a first random number from a finite field indicated by the intermediate parameter; generate a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number; The master key, the public key of the first user equipment, and the first random number generate a private key of the first user equipment.
  • the processing unit 211 is configured to: select a second random number from the finite field indicated by the intermediate parameter; generate a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number; according to the system parameter, The master key, the public key of the second user equipment, and the second random number generate a private key of the second user equipment.
  • the sending unit 212 is further configured to send the public key and the private key of the second user equipment to the second user equipment by using the same state encryption, and the second user equipment performs key negotiation with the first user equipment.
  • the sending unit 212 in this embodiment may be an interface circuit with a sending function on the eNB, such as a transmitter or an information sending interface.
  • the processing unit 211 may be a separately set processor or integrated in the eNB. Implemented in a certain processor, or in the form of program code, stored in the memory of the eNB, A certain processor of the eNB calls and executes the functions of the above processing unit 211.
  • the processor described herein may be a central processing unit (English name: central processing unit, English abbreviation: CPU), or a specific integrated circuit (English full name: application specific integrated circuit, English abbreviation: ASIC), or configured One or more integrated circuits implementing embodiments of the present invention.
  • the present invention provides a first user equipment for performing the above-described key negotiation method.
  • the present invention includes a receiving unit 221, a processing unit 222, and a sending unit 223. among them:
  • the receiving unit 221 is configured to receive system parameters sent by the key generation device, where the system parameters include an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key
  • the first user equipment performs key agreement with the second user equipment.
  • the processing unit 222 is configured to generate a first signature message according to the system parameter and the public key and the private key of the first user equipment.
  • the processing unit 222 is configured to: select a third random number and a fourth random number from a finite field indicated by the intermediate parameter; and, according to the system parameter, the public key and the private key of the first user equipment, and the third random number and the fourth random number, Generate a first signed message.
  • the receiving unit 221 is further configured to receive the second signature message sent by the second user equipment, and decrypt the second signature message, where the second signature message is homomorphically encrypted.
  • the processing unit 222 is further configured to: if the identity of the second user equipment is verified according to the second signature message and the system parameter, obtain a shared key that communicates with the second user equipment according to the second signature message and the system parameter.
  • the processing unit 222 is configured to: if the system parameter and the parameter included in the second signature message satisfy a preset equality relationship, determine that the identity of the second user equipment is legal; according to the third random number, the second signature message, and System parameters, resulting in a shared key that communicates with the second user device.
  • the sending unit 223 in this embodiment may be an interface circuit having a sending function on the UE, such as a transmitter or an information sending interface; and the receiving unit 221 may be an interface circuit having a receiving function on the UE, such as a receiver. Or information receiving interface.
  • the processing unit 222 may be a separately set processor, or may be implemented in one processor of the UE. In addition, it may also be stored in the memory of the UE in the form of program code, and is called and executed by a certain processor of the UE. The function of the above processing unit 222.
  • the processor described herein may be a central processing unit (English name: central processing unit, English abbreviation: CPU), or a specific integrated circuit (English full name: application specific integrated circuit, English abbreviation: ASIC), or configured One or more integrated circuits implementing embodiments of the present invention.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the first user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
  • the present invention provides a second user equipment for performing the above-described key agreement method.
  • the present invention includes a receiving unit 231, a processing unit 232, and a sending unit 233. among them:
  • the processing unit 232 is configured to generate a second signature message according to the system parameter, the public key of the second user equipment, and the private key, if the identity of the first user equipment is verified according to the first signature message and the system parameter.
  • the processor described herein may be a central processing unit (English name: central processing unit, English abbreviation: CPU), or a specific integrated circuit (English)
  • the application specific integrated circuit (ASIC) or one or more integrated circuits configured to implement the embodiments of the present invention.
  • the second user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
  • the processor 1801 is configured to execute a program in the memory to execute the function of the processing unit of the key generation device in the above embodiment.
  • the processor 1901 herein may be a processor or a collective name of multiple processing elements.
  • the processor may be a central processing unit CPU, or a specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more microprocessors (English full name) : digital singnal processor, English abbreviation: DSP), or one or more field programmable gate arrays (English full name: field programmable aate array, English abbreviation: FPGA).
  • the processor 1901 is configured to execute program code stored therein to control the first interface circuit 1902 and the two interface circuit 1903 to perform the method provided in the above method embodiment.
  • the second interface circuit 1903 is configured to perform the function of the transmitting unit of the first user equipment in the above embodiment.
  • the second user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including Several instructions to make a meter
  • the computer device (which may be a personal computer, server, or network device, etc.) performs all or part of the steps of the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Disclosed are a key negotiation method, device and system, relating to the field of wireless communications and used for solving the problem of a low degree of encryption when a BNN-IBS is applied to a D2D wireless communication network for key negotiation. The key negotiation method comprises: when a key generation device sends a public key and a private key of a first user equipment to the first user equipment, when the key generation device sends a public key and a private key of a second user equipment to the second user equipment, when the first user equipment sends a first signature message to the second user equipment, and when the second user equipment sends a second signature message to the first user equipment, performing homomorphic encryption. The embodiments of the present invention are applied to a D2D wireless communication network.

Description

密钥协商方法、设备和系统Key negotiation method, device and system 技术领域Technical field
本发明涉及无线通信领域,尤其涉及一种密钥协商方法、设备和系统。The present invention relates to the field of wireless communications, and in particular, to a key negotiation method, device, and system.
背景技术Background technique
随着4G标准的逐步完善,5G技术已经进入人们视线,有资料显示未来5G无线通信系统将向网络融合的方向发展,一个方向是异构网络,另一个方向是在蜂窝网络下允许相距较近的移动设备直接通信,即D2D(英文全称:Device to Device,中文名称:设备对设备)通信模式。With the gradual improvement of the 4G standard, 5G technology has entered people's attention. There are data showing that the future 5G wireless communication system will develop in the direction of network convergence, one direction is heterogeneous network, and the other direction is to allow close proximity under cellular network. The mobile device communicates directly, that is, D2D (English name: Device to Device, Chinese name: device to device) communication mode.
一方面,密钥协商一直是无线通信系统中十分重要的安全机制,对于D2D无线通信,由于UE与UE之间传输路径的不确定性,因此无法使用传统无线网络中所采用的路由器、防火墙等设备进行密钥协商,目前尚未有针对D2D无线通信的密钥协商的标准和协议。On the one hand, key agreement has always been a very important security mechanism in wireless communication systems. For D2D wireless communication, due to the uncertainty of the transmission path between the UE and the UE, routers, firewalls, etc. used in traditional wireless networks cannot be used. The device performs key negotiation. Currently, there are no standards and protocols for key negotiation for D2D wireless communication.
另一方面,在物联网、传感器网络中使用BNN-IBS(英文全称:Bellare M;Namprempre C;Neven G;identity-based signature,中文:由Bellare M、Namprempre C、Neven G提出的基于椭圆曲线的身份签名协议)进行密钥协商。参照图1所示,BNN-IBS流程包括以下步骤:On the other hand, BNN-IBS is used in the Internet of Things and sensor networks (English name: Bellare M; Namprempre C; Neven G; identity-based signature, Chinese: elliptic curve based by Bellare M, Namprempre C, Neven G Identity Signing Protocol) for key negotiation. Referring to Figure 1, the BNN-IBS process includes the following steps:
S101、PKG(英文名称:private key generator,中文名称:私钥生成器)设定系统参数。S101, PKG (English name: private key generator, Chinese name: private key generator) set system parameters.
选择有限域Fp上的椭圆曲线E(Fp),E/Fp表示由E(Fp)上的点构成的阶为n的群:p∈E/Fp且p的阶为q,q为素数且满足q2不整除n;G1为由p生成的循环群;选取
Figure PCTCN2016076170-appb-000001
为系统私钥;计算Q=sp作为系统公钥;选取两个加密哈希函数
Figure PCTCN2016076170-appb-000002
Select the elliptic curve E(F p ) on the finite field F p , where E/F p represents the group of order n consisting of points on E(F p ): p∈E/F p and the order of p is q, q is a prime number and satisfies q 2 not divisible by n; G 1 is a cyclic group generated by p;
Figure PCTCN2016076170-appb-000001
Is the system private key; calculate Q=sp as the system public key; select two cryptographic hash functions
Figure PCTCN2016076170-appb-000002
S102、PKG向UE(英文名称:user equipment,中文名称:用 户设备)公布系统参数。S102, PKG to UE (English name: user equipment, Chinese name: use User equipment) publish system parameters.
PKG向UE1和UE2公布系统参数<E(Fp),p,q,Q,H1,H2>。The PKG advertises the system parameters <E(F p ), p, q, Q, H 1 , H 2 > to UE1 and UE2.
S103、PKG为UE1分配用户私钥<R1,s1>。S103. PKG allocates a user private key <R 1 , s 1 > to UE1.
给定用户身份信息IDu∈{0,1}*;选取
Figure PCTCN2016076170-appb-000003
计算R=rp;利用系统私钥x计算s=r+cx mod q,c=H1(IDu||R)。用户IDu的私钥SKu=(R,s)。具体的,对于UE1,PKG为UE1分配用户私钥<R1,s1>。
Given user identity information ID u ∈{0,1} * ;
Figure PCTCN2016076170-appb-000003
Calculate R = rp; calculate s = r + cx mod q, c = H 1 (ID u | | R) using the system private key x. User ID u 's private key SK u = (R, s). Specifically, for UE1, PKG allocates a user private key <R 1 , s 1 > to UE1.
S104、UE1利用哈希函数进行签名<R1,Y1,z1>。S104. The UE1 performs a signature <R 1 , Y 1 , z 1 > by using a hash function.
选取
Figure PCTCN2016076170-appb-000004
计算Y=yp,z=y+hs mod q。其中,h=H2(IDu,m,R,Y)。用户IDu对消息m的签名为<R,Y,z>。具体的,对于UE1,h=H2(ID1,m,R1,Y1),z1=y+hs1 mod q,对消息m的签名为<R1,Y1,z1>。
Select
Figure PCTCN2016076170-appb-000004
Calculate Y = yp, z = y + hs mod q. Where h = H 2 (ID u , m, R, Y). The signature of the user ID u to the message m is <R, Y, z>. Specifically, for UE1, h=H 2 (ID 1 , m, R 1 , Y 1 ), z 1 =y+hs 1 mod q, and the signature of the message m is <R 1 , Y 1 , z 1 >.
S105、UE1将签名信息<m,ID1,R1,Y1,z1>发送给UE2。S105, UE1 signature information <m, ID 1, R 1 , Y 1, z 1> sent to UE2.
S106、UE2进行签名验证。S106. The UE2 performs signature verification.
给定用户IDu、系统参数、消息m及签名<R,Y,z>,计算h=H2(IDu,m,R,Y),c=H1(IDu||R)。判断zp=Y+h(R+cQ)是否成立,若成立,则验证通过,接收消息m,否则丢弃消息m。具体的,对于UE2来说,h=H2(ID1,m,R1,Y1),c=H1(ID1||R1),判断z1p=Y1+h(R1+cQ)是否成立,若成立,则验证通过,接收消息m,否则丢弃消息m。Given user ID u , system parameters, message m, and signature <R, Y, z>, calculate h = H 2 (ID u , m, R, Y), c = H 1 (ID u || R). It is judged whether zp=Y+h(R+cQ) is established. If it is established, the verification passes, and the message m is received, otherwise the message m is discarded. Specifically, for UE2, h=H 2 (ID 1 , m, R 1 , Y 1 ), c=H 1 (ID 1 ||R 1 ), and judge z 1 p=Y 1 +h(R 1 Whether +cQ) is established. If it is established, the verification is passed, the message m is received, otherwise the message m is discarded.
S107、PKG为UE2分配用户私钥<R2,s2>。S107. PKG allocates a user private key <R 2 , s 2 > to UE2.
具体计算步骤同步骤S103。具体的,对于UE2,PKG为UE2分配用户私钥<R2,s2>。The specific calculation step is the same as step S103. Specifically, for UE2, PKG allocates a user private key <R 2 , s 2 > to UE2.
S108、UE2利用哈希函数进行签名<R2,Y2,z2>。S108. The UE2 performs the signature <R 2 , Y 2 , z 2 > using a hash function.
具体计算步骤同步骤S104。具体的,对于UE2,h=H2(ID2,m,R2,Y2),z2=y+hs2 mod q,对消息m的签名为<R2,Y2,z2>。The specific calculation step is the same as step S104. Specifically, for UE2, h=H 2 (ID 2 , m, R 2 , Y 2 ), z 2 =y+hs 2 mod q, and the signature of the message m is <R 2 , Y 2 , z 2 >.
S109、UE2将签名信息<m,ID2,R2,Y2,z2>发送给UE1。S109. The UE2 transmits the signature information <m, ID 2 , R 2 , Y 2 , z 2 > to the UE 1.
S110、UE1进行签名验证。S110. The UE1 performs signature verification.
具体计算步骤同步骤S106。具体的,对于UE1来说,h=H2(ID2,m,R2,Y2),c=H1(ID2||R2),判断z2p=Y2+h(R2+cQ)是否成立,若成立,则验证通过,接收消息m,否则丢弃消息m。The specific calculation step is the same as step S106. Specifically, for UE1, h=H 2 (ID 2 , m, R 2 , Y 2 ), c=H 1 (ID 2 ||R 2 ), and judge z 2 p=Y 2 +h(R 2 Whether +cQ) is established. If it is established, the verification is passed, the message m is received, otherwise the message m is discarded.
但是BNN-IBS具有以下问题:由于PKG生成系统参数以及UE1 和UE2进行签名时均采用哈希函数进行加密,加密程度较低,无法对抗篡改数据攻击。But BNN-IBS has the following problems: due to PKG generation system parameters and UE1 Both the UE and the UE2 use a hash function for encryption, which is low in encryption and cannot be used against tampering data attacks.
发明内容Summary of the invention
本发明的实施例提供一种密钥协商方法、装置和系统,用于解决将BNN-IBS应用于D2D无线通信网络中进行密钥协商时加密程度低的问题。Embodiments of the present invention provide a key agreement method, apparatus, and system for solving the problem of low degree of encryption when applying BNN-IBS to a D2D wireless communication network for key negotiation.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,提供一种密钥协商方法,具体包括如下步骤:The first aspect provides a key negotiation method, which specifically includes the following steps:
密钥生成设备根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商;The key generation device generates a system parameter and a master key according to a preset elliptic curve parameter, wherein the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, the system The public key is used by the first user equipment to perform key agreement with the second user equipment;
密钥生成设备广播系统参数;The key generation device broadcasts system parameters;
密钥生成设备根据系统参数、主密钥和第一用户设备的标识,生成第一用户设备的公钥和私钥;The key generation device generates a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
密钥生成设备将第一用户设备的公钥和私钥经过同态加密发送给第一用户设备,用于第一用户设备与第二用户设备进行密钥协商,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The key generation device sends the public key and the private key of the first user equipment to the first user equipment through homomorphic encryption, and is used for performing key negotiation between the first user equipment and the second user equipment, by using homomorphic encryption. Encryption using a hash function has a higher degree of encryption, while communication and computational overhead is small, which reduces the computational complexity;
密钥生成设备根据系统参数、主密钥和第二用户设备的标识,生成第二用户设备的公钥和私钥;The key generation device generates a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment;
密钥生成设备将第二用户设备的公钥和私钥经过同态加密发送给第二用户设备,用于第二用户设备与第一用户设备进行密钥协商,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度。The key generation device sends the common key and the private key of the second user equipment to the second user equipment through homomorphic encryption, and the second user equipment performs key agreement with the first user equipment, by using homomorphic encryption. Encryption with a hash function has a higher degree of encryption, while communication and computational overhead is small, which reduces the computational complexity.
在该实现方式中,在密钥生成设备将第一用户设备的公钥和私钥发送给第一用户设备时,在密钥生成设备将第二用户设备的公钥和私钥发送给第二用户设备时,均进行了同态加密。而非如 BNN-IBS中所描述的:在PKG设定系统参数时,在PKG为UE1和UE2分配用户私钥时,以及在UE1和UE2进行签名时均采用哈希函数进行加密。同态加密可以抵抗篡改数据的攻击,其加密程度比哈希函数的加密程度更高,提高了加密的复杂程度。因此,本发明的实施例提供的密钥协商方法解决了将BNN-IBS身份签名协议应用于D2D无线通信网络中进行密钥协商时加密程度低的问题。另外,使用同态加密与哈希运算相比,通信与计算开销较小,降低了计算的复杂度。In this implementation, when the key generation device sends the public key and the private key of the first user equipment to the first user equipment, the key generation device sends the public key and the private key of the second user equipment to the second Homomorphic encryption is performed on user equipment. Instead of As described in BNN-IBS: when PKG sets system parameters, when PKG allocates user private key for UE1 and UE2, and when UE1 and UE2 sign, both use hash function for encryption. Homomorphic encryption can resist attacks that tamper with data. The degree of encryption is higher than that of the hash function, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
结合第一方面,在第一种可能的实现方式中,密钥协商方法包括:With reference to the first aspect, in a first possible implementation manner, the key negotiation method includes:
密钥生成设备根据椭圆曲线参数和整数得到中间参数;The key generation device obtains an intermediate parameter according to the elliptic curve parameter and the integer;
密钥生成设备从中间参数指示的有限域中选取随机数作为主密钥;The key generation device selects a random number as a master key from a finite field indicated by the intermediate parameter;
密钥生成设备根据主密钥和中间参数得到系统公钥。The key generation device obtains the system public key based on the master key and intermediate parameters.
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,密钥协商方法包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the key negotiation method includes:
密钥生成设备从中间参数指示的有限域中选取第一随机数;The key generation device selects the first random number from the finite field indicated by the intermediate parameter;
密钥生成设备根据系统参数、第一用户设备的标识以及第一随机数,生成第一用户设备的公钥;The key generation device generates a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number;
密钥生成设备根据系统参数、主密钥、第一用户设备的公钥以及第一随机数,生成第一用户设备的私钥。The key generation device generates a private key of the first user equipment according to the system parameter, the master key, the public key of the first user equipment, and the first random number.
结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式,在第三种可能的实现方式中,密钥协商方法包括:With reference to the first aspect, or the first possible implementation of the first aspect, or the second possible implementation of the first aspect, in a third possible implementation, the key negotiation method includes:
密钥生成设备从中间参数指示的有限域中选取第二随机数;The key generation device selects the second random number from the finite field indicated by the intermediate parameter;
密钥生成设备根据系统参数、第二用户设备的标识以及第二随机数,生成第二用户设备的公钥;The key generation device generates a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number;
密钥生成设备根据系统参数、主密钥、第二用户设备的公钥以及第二随机数生成第二用户设备的私钥。 The key generation device generates a private key of the second user equipment according to the system parameter, the master key, the public key of the second user equipment, and the second random number.
第二方面,提供一种密钥协商方法,具体包括如下步骤:The second aspect provides a key negotiation method, which specifically includes the following steps:
第一用户设备接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商;The first user equipment receives system parameters sent by the key generation device, where the system parameters include an elliptic curve parameter, an intermediate parameter, and a system public key, wherein the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used The first user equipment performs key agreement with the second user equipment;
第一用户设备接收密钥生成设备发送的第一用户设备的公钥和私钥,并且对第一用户设备的公钥和私钥进行解密,其中,第一用户设备的公钥和私钥经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The first user equipment receives the public key and the private key of the first user equipment sent by the key generation device, and decrypts the public key and the private key of the first user equipment, where the public key and the private key of the first user equipment pass Homomorphic encryption, by adopting homomorphic encryption, is more encrypted than using hash function, and the communication and computational overhead is small, which reduces the computational complexity;
第一用户设备根据系统参数以及第一用户设备的公钥和私钥,生成第一签名消息;The first user equipment generates a first signature message according to the system parameter and the public key and the private key of the first user equipment;
第一用户设备将第一签名消息经过同态加密发送给第二用户设备,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The first user equipment sends the first signature message to the second user equipment through homomorphic encryption. By adopting homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computation overhead are small. Reduce the complexity of the calculation;
第一用户设备接收第二用户设备发送的第二签名消息,并且对第二签名消息进行解密,其中,第二签名消息经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The first user equipment receives the second signature message sent by the second user equipment, and decrypts the second signature message, where the second signature message is homomorphic encrypted by using homomorphic encryption, compared to using a hash function. Encryption, the degree of encryption is higher, while the communication and computational overhead is small, which reduces the computational complexity;
若第一用户设备根据第二签名消息和系统参数验证第二用户设备的身份合法,则第一用户设备根据第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。If the first user equipment verifies that the identity of the second user equipment is legal according to the second signature message and the system parameter, the first user equipment obtains the shared key that communicates with the second user equipment according to the second signature message and the system parameter.
在该实现方式中,在该实现方式中,在密钥生成设备将第一用户设备的公钥和私钥发送给第一用户设备时,在第一用户设备将第一签名消息发送给第二用户设备时,以及在第二用户设备将第二签名消息发送给第一用户设备时,均进行了同态加密。而非如BNN-IBS中所描述的:在PKG设定系统参数时,在PKG为UE1和UE2分配用户私钥时,以及在UE1和UE2进行签名时均采用哈希函数进行加密。同态加密可以抵抗篡改数据的攻击,其加密程度比哈 希函数的加密程度更高,提高了加密的复杂程度。因此,本发明的实施例提供的密钥协商方法解决了将BNN-IBS身份签名协议应用于D2D无线通信网络中进行密钥协商时加密程度低的问题。另外,使用同态加密与哈希运算相比,通信与计算开销较小,降低了计算的复杂度。In this implementation, in the implementation, when the key generation device sends the public key and the private key of the first user equipment to the first user equipment, the first user equipment sends the first signature message to the second The homomorphic encryption is performed when the user equipment, and when the second user equipment sends the second signature message to the first user equipment. Rather than as described in BNN-IBS: When the PKG sets the system parameters, the PKG allocates the user private key for UE1 and UE2, and when both UE1 and UE2 sign, the hash function is used for encryption. Homomorphic encryption can resist attacks that tamper with data, and its encryption is better than Kazakhstan. The encryption of the Greek function is higher, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
结合第二方面,在第一种可能的实现方式中,密钥协商方法包括:With reference to the second aspect, in a first possible implementation manner, the key negotiation method includes:
第一用户设备从中间参数指示的有限域中选取第三随机数和第四随机数;The first user equipment selects a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
第一用户设备根据系统参数、第一用户设备的公钥和私钥以及第三随机数和第四随机数,生成第一签名消息。The first user equipment generates a first signature message according to the system parameter, the public key and the private key of the first user equipment, and the third random number and the fourth random number.
结合第二方面,在第二种可能的实现方式中,密钥协商方法包括:With reference to the second aspect, in a second possible implementation manner, the key negotiation method includes:
若系统参数和第二签名消息中所包含的参数之间满足预设的等式关系,则确定第二用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the second signature message, it is determined that the identity of the second user equipment is legal.
结合第二方面的第一种可能的实现方式,在第三种可能的实现方式中,密钥协商方法包括:In conjunction with the first possible implementation of the second aspect, in a third possible implementation, the key negotiation method includes:
第一用户设备根据第三随机数、第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。The first user equipment obtains a shared key that communicates with the second user equipment according to the third random number, the second signature message, and the system parameter.
第三方面,提供一种密钥协商方法,具体包括如下步骤:The third aspect provides a key negotiation method, which specifically includes the following steps:
第二用户设备接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数、系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第二用户设备与第一用户设备进行密钥协商;The second user equipment receives the system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used for the second The user equipment performs key agreement with the first user equipment.
第二用户设备接收第一用户设备发送的第一签名消息,并且对第一签名消息进行解密,其中,第一签名消息经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The second user equipment receives the first signature message sent by the first user equipment, and decrypts the first signature message, where the first signature message is homomorphic encrypted, by using homomorphic encryption, compared to using a hash function. Encryption, the degree of encryption is higher, while the communication and computational overhead is small, which reduces the computational complexity;
第二用户设备接收密钥生成设备发送的第二用户设备的公钥和 私钥,并且对第二用户设备的公钥和私钥进行解密,其中,第二用户设备的公钥和私钥经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;Receiving, by the second user equipment, a public key of the second user equipment sent by the key generation device a private key, and decrypting the public key and the private key of the second user equipment, wherein the public key and the private key of the second user equipment are homomorphic encrypted, and by using homomorphic encryption, the encryption is performed by using a hash function. The encryption degree is higher, and the communication and calculation overhead is small, which reduces the computational complexity;
若第二用户设备根据第一签名消息和系统参数验证第一用户设备的身份合法,则第二用户设备根据系统参数、第二用户设备的公钥和私钥,生成第二签名消息;If the second user equipment verifies that the identity of the first user equipment is legal according to the first signature message and the system parameter, the second user equipment generates a second signature message according to the system parameter, the public key of the second user equipment, and the private key;
第二用户设备将第二签名消息经过同态加密发送给第一用户设备,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The second user equipment sends the second signature message to the first user equipment through homomorphic encryption. By adopting the homomorphic encryption, the encryption is higher than that of the hash function, and the communication and calculation overhead are small. Reduce the complexity of the calculation;
第二用户设备根据第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。The second user equipment obtains a shared key that communicates with the first user equipment according to the first signature message and the system parameter.
在该实现方式中,在密钥生成设备将第二用户设备的公钥和私钥发送给第二用户设备时,在第一用户设备将第一签名消息发送给第二用户设备时,以及在第二用户设备将第二签名消息发送给第一用户设备时,均进行了同态加密。而非如BNN-IBS中所描述的:在PKG设定系统参数时,在PKG为UE1和UE2分配用户私钥时,以及在UE1和UE2进行签名时均采用哈希函数进行加密。同态加密可以抵抗篡改数据的攻击,其加密程度比哈希函数的加密程度更高,提高了加密的复杂程度。因此,本发明的实施例提供的密钥协商方法解决了将BNN-IBS身份签名协议应用于D2D无线通信网络中进行密钥协商时加密程度低的问题。另外,使用同态加密与哈希运算相比,通信与计算开销较小,降低了计算的复杂度。In this implementation, when the key generation device sends the public key and the private key of the second user equipment to the second user equipment, when the first user equipment sends the first signature message to the second user equipment, When the second user equipment sends the second signature message to the first user equipment, the homomorphic encryption is performed. Rather than as described in BNN-IBS: When the PKG sets the system parameters, the PKG allocates the user private key for UE1 and UE2, and when both UE1 and UE2 sign, the hash function is used for encryption. Homomorphic encryption can resist attacks that tamper with data. The degree of encryption is higher than that of the hash function, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
结合第三方面,在第一种可能的实现方式中,密钥协商方法包括:With reference to the third aspect, in a first possible implementation manner, the key negotiation method includes:
第二用户设备从中间参数指示的有限域中选取第五随机数和第六随机数;The second user equipment selects the fifth random number and the sixth random number from the finite field indicated by the intermediate parameter;
第二用户设备根据系统参数、第二用户设备的公钥和私钥以及第五随机数和第六随机数,生成第二签名消息。 The second user equipment generates a second signature message according to the system parameter, the public key and the private key of the second user equipment, and the fifth random number and the sixth random number.
结合第三方面,在第二种可能的实现方式中,密钥协商方法包括:With reference to the third aspect, in a second possible implementation manner, the key negotiation method includes:
若系统参数和第一签名消息中所包含的参数之间满足预设的等式关系,则确定第一用户设备的身份合法。If the preset equation relationship is satisfied between the system parameter and the parameter included in the first signature message, it is determined that the identity of the first user equipment is legal.
结合第三方面的第一种可能的实现方式,在第三种可能的实现方式中,密钥协商方法包括:In conjunction with the first possible implementation of the third aspect, in a third possible implementation, the key negotiation method includes:
第二用户设备根据第五随机数、第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。The second user equipment obtains a shared key that communicates with the first user equipment according to the fifth random number, the first signature message, and the system parameter.
第四方面,提供一种密钥生成设备,用于执行第一方面或第一方面中可能的实现方式中所述的密钥协商方法,包括:The fourth aspect provides a key generation device, which is used to perform the key negotiation method described in the first aspect or the possible implementation manner in the first aspect, including:
处理单元,用于根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商;a processing unit, configured to generate a system parameter and a master key according to a preset elliptic curve parameter, wherein the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, The system public key is used for key negotiation between the first user equipment and the second user equipment;
发送单元,用于广播系统参数;a sending unit for broadcasting system parameters;
处理单元,还用于根据系统参数、主密钥和第一用户设备的标识,生成第一用户设备的公钥和私钥;The processing unit is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
发送单元,还用于将第一用户设备的公钥和私钥经过同态加密发送给第一用户设备,用于第一用户设备与第二用户设备进行密钥协商,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The sending unit is further configured to send the public key and the private key of the first user equipment to the first user equipment by using the same state encryption, and the first user equipment performs key negotiation with the second user equipment, and adopts homomorphic encryption. Compared with the hash function, the encryption is higher, and the communication and calculation overhead is smaller, which reduces the computational complexity;
处理单元,还用于根据系统参数、主密钥和第二用户设备的标识,生成第二用户设备的公钥和私钥;The processing unit is further configured to generate a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment;
发送单元,还用于将第二用户设备的公钥和私钥经过同态加密发送给第二用户设备,用于第二用户设备与第一用户设备进行密钥协商,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度。The sending unit is further configured to send the public key and the private key of the second user equipment to the second user equipment by using the same state encryption, and the second user equipment performs key negotiation with the first user equipment, by adopting homomorphic encryption. Compared with the hash function, the encryption is higher, and the communication and calculation overhead is smaller, which reduces the computational complexity.
由于本发明中的密钥生成设备可以用于执行第一方面的方法流程,因此,其所能获得的技术效果也可参考第一方面的方法,本发 明在此不再赘述。Since the key generation device in the present invention can be used to execute the method flow of the first aspect, the technical effects that can be obtained can also refer to the method of the first aspect. Ming will not repeat them here.
结合第四方面,在第一种可能的实现方式中,处理单元还用于:In conjunction with the fourth aspect, in a first possible implementation, the processing unit is further configured to:
根据椭圆曲线参数和整数得到中间参数;Obtain intermediate parameters according to elliptic curve parameters and integers;
从中间参数指示的有限域中选取随机数作为主密钥;Selecting a random number as the master key from the finite field indicated by the intermediate parameter;
根据主密钥和中间参数得到系统公钥。The system public key is obtained based on the master key and intermediate parameters.
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,处理单元还用于:In conjunction with the fourth aspect or the first possible implementation of the fourth aspect, in a second possible implementation, the processing unit is further configured to:
从中间参数指示的有限域中选取第一随机数;Selecting a first random number from a finite field indicated by an intermediate parameter;
根据系统参数、第一用户设备的标识以及第一随机数,生成第一用户设备的公钥;Generating a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number;
根据系统参数、主密钥、第一用户设备的公钥以及第一随机数,生成第一用户设备的私钥。Generating a private key of the first user equipment according to the system parameter, the master key, the public key of the first user equipment, and the first random number.
结合第四方面或第四方面的第一种可能的实现方式或第四方面的第二种可能的实现方式,在第三种可能的实现方式中,处理单元还用于:With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, or the second possible implementation manner of the fourth aspect, in a third possible implementation manner, the processing unit is further configured to:
从中间参数指示的有限域中选取第二随机数;Selecting a second random number from a finite field indicated by the intermediate parameter;
根据系统参数、第二用户设备的标识以及第二随机数,生成第二用户设备的公钥;Generating a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number;
根据系统参数、主密钥、第二用户设备的公钥以及第二随机数生成第二用户设备的私钥。Generating a private key of the second user equipment according to the system parameter, the master key, the public key of the second user equipment, and the second random number.
第五方面,提供一种用户设备,用于执行第二方面或第二方面中可能的实现方式中所述的密钥协商方法,包括:The fifth aspect provides a user equipment, which is used to perform the key negotiation method described in the second aspect or the possible implementation manner of the second aspect, including:
接收单元,用于接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于用户设备与第二用户设备进行密钥协商;a receiving unit, configured to receive a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used by Key negotiation between the user equipment and the second user equipment;
接收单元,还用于接收密钥生成设备发送的用户设备的公钥和私钥,并且对用户设备的公钥和私钥进行解密,其中,用户设备的 公钥和私钥经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The receiving unit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt the public key and the private key of the user equipment, where the user equipment The public key and the private key are homomorphic encrypted, and by using homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computational overhead are small, which reduces the computational complexity;
处理单元,用于根据系统参数以及用户设备的公钥和私钥,生成第一签名消息;a processing unit, configured to generate a first signature message according to the system parameter and the public key and the private key of the user equipment;
发送单元,用于将第一签名消息经过同态加密发送给第二用户设备,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;a sending unit, configured to send the first signature message to the second user equipment by homomorphic encryption, and by using homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computing overhead is small. , reducing the complexity of the calculation;
接收单元,还用于接收第二用户设备发送的第二签名消息,并且对第二签名消息进行解密,其中,第二签名消息经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The receiving unit is further configured to receive the second signature message sent by the second user equipment, and decrypt the second signature message, where the second signature message is homomorphic encrypted by using homomorphic encryption, compared to adopting a hash. The function encrypts, the degree of encryption is higher, and the communication and calculation overhead is small, which reduces the computational complexity;
处理单元,还用于若根据第二签名消息和系统参数验证第二用户设备的身份合法,则根据第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。The processing unit is further configured to: if the identity of the second user equipment is verified according to the second signature message and the system parameter, obtain a shared key that communicates with the second user equipment according to the second signature message and the system parameter.
由于本发明中的用户设备可以用于执行第二方面的方法流程,因此,其所能获得的技术效果也可参考第二方面的方法,本发明在此不再赘述。Since the user equipment in the present invention can be used to perform the method flow of the second aspect, the technical effects that can be obtained are also referred to the method of the second aspect, and the present invention is not described herein again.
结合第五方面,在第一种可能的实现方式中,处理单元还用于:In conjunction with the fifth aspect, in a first possible implementation, the processing unit is further configured to:
从中间参数指示的有限域中选取第三随机数和第四随机数;Selecting a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
根据系统参数、用户设备的公钥和私钥以及第三随机数和第四随机数,生成第一签名消息。The first signature message is generated according to the system parameter, the public key and the private key of the user equipment, and the third random number and the fourth random number.
结合第五方面,在第二种可能的实现方式中,处理单元还用于:In conjunction with the fifth aspect, in a second possible implementation, the processing unit is further configured to:
若系统参数和第二签名消息中所包含的参数之间满足预设的等式关系,则确定第二用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the second signature message, it is determined that the identity of the second user equipment is legal.
结合第五方面的第一种可能的实现方式,在第三种可能的实现方式中,处理单元还用于: In conjunction with the first possible implementation of the fifth aspect, in a third possible implementation, the processing unit is further configured to:
根据第三随机数、第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。A shared key that communicates with the second user equipment is obtained according to the third random number, the second signature message, and the system parameter.
第六方面,提供一种用户设备,用于执行第三方面或第三方面中可能的实现方式中所述的密钥协商方法,包括:The sixth aspect provides a user equipment, which is used to perform the key negotiation method described in the third aspect or the possible implementation manner of the third aspect, including:
接收单元,用于接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数、系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于用户设备与第一用户设备进行密钥协商;a receiving unit, configured to receive a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used by the user The device performs key negotiation with the first user equipment.
接收单元,还用于接收第一用户设备发送的第一签名消息,并且对第一签名消息进行解密,其中,第一签名消息经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The receiving unit is further configured to receive the first signature message sent by the first user equipment, and decrypt the first signature message, where the first signature message is homomorphic encrypted, by using homomorphic encryption, compared to adopting a hash The function encrypts, the degree of encryption is higher, and the communication and calculation overhead is small, which reduces the computational complexity;
接收单元,还用于接收密钥生成设备发送的用户设备的公钥和私钥,并且对用户设备的公钥和私钥进行解密,其中,用户设备的公钥和私钥经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The receiving unit is further configured to receive the public key and the private key of the user equipment sent by the key generation device, and decrypt the public key and the private key of the user equipment, where the public key and the private key of the user equipment are homomorphic encrypted. By adopting homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computational overhead is small, which reduces the computational complexity;
处理单元,用于若根据第一签名消息和系统参数验证第一用户设备的身份合法,则根据系统参数、用户设备的公钥和私钥,生成第二签名消息;a processing unit, configured to: if the identity of the first user equipment is valid according to the first signature message and the system parameter, generate a second signature message according to the system parameter, the public key and the private key of the user equipment;
发送单元,用于将第二签名消息经过同态加密发送给第一用户设备,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The sending unit is configured to send the second signature message to the first user equipment by homomorphic encryption, and by using homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computing overhead is small. , reducing the complexity of the calculation;
处理单元,还用于根据第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。The processing unit is further configured to obtain, according to the first signature message and the system parameter, a shared key that communicates with the first user equipment.
由于本发明中的用户设备可以用于执行第三方面的方法流程,因此,其所能获得的技术效果也可参考第三方面的方法,本发明在此不再赘述。Since the user equipment in the present invention can be used to perform the method flow of the third aspect, the technical effects that can be obtained can also refer to the method of the third aspect, and the present invention will not be described herein.
结合第六方面,在第一种可能的实现方式中,处理单元还用 于:In combination with the sixth aspect, in the first possible implementation, the processing unit further uses to:
从中间参数指示的有限域中选取第五随机数和第六随机数;Selecting a fifth random number and a sixth random number from a finite field indicated by the intermediate parameter;
根据系统参数、用户设备的公钥和私钥以及第五随机数和第六随机数,生成第二签名消息。And generating a second signature message according to the system parameter, the public key and the private key of the user equipment, and the fifth random number and the sixth random number.
结合第六方面,在第二种可能的实现方式中,处理单元还用于:In conjunction with the sixth aspect, in a second possible implementation, the processing unit is further configured to:
若系统参数和第一签名消息中所包含的参数之间之间满足预设的等式关系,则确定第一用户设备的身份合法。If the preset equation relationship is satisfied between the system parameter and the parameter included in the first signature message, it is determined that the identity of the first user equipment is legal.
结合第六方面的第一种可能的实现方式,在第三种可能的实现方式中,处理单元还用于:In conjunction with the first possible implementation of the sixth aspect, in a third possible implementation, the processing unit is further configured to:
根据第五随机数、第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。A shared key that communicates with the first user equipment is obtained according to the fifth random number, the first signature message, and the system parameter.
第七方面,提供一种密钥生成设备,用于执行第一方面或第一方面中可能的实现方式中所述的密钥协商方法,包括:处理器、接口电路、存储器和总线;处理器、接口电路、存储器通过总线连接并完成相互间的通信;处理器用于执行存储器中的程序代码以控制接口电路执行以下操作:According to a seventh aspect, a key generation apparatus is provided for performing the key agreement method described in the first aspect or the possible implementation manner of the first aspect, including: a processor, an interface circuit, a memory, and a bus; The interface circuit and the memory are connected by a bus and complete communication with each other; the processor is configured to execute program code in the memory to control the interface circuit to perform the following operations:
处理器,用于根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商;a processor, configured to generate a system parameter and a master key according to a preset elliptic curve parameter, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, The system public key is used for key negotiation between the first user equipment and the second user equipment;
接口电路,用于广播系统参数;Interface circuit for broadcasting system parameters;
处理单元,还用于根据系统参数、主密钥和第一用户设备的标识,生成第一用户设备的公钥和私钥;The processing unit is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
接口电路,还用于将第一用户设备的公钥和私钥经过同态加密发送给第一用户设备,用于第一用户设备与第二用户设备进行密钥协商,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The interface circuit is further configured to send the public key and the private key of the first user equipment to the first user equipment by using the same state encryption, and the first user equipment performs key agreement with the second user equipment, and adopts homomorphic encryption. Compared with the hash function, the encryption is higher, and the communication and calculation overhead is smaller, which reduces the computational complexity;
处理器,还用于根据系统参数、主密钥和第二用户设备的标 识,生成第二用户设备的公钥和私钥;a processor, further for marking a system parameter, a master key, and a second user device Knowledge generating a public key and a private key of the second user equipment;
接口电路,还用于将第二用户设备的公钥和私钥经过同态加密发送给第二用户设备,用于第二用户设备与第一用户设备进行密钥协商,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度。The interface circuit is further configured to send the public key and the private key of the second user equipment to the second user equipment by using the same state encryption, and the second user equipment performs key negotiation with the first user equipment, and adopts homomorphic encryption. Compared with the hash function, the encryption is higher, and the communication and calculation overhead is smaller, which reduces the computational complexity.
由于本发明中的密钥生成设备可以用于执行第一方面的方法流程,因此,其所能获得的技术效果也可参考第一方面的方法,本发明在此不再赘述。Since the key generation device in the present invention can be used to perform the method flow of the first aspect, the technical effects that can be obtained can also refer to the method in the first aspect, and the present invention will not be described herein.
结合第七方面,在第一种可能的实现方式中,处理器还用于:In conjunction with the seventh aspect, in a first possible implementation, the processor is further configured to:
根据椭圆曲线参数和整数得到中间参数;Obtain intermediate parameters according to elliptic curve parameters and integers;
从中间参数指示的有限域中选取随机数作为主密钥;Selecting a random number as the master key from the finite field indicated by the intermediate parameter;
根据主密钥和中间参数得到系统公钥。The system public key is obtained based on the master key and intermediate parameters.
结合第七方面或第七方面的第一种可能的实现方式,在第二种可能的实现方式中,处理器还用于:With reference to the seventh aspect, or the first possible implementation manner of the seventh aspect, in a second possible implementation manner, the processor is further configured to:
从中间参数指示的有限域中选取第一随机数;Selecting a first random number from a finite field indicated by an intermediate parameter;
根据系统参数、第一用户设备的标识以及第一随机数,生成第一用户设备的公钥;Generating a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number;
根据系统参数、主密钥、第一用户设备的公钥以及第一随机数,生成第一用户设备的私钥。Generating a private key of the first user equipment according to the system parameter, the master key, the public key of the first user equipment, and the first random number.
结合第七方面或第七方面的第一种可能的实现方式或第七方面的第二种可能的实现方式,在第三种可能的实现方式中,处理器还用于:With reference to the seventh aspect, or the first possible implementation manner of the seventh aspect, or the second possible implementation manner of the seventh aspect, in a third possible implementation manner, the processor is further configured to:
从中间参数指示的有限域中选取第二随机数;Selecting a second random number from a finite field indicated by the intermediate parameter;
根据系统参数、第二用户设备的标识以及第二随机数,生成第二用户设备的公钥;Generating a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number;
根据系统参数、主密钥、第二用户设备的公钥以及第二随机数生成第二用户设备的私钥。Generating a private key of the second user equipment according to the system parameter, the master key, the public key of the second user equipment, and the second random number.
第八方面,提供一种用户设备,用于执行第二方面或第二方面中可能的实现方式中所述的密钥协商方法,包括:处理器、第一接 口电路、第二接口电路、存储器和总线;处理器、第一接口电路、第二接口电路、存储器通过总线连接并完成相互间的通信;处理器用于执行存储器中的程序代码以控制第一接口电路和第二接口电路执行以下操作:The eighth aspect provides a user equipment, where the method for performing the key negotiation described in the second aspect or the possible implementation manner of the second aspect is provided, including: a processor, a first connection Port circuit, second interface circuit, memory and bus; processor, first interface circuit, second interface circuit, memory are connected by bus and complete communication with each other; processor is used to execute program code in memory to control first interface The circuit and the second interface circuit perform the following operations:
第一接口电路,用于接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于用户设备与第二用户设备进行密钥协商;a first interface circuit, configured to receive a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public The key is used by the user equipment to perform key agreement with the second user equipment;
第一接口电路,还用于接收密钥生成设备发送的用户设备的公钥和私钥,并且对用户设备的公钥和私钥进行解密,其中,用户设备的公钥和私钥经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The first interface circuit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt the public key and the private key of the user equipment, where the public key and the private key of the user equipment are homomorphic Encryption, by using homomorphic encryption, is more encrypted than using a hash function, and the communication and computational overhead is small, which reduces the computational complexity;
处理器,用于根据系统参数以及用户设备的公钥和私钥,生成第一签名消息;a processor, configured to generate a first signature message according to system parameters and a public key and a private key of the user equipment;
第二接口电路,用于将第一签名消息经过同态加密发送给第二用户设备,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The second interface circuit is configured to send the first signature message to the second user equipment by homomorphic encryption, and by using homomorphic encryption, the encryption is higher than the hash function, and the communication and computation overhead are simultaneously Smaller, reducing the complexity of the calculation;
第一接口电路,还用于接收第二用户设备发送的第二签名消息,并且对第二签名消息进行解密,其中,第二签名消息经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The first interface circuit is further configured to receive the second signature message sent by the second user equipment, and decrypt the second signature message, where the second signature message is homomorphic and encrypted by using homomorphic encryption. The hash function is encrypted, and the encryption degree is higher, and the communication and calculation overhead is small, which reduces the computational complexity;
处理器,还用于若根据第二签名消息和系统参数验证第二用户设备的身份合法,则根据第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。The processor is further configured to: if the identity of the second user equipment is verified according to the second signature message and the system parameter, obtain a shared key that communicates with the second user equipment according to the second signature message and the system parameter.
由于本发明中的用户设备可以用于执行第二方面的方法流程,因此,其所能获得的技术效果也可参考第二方面的方法,本发明在此不再赘述。Since the user equipment in the present invention can be used to perform the method flow of the second aspect, the technical effects that can be obtained are also referred to the method of the second aspect, and the present invention is not described herein again.
结合第八方面,在第一种可能的实现方式中,处理器还用于: In conjunction with the eighth aspect, in a first possible implementation, the processor is further configured to:
从中间参数指示的有限域中选取第三随机数和第四随机数;Selecting a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
根据系统参数、用户设备的公钥和私钥以及第三随机数和第四随机数,生成第一签名消息。The first signature message is generated according to the system parameter, the public key and the private key of the user equipment, and the third random number and the fourth random number.
结合第八方面,在第二种可能的实现方式中,处理器还用于:In conjunction with the eighth aspect, in a second possible implementation, the processor is further configured to:
若系统参数和第二签名消息中所包含的参数之间满足预设的等式关系,则确定第二用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the second signature message, it is determined that the identity of the second user equipment is legal.
结合第八方面第一种可能的实现方式,在第三种可能的实现方式中,处理器还用于:In conjunction with the first possible implementation of the eighth aspect, in a third possible implementation, the processor is further configured to:
根据第三随机数、第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。A shared key that communicates with the second user equipment is obtained according to the third random number, the second signature message, and the system parameter.
第九方面,提供一种用户设备,用于执行第三方面或第三方面中可能的实现方式中所述的密钥协商方法,包括:处理器、第一接口电路、第二接口电路、存储器和总线;处理器、第一接口电路、第二接口电路、存储器通过总线连接并完成相互间的通信;处理器用于执行存储器中的程序代码以控制第一接口电路和第二接口电路执行以下操作:According to a ninth aspect, a user equipment is provided for performing the key negotiation method described in the third aspect or the possible implementation manner of the third aspect, including: a processor, a first interface circuit, a second interface circuit, and a memory And a bus; the processor, the first interface circuit, the second interface circuit, the memory are connected through the bus and complete communication with each other; the processor is configured to execute program code in the memory to control the first interface circuit and the second interface circuit to perform the following operations :
第一接口电路,还用于接收密钥生成设备发送的用户设备的公钥和私钥,并且对用户设备的公钥和私钥进行解密,其中,用户设备的公钥和私钥经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The first interface circuit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt the public key and the private key of the user equipment, where the public key and the private key of the user equipment are homomorphic Encryption, by using homomorphic encryption, is more encrypted than using a hash function, and the communication and computational overhead is small, which reduces the computational complexity;
第一接口电路,用于接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数、系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于用户设备与第一用户设备进行密钥协商;The first interface circuit is configured to receive system parameters sent by the key generation device, where the system parameters include an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used. Key negotiation between the user equipment and the first user equipment;
第一接口电路,还用于接收第一用户设备发送的第一签名消息,并且对第一签名消息进行解密,其中,第一签名消息经过同态加密,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度; The first interface circuit is further configured to receive the first signature message sent by the first user equipment, and decrypt the first signature message, where the first signature message is homomorphic encrypted, by using homomorphic encryption, compared to adopting The hash function is encrypted, and the encryption degree is higher, and the communication and calculation overhead is small, which reduces the computational complexity;
处理器,用于若根据第一签名消息和系统参数验证第一用户设备的身份合法,则根据系统参数、用户设备的公钥和私钥,生成第二签名消息;a processor, configured to generate a second signature message according to the system parameter, the public key and the private key of the user equipment, if the identity of the first user equipment is valid according to the first signature message and the system parameter;
第二接口电路,用于将第二签名消息经过同态加密发送给第一用户设备,通过采用同态加密,相比于采用哈希函数进行加密,其加密程度更高,同时通信与计算开销较小,降低了计算的复杂度;The second interface circuit is configured to send the second signature message to the first user equipment by homomorphic encryption, and by using homomorphic encryption, the encryption is higher than that of the hash function, and the communication and computing overhead are simultaneously Smaller, reducing the complexity of the calculation;
处理器,还用于根据第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。The processor is further configured to obtain, according to the first signature message and the system parameter, a shared key that communicates with the first user equipment.
由于本发明中的用户设备可以用于执行第三方面的方法流程,因此,其所能获得的技术效果也可参考第三方面的方法,本发明在此不再赘述。Since the user equipment in the present invention can be used to perform the method flow of the third aspect, the technical effects that can be obtained can also refer to the method of the third aspect, and the present invention will not be described herein.
结合第九方面,在第一种可能的实现方式中,处理器还用于:In conjunction with the ninth aspect, in a first possible implementation, the processor is further configured to:
从中间参数指示的有限域中选取第五随机数和第六随机数;Selecting a fifth random number and a sixth random number from a finite field indicated by the intermediate parameter;
根据系统参数、用户设备的公钥和私钥以及第五随机数和第六随机数,生成第二签名消息。And generating a second signature message according to the system parameter, the public key and the private key of the user equipment, and the fifth random number and the sixth random number.
结合第九方面,在第二种可能的实现方式中,处理器还用于:In conjunction with the ninth aspect, in a second possible implementation, the processor is further configured to:
若系统参数和第一签名消息中所包含的参数之间之间满足预设的等式关系,则确定第一用户设备的身份合法。If the preset equation relationship is satisfied between the system parameter and the parameter included in the first signature message, it is determined that the identity of the first user equipment is legal.
结合第九方面的第一种可能的实现方式,在第三种可能的实现方式中,处理器还用于:In conjunction with the first possible implementation of the ninth aspect, in a third possible implementation, the processor is further configured to:
根据第五随机数、第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。A shared key that communicates with the first user equipment is obtained according to the fifth random number, the first signature message, and the system parameter.
第十方面,提供一种密钥协商系统,包括如上述第四方面或第四方面中可能的实现方式中提供的任意一种密钥生成设备,以及如上述第五方面或第五方面中可能的实现方式中提供的任意一种用户设备,以及如上述第六方面或第六方面中可能的实现方式中提供的任意一种用户设备,According to a tenth aspect, there is provided a key agreement system, comprising any one of the key generation devices provided in the above-mentioned fourth aspect or a possible implementation in the fourth aspect, and possibly in the fifth aspect or the fifth aspect described above Any of the user equipments provided in the implementation manner, and any one of the user equipments provided in the foregoing sixth aspect or the possible implementation manners in the sixth aspect,
或者,包括如上述第七方面或第七方面中可能的实现方式中提供的任意一种密钥生成设备,以及如上述第八方面或第八方面中可 能的实现方式中提供的任意一种用户设备,以及如上述第九方面或第九方面中可能的实现方式中提供的任意一种用户设备。Or, comprising any one of the key generation devices provided in the above-mentioned seventh aspect or the possible implementation in the seventh aspect, and as in the eighth aspect or the eighth aspect described above Any of the user equipments provided in the implementation manner, and any one of the user equipments provided in the foregoing ninth aspect or the possible implementation manners in the ninth aspect.
由于本发明实施例提供的密钥协商系统包括如上述第四方面或第四方面中可能的实现方式中提供的任意一种密钥生成设备,以及如上述第五方面或第五方面中可能的实现方式中提供的任意一种用户设备,以及如上述第六方面或第六方面中可能的实现方式中提供的任意一种用户设备,或者,包括如上述第七方面或第七方面中可能的实现方式中提供的任意一种密钥生成设备,以及如上述第八方面或第八方面中可能的实现方式中提供的任意一种用户设备,以及如上述第九方面或第九方面中可能的实现方式中提供的任意一种用户设备,因此,其所能获得的技术效果可参考上述密钥生成设备和用户设备的技术效果,此处不再赘述。The key agreement system provided by the embodiment of the present invention includes any one of the key generation devices provided in the foregoing fourth aspect or the possible implementation manner in the fourth aspect, and the fifth aspect or the fifth aspect as possible Any of the user equipments provided in the implementation manner, and any one of the user equipments provided in the foregoing sixth aspect or the possible implementation manners in the sixth aspect, or including the seventh aspect or the seventh aspect as described above Any one of the key generation devices provided in the implementation, and any one of the user devices as provided in the eighth aspect or the possible implementation in the eighth aspect, and the ninth or ninth aspect as described above For the technical effects of the above-mentioned key generation device and the user equipment, reference may be made to the technical effects of the above-mentioned key generation device and the user device.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为已有技术的BNN-IBS密钥协商方法的流程示意图;1 is a schematic flow chart of a prior art BNN-IBS key negotiation method;
图2为本发明的实施例提供的密钥协商系统的示意图;2 is a schematic diagram of a key agreement system according to an embodiment of the present invention;
图3为本发明的实施例提供的一种密钥协商方法的流程示意图;3 is a schematic flowchart of a key negotiation method according to an embodiment of the present invention;
图4为本发明的实施例提供的另一种密钥协商方法的流程示意图;FIG. 4 is a schematic flowchart diagram of another key negotiation method according to an embodiment of the present invention;
图5为本发明的实施例提供的根据预设的椭圆曲线参数生成系统参数以及主密钥的流程示意图;FIG. 5 is a schematic flowchart of generating system parameters and a master key according to a preset elliptic curve parameter according to an embodiment of the present invention;
图6为本发明的实施例提供的第一签名消息的生成和发送过程中的参数关系示意图; FIG. 6 is a schematic diagram of relationship between parameters in a process of generating and transmitting a first signature message according to an embodiment of the present invention;
图7为本发明的实施例提供的eNB生成UE1的公钥和私钥的流程示意图;FIG. 7 is a schematic flowchart of generating, by an eNB, a public key and a private key of UE1 according to an embodiment of the present disclosure;
图8为本发明的实施例提供的UE1生成第一签名消息的流程示意图;FIG. 8 is a schematic flowchart of generating a first signature message by the UE1 according to an embodiment of the present invention;
图9为本发明的实施例提供的eNB生成UE2的公钥和私钥的流程示意图;FIG. 9 is a schematic flowchart of generating, by an eNB, a public key and a private key of UE2 according to an embodiment of the present invention;
图10为本发明的实施例提供的UE2验证UE1的身份是否合法的流程示意图;FIG. 10 is a schematic flowchart of the UE2 verifying that the identity of the UE1 is legal according to an embodiment of the present invention;
图11为本发明的实施例提供的UE2生成第二签名消息的流程示意图;FIG. 11 is a schematic flowchart of generating a second signature message by the UE2 according to an embodiment of the present invention;
图12为本发明的实施例提供的UE2得到共享密钥的流程示意图;FIG. 12 is a schematic flowchart of a UE2 obtaining a shared key according to an embodiment of the present invention;
图13为本发明的实施例提供的UE1验证UE2的身份是否合法的流程示意图;FIG. 13 is a schematic flowchart of the UE1 verifying that the identity of the UE2 is legal according to an embodiment of the present invention;
图14为本发明的实施例提供的UE1得到共享密钥的流程示意图;FIG. 14 is a schematic flowchart of a UE1 obtaining a shared key according to an embodiment of the present invention;
图15为本发明的实施例提供的一种密钥生成设备的结构示意图;FIG. 15 is a schematic structural diagram of a key generation device according to an embodiment of the present invention;
图16为本发明的实施例提供的一种第一用户设备的结构示意图;FIG. 16 is a schematic structural diagram of a first user equipment according to an embodiment of the present invention;
图17为本发明的实施例提供的一种第二用户设备的结构示意图;FIG. 17 is a schematic structural diagram of a second user equipment according to an embodiment of the present invention;
图18为本发明的实施例提供的另一种密钥生成设备的结构示意图;FIG. 18 is a schematic structural diagram of another key generation device according to an embodiment of the present invention;
图19为本发明的实施例提供的另一种第一用户设备的结构示意图;FIG. 19 is a schematic structural diagram of another first user equipment according to an embodiment of the present invention;
图20为本发明的实施例提供的另一种第二用户设备的结构示意图。 FIG. 20 is a schematic structural diagram of another second user equipment according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本申请将围绕可包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。The application will present various aspects, embodiments, or features in a system that can include multiple devices, components, modules, and the like. It is to be understood and appreciated that the various systems may include additional devices, components, modules, etc. and/or may not include all of the devices, components, modules, etc. discussed in connection with the figures. In addition, a combination of these schemes can also be used.
在本发明实施例中,“示例的”一词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In the embodiments of the present invention, the word "exemplary" is used to mean an example, an illustration, or an illustration. Any embodiment or design described as "example" in this application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the term use examples is intended to present concepts in a concrete manner.
本发明实施例既可以应用于时分双工(time division duplexing,TDD)的场景,也可以适用于频分双工(frequency division duplexing,FDD)的场景。The embodiment of the present invention can be applied to a time division duplexing (TDD) scenario or a frequency division duplexing (FDD) scenario.
本发明实施例依托无线通信网络中4G网络的场景进行说明,应当指出的是,本发明实施例中的方案还可以应用于其他无线通信网络中,相应的名称也可以用其他无线通信网络中的对应功能的名称进行替代。The embodiment of the present invention is described in the context of a 4G network in a wireless communication network. It should be noted that the solution in the embodiment of the present invention may also be applied to other wireless communication networks, and the corresponding names may also be used in other wireless communication networks. Replace the name of the corresponding function.
参照图2所示,本发明的实施例提供了一种密钥协商系统,应用于现有蜂窝网络覆盖下的D2D通信(蜂窝网络控制下的D2D通信)架构,包括:eNB 21、UE1 22、UE2 23。UE1、UE2为能够进行D2D通信的双方设备。eNB首先需要发现能够进行D2D通信的设备UE1、UE2,与UE1、UE2建立逻辑连接,然后控制UE1、UE2的资源分配,进行资源调度和干扰管理,用户可以获得高质量的通信。Referring to FIG. 2, an embodiment of the present invention provides a key agreement system, which is applied to D2D communication (D2D communication under cellular network control) architecture under the coverage of an existing cellular network, including: eNB 21, UE1 22, UE2 23. UE1 and UE2 are both devices capable of D2D communication. The eNB first needs to discover devices UE1 and UE2 capable of D2D communication, establish a logical connection with UE1 and UE2, and then control resource allocation of UE1 and UE2, perform resource scheduling and interference management, and obtain high-quality communication.
本发明的实施例提供了一种密钥协商方法,参照图3所示,包 括以下步骤:An embodiment of the present invention provides a key negotiation method, as shown in FIG. Including the following steps:
S301、密钥生成设备根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商。S301. The key generation device generates a system parameter and a master key according to a preset elliptic curve parameter, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter. The system public key is used by the first user equipment to perform key agreement with the second user equipment.
预设的椭圆曲线参数由韦尔斯特拉斯(英文名称:Weierstrass)方程:y2+a1xy+a3y=x3+a2x2+a4x+a6所确定的平面曲线,称它为椭圆曲线是因为该方程与椭圆的曲线积分比较相似。生成主密钥时可以进行随机生成或者按照预设公式进行生成,本发明不做限定,示例性的,在本发明的实施例中采用随机选取的方式。The preset elliptic curve parameter is determined by the Wellstrass equation: y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6 The curve, called the elliptic curve, is because the equation is similar to the curve integral of the ellipse. The master key may be randomly generated or generated according to a preset formula. The present invention is not limited. For example, a random selection method is adopted in the embodiment of the present invention.
第一用户设备和第二用户设备为互相进行密钥协商的双方。The first user equipment and the second user equipment are both parties that perform key agreement with each other.
S302、密钥生成设备广播系统参数。S302. The key generation device broadcasts system parameters.
受椭圆曲线参数限定的有限域的影响,攻击者若想获得主密钥需要破解椭圆曲线离散对数困难问题,而目前这个困难问题还没有找到高效的(相当于多项式复杂度的)算法。Affected by the finite field defined by the elliptic curve parameters, if the attacker wants to obtain the master key, it is necessary to solve the elliptic curve discrete logarithm problem. However, the current difficult problem has not found an efficient (equivalent to polynomial complexity) algorithm.
S303、第一用户设备接收由密钥生成设备发送的系统参数。S303. The first user equipment receives the system parameter sent by the key generation device.
S304、第二用户设备接收由密钥生成设备发送的系统参数。S304. The second user equipment receives the system parameter sent by the key generation device.
S305、密钥生成设备根据系统参数、主密钥、第一用户设备的标识,生成第一用户设备的公钥和私钥。S305. The key generation device generates a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment.
第一用户设备的标识通过第一用户设备向密钥生成设备注册过程中获得。The identity of the first user equipment is obtained by the first user equipment to the key generation device registration process.
S306、密钥生成设备将第一用户设备的公钥和私钥经过同态加密发送给第一用户设备,用于第一用户设备与第二用户设备进行密钥协商。S306. The key generation device sends the public key and the private key of the first user equipment to the first user equipment by using the same state encryption, and is used by the first user equipment to perform key agreement with the second user equipment.
同态加密是基于数学难题的计算复杂性理论的密码学技术。对经过同态加密的数据进行处理得到一个输出,将这一输出进行解密,其结果与用同一方法处理未加密的原始数据得到的输出结果是一样的。Homomorphic encryption is a cryptographic technique based on computational complexity theory of mathematical problems. The homomorphic encrypted data is processed to obtain an output, and the output is decrypted, and the result is the same as the output obtained by processing the unencrypted original data by the same method.
本发明的实施例中的同态加密满足加法同态和乘法同态。其 中,加法同态为:如果存在有效算法⊕,E(x+y)=E(x)⊕E(y)或者x+y=D(E(x)⊕E(y))成立,并且不泄漏x和y。乘法同态为:如果存在有效算法×,E(x×y)=E(x)E(y)或者xy=D(E(x)E(y))成立,并且不泄漏x和y。它们的区别和普通的加法乘法的区别类似,只是运算⊕或×为某种有效算法,在加密或解密过程中满足某些条件。采用加法同态替代哈希运算降低了计算复杂度,采用乘法同态加密身份信息提升了身份信息的隐私性,在通信过程中抗篡改数据攻击。The homomorphic encryption in embodiments of the present invention satisfies the additive homomorphism and the multiplicative homomorphism. Its In the addition, the homomorphism is: if there is a valid algorithm, E(x+y)=E(x)⊕E(y) or x+y=D(E(x)⊕E(y)) holds, and does not Leak x and y. The multiplicative homomorphism is: if there is a valid algorithm ×, E(x×y)=E(x)E(y) or xy=D(E(x)E(y)) holds, and x and y are not leaked. Their difference is similar to the ordinary addition multiplication, except that the operation ⊕ or × is an efficient algorithm that satisfies certain conditions during encryption or decryption. The use of addition homomorphism instead of hashing reduces computational complexity. Multiplicative homomorphic encryption of identity information enhances the privacy of identity information and resists tampering with data attacks during communication.
同态加密与哈希函数加密相比,可以有效对抗篡改数据攻击。Compared with hash function encryption, homomorphic encryption can effectively combat tampering data attacks.
S307、第一用户设备接收由密钥生成设备发送的第一用户设备的公钥和私钥,并且对第一用户设备的公钥和私钥进行解密。S307. The first user equipment receives the public key and the private key of the first user equipment sent by the key generation device, and decrypts the public key and the private key of the first user equipment.
S308、第一用户设备根据系统参数以及第一用户设备的公钥和私钥生成第一用户设备的第一签名消息。S308. The first user equipment generates a first signature message of the first user equipment according to the system parameter and the public key and the private key of the first user equipment.
S309、第一用户设备将第一签名消息经过同态加密发送给第二用户设备。S309. The first user equipment sends the first signature message to the second user equipment by homomorphic encryption.
S310、第二用户设备接收由第一用户设备所发送的第一签名消息,并且对第一签名消息进行解密。S310. The second user equipment receives the first signature message sent by the first user equipment, and decrypts the first signature message.
S311、密钥生成设备根据系统参数、主密钥、第二用户设备的标识,生成第二用户设备的公钥和私钥。S311. The key generation device generates a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment.
第二用户设备的标识通过第二用户设备向密钥生成设备注册过程中获得。The identity of the second user equipment is obtained by the second user equipment to the key generation device registration process.
S312、密钥生成设备将第二用户设备的公钥和私钥经过同态加密发送给第二用户设备,用于第二用户设备与第一用户设备进行密钥协商。S312. The key generation device sends the public key and the private key of the second user equipment to the second user equipment by using the same state encryption for the second user equipment to perform key agreement with the first user equipment.
S313、第二用户设备接收由密钥生成设备发送的第二用户设备的公钥和私钥,并且对第二用户设备的公钥和私钥进行解密。S313. The second user equipment receives the public key and the private key of the second user equipment sent by the key generation device, and decrypts the public key and the private key of the second user equipment.
S314、第二用户设备根据第一签名消息和系统参数验证第一用户设备的身份是否合法。如果验证第一用户设备的身份合法,则第二用户设备根据系统参数、第二用户设备的公钥和私钥,生成第二签名消息。 S314. The second user equipment verifies whether the identity of the first user equipment is legal according to the first signature message and the system parameter. If it is verified that the identity of the first user equipment is legal, the second user equipment generates a second signature message according to the system parameter, the public key of the second user equipment, and the private key.
S315、第二用户设备将第二签名消息经过同态加密发送给第一用户设备。S315. The second user equipment sends the second signature message to the first user equipment by homomorphic encryption.
S316、第二用户设备根据第一签名消息和系统参数得到与第一用户设备进行通信的共享密钥。S316. The second user equipment obtains a shared key that communicates with the first user equipment according to the first signature message and the system parameter.
S317、第一用户设备接收由第二用户设备发送的第二签名消息,并且对第二签名消息进行解密。S317. The first user equipment receives the second signature message sent by the second user equipment, and decrypts the second signature message.
S318、第一用户设备根据第二签名消息和系统参数验证第二用户设备的身份是否合法。如果第二用户设备的身份合法,则第一用户设备根据第二签名消息和系统参数得到与第二用户设备进行通信的共享密钥。S318. The first user equipment verifies whether the identity of the second user equipment is legal according to the second signature message and the system parameter. If the identity of the second user equipment is legal, the first user equipment obtains a shared key that communicates with the second user equipment according to the second signature message and the system parameter.
本发明的实施例提供的密钥协商方法,在密钥生成设备将第一用户设备的公钥和私钥发送给第一用户设备时,在密钥生成设备将第二用户设备的公钥和私钥发送给第二用户设备时,在第一用户设备将第一签名消息发送给第二用户设备时,以及在第二用户设备将第二签名消息发送给第一用户设备时,均进行了同态加密。而非如BNN-IBS中所描述的:在PKG设定系统参数时,在PKG为UE1和UE2分配用户私钥时,以及在UE1和UE2进行签名时均采用哈希函数进行加密。同态加密可以抵抗篡改数据的攻击,其加密程度比哈希函数的加密程度更高,提高了加密的复杂程度。因此,本发明的实施例提供的密钥协商方法解决了将BNN-IBS身份签名协议应用于D2D无线通信网络中进行密钥协商时加密程度低的问题。另外,使用同态加密与哈希运算相比,通信与计算开销较小,降低了计算的复杂度。The key negotiation method provided by the embodiment of the present invention, when the key generation device sends the public key and the private key of the first user equipment to the first user equipment, the key generation device and the public key of the second user equipment When the private key is sent to the second user equipment, when the first user equipment sends the first signature message to the second user equipment, and when the second user equipment sends the second signature message to the first user equipment, Homomorphic encryption. Rather than as described in BNN-IBS: When the PKG sets the system parameters, the PKG allocates the user private key for UE1 and UE2, and when both UE1 and UE2 sign, the hash function is used for encryption. Homomorphic encryption can resist attacks that tamper with data. The degree of encryption is higher than that of the hash function, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
下面以第一用户设备为UE1,第二用户设备为UE2,密钥生成设备PKG为eNB(英文名称:中文名称:)为例对本发明的实施方式进行详细说明。但是,本领域的技术人员可以理解,在部分蜂窝网络覆盖的下的D2D通信模式中,在UE从空闲态(英文名称:idle)向激活态(英文名称:active)转换的场景中,UE应该在有蜂窝网络覆盖时选择eNB作为PKG,在没有蜂窝网络覆盖时,选择可信的 第三方作为PKG;在无蜂窝网络覆盖下的D2D通信模式中,UE之间全部选择可信的第三方作为PKG。The following describes an embodiment of the present invention by taking the first user equipment as UE1, the second user equipment as UE2, and the key generation device PKG as an eNB (English name: Chinese name:) as an example. However, those skilled in the art can understand that in the D2D communication mode under partial cellular network coverage, in the scenario where the UE transitions from the idle state (English name: idle) to the active state (English name: active), the UE should Select eNB as PKG when there is cellular network coverage, and choose trusted when there is no cellular network coverage. The third party acts as a PKG; in the D2D communication mode without cell network coverage, all trusted third parties are selected as PKGs between UEs.
本发明的实施例提供了一种密钥协商方法,参照图4所示,包括以下步骤:An embodiment of the present invention provides a key negotiation method. Referring to FIG. 4, the method includes the following steps:
S401、UE1与eNB之间建立RRC连接,UE2与eNB之间建立RRC连接。该步骤为可选步骤,主要用于:UE1与eNB之间建立无线连接以及UE2与eNB之间建立无线连接;eNB获取UE1和UE2标识;方便后续互相之间进行参数传输。S401. An RRC connection is established between the UE1 and the eNB, and an RRC connection is established between the UE2 and the eNB. The step is an optional step, and is mainly used for establishing a wireless connection between the UE1 and the eNB and establishing a wireless connection between the UE2 and the eNB; the eNB acquires the identifiers of the UE1 and the UE2; and facilitates subsequent parameter transmission between each other.
S402、eNB根据预设的椭圆曲线参数E(Fp)生成系统参数<E(Fp),p,q,a',r',p',q',P>以及主密钥s,其中,系统参数<E(Fp),p,q,a',r',p',q',P>包括椭圆曲线参数E(Fp)、中间参数p、q、p'、q'、a'和r'、系统公钥P,其中,q用于指示非零q阶有限域
Figure PCTCN2016076170-appb-000005
系统公钥用于第一用户设备与第二用户设备进行密钥协商。
S402. The eNB generates system parameters <E(F p ), p, q, a′, r′, p′, q′, P> and a master key s according to a preset elliptic curve parameter E(F p ), where , system parameters <E(F p ), p, q, a', r', p', q', P> include elliptic curve parameters E(F p ), intermediate parameters p, q, p', q', a' and r', the system public key P, where q is used to indicate a non-zero q-order finite field
Figure PCTCN2016076170-appb-000005
The system public key is used for key negotiation between the first user equipment and the second user equipment.
具体的,参照图5中所示,步骤S402包括步骤S4021至S4025:Specifically, referring to FIG. 5, step S402 includes steps S4021 to S4025:
S4021、eNB确定预设的椭圆曲线参数E(Fp)。S4021, the eNB determines a preset elliptic curve parameter E( Fp ).
eNB根据韦尔斯特拉斯方程:y2+a1xy+a3y=x3+a2x2+a4x+a6所确定的平面曲线,在有限域Fp上选择一个椭圆曲线,示例性的,选择如公式(1)所示的椭圆曲线。The eNB selects an ellipse in the finite field F p according to the plane curve determined by the Weltstras equation: y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6 The curve, exemplarily, selects an elliptic curve as shown in the formula (1).
E(Fp):y2=x3+ax+b                    公式(1)E(F p ): y 2 =x 3 +ax+b Formula (1)
其中,a、b同样属于有限域Fp,即a,b∈Fp,且满足4a3+27b2 mod q≠0,其中,mod为取模运算。Wherein, a, b also belong to the finite field F p, i.e. a, b∈F p, satisfying 4a 3 + 27b 2 mod q ≠ 0, wherein, mod is modulo operation.
本领域的技术人员可以想到,满足韦尔斯特拉斯方程:y2+a1xy+a3y=x3+a2x2+a4x+a6的其他椭圆曲线同样适用于本发明的实施例。It will be appreciated by those skilled in the art that other elliptic curves satisfying the Westerstras equation: y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6 are equally applicable to this Embodiments of the invention.
S4022、eNB根据椭圆曲线参数E(Fp)和整数得到中间参数p、q、p'、q'、a'和r'。S4022. The eNB obtains intermediate parameters p, q, p', q', a', and r' according to the elliptic curve parameter E( Fp ) and an integer.
具体的,包括:Specifically, including:
eNB椭圆曲线参数E(Fp)得到系统参数<E(Fp),p,q,a',r',p',q',P>的部分中间参数p和q。 The eNB elliptic curve parameter E(F p ) obtains some intermediate parameters p and q of the system parameters <E(F p ), p, q, a', r', p', q', P>.
设无穷远点与椭圆曲线E(Fp)上的点构成群E/Fp,在群E/Fp上选取一个点p,并由点p生成循环群G1,其中点p的阶为q(对于群中定义的运算,p经过多次运算可以得到此群的单位元,其中运算次数的最小值q称为p的阶),q作为系统参数中的一部分进行广播后,用于指示非零q阶有限域
Figure PCTCN2016076170-appb-000006
Set point at infinity and the elliptic curve E (F p) constituting the point group E / F p, select a point p in the group E / F p, the point p generated by cyclic groups G 1, wherein the order of the point p q (For the operation defined in the group, p can obtain the unit cell of this group after multiple operations, wherein the minimum value q of the operation times is called the order of p), and q is used as a part of the system parameters for broadcasting. Non-zero q-order finite field
Figure PCTCN2016076170-appb-000006
eNB选取整数得到系统参数<E(Fp),p,q,a',r',p',q',P>的剩余部分中间参数p'、q'、a'、r'。The eNB selects an integer to obtain the remaining intermediate parameters p', q', a', r' of the system parameters <E(F p ), p, q, a', r', p', q', P>.
示例性的,选取整数λ=60,令p'=λ5,q'=λ3,a'=λ2,r'=λ,其中λ值为任意整数值。p'、q'、a'、r'这四个中间参数是进行同态加密过程中,为满足同态加密条件而定义的四个参数。本领域的技术人员可以想到,选择满足同态加密条件的其他方式计算中间参数p'、q'、a'、r'同样适用于本发明的实施例。Illustratively, the integer λ=60 is chosen such that p'=λ 5 , q'=λ 3 , a'=λ 2 , r'=λ, where λ is an arbitrary integer value. The four intermediate parameters p', q', a', and r' are four parameters defined in the homomorphic encryption process to satisfy the homomorphic encryption condition. It will be appreciated by those skilled in the art that the calculation of the intermediate parameters p', q', a', r' in other manners that satisfy the homomorphic encryption condition is equally applicable to embodiments of the present invention.
S4023、eNB从中间参数q所指示的非零q阶有限域
Figure PCTCN2016076170-appb-000007
(其取值范围为1、2、…q-1)中选取随机数s(即
Figure PCTCN2016076170-appb-000008
)作为主密钥,并对主密钥进行保密。
S4023, eNB from the non-zero q-order finite field indicated by the intermediate parameter q
Figure PCTCN2016076170-appb-000007
Select the random number s (the value range is 1, 2, ... q-1) (ie
Figure PCTCN2016076170-appb-000008
As the master key, the master key is kept secret.
其中,有限域
Figure PCTCN2016076170-appb-000009
为椭圆曲线参数E(Fp)所限定的有限域。
Among them, the finite field
Figure PCTCN2016076170-appb-000009
The finite field defined by the elliptic curve parameter E(F p ).
选取随机数s时可以进行随机选取或者按照预设公式进行选取,本发明不做限定,在本发明的实施例中采用随机选取的方式。When the random number s is selected, it can be randomly selected or selected according to a preset formula. The present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
S4024、eNB根据主密钥s和中间参数p通过公式(2)得到系统公钥P。S4024. The eNB obtains the system public key P according to the master key s and the intermediate parameter p by using formula (2).
P=sp                                   公式(2)P=sp formula (2)
S4025、eNB最终得到系统参数<E(Fp),p,q,a',r',p',q',P>。S4025, the eNB finally obtains the system parameters <E(F p ), p, q, a', r', p', q', P>.
S403、eNB广播系统参数<E(Fp),p,q,a',r',p',q',P>。S403. The eNB broadcasts a system parameter <E(F p ), p, q, a', r', p', q', P>.
受椭圆曲线参数限定的有限域的影响,攻击者若想通过拦截系统参数<E(Fp),p,q,a',r',p',q',P>获得主密钥s需要破解椭圆曲线离散对数困难问题,而目前这个困难问题还没有找到高效的(相当于多项式复杂度的)算法。Under the influence of the finite field defined by the elliptic curve parameters, the attacker needs to obtain the master key s by intercepting the system parameters <E(F p ), p, q, a', r', p', q', P>. It is difficult to solve the elliptic curve discrete logarithm problem, but the current difficult problem has not found an efficient (equivalent to polynomial complexity) algorithm.
S404、UE1接收由eNB所发送的系统参数<E(Fp),p,q,a',r',p',q',P>。S404. The UE1 receives the system parameter <E(F p ), p, q, a', r', p', q', P> sent by the eNB.
S405、UE2接收由eNB所发送的系统参数<E(Fp),p,q,a',r',p',q',P>。 S405. The UE2 receives the system parameter <E(F p ), p, q, a', r', p', q', P> sent by the eNB.
下述步骤S406至步骤S410是UE1的第一签名消息的生成和发送过程。各参数之间关系参照图6中所示。The following steps S406 to S410 are the process of generating and transmitting the first signature message of the UE1. The relationship between the parameters is shown in Fig. 6.
S406、eNB根据系统参数<E(Fp),p,q,a',r',p',q',P>、主密钥s、UE1的标识IDUE1,生成UE1的公钥cUE1和私钥(RUE1,dUE1)。具体的,参照图7中所示,步骤S406包括步骤S4061至步骤S4063。S406. The eNB generates a public key c UE1 of the UE1 according to the system parameter <E(F p ), p, q, a′, r′, p′, q′, P>, the master key s, and the identifier ID UE1 of the UE1 . And private key (R UE1 , d UE1 ). Specifically, referring to FIG. 7, step S406 includes steps S4061 to S4063.
S4061、eNB从中间参数q指示的非零q阶有限域
Figure PCTCN2016076170-appb-000010
中选取随机数作为第一随机数rUE1,即
Figure PCTCN2016076170-appb-000011
S4061, eNB from the non-zero q-order finite field indicated by the intermediate parameter q
Figure PCTCN2016076170-appb-000010
Selecting a random number as the first random number r UE1 , ie
Figure PCTCN2016076170-appb-000011
选取第一随机数rUE1时可以进行随机选取或者按照预设公式进行选取,本发明不做限定,在本发明的实施例中采用随机选取的方式。When the first random number r UE1 is selected, it may be randomly selected or selected according to a preset formula. The present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
受椭圆曲线参数限定的有限域的影响,攻击者若想获得第一随机数rUE1同样需要破解椭圆曲线离散对数困难问题。Influenced by the finite field defined by the elliptic curve parameters, if the attacker wants to obtain the first random number r UE1, it is also necessary to solve the elliptic curve discrete logarithm problem.
S4062、eNB根据系统参数<E(Fp),p,q,a',r',p',q',P>、UE1的标识IDUE1以及第一随机数rUE1,通过公式(3)和公式(4)生成UE1的公钥cUE1S4062. The eNB passes the formula (3) according to the system parameter <E(F p ), p, q, a', r', p', q', P>, the identifier ID UE1 of the UE1, and the first random number r UE1 . And formula (4) generates the public key c UE1 of UE1 .
RUE=rUEp                                     公式(3)R UE = r UE p formula (3)
Figure PCTCN2016076170-appb-000012
             公式(4)
Figure PCTCN2016076170-appb-000012
Formula (4)
其中,UE的标识满足UEID∈{0,1}(表示二进制0、1形成的数字串,示例性的,UE1的标识IDUE1可以为101即数字5,UE2的标识IDUE2可以为110即数字6)。eNB可以在步骤S401中获取UE1和UE2的身份信息,也可以在本步骤向UE1和UE2获取身份信息,本发明的实施例不作限定。The identifier of the UE satisfies the UE ID ∈{0, 1} (representing the digit string formed by the binary 0, 1. For example, the identifier ID of the UE1 may be 101, that is, the number 5, and the identifier ID of the UE2 may be 110. Number 6). The eNB may obtain the identity information of the UE1 and the UE2 in the step S401, and may also obtain the identity information from the UE1 and the UE2 in this step, which is not limited in the embodiment of the present invention.
另外其中,公式(4)中的点乘符号“·”表示密码学中常用的一种运算,其运算方式与普通的算术乘法不同;公式(4)中的星乘符号“*”表示普通的算术乘法。In addition, the dot multiplication symbol "·" in the formula (4) represents an operation commonly used in cryptography, and its operation mode is different from ordinary arithmetic multiplication; the star multiplication symbol "*" in the formula (4) indicates ordinary Arithmetic multiplication.
S4063、eNB根据系统参数<E(Fp),p,q,a',r',p',q',P>、主密钥s、UE1的公钥cUE1、第一随机数rUE1,通过公式(3)和公式(5)生成UE1的私钥(RUE1,dUE1)。S4063. The eNB is based on the system parameter <E(F p ), p, q, a', r', p', q', P>, the master key s, the public key c UE1 of the UE1 , and the first random number r UE1 The private key (R UE1 , d UE1 ) of UE1 is generated by formula (3) and formula (5).
dUE=rUE+cUEs mod q                           公式(5)d UE = r UE + c UE s mod q formula (5)
具体的,UE1的公钥cUE1和私钥(RUE1,dUE1)的计算方式为: Specifically, the calculation method of the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 is:
RUE1=rUE1p                                        公式(6)R UE1 = r UE1 p formula (6)
dUE1=rUE1+cUE1s mod q                            公式(7)d UE1 = r UE1 + c UE1 s mod q formula (7)
Figure PCTCN2016076170-appb-000013
                      公式(8)
Figure PCTCN2016076170-appb-000013
Formula (8)
S407、eNB将UE1的公钥cUE1和私钥(RUE1,dUE1)经过同态加密发送给UE1,用于UE1与UE2进行密钥协商。S407. The eNB sends the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 to the UE1 through homomorphic encryption, and is used by the UE1 to perform key negotiation with the UE2.
受椭圆曲线参数限定的有限域的影响,攻击者若想通过拦截UE1的公钥cUE1和私钥(RUE1,dUE1)获得第一随机数rUE1同样需要破解椭圆曲线离散对数困难问题。Under the influence of the finite field defined by the elliptic curve parameter, if the attacker wants to obtain the first random number r UE1 by intercepting the public key c UE1 and the private key (R UE1 , d UE1 ) of UE1, it is also necessary to solve the elliptic curve discrete logarithm problem. .
同态加密与哈希函数加密相比,可以有效对抗篡改数据攻击。Compared with hash function encryption, homomorphic encryption can effectively combat tampering data attacks.
S408、UE1接收由eNB发送的该UE1的公钥cUE1和私钥(RUE1,dUE1),并且对UE1的公钥cUE1和私钥(RUE1,dUE1)进行解密。S408. The UE1 receives the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 sent by the eNB, and decrypts the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 .
S409、UE1根据系统参数<E(Fp),p,q,a',r',p',q',P>以及UE1的公钥cUE1和私钥(RUE1,dUE1),生成UE1的第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>。具体的,参照图8中所示,步骤S409包括步骤S4091至步骤S4092。S409. The UE1 generates, according to the system parameter <E(F p ), p, q, a', r', p', q', P>, and the public key c UE1 and the private key (R UE1 , d UE1 ) of the UE1 . The first signature message of UE1 <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 >. Specifically, referring to FIG. 8, step S409 includes steps S4091 to S4092.
S4091、UE1从中间参数q指示的非零q阶有限域
Figure PCTCN2016076170-appb-000014
中选取第三随机数xUE1(即
Figure PCTCN2016076170-appb-000015
)和第四随机数yUE1(即
Figure PCTCN2016076170-appb-000016
)。
S4091, UE1 is a non-zero q-order finite field indicated by the intermediate parameter q
Figure PCTCN2016076170-appb-000014
Select the third random number x UE1 (ie
Figure PCTCN2016076170-appb-000015
And the fourth random number y UE1 (ie
Figure PCTCN2016076170-appb-000016
).
选取第三随机数xUE1或第四随机数yUE1时可以进行随机选取或者按照预设公式进行选取,本发明不做限定,在本发明的实施例中采用随机选取的方式。The third random number x UE1 or the fourth random number y UE1 may be randomly selected or selected according to a preset formula. The present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
S4092、UE1根据系统参数<E(Fp),p,q,a',r',p',q',P>、第一用户设备的公钥cUE1和私钥(RUE1,dUE1)以及第三随机数xUE1和第四随机数xUE1,通过公式(9)至公式(12)生成第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>中的EUE1、YUE1、ZUE1。第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>中的cUE1、RUE1未经运算,直接来自UE1的公钥cUE1和私钥(RUE1,dUE1)。S4092, UE1 according to system parameter <E(F p ), p, q, a', r', p', q', P>, public key c UE1 of the first user equipment and private key (R UE1 , d UE1 And the third random number x UE1 and the fourth random number x UE1 , generating E in the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > by formulas (9) to (12) UE1 , Y UE1 , Z UE1 . The first signature messages <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > in c UE1 , R UE1 are not operated, directly from UE1's public key c UE1 and private key (R UE1 , d UE1 ).
EUE1=xUE1p                       公式(9)E UE1 = x UE1 p formula (9)
YUE1=yUE1p                        公式(10)Y UE1 = y UE1 p formula (10)
hUE1=IDUE1+EUE1+RUE1+YUE1+a'·r'+p'*q',            公式(11)h UE1 = ID UE1 + E UE1 + R UE1 + Y UE1 + a'·r' + p' * q', formula (11)
ZUE1=yUE1+hUE1dUE1 mod q               公式(12)Z UE1 = y UE1 + h UE1 d UE1 mod q Formula (12)
S410、UE1将第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>经过同态加密发送 给UE2。S410. The UE1 sends the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > to the UE2 through homomorphic encryption.
受椭圆曲线参数限定的有限域的影响,攻击者若想通过拦截第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>获得第三随机数xUE1和第四随机数yUE1同样需要破解椭圆曲线离散对数困难问题。Under the influence of the finite field defined by the elliptic curve parameter, the attacker wants to obtain the third random number x UE1 and the fourth random number y by intercepting the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > UE1 also needs to solve the elliptic curve discrete logarithm problem.
S411、UE2接收由UE1所发送的第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>,并且对第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>进行解密。S411. The UE2 receives the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > sent by the UE1, and the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > decryption.
S412、eNB根据系统参数<E(Fp),p,q,a',r',p',q',P>、主密钥s、UE2的标识IDUE2,生成UE2的公钥cUE2和私钥(RUE2,dUE2),具体的,参照图9中所示,步骤S412包括步骤S4121至步骤S4123。S412. The eNB generates a public key c UE2 of the UE2 according to the system parameter <E(F p ), p, q, a′, r′, p′, q′, P>, the master key s, and the identifier ID UE2 of the UE2 . And the private key (R UE2 , d UE2 ), specifically, referring to FIG. 9 , step S412 includes steps S4121 to S4123 .
S4121、eNB从中间参数q指示的非零q阶有限域
Figure PCTCN2016076170-appb-000017
中选取随机数作为第二随机数rUE2,即
Figure PCTCN2016076170-appb-000018
S4121, eNB from the non-zero q-order finite field indicated by the intermediate parameter q
Figure PCTCN2016076170-appb-000017
Selecting a random number as the second random number r UE2 , ie
Figure PCTCN2016076170-appb-000018
选取第二随机数rUE2时可以进行随机选取或者按照预设公式进行选取,本发明不做限定,在本发明的实施例中采用随机选取的方式。When the second random number r UE2 is selected, it can be randomly selected or selected according to a preset formula. The present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
受椭圆曲线参数限定的有限域的影响,攻击者若想获得第二随机数rUE2同样需要破解椭圆曲线离散对数困难问题。Influenced by the finite field defined by the elliptic curve parameters, if the attacker wants to obtain the second random number r UE2, it is also necessary to solve the elliptic curve discrete logarithm problem.
S4122、eNB根据系统参数<E(Fp),p,q,a',r',p',q',P>、UE2的标识IDUE2以及第二随机数rUE2,通过公式(3)和公式(4)生成UE2的公钥cUE2S4122. The eNB passes the formula (3) according to the system parameters <E(F p ), p, q, a', r', p', q', P>, the identifier ID UE2 of the UE2, and the second random number r UE2 . And formula (4) generates UE2's public key c UE2 .
eNB可以在步骤S401中获取UE1和UE2的身份信息,也可以在本步骤向UE1和UE2获取身份信息,本发明的实施例不作限定。The eNB may obtain the identity information of the UE1 and the UE2 in the step S401, and may also obtain the identity information from the UE1 and the UE2 in this step, which is not limited in the embodiment of the present invention.
S4123、eNB根据系统参数<E(Fp),p,q,a',r',p',q',P>、主密钥s、UE2的公钥cUE2、第二随机数rUE2,通过公式(3)和公式(5)生成UE2的私钥(RUE2,dUE2)。S4123. The eNB is based on the system parameter <E(F p ), p, q, a', r', p', q', P>, the master key s, the public key c UE2 of the UE2 , and the second random number r UE2 The private key (R UE2 , d UE2 ) of UE2 is generated by formula (3) and formula (5).
具体的,UE2的公钥cUE2和私钥(RUE2,dUE2)的计算方式为:Specifically, the calculation method of the public key c UE2 and the private key (R UE2 , d UE2 ) of the UE 2 is:
RUE2=rUE2p                           公式(13)R UE2 = r UE2 p formula (13)
dUE2=rUE2+cUE2s mod q                  公式(14)d UE2 = r UE2 + c UE2 s mod q formula (14)
Figure PCTCN2016076170-appb-000019
             公式(15)
Figure PCTCN2016076170-appb-000019
Formula (15)
S413、eNB将UE2的公钥cUE2和私钥(RUE2,dUE2)经过同态加密发送给UE2。 S413. The eNB sends the public key c UE2 and the private key (R UE2 , d UE2 ) of the UE2 to the UE2 through homomorphic encryption.
受椭圆曲线参数限定的有限域的影响,攻击者若想通过拦截UE2的私钥(RUE2,dUE2)获得第二随机数rUE2同样需要破解椭圆曲线离散对数困难问题。Under the influence of the finite field defined by the elliptic curve parameter, if the attacker wants to obtain the second random number r UE2 by intercepting the private key of UE2 (R UE2 , d UE2 ), it is also necessary to solve the elliptic curve discrete logarithm problem.
S414、UE2接收由eNB发送的该UE2的公钥cUE2和私钥(RUE2,dUE2),并且对UE2的公钥cUE2和私钥(RUE2,dUE2)进行解密。S414. The UE2 receives the public key c UE2 and the private key (R UE2 , d UE2 ) of the UE2 sent by the eNB, and decrypts the public key c UE2 and the private key (R UE2 , d UE2 ) of the UE2 .
S415、UE2根据第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>和系统参数<E(Fp),p,q,a',r',p',q',P>验证UE1的身份是否合法。如果验证UE1的身份合法,则进行步骤S416,否则直接结束。S415. The UE2 is based on the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > and system parameters <E(F p ), p, q, a', r', p', q', P> Verify that the identity of UE1 is legal. If it is verified that the identity of UE1 is legal, step S416 is performed, otherwise it ends directly.
具体的,若系统参数<E(Fp),p,q,a',r',p',q',P>和第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>中所包含的参数之间满足预设的等式关系,则确定UE1的身份合法,参照图10所示,步骤S415包括步骤S4151至S4153:Specifically, if the system parameter <E(F p ), p, q, a', r', p', q', P> and the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z If the parameters included in the UE1 > satisfy the preset equality relationship, the identity of the UE1 is determined to be legal. Referring to FIG. 10, step S415 includes steps S4151 to S4153:
S4151、UE2按照公式(16)解密计算出D(cUE1);S4151, UE2 decrypts according to formula (16) to calculate D(c UE1 );
Figure PCTCN2016076170-appb-000020
               公式(16)
Figure PCTCN2016076170-appb-000020
Formula (16)
S4152、UE2按照公式(17)解密计算出D(hUE1):S4152, UE2 decrypts and calculates D(h UE1 ) according to formula (17):
D(hUE1)=(cUE1+EUE1+RUE1+YUE1)mod p'mod a'               公式(17)D(h UE1 )=(c UE1 +E UE1 +R UE1 +Y UE1 )mod p'mod a' Equation (17)
S4153、UE2通过判断等式(18)是否成立验证UE1的身份是否合法,若等式成立则说明UE1身份合法,通过身份验证,进行步骤S416;否则,则说明UE1身份不合法,不能通过身份验证,则丢弃UE1的第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>并拒绝与UE1进行会话,直接结束。S4153, UE2 determines whether the identity of the UE1 is valid by determining whether the equation (18) is established. If the equation is established, the UE1 is legally authenticated, and the identity verification is performed, and step S416 is performed; otherwise, the identity of the UE1 is invalid and cannot be authenticated. Then, the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > of UE1 is discarded and the session with UE1 is refused, and the process ends.
ZUE1p=YUE1+D(hUE1)(RUE1+D(cUE1)P)                 公式(18)Z UE1 p=Y UE1 +D(h UE1 )(R UE1 +D(c UE1 )P) Formula (18)
S416、UE2根据系统参数<E(Fp),p,q,a',r',p',q',P>、UE2的公钥cUE2和私钥(RUE2,dUE2),生成第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>。具体的,参照图11中所示,包括步骤S4161至步骤S4162:S416. The UE2 generates, according to the system parameter <E(F p ), p, q, a', r', p', q', P>, the public key c UE2 of the UE2, and the private key (R UE2 , d UE2 ). Second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 >. Specifically, referring to FIG. 11, the steps S4161 to S4162 are included:
S4161、UE2从中间参数q指示的非零q阶有限域
Figure PCTCN2016076170-appb-000021
中选取的第五随机数xUE2(即
Figure PCTCN2016076170-appb-000022
)和第六随机数yUE2(即
Figure PCTCN2016076170-appb-000023
)。
S4161, UE2 from the non-zero q-order finite field indicated by the intermediate parameter q
Figure PCTCN2016076170-appb-000021
The fifth random number x UE2 selected in the middle (ie
Figure PCTCN2016076170-appb-000022
And the sixth random number y UE2 (ie
Figure PCTCN2016076170-appb-000023
).
选取第五随机数xUE2或第六随机数yUE2时可以进行随机选取或者按照预设公式进行选取,本发明不做限定,在本发明的实施例中采 用随机选取的方式。When the fifth random number x UE2 or the sixth random number y UE2 is selected, it may be randomly selected or selected according to a preset formula. The present invention is not limited, and a random selection method is adopted in the embodiment of the present invention.
S4162、UE2根据系统参数<E(Fp),p,q,a',r',p',q',P>、第二用户设备的公钥cUE2和私钥(RUE2,dUE2)以及第五随机数xUE2和第六随机数xUE2,通过公式(19)至公式(22)生成第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>中的EUE2、YUE2、ZUE2。第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>中的cUE2、RUE2未经运算,直接来自UE2的公钥cUE2和私钥(RUE2,dUE2)。S4162, UE2 according to system parameters <E(F p ), p, q, a', r', p', q', P>, public key c UE2 of the second user equipment and private key (R UE2 , d UE2 And the fifth random number x UE2 and the sixth random number x UE2 , generating E in the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > by formulas (19) to (22) UE2 , Y UE2 , Z UE2 . The second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > c UE2 , R UE2 is not operated, directly from UE2's public key c UE2 and private key (R UE2 , d UE2 ).
EUE2=xUE2p                          公式(19)E UE2 = x UE2 p formula (19)
YUE2=yUE2p                         公式(20)Y UE2 = y UE2 p formula (20)
hUE2=IDUE2+EUE2+RUE2+YUE2+a'·r'+p'*q',                       公式(21)h UE2 = ID UE2 + E UE2 + R UE2 + Y UE2 + a'·r' + p' * q', formula (21)
ZUE2=yUE2+hUE2dUE2 mod q                    公式(22)Z UE2 = y UE2 + h UE2 d UE2 mod q Formula (22)
S417、UE2将第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>经过同态加密发送给UE1。S417. The UE2 sends the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > to the UE1 through homomorphic encryption.
受椭圆曲线参数限定的有限域的影响,攻击者若想通过拦截第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>获得第五随机数xUE2和第六随机数yUE2同样需要破解椭圆曲线离散对数困难问题。Under the influence of the finite field defined by the elliptic curve parameter, the attacker wants to obtain the fifth random number x UE2 and the sixth random number y by intercepting the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > UE2 also needs to solve the elliptic curve discrete logarithm problem.
S418、UE2根据第五随机数xUE2、第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>和系统参数<E(Fp),p,q,a',r',p',q',P>得到与UE1进行通信的共享密钥SKUE1UE2S418. The UE2 is based on the fifth random number x UE2 , the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > and the system parameter <E(F p ), p, q, a', r' , p', q', P> obtain the shared key SK UE1UE2 that communicates with UE1.
具体的,参照图12所示,步骤S418包括步骤S4181至S4183:Specifically, referring to FIG. 12, step S418 includes steps S4181 to S4183:
S4181、UE2根据第五随机数xUE2、第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>中的EUE1,通过公式(23)计算共享密钥的中间参数KUE2UE1S4181, UE2 calculates the intermediate parameter K UE2UE1 of the shared key according to the fifth random number x UE2 , the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > E UE1 through formula (23) .
KUE2UE1=xUE2EUE1。                        公式(23)K UE2UE1 = x UE2 E UE1 . Formula (23)
S4182、UE2根据第一签名消息<cUE1,EUE1,RUE1,YUE1,ZUE1>中的RUE1、cUE1以及系统参数<E(Fp),p,q,a',r',p',q',P>,通过公式(4)逆推出UE1的标识IDUE1,具体的,参照公式(24)。S4182, UE2 according to the first signature message <c UE1 , E UE1 , R UE1 , Y UE1 , Z UE1 > R UE1 , c UE1 and system parameter <E(F p ), p, q, a', r' , p', q', P>, inversely deriving the identification ID UE1 of the UE1 by the formula (4), specifically, referring to the formula (24).
Figure PCTCN2016076170-appb-000024
                      公式(24)
Figure PCTCN2016076170-appb-000024
Formula (24)
S4183、UE2根据UE2的标识IDUE2、UE1的标识IDUE1、中间参数KUE2UE1以及系统参数<E(Fp),p,q,a',r',p',q',P>,通过公式(25)得到与UE1进 行通信的共享密钥SKUE1UE2S4183. The UE2 passes the identifier ID UE2 of the UE2 , the identifier ID UE1 of the UE1 , the intermediate parameter KUE2UE1, and the system parameter <E( Fp ), p, q, a', r', p', q', P>. Equation (25) obtains the shared key SK UE1UE2 in communication with UE1.
SKUE1UE2=IDUE1+IDUE2+KUE2UE1+a'·r'+p'*q'                公式(25)SK UE1UE2 = ID UE1 + ID UE2 + K UE2UE1 + a'·r' + p' * q' Formula (25)
S419、UE1接收由UE2所发送的第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>,并且对第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>进行解密。S419. The UE1 receives the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > sent by the UE2, and the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > decryption.
S420、UE1根据第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>、系统参数<E(Fp),p,q,a',r',p',q',P>验证UE2的身份是否合法。S420. The UE1 according to the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 >, system parameter <E(F p ), p, q, a', r', p', q', P> Verify that the identity of UE2 is legal.
具体的,若系统参数<E(Fp),p,q,a',r',p',q',P>和第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>中所包含的参数之间满足预设的等式关系,则确定UE1的身份合法,参照图13所示,步骤S420包括步骤S4201至S4203:Specifically, if the system parameter <E(F p ), p, q, a', r', p', q', P> and the second signature message < c UE2 , E UE2 , R UE2 , Y UE2 , Z If the parameters included in the UE2 > satisfy the preset equality relationship, the identity of the UE1 is determined to be legal. Referring to FIG. 13, step S420 includes steps S4201 to S4203:
S4201、UE1按照公式(26)解密计算出D(cUE2);S4201, UE1 decrypts according to formula (26) to calculate D(c UE2 );
Figure PCTCN2016076170-appb-000025
              公式(26)
Figure PCTCN2016076170-appb-000025
Formula (26)
S4202、UE1按照公式(27)解密计算出D(hUE2):S4202: UE1 decrypts and calculates D(h UE2 ) according to formula (27):
D(hUE2)=(cUE2+EUE2+RUE2+YUE2)mod p'mod a'               公式(27)D(h UE2 )=(c UE2 +E UE2 +R UE2 +Y UE2 )mod p'mod a' formula (27)
S4203、UE1通过判断等式(28)是否成立验证UE2的身份是否合法,若等式成立则说明UE2身份合法,通过身份验证,进行步骤S421;否则,则说明UE2身份不合法,不能通过身份验证,则丢弃UE2的第一签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>并拒绝与UE2进行会话,直接结束。S4203, UE1 determines whether the identity of the UE2 is valid by determining whether the equation (28) is valid. If the equation is established, the UE2 is legally authenticated, and the identity verification is performed, and step S421 is performed; otherwise, the identity of the UE2 is invalid and cannot be authenticated. Then, the first signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > of UE2 is discarded and the session with UE2 is refused, and the process ends.
ZUE2p=YUE2+D(hUE2)(RUE2+D(cUE2)P)            公式(28)Z UE2 p=Y UE2 +D(h UE2 )(R UE2 +D(c UE2 )P) Formula (28)
S421、如果UE2的身份合法,则UE1根据第三随机数xUE1、第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>和系统参数<E(Fp),p,q,a',r',p',q',P>得到与UE2进行通信的共享密钥SKUE1UE2,如果UE2的身份不合法,则丢弃第二签名消息。S421. If the identity of the UE2 is legal, the UE1 is based on the third random number x UE1 , the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > and the system parameter <E(F p ),p, q, a', r', p', q', P> obtains the shared key SK UE1UE2 that communicates with UE2, and discards the second signature message if the identity of UE2 is invalid.
具体的,参照图14中所示,步骤S421包括步骤S4211至S4213:Specifically, referring to FIG. 14, step S421 includes steps S4211 to S4213:
S4211、UE1根据第三随机数xUE1、第二签名消息<cUE,EUE2,RUE2,YUE2,ZUE2>中的EUE2,通过公式(29)计算共享密钥的中间参数KUE1UE2S4211, UE1 calculates an intermediate parameter K UE1UE2 of the shared key according to the third random number x UE1 , the second signature message <c UE , E UE2 , R UE2 , Y UE2 , Z UE2 > E UE2 through formula (29) .
KUE1UE2=xUE1EUE2。                       公式 (29)K UE1UE2 = x UE1 E UE2 . Formula (29)
S4212、UE1根据第二签名消息<cUE2,EUE2,RUE2,YUE2,ZUE2>中的RUE2、cUE2以及系统参数<E(Fp),p,q,a',r',p',q',P>,通过公式(4)逆推出UE2的标识IDUE2,具体的,参照公式(30)。S4212, UE1 according to the second signature message <c UE2 , E UE2 , R UE2 , Y UE2 , Z UE2 > R UE2 , c UE2 and system parameter <E(F p ), p, q, a', r' , p', q', P>, inversely deriving the identification ID UE2 of the UE2 by the formula (4), specifically, referring to the formula (30).
Figure PCTCN2016076170-appb-000026
                      公式(30)
Figure PCTCN2016076170-appb-000026
Formula (30)
S4213、UE1根据UE1的标识IDUE1、UE2的标识IDUE2、中间参数KUE1UE2以及系统参数<E(Fp),p,q,a',r',p',q',P>,通过公式(31)得到与UE2进行通信的共享密钥SKUE2UE1S4213. The UE1 passes the identifier ID UE1 of the UE1 , the identifier ID UE2 of the UE2 , the intermediate parameter KUE1UE2, and the system parameter <E( Fp ), p, q, a', r', p', q', P>. Equation (31) results in a shared key SK UE2UE1 that communicates with UE2.
SKUE2UE1=IDUE1+IDUE2+KUE1UE2+a'·r'+p'*q'              公式(31)SK UE2UE1 = ID UE1 + ID UE2 + K UE1UE2 + a'·r' + p' * q' Formula (31)
特别地,步骤S421中计算得到的共享密钥SKUE2UE1与步骤S418中计算得到的共享密钥SKUE1UE2相等,即SKUE2UE1=SKUE1UE2Specifically, the shared key SK UE2UE1 calculated in step S421 is equal to the shared key SK UE1UE2 calculated in step S418, that is, SK UE2UE1 = SK UE1UE2 .
本发明的实施例提供的密钥协商方法,在eNB将UE1的公钥和私钥发送给UE1时,在eNB将UE2的公钥和私钥发送给UE2时,在UE1将第一签名消息发送给UE2时,以及在UE2将第二签名消息发送给UE1时,均进行了同态加密。而非如BNN-IBS中所描述的在PKG设定系统参数时,在PKG为UE1和UE2分配用户私钥时,以及在UE1和UE2进行签名时均采用哈希函数进行加密。同态加密可以抵抗篡改数据的攻击,其加密程度比哈希函数的加密程度更高,提高了加密的复杂程度。因此,本发明的实施例提供的密钥协商方法解决了将BNN-IBS身份签名协议应用于D2D无线通信网络中进行密钥协商时加密程度低的问题。另外,使用同态加密与哈希运算相比,通信与计算开销较小,降低了计算的复杂度。In the key negotiation method provided by the embodiment of the present invention, when the eNB sends the public key and the private key of the UE1 to the UE1, when the eNB sends the public key and the private key of the UE2 to the UE2, the first signature message is sent by the UE1. When UE2 is given, and when UE2 sends a second signature message to UE1, homomorphic encryption is performed. Rather than setting the system parameters in PKG as described in BNN-IBS, the PKG uses the hash function for encryption when the user private key is assigned to UE1 and UE2, and when both UE1 and UE2 are signed. Homomorphic encryption can resist attacks that tamper with data. The degree of encryption is higher than that of the hash function, which increases the complexity of encryption. Therefore, the key agreement method provided by the embodiment of the present invention solves the problem of low encryption degree when the BNN-IBS identity signature protocol is applied to the D2D wireless communication network for key negotiation. In addition, the use of homomorphic encryption and hashing, communication and computational overhead is small, reducing the computational complexity.
本发明提供了一种密钥生成设备,用于执行上述密钥协商方法,参照图15所示,包括:处理单元211、发送单元212The present invention provides a key generation apparatus for performing the above-described key negotiation method. Referring to FIG. 15, the present invention includes: a processing unit 211, and a sending unit 212.
处理单元211,用于根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商。 The processing unit 211 is configured to generate a system parameter and a master key according to the preset elliptic curve parameter, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter The system public key is used by the first user equipment to perform key agreement with the second user equipment.
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元211,用于:根据椭圆曲线参数和整数得到中间参数;从中间参数指示的有限域中选取随机数作为主密钥;根据主密钥和中间参数得到系统公钥。The processing unit 211 is configured to: obtain an intermediate parameter according to the elliptic curve parameter and the integer; select the random number as the master key from the finite field indicated by the intermediate parameter; and obtain the system public key according to the master key and the intermediate parameter.
发送单元212,用于广播系统参数;a sending unit 212, configured to broadcast system parameters;
另外,处理单元211,还用于根据系统参数、主密钥和第一用户设备的标识,生成第一用户设备的公钥和私钥;In addition, the processing unit 211 is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元211,用于:从中间参数指示的有限域中选取第一随机数;根据系统参数、第一用户设备的标识以及第一随机数,生成第一用户设备的公钥;根据系统参数、主密钥、第一用户设备的公钥以及第一随机数,生成第一用户设备的私钥。The processing unit 211 is configured to: select a first random number from a finite field indicated by the intermediate parameter; generate a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number; The master key, the public key of the first user equipment, and the first random number generate a private key of the first user equipment.
发送单元212,还用于将第一用户设备的公钥和私钥经过同态加密发送给第一用户设备,用于第一用户设备与第二用户设备进行密钥协商。The sending unit 212 is further configured to send the public key and the private key of the first user equipment to the first user equipment by using the same state encryption, and the first user equipment performs key agreement with the second user equipment.
处理单元211,还用于根据系统参数、主密钥和第二用户设备的标识,生成第二用户设备的公钥和私钥。The processing unit 211 is further configured to generate a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment.
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元211,用于:从中间参数指示的有限域中选取第二随机数;根据系统参数、第二用户设备的标识以及第二随机数,生成第二用户设备的公钥;根据系统参数、主密钥、第二用户设备的公钥以及第二随机数生成第二用户设备的私钥。The processing unit 211 is configured to: select a second random number from the finite field indicated by the intermediate parameter; generate a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number; according to the system parameter, The master key, the public key of the second user equipment, and the second random number generate a private key of the second user equipment.
发送单元212,还用于将第二用户设备的公钥和私钥经过同态加密发送给第二用户设备,用于第二用户设备与第一用户设备进行密钥协商。The sending unit 212 is further configured to send the public key and the private key of the second user equipment to the second user equipment by using the same state encryption, and the second user equipment performs key negotiation with the first user equipment.
需要说明的是,本实施例中的发送单元212,可以为eNB上具备发送功能的接口电路,如发射机或信息发送接口;处理单元211可以为单独设立的处理器,也可以集成在eNB的某一个处理器中实现,此外,也可以以程序代码的形式存储于eNB的存储器中,由 eNB的某一个处理器调用并执行以上处理单元211的功能。这里所述的处理器可以是一个中央处理器(英文全称:central processing unit,英文简称:CPU),或者是特定集成电路(英文全称:application specific integrated circuit,英文简称:ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。It should be noted that the sending unit 212 in this embodiment may be an interface circuit with a sending function on the eNB, such as a transmitter or an information sending interface. The processing unit 211 may be a separately set processor or integrated in the eNB. Implemented in a certain processor, or in the form of program code, stored in the memory of the eNB, A certain processor of the eNB calls and executes the functions of the above processing unit 211. The processor described herein may be a central processing unit (English name: central processing unit, English abbreviation: CPU), or a specific integrated circuit (English full name: application specific integrated circuit, English abbreviation: ASIC), or configured One or more integrated circuits implementing embodiments of the present invention.
由于本发明实施例中的密钥生成设备可以用于执行上述方法流程,因此,其所能获得的技术效果也可参考上述方法实施例,本发明实施例在此不再赘述。The key generation device in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
本发明提供了一种第一用户设备,用于执行上述密钥协商方法,参照图16所示,包括:接收单元221、处理单元222、发送单元223。其中:The present invention provides a first user equipment for performing the above-described key negotiation method. Referring to FIG. 16, the present invention includes a receiving unit 221, a processing unit 222, and a sending unit 223. among them:
接收单元221,用于接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第一用户设备与第二用户设备进行密钥协商。The receiving unit 221 is configured to receive system parameters sent by the key generation device, where the system parameters include an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key The first user equipment performs key agreement with the second user equipment.
接收单元221,还用于接收密钥生成设备发送的第一用户设备的公钥和私钥,并且对第一用户设备的公钥和私钥进行解密,其中,第一用户设备的公钥和私钥经过同态加密。The receiving unit 221 is further configured to receive the public key and the private key of the first user equipment sent by the key generation device, and decrypt the public key and the private key of the first user equipment, where the public key of the first user equipment is The private key is homomorphic encrypted.
处理单元222,用于根据系统参数以及第一用户设备的公钥和私钥,生成第一签名消息。The processing unit 222 is configured to generate a first signature message according to the system parameter and the public key and the private key of the first user equipment.
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元222用于:从中间参数指示的有限域中选取第三随机数和第四随机数;根据系统参数、第一用户设备的公钥和私钥以及第三随机数和第四随机数,生成第一签名消息。The processing unit 222 is configured to: select a third random number and a fourth random number from a finite field indicated by the intermediate parameter; and, according to the system parameter, the public key and the private key of the first user equipment, and the third random number and the fourth random number, Generate a first signed message.
发送单元223,用于将第一签名消息经过同态加密发送给第二用户设备。The sending unit 223 is configured to send the first signature message to the second user equipment by homomorphic encryption.
接收单元221,还用于接收第二用户设备发送的第二签名消息,并且对第二签名消息进行解密,其中,第二签名消息经过同态加密。 The receiving unit 221 is further configured to receive the second signature message sent by the second user equipment, and decrypt the second signature message, where the second signature message is homomorphically encrypted.
处理单元222,还用于若根据第二签名消息和系统参数验证第二用户设备的身份合法,则根据第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。The processing unit 222 is further configured to: if the identity of the second user equipment is verified according to the second signature message and the system parameter, obtain a shared key that communicates with the second user equipment according to the second signature message and the system parameter.
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元222用于:若系统参数和第二签名消息中所包含的参数之间满足预设的等式关系,则确定第二用户设备的身份合法;根据第三随机数、第二签名消息和系统参数,得到与第二用户设备进行通信的共享密钥。The processing unit 222 is configured to: if the system parameter and the parameter included in the second signature message satisfy a preset equality relationship, determine that the identity of the second user equipment is legal; according to the third random number, the second signature message, and System parameters, resulting in a shared key that communicates with the second user device.
需要说明的是,本实施例中的发送单元223,可以为UE上具备发送功能的接口电路,如发射机或信息发送接口;接收单元221可以为UE上具备接收功能的接口电路,如接收机或信息接收接口。处理单元222可以为单独设立的处理器,也可以集成在UE的某一个处理器中实现,此外,也可以以程序代码的形式存储于UE的存储器中,由UE的某一个处理器调用并执行以上处理单元222的功能。这里所述的处理器可以是一个中央处理器(英文全称:central processing unit,英文简称:CPU),或者是特定集成电路(英文全称:application specific integrated circuit,英文简称:ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。It should be noted that the sending unit 223 in this embodiment may be an interface circuit having a sending function on the UE, such as a transmitter or an information sending interface; and the receiving unit 221 may be an interface circuit having a receiving function on the UE, such as a receiver. Or information receiving interface. The processing unit 222 may be a separately set processor, or may be implemented in one processor of the UE. In addition, it may also be stored in the memory of the UE in the form of program code, and is called and executed by a certain processor of the UE. The function of the above processing unit 222. The processor described herein may be a central processing unit (English name: central processing unit, English abbreviation: CPU), or a specific integrated circuit (English full name: application specific integrated circuit, English abbreviation: ASIC), or configured One or more integrated circuits implementing embodiments of the present invention.
由于本发明实施例中的第一用户设备可以用于执行上述方法流程,因此,其所能获得的技术效果也可参考上述方法实施例,本发明实施例在此不再赘述。The first user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
本发明提供了一种第二用户设备,用于执行上述密钥协商方法,参照图17所示,包括:接收单元231、处理单元232、发送单元233。其中:The present invention provides a second user equipment for performing the above-described key agreement method. Referring to FIG. 17, the present invention includes a receiving unit 231, a processing unit 232, and a sending unit 233. among them:
接收单元231,用于接收密钥生成设备发送的系统参数,其中,系统参数包括椭圆曲线参数、中间参数、系统公钥,中间参数用于指示椭圆曲线参数限定的有限域,系统公钥用于第二用户设备与第一用户设备进行密钥协商。The receiving unit 231 is configured to receive system parameters sent by the key generation device, where the system parameters include an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used. The second user equipment performs key agreement with the first user equipment.
接收单元231,还用于接收第一用户设备发送的第一签名消 息,并且对第一签名消息进行解密,其中,第一签名消息经过同态加密。The receiving unit 231 is further configured to receive the first signature sent by the first user equipment. And decrypting the first signed message, wherein the first signed message is homomorphic encrypted.
接收单元231,还用于接收密钥生成设备发送的第二用户设备的公钥和私钥,并且对第二用户设备的公钥和私钥进行解密,其中,第二用户设备的公钥和私钥经过同态加密。The receiving unit 231 is further configured to receive the public key and the private key of the second user equipment sent by the key generation device, and decrypt the public key and the private key of the second user equipment, where the public key of the second user equipment is The private key is homomorphic encrypted.
处理单元232,用于若根据第一签名消息和系统参数验证第一用户设备的身份合法,则根据系统参数、第二用户设备的公钥和私钥,生成第二签名消息。The processing unit 232 is configured to generate a second signature message according to the system parameter, the public key of the second user equipment, and the private key, if the identity of the first user equipment is verified according to the first signature message and the system parameter.
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元232,用于:若系统参数和第一签名消息中所包含的参数之间之间满足预设的等式关系,则确定第一用户设备的身份合法。处理单元232,还用于:从中间参数指示的有限域中选取第五随机数和第六随机数;根据系统参数、第二用户设备的公钥和私钥以及第五随机数和第六随机数,生成第二签名消息。The processing unit 232 is configured to: if the preset parameter relationship is satisfied between the system parameter and the parameter included in the first signature message, determine that the identity of the first user equipment is legal. The processing unit 232 is further configured to: select a fifth random number and a sixth random number from the finite field indicated by the intermediate parameter; according to the system parameter, the public key and the private key of the second user equipment, and the fifth random number and the sixth random number Number, generating a second signature message.
发送单元233,用于将第二签名消息经过同态加密发送给第一用户设备。The sending unit 233 is configured to send the second signature message to the first user equipment by homomorphic encryption.
处理单元232,还用于根据第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。The processing unit 232 is further configured to obtain, according to the first signature message and the system parameter, a shared key that communicates with the first user equipment.
可选的,在一种可能的实现方式中,Optionally, in a possible implementation manner,
处理单元232,用于:根据第五随机数、第一签名消息和系统参数,得到与第一用户设备进行通信的共享密钥。The processing unit 232 is configured to: obtain a shared key that communicates with the first user equipment according to the fifth random number, the first signature message, and the system parameter.
需要说明的是,本实施例中的发送单元233,可以为UE上具备发送功能的接口电路,如发射机或信息发送接口;接收单元231可以为UE上具备接收功能的接口电路,如接收机或信息接收接口。处理单元232可以为单独设立的处理器,也可以集成在UE的某一个处理器中实现,此外,也可以以程序代码的形式存储于UE的存储器中,由UE的某一个处理器调用并执行以上处理单元232的功能。这里所述的处理器可以是一个中央处理器(英文全称:central processing unit,英文简称:CPU),或者是特定集成电路(英 文全称:application specific integrated circuit,英文简称:ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。It should be noted that the sending unit 233 in this embodiment may be an interface circuit having a sending function on the UE, such as a transmitter or an information sending interface, and the receiving unit 231 may be an interface circuit having a receiving function on the UE, such as a receiver. Or information receiving interface. The processing unit 232 may be a separately set processor, or may be implemented in one processor of the UE. In addition, it may also be stored in the memory of the UE in the form of program code, and is called and executed by a certain processor of the UE. The function of the above processing unit 232. The processor described herein may be a central processing unit (English name: central processing unit, English abbreviation: CPU), or a specific integrated circuit (English) The application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
由于本发明实施例中的第二用户设备可以用于执行上述方法流程,因此,其所能获得的技术效果也可参考上述方法实施例,本发明实施例在此不再赘述。The second user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
本发明提供了一种密钥生成设备,用于执行上述密钥协商方法,参照图18所示,该装置可以为eNB,其可以包括:处理器1801、接口电路1802、存储器1803和总线1804;处理器1801、接口电路1702、存储器1803通过总线1804连接并完成相互间的通信。The present invention provides a key generation apparatus for performing the above-described key agreement method. Referring to FIG. 18, the apparatus may be an eNB, which may include: a processor 1801, an interface circuit 1802, a memory 1803, and a bus 1804; The processor 1801, the interface circuit 1702, and the memory 1803 are connected by the bus 1804 and complete communication with each other.
需要说明的是,这里的处理器1801可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器可以是中央处理器CPU,也可以是特定集成电路ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器(英文全称:digital singnal processor,英文简称:DSP),或,一个或者多个现场可编程门阵列(英文全称:field programmable aate array,英文简称:FPGA)。It should be noted that the processor 1801 herein may be a processor or a general term of multiple processing elements. For example, the processor may be a central processing unit CPU, or a specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more microprocessors (English full name) : digital singnal processor, English abbreviation: DSP), or one or more field programmable gate arrays (English full name: field programmable aate array, English abbreviation: FPGA).
存储器1803可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码或接入网管理设备运行所需要参数、数据等。且存储器1803可以包括随机存储器(英文全称:random-access memory,英文简称:RAM),也可以包括非易失性存储器(英文全称:non-volatile memory,英文简称:NVRAM),例如磁盘存储器,闪存(Flash)等。The memory 1803 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or parameters, data, and the like required for the operation of the access network management device. The memory 1803 may include a random access memory (English name: random-access memory, English abbreviation: RAM), and may also include non-volatile memory (English name: non-volatile memory, English abbreviation: NVRAM), such as disk storage, flash memory. (Flash) and so on.
总线1804可以是工业标准体系结构(英文全称:industry standard architecture,英文简称:ISA)总线、外部设备互连(英文全称:peripheral component,英文简称:PCI)总线或扩展工业标准体系结构(英文全称:extended industry standard architecture,英文简称:EISA)总线等。该总线1804可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。 The bus 1804 can be an industry standard architecture (English name: industry standard architecture, English abbreviation: ISA) bus, external device interconnection (English full name: peripheral component: English abbreviation: PCI) bus or extended industry standard architecture (English full name: Extended industry standard architecture, English abbreviation: EISA) bus. The bus 1804 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 18, but it does not mean that there is only one bus or one type of bus.
处理器1801用于执行存储其中的程序代码,以控制接口电路1802执行上述方法实施例中所提供的方法。The processor 1801 is configured to execute program code stored therein to control the interface circuit 1802 to perform the method provided in the above method embodiments.
具体的,处理器1801用于执行存储器中的程序执行上述实施例中密钥生成设备的处理单元的功能。Specifically, the processor 1801 is configured to execute a program in the memory to execute the function of the processing unit of the key generation device in the above embodiment.
接口电路1802用于执行上述实施例中密钥生成设备的发送单元的功能。The interface circuit 1802 is for performing the function of the transmitting unit of the key generation device in the above embodiment.
由于本发明实施例中的密钥生成设备可以用于执行上述方法流程,因此,其所能获得的技术效果也可参考上述方法实施例,本发明实施例在此不再赘述。The key generation device in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
本发明提供了一种第一用户设备,用于执行上述密钥协商方法,参照图19所示,该装置可以为UE,其可以包括:处理器1901、第一接口电路1902、第二接口电路1903、存储器1904和总线1905;处理器1901、第一接口电路1902、第二接口电路1903、存储器1904通过总线1905连接并完成相互间的通信。The present invention provides a first user equipment for performing the above-mentioned key negotiation method. Referring to FIG. 19, the apparatus may be a UE, which may include: a processor 1901, a first interface circuit 1902, and a second interface circuit. 1903, a memory 1904 and a bus 1905; a processor 1901, a first interface circuit 1902, a second interface circuit 1903, and a memory 1904 are connected by a bus 1905 and complete communication with each other.
需要说明的是,这里的处理器1901可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器可以是中央处理器CPU,也可以是特定集成电路ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器(英文全称:digital singnal processor,英文简称:DSP),或,一个或者多个现场可编程门阵列(英文全称:field programmable aate array,英文简称:FPGA)。It should be noted that the processor 1901 herein may be a processor or a collective name of multiple processing elements. For example, the processor may be a central processing unit CPU, or a specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more microprocessors (English full name) : digital singnal processor, English abbreviation: DSP), or one or more field programmable gate arrays (English full name: field programmable aate array, English abbreviation: FPGA).
存储器1904可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码或接入网管理设备运行所需要参数、数据等。且存储器1904可以包括随机存储器(英文全称:random-access memory,英文简称:RAM),也可以包括非易失性存储器(英文全称:non-volatile memory,英文简称:NVRAM),例如磁盘存储器,闪存(Flash)等。The memory 1904 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or parameters, data, and the like required for the operation of the access network management device. The memory 1904 may include a random access memory (English name: random-access memory, English abbreviation: RAM), and may also include non-volatile memory (English name: non-volatile memory, English abbreviation: NVRAM), such as disk storage, flash memory (Flash) and so on.
总线1905可以是工业标准体系结构(英文全称:industry standard architecture,英文简称:ISA)总线、外部设备互连(英文 全称:peripheral component,英文简称:PCI)总线或扩展工业标准体系结构(英文全称:extended industry standard architecture,英文简称:EISA)总线等。该总线1905可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。 Bus 1905 can be an industry standard architecture (English full name: industry standard architecture, English abbreviation: ISA) bus, external device interconnection (English Full name: peripheral component, English abbreviation: PCI) bus or extended industry standard architecture (English full name: extended industry standard architecture, English abbreviation: EISA) bus. The bus 1905 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 19, but it does not mean that there is only one bus or one type of bus.
处理器1901用于执行存储其中的程序代码,以控制第一接口电路1902和二接口电路1903执行上述方法实施例中所提供的方法。The processor 1901 is configured to execute program code stored therein to control the first interface circuit 1902 and the two interface circuit 1903 to perform the method provided in the above method embodiment.
具体的,处理器1901用于执行存储器中的程序执行上述实施例中第一用户设备的处理单元的功能。Specifically, the processor 1901 is configured to execute a program in the memory to perform the function of the processing unit of the first user equipment in the foregoing embodiment.
第一接口电路1902用于执行上述实施例中第一用户设备的接收单元的功能。The first interface circuit 1902 is configured to perform the function of the receiving unit of the first user equipment in the above embodiment.
第二接口电路1903用于执行上述实施例中第一用户设备的发送单元的功能。The second interface circuit 1903 is configured to perform the function of the transmitting unit of the first user equipment in the above embodiment.
由于本发明实施例中的第一用户设备可以用于执行上述方法流程,因此,其所能获得的技术效果也可参考上述方法实施例,本发明实施例在此不再赘述。The first user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
本发明提供了一种第二用户设备,用于执行上述密钥协商方法,参照图20所示,该装置可以为UE,其可以包括:处理器2001、第一接口电路2002、第二接口电路2003、存储器2004和总线2005;处理器2001、第一接口电路2002、第二接口电路2003、存储器2004通过总线2005连接并完成相互间的通信。The present invention provides a second user equipment for performing the above-described key negotiation method. Referring to FIG. 20, the apparatus may be a UE, which may include: a processor 2001, a first interface circuit 2002, and a second interface circuit. 2003, the memory 2004 and the bus 2005; the processor 2001, the first interface circuit 2002, the second interface circuit 2003, and the memory 2004 are connected by the bus 2005 and complete communication with each other.
需要说明的是,这里的处理器2001可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器可以是中央处理器CPU,也可以是特定集成电路ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器(英文全称:digital singnal processor,英文简称:DSP),或,一个或者多个现场可编程门阵列(英文全称:field programmable aate array,英文简称:FPGA)。 It should be noted that the processor 2001 herein may be a processor or a collective name of multiple processing elements. For example, the processor may be a central processing unit CPU, or a specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more microprocessors (English full name) : digital singnal processor, English abbreviation: DSP), or one or more field programmable gate arrays (English full name: field programmable aate array, English abbreviation: FPGA).
存储器2004可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码或接入网管理设备运行所需要参数、数据等。且存储器2004可以包括随机存储器(英文全称:random-access memory,英文简称:RAM),也可以包括非易失性存储器(英文全称:non-volatile memory,英文简称:NVRAM),例如磁盘存储器,闪存(Flash)等。The memory 2004 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or parameters, data, and the like required for the operation of the access network management device. The memory 2004 may include a random access memory (English name: random-access memory, English abbreviation: RAM), and may also include non-volatile memory (English name: non-volatile memory, English abbreviation: NVRAM), such as disk storage, flash memory (Flash) and so on.
总线2005可以是工业标准体系结构(英文全称:industry standard architecture,英文简称:ISA)总线、外部设备互连(英文全称:peripheral component,英文简称:PCI)总线或扩展工业标准体系结构(英文全称:extended industry standard architecture,英文简称:EISA)总线等。该总线2005可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。 Bus 2005 can be an industry standard architecture (English full name: industry standard architecture, English abbreviation: ISA) bus, external device interconnection (English full name: peripheral component: English abbreviation: PCI) bus or extended industry standard architecture (English full name: Extended industry standard architecture, English abbreviation: EISA) bus. The bus 2005 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 20, but it does not mean that there is only one bus or one type of bus.
处理器2001用于执行存储其中的程序代码,以控制第一接口电路2002和二接口电路2003执行上述方法实施例中所提供的方法。The processor 2001 is configured to execute program code stored therein to control the first interface circuit 2002 and the two interface circuit 2003 to perform the method provided in the above method embodiments.
具体的,处理器2001用于执行存储器中的程序执行上述实施例中第二用户设备的处理单元的功能。Specifically, the processor 2001 is configured to execute a program in the memory to execute the function of the processing unit of the second user equipment in the foregoing embodiment.
第一接口电路2002用于执行上述实施例中第二用户设备的接收单元的功能。The first interface circuit 2002 is configured to perform the functions of the receiving unit of the second user equipment in the above embodiment.
第二接口电路2003用于执行上述实施例中第二用户设备的发送单元的功能。The second interface circuit 2003 is configured to perform the functions of the transmitting unit of the second user equipment in the above embodiment.
由于本发明实施例中的第二用户设备可以用于执行上述方法流程,因此,其所能获得的技术效果也可参考上述方法实施例,本发明实施例在此不再赘述。The second user equipment in the embodiment of the present invention may be used to perform the foregoing method, and therefore, the technical effects that can be obtained are also referred to the foregoing method embodiments, and details are not described herein again.
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present invention, the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention. The implementation process constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例 描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。One of ordinary skill in the art will recognize that the embodiments disclosed herein are incorporated The elements and algorithm steps of the various examples described can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计 算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文全称:read-only memory,英文简称:ROM)、随机存取存储器(英文全称:random access memory,英文简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including Several instructions to make a meter The computer device (which may be a personal computer, server, or network device, etc.) performs all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (English full name: read-only memory, English abbreviation: ROM), a random access memory (English full name: random access memory, English abbreviation: RAM), magnetic A variety of media that can store program code, such as a disc or a disc.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims (37)

  1. 一种密钥协商方法,其特征在于,包括:A key negotiation method, comprising:
    密钥生成设备根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,所述系统参数包括所述椭圆曲线参数、中间参数和系统公钥,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于第一用户设备与第二用户设备进行密钥协商;The key generation device generates a system parameter and a master key according to a preset elliptic curve parameter, wherein the system parameter includes the elliptic curve parameter, an intermediate parameter, and a system public key, and the intermediate parameter is used to indicate the ellipse a finite field defined by a curve parameter, where the system public key is used for key negotiation between the first user equipment and the second user equipment;
    所述密钥生成设备广播所述系统参数;The key generation device broadcasts the system parameter;
    所述密钥生成设备根据所述系统参数、所述主密钥和所述第一用户设备的标识,生成所述第一用户设备的公钥和私钥;The key generation device generates a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
    所述密钥生成设备将所述第一用户设备的公钥和私钥经过同态加密发送给所述第一用户设备,用于所述第一用户设备与所述第二用户设备进行密钥协商;The key generation device sends the public key and the private key of the first user equipment to the first user equipment through homomorphic encryption, and the first user equipment and the second user equipment perform a key Negotiate
    所述密钥生成设备根据所述系统参数、所述主密钥和所述第二用户设备的标识,生成所述第二用户设备的公钥和私钥;Generating, by the key generation device, a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment;
    所述密钥生成设备将所述第二用户设备的公钥和私钥经过同态加密发送给所述第二用户设备,用于所述第二用户设备与所述第一用户设备进行密钥协商。The key generation device sends the public key and the private key of the second user equipment to the second user equipment by using the same state encryption, and the second user equipment performs a key with the first user equipment. Negotiation.
  2. 根据权利要求1所述的密钥协商方法,其特征在于,所述密钥生成设备根据预设的椭圆曲线参数,生成系统参数以及主密钥,包括:The key agreement method according to claim 1, wherein the key generation device generates a system parameter and a master key according to a preset elliptic curve parameter, including:
    所述密钥生成设备根据所述椭圆曲线参数和整数得到所述中间参数;The key generation device obtains the intermediate parameter according to the elliptic curve parameter and an integer;
    所述密钥生成设备从所述中间参数指示的所述有限域中选取随机数作为所述主密钥;The key generation device selects a random number as the master key from the finite field indicated by the intermediate parameter;
    所述密钥生成设备根据所述主密钥和所述中间参数得到系统公钥。The key generation device obtains a system public key according to the master key and the intermediate parameter.
  3. 根据权利要求1或2所述的密钥协商方法,其特征在于,所述根据所述系统参数、所述主密钥和所述第一用户设备的标识,生成所述第一用户设备的公钥和私钥,包括: The key negotiation method according to claim 1 or 2, wherein the generating of the first user equipment is performed according to the system parameter, the master key, and the identifier of the first user equipment. Key and private key, including:
    所述密钥生成设备从所述中间参数指示的有限域中选取第一随机数;The key generation device selects a first random number from a finite field indicated by the intermediate parameter;
    所述密钥生成设备根据所述系统参数、所述第一用户设备的标识以及所述第一随机数,生成所述第一用户设备的公钥;The key generation device generates a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number;
    所述密钥生成设备根据所述系统参数、所述主密钥、所述第一用户设备的公钥以及所述第一随机数,生成所述第一用户设备的私钥。The key generation device generates a private key of the first user equipment according to the system parameter, the master key, the public key of the first user equipment, and the first random number.
  4. 根据权利要求1-3任一项所述的密钥协商方法,其特征在于,所述根据所述系统参数、所述主密钥和所述第二用户设备的标识,生成所述第二用户设备的公钥和私钥,包括:The key negotiation method according to any one of claims 1-3, wherein the generating the second user according to the system parameter, the master key, and the identifier of the second user equipment The public and private keys of the device, including:
    所述密钥生成设备从所述中间参数指示的有限域中选取第二随机数;The key generation device selects a second random number from a finite field indicated by the intermediate parameter;
    所述密钥生成设备根据所述系统参数、所述第二用户设备的标识以及所述第二随机数,生成所述第二用户设备的公钥;The key generation device generates a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number;
    所述密钥生成设备根据所述系统参数、所述主密钥、所述第二用户设备的公钥以及所述第二随机数生成所述第二用户设备的私钥。The key generation device generates a private key of the second user equipment according to the system parameter, the master key, the public key of the second user equipment, and the second random number.
  5. 一种密钥协商方法,其特征在于,包括:A key negotiation method, comprising:
    第一用户设备接收密钥生成设备发送的系统参数,其中,所述系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于所述第一用户设备与第二用户设备进行密钥协商;Receiving, by the first user equipment, a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, wherein the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter The system public key is used by the first user equipment to perform key negotiation with the second user equipment.
    所述第一用户设备接收所述密钥生成设备发送的所述第一用户设备的公钥和私钥,并且对所述第一用户设备的公钥和私钥进行解密,其中,所述第一用户设备的公钥和私钥经过同态加密;Receiving, by the first user equipment, a public key and a private key of the first user equipment that are sent by the key generation device, and decrypting a public key and a private key of the first user equipment, where the The public key and private key of a user equipment are homomorphic encrypted;
    所述第一用户设备根据所述系统参数以及所述第一用户设备的公钥和私钥,生成第一签名消息;The first user equipment generates a first signature message according to the system parameter and the public key and the private key of the first user equipment;
    所述第一用户设备将所述第一签名消息经过同态加密发送给第二用户设备;Transmitting, by the first user equipment, the first signature message to the second user equipment by using the same state encryption;
    所述第一用户设备接收所述第二用户设备发送的第二签名消息, 并且对所述第二签名消息进行解密,其中,所述第二签名消息经过同态加密;Receiving, by the first user equipment, a second signature message sent by the second user equipment, where And decrypting the second signature message, wherein the second signature message is homomorphic encrypted;
    若所述第一用户设备根据所述第二签名消息和所述系统参数验证所述第二用户设备的身份合法,则所述第一用户设备根据所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥。If the first user equipment verifies that the identity of the second user equipment is legal according to the second signature message and the system parameter, the first user equipment is configured according to the second signature message and the system parameter. A shared key is obtained that is in communication with the second user equipment.
  6. 根据权利要求5所述的密钥协商方法,其特征在于,所述第一用户设备根据所述系统参数以及所述第一用户设备的公钥和私钥,生成第一签名消息,包括:The key agreement method according to claim 5, wherein the first user equipment generates a first signature message according to the system parameter and the public key and the private key of the first user equipment, including:
    所述第一用户设备从所述中间参数指示的有限域中选取第三随机数和第四随机数;The first user equipment selects a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
    所述第一用户设备根据所述系统参数、所述第一用户设备的公钥和私钥以及所述第三随机数和所述第四随机数,生成所述第一签名消息。The first user equipment generates the first signature message according to the system parameter, the public key and the private key of the first user equipment, and the third random number and the fourth random number.
  7. 根据权利要求5所述的密钥协商方法,其特征在于,所述第一用户设备根据所述第二签名消息和所述系统参数验证所述第二用户设备的身份合法,包括:The key negotiation method according to claim 5, wherein the first user equipment verifies the identity of the second user equipment according to the second signature message and the system parameter, including:
    若所述系统参数和所述第二签名消息中所包含的参数之间满足预设的等式关系,则确定所述第二用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the second signature message, determining that the identity of the second user equipment is legal.
  8. 根据权利要求6所述的密钥协商方法,其特征在于,所述第一用户设备根据所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥,包括:The key negotiation method according to claim 6, wherein the first user equipment obtains a shared key for communicating with the second user equipment according to the second signature message and the system parameter, include:
    所述第一用户设备根据所述第三随机数、所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥。The first user equipment obtains a shared key that communicates with the second user equipment according to the third random number, the second signature message, and the system parameter.
  9. 一种密钥协商方法,其特征在于,包括:A key negotiation method, comprising:
    第二用户设备接收密钥生成设备发送的系统参数,其中,所述系统参数包括椭圆曲线参数、中间参数、系统公钥,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于所述第二用户设备与第一用户设备进行密钥协商; Receiving, by the second user equipment, a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, where The system public key is used by the second user equipment to perform key agreement with the first user equipment;
    所述第二用户设备接收第一用户设备发送的第一签名消息,并且对所述第一签名消息进行解密,其中,所述第一签名消息经过同态加密;Receiving, by the second user equipment, the first signature message sent by the first user equipment, and decrypting the first signature message, where the first signature message is homomorphic encrypted;
    所述第二用户设备接收所述密钥生成设备发送的所述第二用户设备的公钥和私钥,并且对所述第二用户设备的公钥和私钥进行解密,其中,所述第二用户设备的公钥和私钥经过同态加密;Receiving, by the second user equipment, a public key and a private key of the second user equipment that are sent by the key generation device, and decrypting a public key and a private key of the second user equipment, where the The public key and the private key of the second user equipment are homomorphic encrypted;
    若所述第二用户设备根据所述第一签名消息和所述系统参数验证所述第一用户设备的身份合法,则所述第二用户设备根据所述系统参数、所述第二用户设备的公钥和私钥,生成第二签名消息;If the second user equipment verifies that the identity of the first user equipment is legal according to the first signature message and the system parameter, the second user equipment is configured according to the system parameter, the second user equipment a public key and a private key to generate a second signature message;
    所述第二用户设备将所述第二签名消息经过同态加密发送给所述第一用户设备;Transmitting, by the second user equipment, the second signature message to the first user equipment by homomorphic encryption;
    所述第二用户设备根据所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥。The second user equipment obtains a shared key that communicates with the first user equipment according to the first signature message and the system parameter.
  10. 根据权利要求9所述的密钥协商方法,其特征在于,所述第二用户设备根据所述系统参数、所述第二用户设备的公钥和私钥,生成第二签名消息,包括:The key negotiation method according to claim 9, wherein the second user equipment generates a second signature message according to the system parameter, the public key and the private key of the second user equipment, including:
    所述第二用户设备从所述中间参数指示的有限域中选取第五随机数和第六随机数;The second user equipment selects a fifth random number and a sixth random number from a finite field indicated by the intermediate parameter;
    所述第二用户设备根据所述系统参数、所述第二用户设备的公钥和私钥以及所述第五随机数和所述第六随机数,生成所述第二签名消息。The second user equipment generates the second signature message according to the system parameter, the public key and the private key of the second user equipment, and the fifth random number and the sixth random number.
  11. 根据权利要求9所述的密钥协商方法,其特征在于,所述若所述第二用户设备根据所述第一签名消息和所述系统参数验证所述第一用户设备的身份合法,包括:The key negotiation method according to claim 9, wherein if the second user equipment verifies the identity of the first user equipment according to the first signature message and the system parameter, the method includes:
    若所述系统参数和所述第一签名消息中所包含的参数之间满足预设的等式关系,则确定所述第一用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the first signature message, determining that the identity of the first user equipment is legal.
  12. 根据权利要求10所述的密钥协商方法,其特征在于,所述第二用户设备根据所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥,包括: The key negotiation method according to claim 10, wherein the second user equipment obtains a shared key for communicating with the first user equipment according to the first signature message and the system parameter, Includes:
    所述第二用户设备根据所述第五随机数、所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥。And obtaining, by the second user equipment, a shared key that communicates with the first user equipment according to the fifth random number, the first signature message, and the system parameter.
  13. 一种密钥生成设备,其特征在于,包括:A key generation device, comprising:
    处理单元,用于根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,所述系统参数包括所述椭圆曲线参数、中间参数和系统公钥,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于第一用户设备与第二用户设备进行密钥协商;a processing unit, configured to generate a system parameter and a master key according to a preset elliptic curve parameter, where the system parameter includes the elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate the a finite field defined by an elliptic curve parameter, where the system public key is used for key negotiation between the first user equipment and the second user equipment;
    发送单元,用于广播所述系统参数;a sending unit, configured to broadcast the system parameter;
    所述处理单元,还用于根据所述系统参数、所述主密钥和所述第一用户设备的标识,生成所述第一用户设备的公钥和私钥;The processing unit is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
    所述发送单元,还用于将所述第一用户设备的公钥和私钥经过同态加密发送给所述第一用户设备,用于所述第一用户设备与所述第二用户设备进行密钥协商;The sending unit is further configured to send the public key and the private key of the first user equipment to the first user equipment through homomorphic encryption, where the first user equipment and the second user equipment perform Key agreement
    所述处理单元,还用于根据所述系统参数、所述主密钥和所述第二用户设备的标识,生成所述第二用户设备的公钥和私钥;The processing unit is further configured to generate a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment;
    所述发送单元,还用于将所述第二用户设备的公钥和私钥经过同态加密发送给所述第二用户设备,用于所述第二用户设备与所述第一用户设备进行密钥协商。The sending unit is further configured to send the public key and the private key of the second user equipment to the second user equipment by using a homomorphic encryption, where the second user equipment performs the second user equipment with the first user equipment. Key negotiation.
  14. 根据权利要求13所述的密钥生成设备,其特征在于,所述处理单元,还用于:The key generation device according to claim 13, wherein the processing unit is further configured to:
    根据所述椭圆曲线参数和整数得到所述中间参数;Obtaining the intermediate parameter according to the elliptic curve parameter and an integer;
    从所述中间参数指示的所述有限域中选取随机数作为所述主密钥;Selecting a random number as the master key from the finite field indicated by the intermediate parameter;
    根据所述主密钥和所述中间参数得到系统公钥。The system public key is obtained according to the master key and the intermediate parameter.
  15. 根据权利要求13或14所述的密钥生成设备,其特征在于,所述处理单元,还用于:The key generation device according to claim 13 or 14, wherein the processing unit is further configured to:
    从所述中间参数指示的有限域中选取第一随机数;Selecting a first random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述第一用户设备的标识以及所述第一随机数,生成所述第一用户设备的公钥; Generating a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number;
    根据所述系统参数、所述主密钥、所述第一用户设备的公钥以及所述第一随机数,生成所述第一用户设备的私钥。Generating a private key of the first user equipment according to the system parameter, the master key, the public key of the first user equipment, and the first random number.
  16. 根据权利要求13-15任一项所述的密钥生成设备,其特征在于,所述处理单元,还用于:The key generation device according to any one of claims 13 to 15, wherein the processing unit is further configured to:
    从所述中间参数指示的有限域中选取第二随机数;Selecting a second random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述第二用户设备的标识以及所述第二随机数,生成所述第二用户设备的公钥;Generating a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number;
    根据所述系统参数、所述主密钥、所述第二用户设备的公钥以及所述第二随机数生成所述第二用户设备的私钥。Generating a private key of the second user equipment according to the system parameter, the master key, the public key of the second user equipment, and the second random number.
  17. 一种用户设备,其特征在于,包括:A user equipment, comprising:
    接收单元,用于接收密钥生成设备发送的系统参数,其中,所述系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于所述用户设备与第二用户设备进行密钥协商;a receiving unit, configured to receive a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate that the elliptic curve parameter is limited a domain, the system public key is used by the user equipment to perform key agreement with the second user equipment;
    所述接收单元,还用于接收所述密钥生成设备发送的所述用户设备的公钥和私钥,并且对所述用户设备的公钥和私钥进行解密,其中,所述用户设备的公钥和私钥经过同态加密;The receiving unit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt a public key and a private key of the user equipment, where the user equipment The public and private keys are encrypted in the same state;
    处理单元,用于根据所述系统参数以及所述用户设备的公钥和私钥,生成第一签名消息;a processing unit, configured to generate a first signature message according to the system parameter and a public key and a private key of the user equipment;
    发送单元,用于将所述第一签名消息经过同态加密发送给第二用户设备;a sending unit, configured to send the first signature message to the second user equipment by homomorphic encryption;
    所述接收单元,还用于接收所述第二用户设备发送的第二签名消息,并且对所述第二签名消息进行解密,其中,所述第二签名消息经过同态加密;The receiving unit is further configured to receive a second signature message sent by the second user equipment, and decrypt the second signature message, where the second signature message is homomorphic encrypted;
    所述处理单元,还用于若根据所述第二签名消息和所述系统参数验证所述第二用户设备的身份合法,则根据所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥。The processing unit is further configured to: if the identity of the second user equipment is verified according to the second signature message and the system parameter, obtain, according to the second signature message and the system parameter, A shared key that the second user device communicates with.
  18. 根据权利要求17所述的用户设备,其特征在于,所述处理单元,还用于: The user equipment according to claim 17, wherein the processing unit is further configured to:
    从所述中间参数指示的有限域中选取第三随机数和第四随机数;Selecting a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述用户设备的公钥和私钥以及所述第三随机数和所述第四随机数,生成所述第一签名消息。And generating the first signature message according to the system parameter, a public key and a private key of the user equipment, and the third random number and the fourth random number.
  19. 根据权利要求17所述的用户设备,其特征在于,所述处理单元,还用于:The user equipment according to claim 17, wherein the processing unit is further configured to:
    若所述系统参数和所述第二签名消息中所包含的参数之间满足预设的等式关系,则确定所述第二用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the second signature message, determining that the identity of the second user equipment is legal.
  20. 根据权利要求18所述的用户设备,其特征在于,所述处理单元,还用于:The user equipment according to claim 18, wherein the processing unit is further configured to:
    根据所述第三随机数、所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥。And obtaining, according to the third random number, the second signature message, and the system parameter, a shared key that communicates with the second user equipment.
  21. 一种用户设备,其特征在于,包括:A user equipment, comprising:
    接收单元,用于接收密钥生成设备发送的系统参数,其中,所述系统参数包括椭圆曲线参数、中间参数、系统公钥,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于所述用户设备与第一用户设备进行密钥协商;a receiving unit, configured to receive a system parameter sent by the key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, The system public key is used by the user equipment to perform key agreement with the first user equipment;
    所述接收单元,还用于接收第一用户设备发送的第一签名消息,并且对所述第一签名消息进行解密,其中,所述第一签名消息经过同态加密;The receiving unit is further configured to receive a first signature message sent by the first user equipment, and decrypt the first signature message, where the first signature message is homomorphic encrypted;
    所述接收单元,还用于接收所述密钥生成设备发送的所述用户设备的公钥和私钥,并且对所述用户设备的公钥和私钥进行解密,其中,所述用户设备的公钥和私钥经过同态加密;The receiving unit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt a public key and a private key of the user equipment, where the user equipment The public and private keys are encrypted in the same state;
    处理单元,用于若根据所述第一签名消息和所述系统参数验证所述第一用户设备的身份合法,则根据所述系统参数、所述用户设备的公钥和私钥,生成第二签名消息;a processing unit, configured to generate a second according to the system parameter, the public key and the private key of the user equipment, if the identity of the first user equipment is legal according to the first signature message and the system parameter Signed message
    发送单元,用于将所述第二签名消息经过同态加密发送给所述第一用户设备;a sending unit, configured to send the second signature message to the first user equipment by homomorphic encryption;
    所述处理单元,还用于根据所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥。 The processing unit is further configured to obtain, according to the first signature message and the system parameter, a shared key that communicates with the first user equipment.
  22. 根据权利要求21所述的用户设备,其特征在于,所述处理单元,还用于:The user equipment according to claim 21, wherein the processing unit is further configured to:
    从所述中间参数指示的有限域中选取第五随机数和第六随机数;Selecting a fifth random number and a sixth random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述用户设备的公钥和私钥以及所述第五随机数和所述第六随机数,生成所述第二签名消息。And generating the second signature message according to the system parameter, a public key and a private key of the user equipment, and the fifth random number and the sixth random number.
  23. 根据权利要求21所述的用户设备,其特征在于,所述处理单元,还用于:The user equipment according to claim 21, wherein the processing unit is further configured to:
    若所述系统参数和所述第一签名消息中所包含的参数之间之间满足预设的等式关系,则确定所述第一用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the first signature message, determining that the identity of the first user equipment is legal.
  24. 根据权利要求22所述的用户设备,其特征在于,所述处理单元,还用于:The user equipment according to claim 22, wherein the processing unit is further configured to:
    根据所述第五随机数、所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥。And obtaining, according to the fifth random number, the first signature message, and the system parameter, a shared key that communicates with the first user equipment.
  25. 一种密钥生成设备,其特征在于,包括处理器、接口电路、存储器和总线;所述处理器、接口电路、存储器通过所述总线连接并完成相互间的通信;所述处理器用于执行存储器中的程序代码以控制所述接口电路执行以下操作:A key generation device, comprising: a processor, an interface circuit, a memory, and a bus; the processor, the interface circuit, and the memory are connected through the bus and complete communication with each other; the processor is configured to execute the memory The program code in the control to perform the following operations on the interface circuit:
    所述处理器,用于根据预设的椭圆曲线参数,生成系统参数以及主密钥,其中,所述系统参数包括所述椭圆曲线参数、中间参数和系统公钥,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于第一用户设备与第二用户设备进行密钥协商;The processor is configured to generate a system parameter and a master key according to a preset elliptic curve parameter, where the system parameter includes the elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, where the system public key is used for key negotiation between the first user equipment and the second user equipment;
    所述接口电路,用于广播所述系统参数;The interface circuit is configured to broadcast the system parameter;
    所述处理单元,还用于根据所述系统参数、所述主密钥和所述第一用户设备的标识,生成所述第一用户设备的公钥和私钥;The processing unit is further configured to generate a public key and a private key of the first user equipment according to the system parameter, the master key, and the identifier of the first user equipment;
    所述接口电路,还用于将所述第一用户设备的公钥和私钥经过同态加密发送给所述第一用户设备,用于所述第一用户设备与所述第二用户设备进行密钥协商;The interface circuit is further configured to send the public key and the private key of the first user equipment to the first user equipment through homomorphic encryption, where the first user equipment and the second user equipment perform Key agreement
    所述处理器,还用于根据所述系统参数、所述主密钥和所述第二用户设备的标识,生成所述第二用户设备的公钥和私钥; The processor is further configured to generate a public key and a private key of the second user equipment according to the system parameter, the master key, and the identifier of the second user equipment;
    所述接口电路,还用于将所述第二用户设备的公钥和私钥经过同态加密发送给所述第二用户设备,用于所述第二用户设备与所述第一用户设备进行密钥协商。The interface circuit is further configured to send the public key and the private key of the second user equipment to the second user equipment by using a homomorphic encryption, where the second user equipment performs the second user equipment with the first user equipment. Key negotiation.
  26. 根据权利要求25所述的密钥生成设备,其特征在于,所述处理器,还用于:The key generation device according to claim 25, wherein the processor is further configured to:
    根据所述椭圆曲线参数和整数得到所述中间参数;Obtaining the intermediate parameter according to the elliptic curve parameter and an integer;
    从所述中间参数指示的所述有限域中选取随机数作为所述主密钥;Selecting a random number as the master key from the finite field indicated by the intermediate parameter;
    根据所述主密钥和所述中间参数得到系统公钥。The system public key is obtained according to the master key and the intermediate parameter.
  27. 根据权利要求25或26所述的密钥生成设备,其特征在于,所述处理器,还用于:The key generation device according to claim 25 or 26, wherein the processor is further configured to:
    从所述中间参数指示的有限域中选取第一随机数;Selecting a first random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述第一用户设备的标识以及所述第一随机数,生成所述第一用户设备的公钥;Generating a public key of the first user equipment according to the system parameter, the identifier of the first user equipment, and the first random number;
    根据所述系统参数、所述主密钥、所述第一用户设备的公钥以及所述第一随机数,生成所述第一用户设备的私钥。Generating a private key of the first user equipment according to the system parameter, the master key, the public key of the first user equipment, and the first random number.
  28. 根据权利要求25-27任一项所述的密钥生成设备,其特征在于,所述处理器,还用于:The key generation device according to any one of claims 25-27, wherein the processor is further configured to:
    从所述中间参数指示的有限域中选取第二随机数;Selecting a second random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述第二用户设备的标识以及所述第二随机数,生成所述第二用户设备的公钥;Generating a public key of the second user equipment according to the system parameter, the identifier of the second user equipment, and the second random number;
    根据所述系统参数、所述主密钥、所述第二用户设备的公钥以及所述第二随机数生成所述第二用户设备的私钥。Generating a private key of the second user equipment according to the system parameter, the master key, the public key of the second user equipment, and the second random number.
  29. 一种用户设备,其特征在于,包括处理器、第一接口电路、第二接口电路、存储器和总线;所述处理器、第一接口电路、第二接口电路、存储器通过所述总线连接并完成相互间的通信;所述处理器用于执行存储器中的程序代码以控制所述第一接口电路和所述第二接口电路执行以下操作:A user equipment, comprising: a processor, a first interface circuit, a second interface circuit, a memory, and a bus; the processor, the first interface circuit, the second interface circuit, and the memory are connected and completed through the bus Communication with each other; the processor is configured to execute program code in the memory to control the first interface circuit and the second interface circuit to perform the following operations:
    所述第一接口电路,用于接收密钥生成设备发送的系统参数,其 中,所述系统参数包括椭圆曲线参数、中间参数和系统公钥,其中,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于所述用户设备与第二用户设备进行密钥协商;The first interface circuit is configured to receive a system parameter sent by a key generation device, where The system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, wherein the intermediate parameter is used to indicate a finite field defined by the elliptic curve parameter, and the system public key is used for the user equipment and the Two user equipments perform key agreement;
    所述第一接口电路,还用于接收所述密钥生成设备发送的所述用户设备的公钥和私钥,并且对所述用户设备的公钥和私钥进行解密,其中,所述用户设备的公钥和私钥经过同态加密;The first interface circuit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt a public key and a private key of the user equipment, where the user The public key and private key of the device are encrypted in the same state;
    所述处理器,用于根据所述系统参数以及所述用户设备的公钥和私钥,生成第一签名消息;The processor is configured to generate a first signature message according to the system parameter and a public key and a private key of the user equipment;
    所述第二接口电路,用于将所述第一签名消息经过同态加密发送给第二用户设备;The second interface circuit is configured to send the first signature message to the second user equipment by homomorphic encryption;
    所述第一接口电路,还用于接收所述第二用户设备发送的第二签名消息,并且对所述第二签名消息进行解密,其中,所述第二签名消息经过同态加密;The first interface circuit is further configured to receive a second signature message sent by the second user equipment, and decrypt the second signature message, where the second signature message is homomorphic encrypted;
    所述处理器,还用于若根据所述第二签名消息和所述系统参数验证所述第二用户设备的身份合法,则根据所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥。The processor is further configured to: if the identity of the second user equipment is verified according to the second signature message and the system parameter, obtain, according to the second signature message and the system parameter, A shared key that the second user device communicates with.
  30. 根据权利要求29所述的用户设备,其特征在于,所述处理器,还用于:The user equipment according to claim 29, wherein the processor is further configured to:
    从所述中间参数指示的有限域中选取第三随机数和第四随机数;Selecting a third random number and a fourth random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述用户设备的公钥和私钥以及所述第三随机数和所述第四随机数,生成所述第一签名消息。And generating the first signature message according to the system parameter, a public key and a private key of the user equipment, and the third random number and the fourth random number.
  31. 根据权利要求29所述的用户设备,其特征在于,所述处理器,还用于:The user equipment according to claim 29, wherein the processor is further configured to:
    若所述系统参数和所述第二签名消息中所包含的参数之间满足预设的等式关系,则确定所述第二用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the second signature message, determining that the identity of the second user equipment is legal.
  32. 根据权利要求30所述的用户设备,其特征在于,所述处理器,还用于:The user equipment according to claim 30, wherein the processor is further configured to:
    根据所述第三随机数、所述第二签名消息和所述系统参数,得到与所述第二用户设备进行通信的共享密钥。 And obtaining, according to the third random number, the second signature message, and the system parameter, a shared key that communicates with the second user equipment.
  33. 一种用户设备,其特征在于,包括处理器、第一接口电路、第二接口电路、存储器和总线;所述处理器、第一接口电路、第二接口电路、存储器通过所述总线连接并完成相互间的通信;所述处理器用于执行存储器中的程序代码以控制所述第一接口电路和所述第二接口电路执行以下操作:A user equipment, comprising: a processor, a first interface circuit, a second interface circuit, a memory, and a bus; the processor, the first interface circuit, the second interface circuit, and the memory are connected and completed through the bus Communication with each other; the processor is configured to execute program code in the memory to control the first interface circuit and the second interface circuit to perform the following operations:
    所述第一接口电路,还用于接收所述密钥生成设备发送的所述用户设备的公钥和私钥,并且对所述用户设备的公钥和私钥进行解密,其中,所述用户设备的公钥和私钥经过同态加密;The first interface circuit is further configured to receive a public key and a private key of the user equipment sent by the key generation device, and decrypt a public key and a private key of the user equipment, where the user The public key and private key of the device are encrypted in the same state;
    所述第一接口电路,用于接收密钥生成设备发送的系统参数,其中,所述系统参数包括椭圆曲线参数、中间参数、系统公钥,所述中间参数用于指示所述椭圆曲线参数限定的有限域,所述系统公钥用于所述用户设备与第一用户设备进行密钥协商;The first interface circuit is configured to receive a system parameter sent by a key generation device, where the system parameter includes an elliptic curve parameter, an intermediate parameter, and a system public key, where the intermediate parameter is used to indicate the elliptic curve parameter definition a finite domain, the system public key is used by the user equipment to perform key agreement with the first user equipment;
    所述第一接口电路,还用于接收第一用户设备发送的第一签名消息,并且对所述第一签名消息进行解密,其中,所述第一签名消息经过同态加密;The first interface circuit is further configured to receive a first signature message sent by the first user equipment, and decrypt the first signature message, where the first signature message is homomorphic encrypted;
    所述处理器,用于若根据所述第一签名消息和所述系统参数验证所述第一用户设备的身份合法,则根据所述系统参数、所述用户设备的公钥和私钥,生成第二签名消息;The processor is configured to generate, according to the first signature message and the system parameter, the identity of the first user equipment, according to the system parameter, the public key and the private key of the user equipment, Second signature message;
    所述第二接口电路,用于将所述第二签名消息经过同态加密发送给所述第一用户设备;The second interface circuit is configured to send the second signature message to the first user equipment by homomorphic encryption;
    所述处理器,还用于根据所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥。The processor is further configured to obtain, according to the first signature message and the system parameter, a shared key that communicates with the first user equipment.
  34. 根据权利要求33所述的用户设备,其特征在于,所述处理器,还用于:The user equipment according to claim 33, wherein the processor is further configured to:
    从所述中间参数指示的有限域中选取第五随机数和第六随机数;Selecting a fifth random number and a sixth random number from a finite field indicated by the intermediate parameter;
    根据所述系统参数、所述用户设备的公钥和私钥以及所述第五随机数和所述第六随机数,生成所述第二签名消息。And generating the second signature message according to the system parameter, a public key and a private key of the user equipment, and the fifth random number and the sixth random number.
  35. 根据权利要求33所述的用户设备,其特征在于,所述处理器,还用于: The user equipment according to claim 33, wherein the processor is further configured to:
    若所述系统参数和所述第一签名消息中所包含的参数之间之间满足预设的等式关系,则确定所述第一用户设备的身份合法。If the preset parameter relationship is satisfied between the system parameter and the parameter included in the first signature message, determining that the identity of the first user equipment is legal.
  36. 根据权利要求34述的用户设备,其特征在于,所述处理器,还用于:The user equipment according to claim 34, wherein the processor is further configured to:
    根据所述第五随机数、所述第一签名消息和所述系统参数,得到与所述第一用户设备进行通信的共享密钥。And obtaining, according to the fifth random number, the first signature message, and the system parameter, a shared key that communicates with the first user equipment.
  37. 一种密钥协商系统,包括如权利要求13-16任一项所述的密钥生成设备、如权利要求17-20任一项所述的用户设备以及如权利要求21-24任一项所述的用户设备;A key agreement system, comprising the key generation device according to any one of claims 13-16, the user equipment according to any one of claims 17-20, and the method of any one of claims 21-24 User equipment
    或者,or,
    包括如权利要求25-28任一项所述的密钥生成设备、如权利要求29-32任一项所述的用户设备以及如权利要求33-36任一项所述的用户设备。 A key generation device according to any one of claims 25 to 28, a user device according to any one of claims 29 to 32, and a user device according to any one of claims 33 to 36.
PCT/CN2016/076170 2016-03-11 2016-03-11 Key negotiation method, device and system WO2017152423A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680046828.8A CN107925578B (en) 2016-03-11 2016-03-11 Key agreement method, device and system
PCT/CN2016/076170 WO2017152423A1 (en) 2016-03-11 2016-03-11 Key negotiation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/076170 WO2017152423A1 (en) 2016-03-11 2016-03-11 Key negotiation method, device and system

Publications (1)

Publication Number Publication Date
WO2017152423A1 true WO2017152423A1 (en) 2017-09-14

Family

ID=59790096

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076170 WO2017152423A1 (en) 2016-03-11 2016-03-11 Key negotiation method, device and system

Country Status (2)

Country Link
CN (1) CN107925578B (en)
WO (1) WO2017152423A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109818744A (en) * 2019-02-27 2019-05-28 矩阵元技术(深圳)有限公司 Shared secret key generation method, device, computer equipment and storage medium
WO2022042244A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Data transmission method, client, server, and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768861B (en) * 2019-01-24 2021-07-30 西安电子科技大学 Massive D2D anonymous discovery authentication and key agreement method
CN111835508B (en) * 2019-04-23 2023-02-28 深圳市汇顶科技股份有限公司 Key distribution deployment method and system
CN114362946B (en) * 2022-03-10 2022-06-07 北京得瑞领新科技有限公司 Key agreement method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825743A (en) * 2014-02-13 2014-05-28 南京邮电大学 Data security aggregation method with privacy protection function
CN104917618A (en) * 2015-06-02 2015-09-16 北京航空航天大学 Authentication key negotiation method based on hierarchy identity basis and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9252942B2 (en) * 2012-04-17 2016-02-02 Futurewei Technologies, Inc. Method and system for secure multiparty cloud computation
WO2015062239A1 (en) * 2013-11-04 2015-05-07 华为技术有限公司 Method and device for key negotiation processing
CN104967517B (en) * 2015-07-24 2018-03-20 电子科技大学 A kind of network data convergence method for wireless senser

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825743A (en) * 2014-02-13 2014-05-28 南京邮电大学 Data security aggregation method with privacy protection function
CN104917618A (en) * 2015-06-02 2015-09-16 北京航空航天大学 Authentication key negotiation method based on hierarchy identity basis and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TSOUTSOS, N.G. ET AL.: "Extending Residue-based Fault Tolerance to Encrypted Computation", INTERNATIONAL TEST CONFERENCE (ITC, 8 October 2015 (2015-10-08), pages 1 - 10, XP032822467 *
YUAN, YANXIANG ET AL.: "Identity-based Encryption Authenticated Key Agreement Protocol", NETINFO SECURITY, 31 March 2014 (2014-03-31) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109818744A (en) * 2019-02-27 2019-05-28 矩阵元技术(深圳)有限公司 Shared secret key generation method, device, computer equipment and storage medium
CN109818744B (en) * 2019-02-27 2022-11-18 矩阵元技术(深圳)有限公司 Shared secret key generation method and device, computer equipment and storage medium
WO2022042244A1 (en) * 2020-08-31 2022-03-03 Oppo广东移动通信有限公司 Data transmission method, client, server, and storage medium

Also Published As

Publication number Publication date
CN107925578B (en) 2020-12-01
CN107925578A (en) 2018-04-17

Similar Documents

Publication Publication Date Title
JP7024563B2 (en) Confidential and mutually authenticated key exchange
US20190372763A1 (en) System and method for computing private keys for self certified identity based signature schemes
CN104641592B (en) The method and system of (CLAE) is encrypted for no certificate verification
Peng et al. Efficient and provably secure multireceiver signcryption scheme for multicast communication in edge computing
US9722787B2 (en) Key sharing device and system for configuration thereof
WO2017152423A1 (en) Key negotiation method, device and system
WO2017167771A1 (en) Handshake protocols for identity-based key material and certificates
US20150134960A1 (en) Determination of cryptographic keys
US10630476B1 (en) Obtaining keys from broadcasters in supersingular isogeny-based cryptosystems
Chen Cryptography standards in quantum time: new wine in old wineskin?
CN112912878B (en) Secure crypto processor
US11044081B2 (en) System and method for obtaining a common session key between devices
Tsai et al. Provably secure anonymous authentication with batch verification for mobile roaming services
Abusukhon et al. An authenticated, secure, and mutable multiple‐session‐keys protocol based on elliptic curve cryptography and text‐to‐image encryption algorithm
US10880278B1 (en) Broadcasting in supersingular isogeny-based cryptosystems
Singh et al. Elliptic curve cryptography based mechanism for secure Wi-Fi connectivity
CN106953727A (en) Based on the group safety certifying method without certificate in D2D communications
CN116436640A (en) Lightweight terminal cross-domain authentication method for edge calculation
CN112533213B (en) Key negotiation method, device, terminal and storage medium
Dugardin et al. A New Fair Identity Based Encryption Scheme
Prasad et al. A robust secure DS-AKA with mutual authentication for LTE-A
Yap et al. On the security of a lightweight authentication and encryption scheme for mobile ad hoc network
Li et al. Certificateless identity-concealed authenticated encryption under multi-KGC
Ricci et al. Privacy-enhancing group signcryption scheme
CN114640440B (en) Distributed threshold signature method and device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16893072

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16893072

Country of ref document: EP

Kind code of ref document: A1