Password exchange method
Abstract
The invention discloses a password exchange method. The method comprises that two communication sides generate random strings of certain lengths respectively, use an asymmetric cryptographic algorithm to encrypt and sign the random strings and then send the random strings to each other, the two communication sides decipher, verify and sign the random string of the other side respectively and use exclusive or values of the random strings of the two sides as session keys for communication. The password exchange method is simple to implement and applicable to communication in various environments.
Term
No projected expiry on record.
- Priority and filed
- Published
- Today
1 claim: 1 independent, 0 dependent
- 1Password 1.1 exchange method, device comprises A and B device, device, comprising A private da key, a B's device of Pb key, device and B the key for asymmetric encryption is a a private key db and device of A key pa, da and pa db; and pb is the key for asymmetric encryption is; theMethod comprises the following steps:51: Device for generating A length of rlen of train, r1 52: A device for generating message El I I Vl to apparatus, BAnd El is an ethylene device of key pb encryption obtaining r1, Vl of r1 to signature;a given 53: The B device deciphers El obtaining R1 and comprising a private db;and signs Vl according to the R1, apparatus 54: The current generation length of rlen of train r2, obtaining session password D= © R1, r2 55: The current generating message E2 I IV2 to output device;AAnd E2 is a device of A key pa encryption r2, obtaining V2 to signature r2, obtaining 56: A device deciphers E2 obtaining R2 and comprising a private da, and signs V2 according to the R2, apparatus 57: A device for session calculation password C= © r1, R2 and generating ECI IVC by a apparatus, BAnd EC is an ethylene device of key pb encryption C obtaining, VC to signature C;a given 58: The device deciphers B the EC obtaining c1 with comprising a private db;and signs VC according to the fourth, apparatus 59: The current comparison c1 D;and two different password of successfully, otherwise password exchange failure. 1.一种密码交换方法,包括装置A和装置B,其中,装置A包括私钥da,和装置B的公钥Pb,装置B包括私钥db和装置A的公钥pa,da和pa构成非对称加密的密钥对,db和pb构成非对称加密的密钥对;所述的方法包括如下步骤: 51:装置A生成长度为rlen的随机串rl ; 52:装置A生成消息El I I Vl发送给装置B ;其中El是由装置B的公钥pb加密rl得到,Vl由对rl签名得到; 53:装置B用其自身的私钥db解密El得到Rl,并根据Rl验证签名Vl ; 54:装置B生成长度为rlen的随机串r2,得到会话密码D= Rl © r2 ; 55:装置B生成消息E2 I IV2发送给装置A ;其中E2是由装置A的公钥pa加密r2得到,V2由对r2签名得到; 56:装置A用其自身的私钥da解密E2得到R2,并根据R2验证签名V2 ; 57:装置A计算会话密码C= rl © R2,并生成ECI IVC发送给装置B ;其中EC是由装置B的公钥pb加密C得到,VC由对C签名得到; 58:装置B用其自身的私钥db解密EC得到Cl,并根据Cl验证签名VC ; 59:装置B比较Cl和D,如果两者相同则密码交换成功,否则密码交换失败。
16 paragraphs, as filed
The password exchange method
technical field
(0001) Invention relates to communication and communication encryption technique. Background method
[0002] So-called session password with a key to each independent session encryption, wherein without using in a special application. Therefore communication two ends of each session flowing a lead password session. The how session password and communication two ends problems for problems of password exchange. The password session is at method for communication two sides of called password exchange method. Are the password exchange method of layers are DH algorithm. Then the DH algorithm of the introduce to an oval curve; the key swap protocol in SM2 oval curve of key algorithm the national password administrative local stipulated is a aberration of DH algorithm. And a algorithm abnormal complex. invention content
[0003] The invention wants solving the problems is a password exchange complex problems.
[0004] For solving the problems, the capacitor according the invention is used as follows: The password exchange method, device comprises A and B, device, comprising A private key, da device with common B's key pb, the B apparatus and key for asymmetric encryption is a a private key db and device of A key pa, da and pa db; and pb is the key for asymmetric encryption is; theMethod comprises the following steps: 51: Device for generating A length of rlen of train, r1 52: A device for generating message El I I Vl to apparatus, BAnd El is an ethylene device of key pb encryption obtaining r1, Vl of r1 to signature; a given 53: The B device deciphers El obtaining R1 and comprising a private db; and signs Vl according to the R1, apparatus 54: The current generation length of rlen of train r2, obtaining session password D= © R1, r2 55: The current generating message E2 I IV2 to output device; AAnd E2 is a device of A key pa encryption r2, obtaining V2 to signature r2, obtaining 56: A device deciphers E2 obtaining R2 and comprising a private da, and signs V2 according to the R2, apparatus 57: A device for session calculation password C= © r1, R2 and generating ECI IVC by a apparatus, BAnd EC is an ethylene device of key pb encryption C obtaining, VC to signature C; a given 58: The device deciphers B the EC obtaining c1 with comprising a private db; and signs VC according to the fourth, apparatus 59: The current comparison c1 D; and two different password of successfully, otherwise password exchange failure.
[0005] The technical effect of this invention is as follows: The password exchange method for security is needed the middle of the attack. Wherein the invention uses signature method, causing the middle is not connected through a method for obtaining session password of counterfeit, wherein a signature apparatus of the pedal S3 and S6; and middle camouflages, the signature apparatus is not connected to the. Obviously safety of this invention is asymmetrical encryption algorithm waterproof and digital signature decision algorithm. The invention and compares the key swap agreements is very simple. brief description fo the drawings
[0006] Digital 1) is device A and B the alternating current map. Performing is specifically
[0007] Lower is further detailed description the invention: A with communication two sides A apparatus and B device. The initial device, A manner of the asymmetrical encrypting the key and pa to da; The apparatus with B of the asymmetrical encrypting the key and pb to db; And da and db which is A apparatus and apparatus B private key; The Pa and pb device is A and B the common key; A device for obtaining device of current pb key, a current device is connected with the obtaining device of A key Pa. Public key pa and pb transmission no need to encrypt; Further is a third opening of obtaining. The asymmetrical encryption algorithm may use RSA algorithm or an oval curve algorithm, may use national password administrative local standard special the SM2 oval curve algorithm.
[0008] First; a random/production run SI and S4 comprising a length of rlen of train r1 and r2 a production process, a production of the random section of randomizer generate. A randomizer capable of train generator is receiver of the national password administrative local. Random train r1 and r2 the length is as the length of the terminal session key, is generally 128 or 256, wherein bytes 16 or 32 bytes length.
[0009] , Second, encryption signature and AC step S2 and S5 with a to any train r1 and a a process of r2 encryption and signature: A random train r1 and r2 encrypt obtaining EU; ANA random train r1 and r2 a obtaining V1 and V2. And apparatus to A random train r1 encryption and apparatus B of the key Pb. When the B to a random train r2 encryption device for A common key pa. The encryption algorithm may use national password administrative local standard the SM2 oval curve of key encryption algorithm. The signature algorithm may use national password administrative local standard the SM2 oval curve digital signature algorithm. Is connected with A random train r1 encryption signs obtaining El and Vl combined light to B device. A current device of random train r2 encryption signs obtaining E2 and V2 combined light to A device. step S2 El Terminal Terminal V1 and S5 E2 Terminal TerminalThe V2 made of I I( represent of the combination, wherein the combination of numstring.
[0010] Third, a decryption and signature data of S3 and S6 of train a a method of random section and a signature apparatus. The B device with comprising a private db the El deciphers obtaining Resistor. A device With comprising a private da the E2 deciphers obtaining R2. In long and normal communication, R1 is equal to the r1, R2 is equal to the r2. The data signature capable of the preventing counterfeit of third person. Digital signature denying no separating the device to B confirm of R1 of A device for device, A cover confirm R2 of the B device for. Random section of a third middle section camouflages device, A and B the fixed signature the data to refuse to casing to exchange the key.
[0011] Fourth, and session key generation of S4 the B device of El deciphers obtaining R1, any train r2 in addition generation of the R1 © the r20 of S7 device is A shape or else a method for obtaining session password D of E2 deciphers obtaining, R2 of train r3 in addition generating is in the shape or else a method for obtaining session password C the r1 Θ R2. Wherein r1 is equal to the R1, r2 is equal to the R2, wherein fact session password C and D same.
[0012] Fifth, session key contrasts the data communication two sides of a once side wall of the sponsor, the other side of the passive side. A apparatus In the invention is a sponsor, the B device is a passive side. With A apparatus and sponsor obtaining session password C, after to the B, device and B passive the multipoint two ends session password wherein, wherein judgement session password C and D the same. When A device for session password C to the B, similar comprising a a process of common key encryption and signature, namely steps: S7A device EC TERMINAL TerminalVC output to the B, EC is composed of A device And device of current key pb of the C encrypts obtaining, VC is connected with A C digital signature obtaining. And when the B and similar comprising a a process of private key and a signature apparatus. Namely steps: S8The apparatus current automatically according to comprising a private db a obtaining the second the EC; and second data signature digital VC. A device for encrypting and signature to the C see is the preceding step S2. The device to B deciphering and signature proof program see further - S3.
[0013] In long and normal communication c1 is equal to the C, each of which are not to a having abnormal situation c1 is equal to FILTER. The device signature B and apparatus, namely with a c1 the D of said; and two unequal, password exchange failure.
[0014] The producing are details see digital 1 AB two sides of the alternating current, the left for manufacturing apparatus for A, the right for operation of the B device of.
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| CN106685989A | Cited by | China | Search report |
| CN106487749A | Cited by | China | Search report |
| CN106713237A | Cited by | China | Search report |
| WO2017032242A1 | Cited by | World Intellectual Property Organization (WIPO) | International search |
| CN104954124A | Cited by | China | Search report |
| CN106161363A | Cited by | China | Search report |
| US10693634B2 | Cited by | United States of America | Applicant |
| CN101378320A | Cites | China | Search report |
| US2006294386A1 | Cites | United States of America | Search report |
| CN200962604Y | Cites | China | Search report |
2 priority claims, no other members on record
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 201310082636 | China | A | |
| CN2013182636 | – | – | – |
Numbers
- Publication
- 103209075
- Publication, DOCDB
- 103209075
- Publication, EPODOC
- CN103209075
- Application
- 100826360
- Application, DOCDB
- 201310082636
- Application, EPODOC
- CN2013182636
Titles3
- English
- The password exchange method
- Chinese
- 一种密码交换方法
- English
- Password exchange method
Classification
- IPC, 2
- H04L9 32
- H04L9 08