disclosure of Invention
The invention aims to provide a key exchange method which is efficient, can be based on passwords and is resistant to secret data leakage. The key exchange method of the invention has the following characteristics:
1. compared with the common password-based authentication protocol (including many commercial applications), such as the SSL/TLS authentication protocol specified in RFC 2246 of IETF, the following differences and features exist:
(1) the server 'B' does not directly store the password w of the client 'A' in the database entry corresponding to the user 'A'; the data stored in the storage device can not reveal the password of the client 'A', namely: the leakage of the stored data can not reveal the password of the client; and the stored data is directly used for generating the session key and can be calculated in advance to accelerate the calculation efficiency.
(2) The password of client "a" participates in the session key generation process in an implicit way, providing a degree of mutual authentication.
(3) After the session key generation, client "a" does not transmit the password encrypted with the session key, i.e.: the information transmitted after the session key is generated may have no relation to the password of user "a"; this feature ensures that: even if the session key is leaked, an attacker cannot obtain the password of the user from the leaked session key by an offline attack. Furthermore, time-based analysis can be well protected against the encrypted transmission of passwords with session keys.
(4) Client "A" may not need to send t additionallyA=MACK(sid,rA) But rather bind it to other information sent by the protocol, further increasing computational and communication complexity. Where K is the generated session key.
2. Compared with the commonly used Diffie-Hellman key exchange protocol, such as the IKE protocol specified in RFC 2409 of IETF, the following differences and features exist:
(1) identity authentication is performed without using a digital signature, so that the privacy of a user can be well protected;
(2) off-line calculation can be well performed in advance, so that the high efficiency of on-line calculation is ensured;
(3) is well compatible with key exchange protocols that do not use signatures.
Compared with the commonly used Diffie-Hellman key exchange protocol without signature for identity authentication, such as the MQV protocol specified by the American National Standards Institute (ANSI) X9.42-2001 standard document, the International Standards Organization (ISO) IS 15946-3 standard document, the International institute of Electrical and electronics Engineers' 1363- & 2000 standard document, etc., the following differences and features are present:
(a) in the protocol (implementation method-4) of the present invention, each user only needs to perform an exponential operation online; in the MQV protocol, each user needs to perform 1.5 exponential operations on line; therefore, the inventive protocol has better online computing efficiency.
(b) The session key generated by the protocol has good repudiation performance, so that the privacy of the user can be better protected; in the MQV protocol, however, the generated session key is bound to two users who generate the session key in a non-repudiatable manner, and thus the privacy of the users cannot be well protected.
(c) The inventive protocol may fully guarantee that the DH-key component of each user is not contained in a small subgroup.
3. The inventive protocol has good resistance to the harm caused by the leakage of the temporary secret data, the stored leakage of the temporary secret data about one execution of the protocol does not affect the safety of other executions of the protocol, and effective convenience is not provided for an attacker to solve the computational Diffie-Hellman problem.
4. The inventive protocol allows the checking of the DH-key components of the users as elements in the corresponding groups to be combined well with a priori offline calculations and to fully ensure that the DH-key components of the users are not included in small subgroups.
5. The protocol of the invention has excellent expansion performance and system performance, and can be applied to various application environments and occasions. The system working environment of the method of the invention is as follows:
(1) system parameters: (G ', G, G, q), where G ' is a finite group of order N, G is a subgroup of order q in G ', and G is a generator of G, making it difficult to define the discrete logarithm problem on G. The general settings of G', G are as follows: g' is <math><mrow><msubsup><mi>Z</mi><mi>p</mi><mo>*</mo></msubsup><mo>=</mo><mrow><mo>{</mo><mn>1,2</mn><mo>,</mo><mo>·</mo><mo>·</mo><mo>·</mo><mi>p</mi><mo>-</mo><mn>1</mn><mo>}</mo></mrow><mo>,</mo></mrow></math>p is a prime number, q is divided by (p-1), when the order of G' is N ═ p-1; alternatively, G' is an elliptic curve defined over a finite field (i.e., a group of points on an elliptic curve defined over a finite field). In general terms, the amount of the solvent to be used, <math><mrow><msubsup><mi>Z</mi><mi>p</mi><mo>*</mo></msubsup><mo>=</mo><mrow><mo>{</mo><mn>1,2</mn><mo>,</mo><mo>·</mo><mo>·</mo><mo>·</mo><mi>p</mi><mo>-</mo><mn>1</mn><mo>}</mo></mrow></mrow></math>the element operation in (1) is expressed by multiplication, the unit cell is an integer of 1, and the operation on the elliptic curve is expressed by addition, and the unit cell is an infinite point. In this document, we represent the operation of an element in G' by multiplication. Unless otherwise specified, the unit cell in G, G' is designated as 1G,G′/1GExpressed is the subtraction of Unit cell 1 from GGSet of other elements thereafter, i.e. not 1 in GGAn element; note G/1GIs other than 1 in GGAnd (4) elements. Without loss of generality, the result of the exponential operation and the multiplication operation that is not exponential is either G' or one element of G, and the addition and/or multiplication operation on the exponent is a modulo-q calculation. Defining the function DL: zq→ G, so that h ═ dl (w) ═ Gw. w is referred to as the discrete logarithm of h. We require that no polynomial time algorithm compute the discrete logarithm w of h given a randomly computed h, which is called the discrete logarithm problem. The computational Diffie-Hellman problem refers to: given a random gxAnd gyWithout polynomial time algorithm to calculate gxy. For those skilled in the art, the discrete logarithm problem and the computational Diffie-Hellman problem may also be defined on a group defined by an elliptic curve or a bilinear pair (bilinear). For any element X ∈ G', we remember X-1Is the inverse of X relative to G', i.e.: XX-1=1G(ii) a As general knowledge in the art, X-abThere may be various equivalent computing methods, such as: x-ab=(X-1)ab=(X-a)b=(Xa)-b=(X-b)a=(Xb)-a=…,Xtcb+tfy=Xt(cb+fy)And so on;
the check confirms that one element X is belonged to G, and the following method can be used: (1) calculate and check Xq1 is ═ 1; (2) if N is 2q +1, calculate and check X2Not equal to 1, or calculate the Legendre symbol for X; (3) if G ' is G (for example, G ' is an elliptic curve group with prime order), only X is required to be checked to be G '; (4) calculating and checking X ∈ G' and XN/qNot equal to 1 to ensure that X is not in a small subgroup of order divisible by N/q; (5) if G' is defined in a finite field FqChecking that X ∈ G'/1 and the X-coordinate and y-coordinate of X are FqOf (1). In general, the check of X ∈ G may be embedded into other operations of the protocol.
(2) H is a hash function; for character strings or values s1,s2,…sm,m>1,H(s1,s2,…sm) It is shown that: will s1,s2,…,smAnd (4) representing by using proper codes, then connecting all the coding sequences in series, and finally taking the string obtained after the series connection as the input of H. Without loss of generality, let us assume that the output of H is Zq(0, 1, 2, …, q-1) element, otherwise we can simply take one of the outputs of H to belong to ZqOr modulo q calculation is performed on the output of H. If s1,s2,…,smIs a string of m characters, S1,S2,…SnIs n sets, 1 is not more than n, m, { s1,s2,…,sm,S1,S2,…,SnDenoted by s1,s2,…,sm}∪S1∪S2∪…∪SnWherein the order of elements in parentheses may be changed arbitrarily. H(s)1,s2,…,sm,S1,S2,…,Sn) Is expressed by1,s2,…smAnd S1∪S2∪…∪Sn-{s1,s2,…,smThe elements in the code are represented by proper codes, all the code strings are sequentially connected in series, and finally the string obtained after series connection is used as the input of H.
(3) Unless otherwise specified, with an identity ID IAUser "a" has a public key a ═ gaE G, where a is set in Z by user "Aq0, 1, 2, …, q-1. Accordingly, has ID IBThe public key of the user "B" is denoted as B ═ gbE.g., G, and so on. Wherein IAFor identity information or user name of user "A", IBIs the identity information or username of user "B". For any element x ∈ ZqWe note that x is x relative to ZqThe negative element of (a), namely: x + (-x) ═ 0 modq.
Without loss of generality, the public key certificate authority checks to confirm that the public key registered by the user is an element in G or G/1 when issuing a certificate to the userGAnd (5) medium element. The certificate authority refuses to issue the public key certificate if any check fails. Thus, each user can confirm that the public key of the opposite party is G or G/1 only by checking the public key certificate of the opposite party userGOf (1).
(4) The protocol is based on the Diffie-Hellman key exchange protocol. Unless otherwise specified, the symbols X-gxA DH key component of user "A", X being a discrete logarithm of DH key component X, X being derived from Z by user "Aq0, 1, …, q-1.Let Y be gyDH key component for user "B", Y is the discrete logarithm of DH key component Y, Y is derived from Z by user "Bq0, 1, …, q-1. Assume that user "A" is the initiator (initiator) of the protocol and user "B" is the responder to the protocol. Namely: user "A" sends X first; user "B" sends Y again after receiving X. In general, user "B" needs to check X ∈ G'/1 before sending YGOr X ∈ G, "A" needs to check Y ∈ G'/1 after receiving YGOr Y ∈ G.
(5) Other information related to protocol execution pub: pub is the component X ═ g for removing DH-keyxOr X', Y ═ gyA subset or sequence of other information related to protocol execution, other than that, may be empty or contain repeating elements. Here, other information related to protocol execution includes: the identity information or user names of the users, i.e., protocol initiators and responders, the role designations of the protocol initiators and responders, public and public key certificate information, IP addresses, protocol versions, security parameters and key (length) parameters, session designations of the protocols, timestamps, arbitrary values, and other information transmitted by the protocol session other than the DH-key component. In different implementation methods and applications, pub values may be different. Generally, pub contains the public key and identity or username information of the protocol initiator and responder, i.e. <math><mrow><mrow><mo>{</mo><msub><mi>I</mi><mi>A</mi></msub><mo>,</mo><mi>A</mi><mo>,</mo><msub><mi>I</mi><mi>B</mi></msub><mo>,</mo><mi>B</mi><mo>}</mo></mrow><mo>⊆</mo><mi>pub</mi><mo>.</mo></mrow></math>
The session identifier sid is generally two random numbers R sent by the users "a" and "BAAnd RBOr DH-key components are concatenated in initiator-responder order, i.e. sid ═ RA‖RBOr sid | Y, where | denotes the concatenation operator.
Protocol role designation r of userAAnd rBTypically with different integers such as: r isA=0,rB1 is ═ 1; or by different sequences of the random numbers or DH-key components sent by users "a" and "B", such as: r isA=RA‖RBOr rA=X‖Y,rB=RB‖RAOr rB=Y‖X。
For the person skilled in the art, the random number RAAnd RBAnd possibly the exchange of public key certificates, may be performed before the implementation method is run, or may be included in the information sent by each user in the implementation method.
(6) Key derivation function KDF: KDF (S, aux) is a key derivation function, where S is a value or set of values and aux is a set of strings of values or a counter. In general, a KDF is a hash function or sequence of hash functions or directly outputs its first input, such as: KDF (S, aux) ═ H (S, aux) (this calculation is suitable for the case where the length of the output of the hash function H is equal to or greater than the length of the specified key, i.e., the true output may be a substring of H (S, aux), such as a prefix, the length of the output substring being equal to the length of the specified key, or KDF (S, aux) ═ H (S, 1) H (S, 2) … H (S, k) where k ≧ 1, aux is a counter (this calculation is suitable for the case where the length of the output of the hash function H is less than the length of the specified key), or KDF (S, aux) ═ S; or KDF is a pseudo-random function with S as the random seed, such as KDF (S, aux) ═ PRFS(aux). The session key and the authentication key may be derived from the same key derivation function on the same input; alternatively, the session key and the authentication key are derived from the same key derivation function on different inputs, such as the session key is H (S, aux) and the authentication key is H (aux, S); alternatively, the session key derivation function is different from the authentication key derivation function, and their inputs are the same or different, such as: the derivation of the session key and the authentication key uses different hash functions or pseudo-random functions.
(7) A tag authentication function FT(K, U) where K is a secret value or secret valueAnd in the set, U is a numeric string set. Tag authentication function FT(K, U) is any function that satisfies the following properties: (1) cannot be taken from FT(K, U) solving for K in a polynomial time of the length of K, namely: function F with respect to input KTIs unidirectional; (2) given FT(K, U) F cannot be calculated within a polynomial time of the length of KT(K, U') or FT(K, U ') such that U ≠ U'. In general, FTIs a one-way hash function, such as: fT(K, U) ═ H (K, U); or FTIs a message authentication code MAC function in which the MAC private key is derived from K, U and the authentication information is a subset of U, such as FT(K,U)=MACK(U)。
Let us assume that the protocol operation sender has some mechanism to negotiate the above parameters (including security parameters and key length parameters), functions, algorithms (including symmetric and public key encryption algorithms, authentication algorithms, signature algorithms, hash functions, etc.), user role indication and session indication symbol representation methods, etc., and to operate which of the following implementation methods, and to reach a agreement. This negotiation mechanism may vary from application environment to application environment and from system to system. Generally, pub contains a subset of the information that the negotiation interacts with. To those familiar with the art, the checks performed on the various elements in the application method confirm that the default is one-time, i.e.: once the validation is correct (typically at the first calculation of the element), it is not checked in subsequent runs.
The implementation method comprises the following steps: according to different application environments and systems, the following implementation methods are adopted:
the implementation method-1: implementation method-1 is suitable for a client "a" not having or not having the convenience of using a public key, and a user "B" not sending a DH-key component Y ═ g
yThe case (2); but client "a" has registered a password w at user "B". Generally, user "A" is a client and user "B" is a server. User "B" manages a user database and creates an entry in the database for each client; user 'B' supports with B ═ g
bE G' is a public key encryption algorithm with a public key based on Diffie-Hellman or ElGamal, such as the public key encryption algorithm ECIES based on Diffle-Hellman specified by standardized documents such as ANSI X9.63, ISO/IEC 15946-3 and IEEEP1363a, or the public key encryption algorithm PSEC based on Diffle-Hellman specified by the ISO18033-2 standardized draft; any legal public key encryption ciphertext, denoted as C, is a set of values and each includes a DH-key component X ═ g for generating a Diffie-Hellman secret with public key B
xE is G; namely: x ═ g
xFor generating a common Diffie-Hellman secret B between an encryptor and a decryptor
tx=g
tbx=X
tbE G', wherein t is 1 or
(ii) a In general, the common secret that the encryptor and the decryptor really use is composed of { X, B }
tx=X
tbIs derived using a key derivation function, i.e., KDF (B)
tx,X)=KDF(X
tb,X)。B=g
bE G' can be the public key of fixed user "B", i.e.: randomly selected b ∈ Z
qRemain unchanged from session to session. G ═ B
bE G' can also be chosen randomly by user "B" independently in each session, i.e.: b independently in Z in different sessions
qSelecting.
The core and the characteristic of the implementation method-1 are that two functions K are constructedAAnd KBSo that KA(x,w,B,pub)=KB(b, w, X', pub). User "a" calculates and sends DH-key component X ═ gxBβE.g. G'; user "A" calculates KA=BtxE.g. G', and user "B" calculates KB=X′tbB-tbβE.g. G' or KB=(X′B-β)tbE.g. G'; wherein, if B ═ gbIf the E G ' is the public key of the user ' B ', the user ' B ' can calculate and store B in advance-tbβE G' and/or BtbβE.g. G'; if B is gbE G 'is not the public key of user' B ', but is present by user' BEach session is independently selected randomly, and user 'B' first gets g from BbE.g. G' is sent to "A".
The specific method comprises the following steps: using DH-key component X ═ g for generating Diffie-Hellman secret in public key encryption algorithm based on Diffie-Hellman or ElGamalxG is changed from e G to X ═ GxBβE.g. G'. Diffie-Hellman secret B for (X, B) in a public key encryption algorithm based on Diffie-Hellman or ElGamal is calculated as followstx=gtbx=Xtb=(X′B-β)tb=X′tbB-tbβE.g.. G': user "A" calculates KA=BtxE.g. G', and user "B" calculates KB=X′tbB-tbβE G ' (the calculation is suitable for the user ' B ' to calculate and store B in advance-tbβE.g. case of G') or KB=(X′B-β)tbE G ' (the calculation is suitable for the user ' B ' to calculate and store B in advance-βE G'); wherein t is 1 orBeta is w or-w, and w and-w are coded as ZqOne element of (1); or beta is Hw(W) or-Hw(W), wherein W is { W, IA,IBB, pub } or { w, X', IA,IBOne subset of, B, pub } containing w, HwIs a hash function of length with output length less than q, HwTypically set to a short substring of the hash function H output (e.g., 8 or 16 or 32 bit prefix of H output). The common secret really used by the encryptor and the decryptor is composed of { X', KA=KBDerivation, i.e. KDF (K)A,X′)=KDF(KBX '), or from { X', KA=KBDerived from aux, aux is { I }A,IB,sid,rA,rBPub, can be empty. Is recorded by { X', KA=KBOr by { X', K }A=KBThe secret derived from (k) and aux is1,k2) (ii) a In general, k is1Is a key for symmetric encryption and decryption, k2Is a MAC authentication key.
User "B" may calculate B in advance-1. If β does not involve X' and if B ═ gbE.G ' is the public key of user ' B ', user ' B ' calculates B in advance-tbβE G' and/or BtbβE G', and B-tbβAnd/or BtbβStored in the database entry corresponding to user "A"; namely: when user "A" registers password w with user "B", user "B" calculates β, B-tbβE G' and/or BtbβE.g. G', deleting beta and adding B-tbβAnd/or BtbβStoring the password in an entry corresponding to a user 'A' in a database instead of directly storing the password w or beta; alternatively, user "B" calculates B in advance-βAnd B is-βSecurely stored in the database entry corresponding to user "A" (at this point, B)-βWill reveal the user's password, suggest pair B-βEncrypted storage is performed). However, if user "B" does not have a public key, it randomly chooses and sends B ═ gbE G' gives the user "A", namely: b independently in Z in different sessionsqIf so, user "B" still needs to store β in the database entry corresponding to user "a" (suggesting encrypted storage of β).
To prevent offline attacks, user "A" is at X', BtxDeleting x, w, beta, B immediately after calculationβOr immediately deleted or stored in a secure location. The calculation of the user 'A' can be carried out in advance; in particular, if β ═ w or β ═ Hw(W), user "A" may calculate B in advance-1Upon accelerated calculation, where-beta is exactly w or Hw(W). If β ═ w or β ═ Hw(W), user "B" may calculate and store B in advance-1。
For the case where user "B" has the public key "B", in general, if the decryptor, i.e., user "B", checks the confirmation X' ∈ G, let t equal to 1. If the decryptor only checksChecking that X 'belongs to G' or X 'belongs to G'/1GIf X' is not in the range of G, then letAnd checked to confirm X'tb≠Btbβ(applicable to K)B=X′tbB-tbβE G' calculation mode) or KB≠1GOr (X' B)-β)t≠1G. If user 'B' does not have a public key, it randomly chooses and sends B-gbE G' gives the user "A", namely: b independently in Z in different sessionsqIf so, then the user "B" only checks to confirm that X '∈ G' or X '∈ G'/1GLet t equal to 1. User "B" aborts protocol execution, returning or not returning an error message, if any check fails. User 'A' sends identity information I of user 'A' at the same time of sending cipher text or before sending cipher textA(ii) a The modified Diffie-Hellman or ElGamal-based public key encryption algorithm is referred to as a password-based Diffie-Hellman or ElGamal public key encryption algorithm.
Client 'A' encrypts a random number R by using a Diffie-Hellman or ElGamal public key encryption algorithm based on a password to obtain a ciphertext C, and encrypts the ciphertext C and identity information IASending to user 'B'; if user 'B' successfully decrypts C to obtain R, the session key and the authentication key are composed of random numbers R and k1,k2C, pub } or directly setting the session key and/or the authentication key to R; let the derived authentication key be R'. The recommended calculation method is as follows: the session key is set to R, and the authentication key R' is formed by R and k2And (6) exporting. If the decryption of the user B is wrong, the execution is stopped, and error information is returned or not returned; we assume that user "a" is only allowed to make mistakes a limited number of times to prevent online guessing attacks.
To prove to user "A" that he knows R, user "B" utilizes a tag authentication function FTCalculate and send tB=FT(R′,auxB) Wherein auxBIs { IB,sid,rBC, X', pub } is a session identifier, rBIs the protocol role designation for user "B". User "A" checks t with the authentication key RBAnd if the correctness is not correct, the protocol execution is stopped, and error information is returned or not returned.
User "A" proves to user "B" that it does know R as follows: user "A" sends ciphertext C at the same time or receives tBAnd verifies the confirmation tBAfter correctness, t is calculated and sent to user "BA=FT(R′,auxA) Wherein auxAIs { IA,sid,rAA subset of C, X', pub } and auxA≠auxB,rAIs the protocol role designation for user "a". If the Diffie-Hellman or ElGamal public key encryption ciphertext C based on the password for R already contains a label tE=MACk(E) Or in general tE=FT(k, E), where E is an element in the ciphertext C or the division of t in the ciphertext CEA subset of other elements than k and in general k e k1,k2}, user "A" can prove to user "B" that it knows R more efficiently as follows: user "A" does not send tA=FT(R′,auxA) But instead t in the ciphertext CEIs replaced byOr in general tA=FT(KR,{E,auxA}) in which auxAIs { IA,sid,rAPub } and auxA≠auxB,KRIs derived from (K, R ', aux) or (K, R, aux) or is directly set as R' (recommending K)RR') aux is { I ═ IA,IB,sid,rA,rBA subset of E, pub } may be empty; namely: kRKDF ({ K, R' }, aux) or KRKDF ({ K, R }, aux) or KRR'; in general, KRH (k, R), or <math><mrow><msub><mi>K</mi><mi>R</mi></msub><mo>=</mo><mi>k</mi><mo>⊕</mo><mi>R</mi><mo>,</mo></mrow></math>Or <math><mrow><msub><mi>K</mi><mi>R</mi></msub><mo>=</mo><mi>H</mi><mrow><mo>(</mo><mi>k</mi><mo>⊕</mo><mi>R</mi><mo>)</mo></mrow><mo>,</mo></mrow></math>Or KRR'; user "B" checks tAAnd if the correctness is not correct, the protocol execution is stopped, and error information is returned or not returned.
The implementation method-2: implementation method-2 is applicable to client "a" having public key a ═ gaUser 'B' has public key B ═ gbBut does not send the DH-key component Y ═ gyThe situation (2).
If user "A" registers a password w at user "B", the core and feature of implementing method-3 is to construct two functions K
AAnd K
BSo that K
A(a,x,w,B,pub)=K
B(b, w, A, X, pub). The specific method comprises the following steps: user "a" calculates and sends DH-key component X ═ g
xB
βE G', wherein β is w or-w, and w and-w are encoded as Z
qOne element of (1); or beta is H
w(W) or-H
w(W), wherein W is { W, I
A,A,I
BB, pub } or { w, X', I
A,A,I
BOne subset of, B, pub } containing w, H
wIs a hash function that outputs a length less than q, typically taking a short substring of the H output (e.g., 8 or 16 or 32 bit prefix of the H output). User "A" calculation
<math><mrow><msub><mi>K</mi><mi>A</mi></msub><mo>=</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>ae</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>xc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>User "B" calculation
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>X</mi><mo>′</mo></msup><msup><mi>B</mi><mrow><mo>-</mo><mi>β</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>(this calculation has the advantage that fewer on-line exponential operations are required, essentially only one exponential operation has to be performed on-line, where B
-βCan be calculated in advance; the disadvantage is that B
-βReveal the user's password), or
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>(this calculation is suitable for the user "B" to calculate in advance
In which case
<math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Can be calculated in advance; has the advantages that
Without revealing the userA password; recommending the use of such a calculation), or
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><mi>b</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>c</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>(this calculation is suitable for the user "B" to calculate B in advance
-bβCase of (a) or
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>Where c ═ H (X ', pub) or H (X', B, pub), e ═ 1 or H (pub), t ═ 1, or H (pub), t
i1 or
I is more than or equal to 1 and less than or equal to 2; c depends on X ', e does not depend on X'; all calculations for user "A" can be performed in advance and are performed at { β, X', K
ADeleting x after the calculation is finished, and w, beta, B
βOr immediately deleted or stored in a secure location; in particular, if β ═ w or β ═ H
w(W), user "A" may calculate B in advance
-1With accelerated calculation, when-beta is exactly w or H
w(W) (in this case, user "B" may not calculate B in advance
-1) (ii) a If β ═ w or β ═ H
w(W), user "B" may calculate B in advance
-1. User "B" can be calculated in advanceAnd store B
-1、
<math><mrow><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>If the calculation of beta does not involve X ' user ' B ', it can also be calculated in advance
<math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>And/or B
-bβE.g. G'; user 'B' will
Or B
-bβOr
Or
Or
<math><mrow><mo>{</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><mo>,</mo><msup><mi>B</mi><mrow><mo>-</mo><mi>bβ</mi></mrow></msup><mo>,</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>,</mo><msup><mi>B</mi><mi>bβ</mi></msup><mo>,</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>,</mo><msup><mi>B</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><mo>}</mo></mrow></math>Is stored in the database entry corresponding to user "a", encrypted if necessary, rather than storing the password w or β directly, when K is present
BIs calculated as
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Or
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><mi>b</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>c</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>If user 'B' does not calculate in advance
<math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Or B
-bβE.g. G ', user ' B ' will
Securely stored in the database entry corresponding to user "A", if necessary
Encrypted for storage, at this time K
BIs calculated as
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>X</mi><mo>′</mo></msup><msup><mi>B</mi><mrow><mo>-</mo><mi>β</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>.</mo></mrow></math>tiI is more than or equal to 1 and less than or equal to 2, and the key is as follows: for password-based implementations, if the user "B" checks that X' ∈ G and A ∈ G are confirmed, let t1=t21. If the decryptor only checks to confirm that A ∈ G, X '∈ G' or X '∈ G'/1GIf X' is not in the range of G, let t1=1,User "B" check confirmation <math><mrow><msup><mrow><mo>(</mo><msup><mi>X</mi><mo>′</mo></msup><msup><mi>B</mi><mrow><mo>-</mo><mi>β</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>(is suitable for <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>X</mi><mo>′</mo></msup><msup><mi>B</mi><mrow><mo>-</mo><mi>β</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>In a calculation manner) or <math><mrow><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>(is suitable for <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Is recommended for such inspection) or/and <math><mrow><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub><mo>,</mo></mrow></math>or <math><mrow><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><mi>b</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>c</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>(is suitable for <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><mi>b</mi></mrow></msup><mo>)</mo></mrow><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>c</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>In a calculation manner) or <math><mrow><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>(is suitable for <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>In a calculation manner) or <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>≠</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>eb</mi></mrow></msup></mrow></math>(applicable to the above various KBManner of calculation), or <math><mrow><msup><mrow><mo>(</mo><msup><mi>X</mi><mo>′</mo></msup><msup><mi>B</mi><mrow><mo>-</mo><mi>β</mi></mrow></msup><mo>)</mo></mrow><msub><mi>t</mi><mn>2</mn></msub></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub><mo>.</mo></mrow></math>If any check fails, user "B" then aborts the protocol run, returning or not returning an error message.
There are two ways to generate the session key and the authentication key:
(1) session key and authentication key are directly composed of KA=KBAnd some subset of { c, e, X', pub } is derived using a key derivation function, thisThe time user "B" checks X' ∈ G.
(2) Or else, the DH-key component X ═ g in the public key encryption algorithm based on Diffie-Hellman or ElGamalxIs changed to X' ═ gxBβE.g. G'. The common Diffile-Hellman secret really used by the encryptor and the decryptor is composed of { X', KA=KBDerivation, i.e. KDF (K)A,X′)=KDF(KBX '), or from { X', KA=KBDerived from aux, aux is { I }A,IB,sid,rA,rBPub, can be empty. Is recorded by { X', KA=KBOr by { X', K }A=KBThe secret derived from (k) and aux is1,k2) (ii) a In general, k is1Is a key for symmetric encryption and decryption, k2Is a MAC authentication key. User 'A' sends the public key certificate or identity information I of user 'A' at the same time of sending cipher text C or before sending cipher textAThereby obtaining a password-based secret signature algorithm with the sender identity authentication function. Encrypting a random number R by using the obtained password-based signcryption algorithm; the secret label of the random number R is marked as C, and the secret label C is a set of a plurality of numerical values. If the user 'B' has a decryption error, the execution is stopped, and error information is returned or not returned. The session key and the authentication key are composed of random numbers R and k1,k2C, pub } or directly setting the session key and/or the authentication key to R; let the derived authentication key be R'. We assume that user "a" is only allowed to make mistakes a limited number of times to prevent online guessing attacks.
If user "a" does not have a password registered at user "B", user "a" calculates and sends DH-key component X ═ g
xE is G; at this time, the core and the characteristic of the implementation method-2 are to construct two functions K
AAnd K
BSo that K
A(a,x,B,pub)=K
B(b, A, X, pub). The specific method comprises the following steps: user "A" calculation
<math><mrow><msub><mi>K</mi><mi>A</mi></msub><mo>=</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>ae</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>xc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>User "B" calculation
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>Where c ═ H (X, pub) or H (X, B, pub), e ═ 1 or H (pub), t ═ 1, or H (pub), t
i1 or
I is more than or equal to 1 and less than or equal to 2; the calculation of c depends on X, and the calculation of e does not depend on X. All calculations for user "A" can be performed in advance; user "B" can be calculated in advance
<math><mrow><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>.</mo></mrow></math>There are two ways to generate the session key and the authentication key:
(1) session key and authentication key are directly composed of KA=KBAnd some subset of { c, e, X, pub } is derived using a key derivation function, when user "B" checks X' e G.
(2) Alternatively, the common Diffile-Hellman secret that is really used by the encryptor and the decryptor in a Diffie-Hellman or ElGamal-based public key encryption algorithm is composed of { X, KA=KBDerivation, i.e. KDF (K)A,X)=KDF(KBX) or from { X, K)A=KBDerived from aux, aux is { I }A,KB,sid,rA,rBPub, can be empty. Notation of { X, KA=KBOr by { X, K }A=KBThe secret derived from (k) and aux is1,k2) (ii) a In general, k is1Is a key for symmetric encryption and decryption, k2Is a MAC authentication key. User 'A' sends the public key certificate or identity information I of user 'A' at the same time of sending cipher text or before sending cipher textAThus, a password-based secret signature algorithm with the sender identity authentication function is obtained: . Encrypting a random number R by using the obtained password-based signcryption algorithm; the secret label of the random number R is marked as C, and the secret label C is a set of a plurality of numerical values. If the user 'B' has a decryption error, the execution is stopped, and error information is returned or not returned. The session key and the authentication key are composed of random numbers R and k1,k2C, pub } or directly setting the session key and/or the authentication key to R; let the derived authentication key be R'.
tiI is more than or equal to 1 and less than or equal to 2, and the key is as follows: for non-password based implementations, if the user "B" checks that X ∈ G and A ∈ G are confirmed, let t1=t21 is ═ 1; if the decryptor only checks for confirmations A ∈ G, X ∈ G 'or X ∈ G'/1GIf X ∈ G cannot be confirmed, let t1=1,User "B" check confirmation <math><mrow><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>OrIf any check fails, user "B" then aborts the protocol run, returning or not returning an error message.
Memory and exportIn order to prove to user "A" that it knows R', user "B" utilizes a tag authentication function FTCalculate and send tB=FT(R′,auxB) (ii) a Wherein aux is implemented for password-based implementationBIs { IB,sid,rBX', pub } for non-password based implementations auxBIs { IB,sid,rBX, pub } is a subset of the session identifier, sid, rBIs the protocol role designation of user "B"; user "A" checks t with the authentication key RBIf the correctness is incorrect, the protocol execution is stopped, and error information is returned or not returned;
user "a" proves to user "B" that he does know R' using the following method: user "A" sends X' or X at the same time or receives tBAnd verify tBAfter correctness, t is calculated and sent to user "BA=FT(R′,auxA) Wherein auxAIs { IA,sid,rAX', pub } or { IA,sid,rAA subset of X, pub } and auxA≠auxB,rAIs the protocol role designation for user "a". If the authentication key is derived from the random number R of the signpost and the signpost C already contains a tag tE=MACk(E) Or in general tE=FT(k, E), wherein E is an element of C or t is divided by CEA subset of other elements than R, then user "A" can prove to user "B" that it knows R' more efficiently as follows: user "A" does not send tA=FT(R′,auxA) Instead, t in the secret tag C isEIs replaced byOr in general tA=FT(KR,{E,auxA}) in which auxAIs { IA,sid,rAX', pub } or { IA,sid,rAA subset of X, pub } and auxA≠auxB;KRIs derived from or directly set to R 'of (k, R', aux) or (k, R, aux), where aux is { I }A,IB,sid,rA,rBX', pub } or { IA,IB,sid,rA,rBA subset of X, pub } may be empty; namely: kRKDF ({ K, R' }, aux) or KRKDF ({ K, R }, aux) or KRR'; in general, KRH (k, R), or <math><mrow><msub><mi>K</mi><mi>R</mi></msub><mo>=</mo><mi>k</mi><mo>⊕</mo><mi>R</mi><mo>,</mo></mrow></math>Or <math><mrow><msub><mi>K</mi><mi>R</mi></msub><mo>=</mo><mi>H</mi><mrow><mo>(</mo><mi>k</mi><mo>⊕</mo><mi>R</mi><mo>)</mo></mrow><mo>,</mo></mrow></math>Or KRR', wherein KRThe length of (d) is taken to be the same as k; user "B" checks tAIf the correctness is incorrect, the protocol execution is stopped, and error information is returned or not returned;
the implementation method-3: implementation-3 is applicable to the case where client "a" does not have or does not have the convenience of using a public key, but user "a" still sends DH-key component X ═ gxAnd user 'B' has public key B ═ gbAnd sends DH-key component Y ═ gyThe situation (2).
The core and the characteristic of the implementation method-3 are that two functions K are constructed
AAnd K
BSo that K
A(x,B,Y,pub)=K
B(b, y, X, pub); the specific method comprises the following steps: user "A" calculation
<math><mrow><msub><mi>K</mi><mi>A</mi></msub><mo>=</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>xc</mi></mrow></msup><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>xf</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>User "B" calculation
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>bc</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>yf</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>Where c ═ H (X, pub) or H (X, B, pub), f ═ H (pub, X, Y) or f ═ H (pub, B, X, Y) or H (c, Y), t
i1 or
I is more than or equal to 1 and less than or equal to 2; note that the calculation of c depends on X but not on Y, the calculation of f depends on both X and Y; user "A" may be calculated in advance
tiI is more than or equal to 1 and less than or equal to 2, and the key is as follows: (1) let t be if user "B" checks that X ∈ G is confirmed1=t21. (2) If user "B" only checks for confirmation X ∈ G 'or X ∈ G'/1GBut X ∈ G cannot be confirmed, and if y is likely to leak (or the user "B" worries that y is likely to leak)), letUser "B" check confirmation <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>X</mi><mrow><mi>t</mi><mrow><mo>(</mo><mi>bc</mi><mo>+</mo><mi>yf</mi><mo>)</mo></mrow></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub><mo>,</mo></mrow></math>If y does not leak (i.e., is sufficiently secure, or user "B" confirms that y does not leak), then t is the same as (1)1,t2Can still be1. If any check fails, the protocol is aborted and an error message is returned or not.
Deriving a function from K using a secret keyA=KBAnd a subset of { f, c, X, Y, pub } derives a session key and an authentication key; let the derived authentication key be R ', in order to prove to user "A" that it knows R', user "B" utilizes a tag authentication function FTCalculate and send tB=FT(R′,auxB) Wherein auxBIs { IB,sid,rBX, Y, pub } is a subset of the session identifier, sid, rBIs the protocol role designation for user "B". User "A" checks t with the authentication key RBAnd if the correctness is not correct, the protocol execution is stopped, and error information is returned or not returned. To prove to user "B" that he does know R', user "A" is receiving tBAnd verifies the confirmation tBAfter correctness, t is calculated and sent to user "BA=FT(R′,auxA) Wherein auxAIs { IA,sid,rAA subset of X, Y, pub } and auxA≠auxB,rAIs the protocol role designation for user "a"; user "B" checks t with the authentication key RAAnd if the correctness is not correct, the protocol execution is stopped, and error information is returned or not returned.
In a specific implementation, it is proposed to implement method-3 in combination with variant (1) of claim 6.
The implementation method-4: the implementation method-4 is suitable for the client 'A' to have a discrete logarithm public key A ═ gaAnd sends DH-key component X ═ gxAnd user 'B' also has discrete logarithm public key B ═ gbAnd sends DH-key component Y ═ gyThe situation (2).
The core and the characteristic of the implementation method-4 are that two functions K are constructed
AAnd K
BSo that K
A(a,x,B,Y,pub)=K
B(b, y, A, X, pub). The specific method comprises the following steps: user "A" calculation
<math><mrow><msub><mi>K</mi><mi>A</mi></msub><mo>=</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>ae</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>xc</mi></mrow></msup><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>ad</mi><mo>+</mo><msub><mi>t</mi><mn>4</mn></msub><mi>xf</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>User "B" calculation
<math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi><mo>+</mo><msub><mi>t</mi><mn>3</mn></msub><mi>yd</mi></mrow></msup><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi><mo>+</mo><msub><mi>t</mi><mn>4</mn></msub><mi>yf</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>Where c ═ H (X, pub) or H (X, B, pub), d ═ H (pub, Y) or H (pub, a, Y) e ═ 0 or 1 or H (pub), f ═ H (pub, X, Y) or H (c, d), t (c, Y
i1 or
I is more than or equal to 1 and less than or equal to 4. c. The key points of the setting of d, e and f are as follows: c depends on X but not on Y, d depends on Y but not on X, e depends on neither X nor Y, f depends on (X, Y). User "A" may be calculated in advance
<math><mrow><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>ae</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>xc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>User "B" can be calculated in advance
<math><mrow><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi><mo>+</mo><msub><mi>t</mi><mn>3</mn></msub><mi>yd</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>;</mo></mrow></math>tiI is more than or equal to 1 and less than or equal to 4, and the key of the setting is as follows: (1) if the user 'A' checks that B belongs to G and Y belongs to G, the user 'B' checks that A belongs to G and X belongs to G, let t belong to G1=t2=t3=t41 is ═ 1; (2) if user "A" only checks for confirmations B ∈ G, X ∈ G 'or X ∈ G'/1GWhile X ∈ G cannot be confirmed, user "B" merely checks to confirm A ∈ G, Y ∈ G 'or Y ∈ G'/1GAnd cannot confirm Y ∈ G, and user "A" worrys about x and/or user "B" worrys about Y may leak, let t1=1,User "B" check confirmation <math><mrow><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>bc</mi><mo>+</mo><msub><mi>t</mi><mn>4</mn></msub><mi>yf</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>Or <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>≠</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>be</mi><mo>+</mo><msub><mi>t</mi><mn>3</mn></msub><mi>yd</mi></mrow></msup><mo>,</mo></mrow></math>User "A" check confirmation <math><mrow><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>ad</mi><mo>+</mo><msub><mi>t</mi><mn>4</mn></msub><mi>xf</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>Or <math><mrow><msub><mi>K</mi><mi>A</mi></msub><mo>≠</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>ae</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>xc</mi></mrow></msup><mo>;</mo></mrow></math>If x and y are not leaked, t can be set in the same way as (1)1=t2=t3=t41. If any check fails, the protocol is aborted and an error message is returned or not.
Deriving a function from K using a secret keyA=KBAnd a subset of { f, c, d, e, X, Y, pub } derives a session key and an authentication key; in general, the session key k is generated as follows1And an authentication key k2In which H isKIs a hash function: (1) (k)1,k2)←HK(KA,f,1)HK(KA,f,2)…HK(KA,f,i)=HK(KB,f,1)HK(KB,f,2)…HK(KBF, i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of length, i.e. up to HK(KA,f,1)HK(KA,f,2)…HK(KAF, i) is not less than (k)1,k2) Length of (d). Is provided with (k)1,k2) Of length l, we can take HK(KA,f,1)HK(KA,f,2)…HK(KAF, i) is a prefix or suffix of length l. (2) K. k1←HK(KA,f,1)HK(KA,f,2)…HK(KA,f,i)=HK(KB,f,1)HK(KB,f,2)…HK(KB,f,i);k2←HK(f,KA,1)HK(f,KA,2)…HK(f,KA,i)=HK(f,KB,1)HK(f,KB,2)…HK(f,KBJ). Let k1Has a length of l1,k2Has a length of l2Then, the value of the counter i is taken until the output length of the hash function sequence is greater than or equal to l1The value of the counter j is equal to or larger than l until the output length of the hash function sequence is larger than or equal to l2。
Let the derived authentication key be R' ═ k2To prove to user "A" that it knows R', user "B" utilizes a tag authentication function FTCalculate and send tB=FT(R′,auxB) Wherein auxBIs { IB,sid,rBX, Y, pub } is a subset of the session identifier, sid, rBIs the protocol role designation of user "B"; user "A" checks t with the authentication key RBAnd if the correctness is not correct, the protocol execution is stopped, and error information is returned or not returned. To prove to user "B" that he does know R', user "A" is receiving tBAnd verify tBAfter correctness, t is calculated and sent to user "BA=FT(R′,auxA) Wherein auxAIs { IA,sid,rAA subset of X, Y, pub } and auxA≠auxB,rAIs the protocol role designation for user "a"; user "B" checks t with the authentication key RAAnd if the correctness is not correct, the protocol execution is stopped, and error information is returned or not returned.
The implementation method comprises the following steps: implementation-5 applies to the case where one, but not all, of client "A" and client "B" may not have a discrete logarithmic public key defined on (G', G, G, q), but still supports digital signatures.
Let t
i1 or
I is more than or equal to 1 and less than or equal to 6; let aux
Aj,aux′
Aj,aux
Bi,aux′
BiJ is more than or equal to 1 and less than or equal to 7, i is more than or equal to 1 and less than or equal to 9, and is divided by X and g respectively
x,Y=g
yA subset or sequence of other information related to protocol execution, other than that, may be empty or contain repeating elements. aux
AAnd aux'
AIsI
A,sid,r
AA subset of X, Y, pub }, aux
BAnd aux'
BIs { I
B,sid,r
BA subset of X, Y, pub } and aux
A≠aux
BWhere sid is the session identifier, r
BIs the protocol role designation of user "B", r
AIs the protocol role designation for user "a". Order to
<math><mrow><mi>U</mi><mo>⊆</mo><mrow><mo>{</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>}</mo></mrow><mo>.</mo></mrow></math>A first round: user 'A' transmission <math><mrow><mrow><mo>{</mo><mi>X</mi><mo>=</mo><msup><mi>g</mi><mi>x</mi></msup><mo>∈</mo><mi>G</mi><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mn>1</mn></msubsup><mo>}</mo></mrow><mo>.</mo></mrow></math>
And a second round: user 'B' transmission <math><mrow><mrow><mo>{</mo><mi>Y</mi><mo>=</mo><msup><mi>g</mi><mi>y</mi></msup><mo>∈</mo><mi>G</mi><mo>,</mo><msub><mi>T</mi><mn>1</mn></msub><mo>=</mo><mi>H</mi><mrow><mo>(</mo><mi>Y</mi><mo>,</mo><mi>X</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mn>1</mn></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mn>2</mn></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mn>3</mn></msubsup><mo>}</mo></mrow><mo>,</mo></mrow></math>OrOr { Y, FT(T′1,auxB),auxB3} or { Y, aux'B3}. Wherein, <math><mrow><msubsup><mi>T</mi><mn>1</mn><mo>′</mo></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>1</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>2</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>2</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>(where U may be null), auxB3Containing identity information I of user' BB,auxB2And/or auxB1Containing identity information I of user' BB(auxB2And/or auxB1May contain only identity information I of user' BB)。
User 'A' utilization <math><mrow><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>x</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>y</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Examination T1Or FT(T′1,auxB) The correctness of the test; namely: calculate and checkOrOr calculate <math><mrow><msubsup><mi>T</mi><mn>1</mn><mo>′</mo></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>X</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>1</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>2</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>1</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>2</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>And check FT(T′1,auxB) Is/are as followsAnd (4) correctness. If any check is incorrect, user "A" terminates the run, with or without returning an error message.
And a third round: if user "a" has public key a ═ gaE.g. G, then user 'A' sendsOrOr { FT(T′2,auxA),auxA5}. Wherein, <math><mrow><msubsup><mi>T</mi><mn>2</mn><mo>′</mo></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>Y</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>a</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>2</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>3</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>4</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>a</mi></mrow></msup><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>(where U may be null), auxA5Public key certificate or I containing user' AA,auxA2,auxA6Identity information I containing user' AA(auxA2,auxA6May contain only the identity information I of the user "AA) (ii) a User 'B' utilization <math><mrow><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>y</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>a</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>And <math><mrow><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>y</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>X</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>to check T2Or FT(T′2,auxA) The correctness of (1), namely: calculate and checkOrOr calculate <math><mrow><msubsup><mi>T</mi><mn>2</mn><mo>′</mo></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>Y</mi><mo>,</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>2</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>3</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>4</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>A</mi><mrow><msub><mi>t</mi><mn>2</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>And check FT(T′2,auxA) The correctness of the operation. If any check is incorrect, user "B" terminates the run, with or without returning an error message.
If user "a" does not have public key a ═ gaE G but still supports digital signatures, user "a" sends sA,auxA7Therein auxA7Public key certificate or I containing user' AA,sAUse of its own private key pair for user "AOr H (F)T(TSA,auxA),aux′A) Is determined by the digital signature of (a) a digital signature, <math><mrow><msubsup><mi>T</mi><mi>S</mi><mi>A</mi></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>3</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>4</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>(where U may be null); user 'B' utilization <math><mrow><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>y</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>x</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Checks s with the public key of user "AAThe correctness of (1), namely: computingAnd checks s with the public key of user "AAThe correctness of the test; or, calculate <math><mrow><msubsup><mi>T</mi><mi>S</mi><mi>A</mi></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>3</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>4</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>3</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>A</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>And H (F)T(TSA,auxA),aux′A) And checks s with the public key of user "AAThe correctness of the operation. If any check is incorrect, user "B" terminates the run, with or without returning an error message.
Fourth wheel: if user 'B' has public key B ═ gbE.g. G, then user 'B' sendsOrOr { FT(T′3,auxB),auxB7}; wherein, <math><mrow><msubsup><mi>T</mi><mn>3</mn><mo>′</mo></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>4</mn></msub><mi>b</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>4</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>5</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mrow><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>4</mn></msub><mi>b</mi></mrow></msup><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>8</mn></mrow></msubsup></mrow><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>(where U may be null), auxB7Public key certificate or I containing user' BB,auxB4,auxB8Identity information I containing user' BB(auxB4,auxB8May contain only identity information I of user' BB) (ii) a User 'A' utilization <math><mrow><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>4</mn></msub><mi>x</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>4</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>And <math><mrow><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>x</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>y</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>to check T3Or FT(T′3,auxB) The correctness of (1), namely: calculate and checkOrOr calculate <math><mrow><msubsup><mi>T</mi><mn>3</mn><mo>′</mo></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>4</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>4</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>5</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mrow><msup><mi>B</mi><mrow><msub><mi>t</mi><mn>4</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>8</mn></mrow></msubsup></mrow><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>And check FT(T′3,auxB) The correctness of the operation. If any check is incorrect, user "A" terminates the run, with or without returning an error message.
If user 'B' does not have public key B ═ g
bE G but still supports digital signatures, user 'B' sends s
B,aux
B9Therein aux
B9Public key certificate or I containing user' B
B,s
BUse of its own private key pair for user' B
Or H (F)
T(T
SB,aux
B),aux′
B) Is determined by the digital signature of (a) a digital signature,
<math><mrow><msubsup><mi>T</mi><mi>S</mi><mi>B</mi></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>5</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>y</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>8</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>(where U may be null); user 'A' utilization
<math><mrow><msup><mi>T</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>x</mi></mrow></msup><mrow><mo>(</mo><mo>=</mo><msup><mi>X</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>y</mi></mrow></msup><mo>)</mo></mrow><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>Checks s with the public key of user' B
BThe correctness of (1), namely: computing
And checks s with the public key of user' B
BThe correctness of the test; or, calculate
<math><mrow><msubsup><mi>T</mi><mi>S</mi><mi>B</mi></msubsup><mo>∈</mo><mrow><mo>{</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>5</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>6</mn></mrow></msubsup><mo>)</mo></mrow><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>U</mi><mo>,</mo><msup><mi>Y</mi><mrow><msub><mi>t</mi><mn>5</mn></msub><mi>x</mi></mrow></msup><mo>,</mo><msubsup><mi>aux</mi><mi>B</mi><mrow><mo>′</mo><mn>8</mn></mrow></msubsup><mo>)</mo></mrow><mo>}</mo></mrow></mrow></math>And H (F)
T(T
SB,aux
B),aux′
B) And checks s with the public key of user' B
BThe correctness of the operation. If any check is incorrect, user "A" terminates the run, with or without returning an error message.
Session key management
And { X, Y, pub }, where user "A" calculates K
AUser "B" calculates K
B. The user "a" may calculate X ═ g in advance
x,
Or
The user "B" may calculate Y ═ g in advance
y,
Or
If user "A" is calculated in advance
Will be calculated after finishing the calculation
Delete, and save
If user "B"Is calculated in advance
Will be calculated after finishing the calculation
Delete, and save
t
iI is more than or equal to 1 and less than or equal to 6, and the key is as follows: order to
If the user 'B' checks that X belongs to G, let t
1=t
4=t
51 is ═ 1; if the user 'A' checks that Y belongs to G, let t
2=t
31. If user "B" only checks for confirmation that X ∈ G 'or X ∈ G'/1
GIf X ∈ G cannot be confirmed and no signature is used for the fourth round, t
1,t
3,t
4,t
5At least one of them is
And checking and confirming X once
hy≠1
GAnd/or X
hb≠1
G(i.e., first computing X during protocol execution
hy≠1
GOr X
hb≠1
GChecking at that time, and not checking once confirmed); if the user "A" only checks for confirmation Y ∈ G 'or Y ∈ G'/1
GAnd if Y ∈ G cannot be confirmed and no signature is used in the third round, then t
1,t
2,t
3,t
5At least one of them is
And checking and confirming Y at a time
hx≠1
GAnd/or Y
ha≠1
G. If user "A" uses the signature for the third round, user "A" can only check for confirmations Y ∈ G 'or Y ∈ G'/1
GAnd can make t
31 is ═ 1; if user "B" uses the signature for the fourth round, user "B" can only check for confirmation X ∈ G 'or X ∈ G'/1
GAnd can make t
1=t
51. If any check fails, the protocol execution is aborted, with or without an error message being returned. Generally, let t
1=t
3=t
5=t
6. Note that: when in use
And when no user uses the signature, the check implemented above not only ensures that the DH-key components are not in the small subgroup, but also does not reveal the parity of the discrete logarithm of each user's own DH-key component (but still does not ensure that the opposite party does know the discrete logarithm of the DH-key component it sent).
The public key registration and public key certificate issuing method comprises the following steps:
the following public key registration and public key certificate issuance methods can be applied to simplify the computation of the above implementation method.
(1) The public key certificate authority CA checks to confirm that the public key registered by the user is an element in G or G/1 when issuing a certificate to the userGMiddle element; if any check fails, the certificate authority refuses to issue the public key certificate; thus, each user can confirm that the public key of the opposite party is G or G/1 only by checking the public key certificate of the opposite party userGOf (1). It is proposed to employ (1) in all implementations.
(2) When a user registers user identity information ID and a public key PK to a public key certificate authority, belonging to G', the user submits an inverse element PK of the public key at the same time-1E.g. G'; that is, in addition to ID and PK ∈ G', the public key certificate application also includes PK-1E.g. G'. It is recommended to adopt (2) in the implementation method-1 and the password-based implementation method-2.
(3) Use ofWhen a user registers user identity information and a public key to a public key certificate authority, submitting the identity information, the public key and a hash value of aux at the same time; or the identity information, the public key inverse element and the hash value of the aux; providing or not providing a digital signature of the resulting hash value and/or aux using a private key corresponding to the public registration key; aux is other information of the protocol, and generally includes a subset of a timestamp (i.e., the date and time of the public key registration application), a session identifier (where the session identifier may be a random number sent by the CA to the user, or a concatenation of two random numbers exchanged by the CA and the registered user), and so on. aux may take a null value; note that the resulting hash value is tPKThe digital signature of a possible user is sPK(ii) a That is, the public key certificate application includes both aux and t in addition to the user's identity information, public key, and/or public key inversePKBut with or without sPK。
(4) If the public key issuing authority checks for tPKOr sPKIf the certificate is wrong, refusing to issue the certificate; when issuing a certificate to a user, a public key certificate issuing authority issues identity information, a public key and/or an inverse element, aux and a hash value t of the public key certificate to the userPKAndor do not have sPKCarrying out digital signature; alternatively, CA only pairs hash values tPKCarrying out digital signature; rather than merely signing the user's identity information and public key; namely: a legitimate public key certificate must also contain the digital signature of the certificate authority.
Thus, the hash function or key derivation function input or pub contains (I)AA) or A can be replaced by a hash value in the public key certificate of the user 'A', and the hash value is recorded as tAPK(ii) a (I) contained in the hash function or key derivation function input or pubBB) or B can be replaced by a hash value in a public key certificate of a user 'B' and is marked as tBPK. And, if the public key certificate contains the inverse of the user's public key, then in the implementation method-1 and implementation method-2 of claim 1, the users "a" and "B" do not need to calculate B in advance-1∈G′。
Detailed Description
Having identity IAThe public key of the user "a" is a ═ gaAnd having a certificate CERTAHaving identity IBThe public key of the user "B" is B ═ gbAnd having a certificate CERTB. The certificate authority CA checks the confirmation A e G/1 before issuing the certificateGAnd B ∈ G/1G. We assume that user "a" is the protocol operation initiator (initiator), i.e.: first, DH-key component X is sent as gxE is G; "B" is a protocol operation responder (responder), i.e. after receiving X, it sends DH-key component X ═ gyE.g. G. Wherein a, x, b, y are from ZqThe selection is carried out randomly.
In the protocol implementation described below, the message authentication code MAC employs an HMAC authentication code as described in Internet opinion solicitation document No. 2104 (Internet RFC 2104) published by ietf (Internet Engineering task force). The HMAC only needs to do two hash operations and is proven to be both a message authentication code and a pseudorandom function. In protocol implementation, HMAC and the Hash function H, HKImplemented by the SHA-1 hahsi function. Symmetric encryption employs the AES algorithm specified by the NIST (national institute of standards and technology) standard.
Implementation of the method-1 according to claim 1 is based on the specific embodiment:
password registration: user "B" may calculate and store B in advance-1. When user "A" registers password w with user "B", user "B" calculates H (w, I)A,IB) And let beta be H (w, I)A,IB) Is a 32-bit prefix. User "B" calculates B-tbβE G' and BtbβE.g. G', deleting beta and adding B-tbβAnd/or BtbβStored in the database in the entry corresponding to user "a".
And (4) role marking: let the user 'A' and 'B' parameter negotiation stage exchange two random numbers RAAnd RB(and the public key certificate of user "B"), i.e.: user "A" sends RAUser "B" sends RB. Let the role of user "A" be labeled: r isA=RA‖RB(ii) a The role of user "B" is denoted as rB=RB‖RA(ii) a Where "|" is the string concatenation operator. RAMay be included in the following information that user "a" transmits the ciphertext.
We present specific embodiments of the ECIES public key encryption algorithm specified in standardized documents based on ANSI X9.63, ISO/IEC 15946-3, and IEEE P1363 a. The specific implementation mode is similar based on other Diffie-Hellman public key encryption algorithms, such as the PSEC public key encryption algorithm specified by the ISO18033-2 standardized draft.
Order toUser "A" is calculated as follows: (1) calculate X ═ gxBβE is G; (2) calculate KA=BtxE.g. G, if KA=1GRepeating (1) and (2) until KA≠1G(ii) a (3) Computing a Diffie-Hellman secret k1And k is2:(k1,k2)←H(KA,X′,1)HK(KA,X′,2)…HK(KAX', i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of up to H (K)A,X′,1)HK(KA,X′,2)…HK(KAThe length of X', i) is not less than (k)1,k2) Length of (d). Is provided with (k)1,k2) Of length l, we can take H (K)A,X′,1)HK(KA,X′,2)…HK(KAAnd X', i) is a prefix of length l. (4) The user 'A' randomly selects a random number R and calculatesCalculating H (k)2R) and let KRIs taken as H (k)2Of R) and k2Prefixes of the same length, calculatingFinally, user "A" sends { IA,X′,E,tATo server "B", where C ═ X', E, tAIt is called password-based public key encryption ciphertext.
Receive { IA,X′,E,tAAfter this, user "B" is calculated as follows: (1) check to confirm X 'is ∈ G'/1GIf, in error (i.e.: <math><mrow><msup><mi>X</mi><mo>′</mo></msup><mo>∉</mo><msup><mi>G</mi><mo>′</mo></msup><mo>/</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>) Stopping running and returning error information; (2) calculating X'tbBelongs to G ', and is checked for X'tb≠Btbβ(wherein BtbβCalculated in advance and stored in the database), if it is wrong (i.e. X'tb=Btbβ): stopping running and returning error information; (3) calculate KB=X′tbB-tbβE G' (where B is-tbβCalculated in advance and stored in a database); (4) computing a Diffie-Hellman secret k1And k is2: the method is the same as the step (3) of the user 'A', only K in the input of the hash function is usedAIs changed to KB(ii) a (5) By k1Decrypting the E to obtain R; (6) by k2And R calculates KR(method as same as user "A"), checking and confirmingIf it is wrong (i.e. the <math><mrow><msub><mi>t</mi><mi>A</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>K</mi><mi>R</mi></msub></msub><mrow><mo>(</mo><mi>E</mi><mo>,</mo><msub><mi>I</mi><mi>A</mi></msub><mo>,</mo><msub><mi>r</mi><mi>A</mi></msub><mo>)</mo></mrow></mrow></math>) Stopping running and returning error information; (7) setting session key directly to KRCalculate and sendAnd sets the session key to R. (user's "B" public key certificate may also be sent at this step.)
Receives tBThereafter, user "A" checks for confirmationIf it is wrong (i.e. the <math><mrow><msub><mi>t</mi><mi>B</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>K</mi><mi>R</mi></msub></msub><mrow><mo>(</mo><msub><mi>I</mi><mi>B</mi></msub><mo>,</mo><msub><mi>r</mi><mi>B</mi></msub><mo>)</mo></mrow></mrow></math>) Stopping running and returning error information; the session key is set to R.
The password-based implementation of the method-2 of claim 1 is based on the specific implementation:
we present a password-based embodiment, a non-password-based embodiment being a simplified version of the password-based embodiment, of the implementation method-2 of claim 1.
Password registration: user "B" may calculate and store B in advance
-1. When user "A" registers password w with user "B", user "B" calculates H (w, I)
A,I
B) And let beta be H (w, I)
A,I
B) Is a 32-bit prefix. User "B" calculation
<math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><mo>∈</mo><mi>G</mi></mrow></math>And A
bE is G; delete beta and remove
And A
bStored in the database in the entry corresponding to user "A" (if necessary in pairs
In particular A
bAnd encrypted storage is performed).
And (4) role marking: user role rAAnd rBThe marking method is the same as the specific implementation mode of the implementation method-1. (We assume that both parties of the protocol have exchanged and verified respective public key certificates.) the random number R sent by user "A"AAnd user "a" may also be included in the first round of information sent by user "a" in the protocol embodiments below.
We present specific embodiments of the ECIES public key encryption algorithm specified in standardized documents based on ANSI X9.63, ISO/IEC 15946-3, and IEEE P1363 a. The specific implementation mode is similar based on other Diffie-Hellman public key encryption algorithms, such as the PSEC public key encryption algorithm specified by the ISO18033-2 standardized draft.
Order toUser "A" is calculated as follows: (1) calculate X ═ gxBβE is G; (2) calculating <math><mrow><msub><mi>K</mi><mi>A</mi></msub><mo>=</mo><msup><mi>B</mi><mrow><mi>a</mi><mo>+</mo><msub><mi>t</mi><mn>2</mn></msub><mi>xc</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>If KA=1GRepeating (1) and (2) until KA≠1G(ii) a (3) Computing a Diffie-Hellman secret k1And k is2:(k1,k2)←H(KA,X′,1)HK(KA,X′,2)…HK(KAX', i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of up to H (K)A,X′,1)HK(KA,X′,2)…HK(KAThe length of X', i) is not less than (k)1,k2) Length of (d). Is provided with (k)1,k2) Of length l, we can take H (K)A,X′,1)HK(KA,X′,2)…HK(KAAnd X', i) is a prefix of length l. (4) The user 'A' randomly selects a random number R and calculatesCalculating H (k)2R) and let KRIs taken as H (k)2Of R) and k2Prefixes of the same length, calculatingFinally, user "A" sendsIA,X′,E,tATo server "B", where C ═ X', E, tAIt is called password-based public key encryption ciphertext. (the public key certificate for user "A" may be sent at this step.)
Receive { IA,X′,E,tAAfter this, user "B" is calculated as follows: (1) check to confirm X 'is ∈ G'/1GIf, in error (i.e.: <math><mrow><msup><mi>X</mi><mo>′</mo></msup><mo>∉</mo><msup><mi>G</mi><mo>′</mo></msup><mo>/</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>) Stopping running and returning error information; (2) calculating <math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup></mrow></math>(whereinCalculated in advance and stored in a database) and checked <math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>≠</mo><msub><mn>1</mn><mi>G</mi></msub><mo>;</mo></mrow></math>If it is wrong (i.e. the <math><mrow><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>=</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>) If yes, stopping running and returning error information; (3) calculating <math><mrow><msub><mi>K</mi><mi>B</mi></msub><mo>=</mo><msup><mi>A</mi><mi>b</mi></msup><msup><mrow><mo>(</mo><msup><mi>B</mi><mrow><mo>-</mo><msub><mi>t</mi><mn>2</mn></msub><mi>bβ</mi></mrow></msup><msup><mi>X</mi><mrow><mo>′</mo><msub><mi>t</mi><mn>2</mn></msub><mi>b</mi></mrow></msup><mo>)</mo></mrow><mi>c</mi></msup><mo>∈</mo><msup><mi>G</mi><mo>′</mo></msup><mo>,</mo></mrow></math>Wherein c ═ H (X', I)A,A,IB,B),AbAre calculated in advance and stored in a database. (4) Computing a Diffie-Hellman secret k1And k is2: the method is the same as the step (3) of the user 'A', only K in the input of the hash function is usedAIs changed to KB(ii) a (5) By k1Decrypting the E to obtain R; (6) by k2And R calculates KR(method as same as user "A"), checking and confirmingIf it is wrong (i.e. the <math><mrow><msub><mi>t</mi><mi>A</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>K</mi><mi>R</mi></msub></msub><mrow><mo>(</mo><mi>E</mi><mo>,</mo><msub><mi>I</mi><mi>A</mi></msub><mo>,</mo><msub><mi>r</mi><mi>A</mi></msub><mo>)</mo></mrow></mrow></math>) Stopping running and returning error information; (7) setting session key directly to KRCalculate and sendAnd sets the session key to R.
Receives tBThereafter, user "A" checks for confirmationIf it is wrong (i.e. the <math><mrow><msub><mi>t</mi><mi>B</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>K</mi><mi>R</mi></msub></msub><mrow><mo>(</mo><msub><mi>I</mi><mi>B</mi></msub><mo>,</mo><msub><mi>r</mi><mi>B</mi></msub><mo>)</mo></mrow></mrow></math>) Stopping running and returning error information; the session key is set to R.
Claim 1 implementation of a password-based embodiment of method-3:
password registration: user "B" may calculate and store B in advance-1. When user "A" registers password w with user "B", user "B" calculates H (w, I)A,IB) And let beta be H (w, I)A,IB) Is a 32-bit prefix. User "B" calculates B-βE is G; store β in the database in the entry corresponding to user "A" (if necessary for B)-βEncrypted storage is performed).
And (4) role marking: let r beA=0,rB=1。
Calculating in advance: user "a" calculates X' ═ g in advancexBβ∈G,c=H(X′,IA,IBB), andtcxmodqe G', wherein t is N/q.
In the following detailed description, elements in parentheses indicate transmitted information.
A first round: user "a" sends { X' ═gxBβE G (where x is from Z)qWhere the elements in parenthesis are the information to be sent). After receiving X ', the user ' B ' checks to confirm that X ' belongs to G '/1G(ii) a If there is an error (i.e., the <math><mrow><msup><mi>X</mi><mo>′</mo></msup><mo>∉</mo><msup><mi>G</mi><mo>′</mo></msup><mo>/</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>) If any check is unsuccessful, user "B" aborts the protocol execution; if the check is passed, user "B" calculates Y ═ gyE G (where y is from ZqWherein is randomly selected), c ═ H (X', I)A,IB,B)、f=H(c,Y),KB=(X′B-β)t(cb+fy)modqE.g. G' and delete y (where B-βCalculated in advance and stored in a database); user "B" check confirmation KB≠1GIf it is wrong (i.e. K)B=1G) User "B" then aborts the protocol execution and returns an error message. If KB≠1GUser "B" calculation (k)1,k2)←H(KB,f,1)H(KB,f,2)…H(KBF, i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of up to H (K)B,f,1)H(KB,f,2)…H(KBF, i) is not less than (k)1,k2) Length of (d); if (k)1,k2) Is l, we order (k)1,k2) Is H (K)B,f,1)H(KB,f,2)…H(KBF, i) is a prefix of length l.
And a second round: user 'B' transmissionReceive the 'B' transmissionAfter the message is sent, user "A" checks CERTBIs valid and Y ∈ G'/1GIf any check is unsuccessful, user "B" aborts protocol execution and returns an error message; if the check passes, user "a" calculates f ═ H (c, Y), KA=BtcxYtfxE.g. G'; user "A" calculation (k)1,k2)←H(KA,f,1)H(KA,f,2)…H(KAF, i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of up to H (K)A,f,1)H(KA,f,2)…H(KAF, i) is not less than (k)1,k2) Length of (d); if (k)1,k2) Is l, we order (k)1,k2) Is H (K)A,f,1)H(KA,f,2)…H(KAF, i) is a prefix of length l. User "A" checkIf it is notThe session key is set to k2And go to the next round, otherwise (i.e. the <math><mrow><msub><mi>t</mi><mi>B</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>k</mi><mn>1</mn></msub></msub><mrow><mo>(</mo><mn>1</mn><mo>)</mo></mrow></mrow></math>) Aborts protocol execution and returns an error message.
And a third round: user 'A' transmission. Receives tAThereafter, user "B" checks for confirmationIf it is notUser "B" sets the session key to k2And successfully ending the protocol, otherwise, stopping the protocol execution.
Embodiment of claim 1 for carrying out method-4:
calculating in advance: user "a" calculates X ═ g in advancex∈G,c=H(X,IA,A,IB,B),t=t2=t3=t4N/q and BtxcmodqBelongs to G ', wherein N is the order of the finite field G'; user "B" calculates in advance Y ═ gy∈G,d=H(IB,B,IA,A,Y),t=t2=t3=t4N/q and Atyd modq∈G′。
A first round: user "A" transmits { CERTAX }; received { CERTAX post user "B" check CERTAIs valid and X ∈ G'/1G(ii) a If any checks are unsuccessful, user "B" aborts the protocol execution. If the check passes, user "B" calculates c ═ H (X, I)A,A,IB,B),f=H(c,d),Xt(cb+fy)modq(ii) a User "B" checks for confirmation Xt(cb+fy)≠1GIf X ist(cb+fy)=1GUser "B" aborts the protocol execution and returns an error message; if Xt(cb+fy)≠1GUser "B" calculates KB=AtydXt(cb+fy)E G' (where Atyd modqE G' is calculated in advance), calculating (k)1,k2)←H(KB,f,1)H(KB,f,2)…H(KBF, i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of up to H (K)B,f,1)H(KB,f,2)…H(KBF, i) is not less than (k)1,k2) Length of (d); if (k)1,k2) Is l, we order (k)1,k2) Is H (K)B,f,1)H(KB,f,2)…H(KBF, i) is a prefix of length l.
And a second round: user 'B' transmissionAfter receiving the message sent by "B", user "A" checks CERTBIs valid and Y ∈ G'/1G(ii) a If any check is unsuccessful, user "A" aborts protocol execution and returns an error message; if the check passes, user "a" calculates d ═ H (I)B,B,IA,A,Y),f=H(c,d),Yt(da+fx)E.g. G'; user "A" checks for confirmation Yt(da+fx)≠1GIf Y ist(da+fx)=1GUser "A" aborts protocol execution and returns an error message; if Y ist(da+fx)≠1GUser "A" calculates KA=BtxcYt(da+fx)E G' (where B istxc modqE G' is calculated in advance). User "A" calculation (k)1,k2)←H(KA,f,1)H(KA,f,2)…H(KAF, i), where i ≧ 1 is implemented by a counter, the value of i depends on (k)1,k2) Of up to H (K)A,f,1)H(KA,f,2)…H(KAF, i) is not less than (k)1,k2) Length of (d); if (k)1,k2) Is l, we order (k)1,k2) Is H (K)A,f,1)H(KA,f,2)…H(KAF, i) is a prefix of length l. User "A" checkIf it is notThe session key is set to k2And go to the next round, otherwise (i.e. the <math><mrow><msub><mi>t</mi><mi>B</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>k</mi><mn>1</mn></msub></msub><mrow><mo>(</mo><mn>1</mn><mo>)</mo></mrow></mrow></math>) Aborts protocol execution and returns an error message.
And a third round: user 'A' transmissionReceives tAThereafter, user "B" checksIf it is notUser "B" sets the session key to k2Successfully ending the protocol; otherwise (i.e. the <math><mrow><msub><mi>t</mi><mi>A</mi></msub><mo>≠</mo><msub><mi>HMAC</mi><msub><mi>k</mi><mn>1</mn></msub></msub><mrow><mo>(</mo><mn>0</mn><mo>)</mo></mrow></mrow></math>) User "B" aborts the protocol execution and returns an error message.
Embodiment of claim 1 for carrying out method-5:
we present a discrete logarithm public key that user "B" does not define on (G', G, q), in combination with the embodiment of claim 3. User "B" still supports digital signatures, such as the RSA signature scheme. We assume that users "a" and "B" have some kind of negotiation mechanism to mutually confirm and agree on the public key type of the other party, the supported algorithms, and other parameters. In the following embodiment, let
Calculating in advance: in the following detailed description, user "B" may have been previously calculated Y, H (I)A,Y,Ay) And delete Ay。
A first round: user "a" sends { X ═ g
xE.g. G }. User "B" checks to confirm that X ∈ G'/1
GIf it is wrong (i.e. wrong)
<math><mrow><mi>X</mi><mo>∉</mo><msup><mi>G</mi><mo>′</mo></msup><mo>/</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>) The run is aborted and an error message is returned. User "B" calculates Y ═ g
y∈G,X
hyE.g. G', check and confirm X
hy≠1
GIf there is an error (i.e., X)
hy=1
G) The run is aborted and an error message is returned. User "B" calculates H (X, Y, X)
hy) Delete X
hyAnd calculate
During the whole protocol operation, user 'B' only retains Y, H (X, Y, X)hy) And possibly H (I)A,Y,Ay) (if H (I)A,Y,Ay) Calculated in advance) as temporary secret data (other temporary secret data is deleted immediately after use).
And a second round: user 'B' transmission <math><mrow><mrow><mo>{</mo><mi>Y</mi><mo>=</mo><msup><mi>g</mi><mi>y</mi></msup><mo>∈</mo><mi>G</mi><mo>,</mo><msub><mi>HMAC</mi><mrow><mi>H</mi><mrow><mo>(</mo><mi>Y</mi><mo>,</mo><mi>X</mi><mo>,</mo><msub><mi>I</mi><mi>B</mi></msub><mo>,</mo><mi>H</mi><mrow><mo>(</mo><mi>X</mi><mo>,</mo><mi>Y</mi><mo>,</mo><msup><mi>X</mi><mi>hy</mi></msup><mo>)</mo></mrow><mo>)</mo></mrow></mrow></msub><mrow><mo>(</mo><msub><mi>I</mi><mi>B</mi></msub><mo>)</mo></mrow><mo>}</mo></mrow><mo>.</mo></mrow></math>User "A" checks to confirm Y ∈ G'/1GIf it is wrong (i.e. wrong) <math><mrow><mi>Y</mi><mo>∉</mo><msup><mi>G</mi><mo>′</mo></msup><mo>/</mo><msub><mn>1</mn><mi>G</mi></msub></mrow></math>) The run is aborted and an error message is returned. User "A" calculates YhxE.g. G', checking to confirm Yhx≠1GIf it is wrong (i.e. Y)hx=1G) The run is aborted and an error message is returned. User "A" calculates H (X, Y)hx) Delete YhxChecking and confirmingIf the error occurs, the operation is stopped and error information is returned. User "A" calculates H (I)A,Y,Ya) Calculating
During the whole protocol operation, user 'A' only retains X, H (X, Y)hx) And possibly H (I)B,X,Bx) (if user "A" calculates H (I) in advanceB,X,Bx) As temporary secret data (other temporary secret data is deleted immediately after use).
And a third round: user 'A' transmission
Wherein CERT
AIs a public key certificate for user "a". User 'B' authentication confirmation CERT
AAnd if the validity is invalid, the operation is stopped and error information is returned. User "B" check confirmation
If the error occurs, the operation is stopped and error information is returned. User "B" calculation
Using its own private signature key pair
Performing digital signature to obtain a digital signature s
B(ii) a User "B" sets the session key to
Fourth wheel: user "B" transmits { CERT
B,s
BWherein CERT is
BIs a public key certificate for user "B". User "A" authentication confirmation CERT
BAnd if the validity is invalid, the operation is stopped and error information is returned. User "A" calculation
And checks the confirmation s with the public key of user' B
BIs to
If false (i.e., s)
BIs not right
Valid digital signature) then the run is aborted and an error message is returned. User "A" sets the session key to