CN113326530A - Key negotiation method suitable for sharing keys of two communication parties - Google Patents

Key negotiation method suitable for sharing keys of two communication parties Download PDF

Info

Publication number
CN113326530A
CN113326530A CN202110723225.XA CN202110723225A CN113326530A CN 113326530 A CN113326530 A CN 113326530A CN 202110723225 A CN202110723225 A CN 202110723225A CN 113326530 A CN113326530 A CN 113326530A
Authority
CN
China
Prior art keywords
key
random
skm
shared
secret
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110723225.XA
Other languages
Chinese (zh)
Other versions
CN113326530B (en
Inventor
祝连海
王飞
王施人
王艳
马睿
冯吉喆
王剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Computer Technology and Applications
Original Assignee
Beijing Institute of Computer Technology and Applications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Computer Technology and Applications filed Critical Beijing Institute of Computer Technology and Applications
Priority to CN202110723225.XA priority Critical patent/CN113326530B/en
Publication of CN113326530A publication Critical patent/CN113326530A/en
Application granted granted Critical
Publication of CN113326530B publication Critical patent/CN113326530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to a key negotiation method suitable for sharing keys of two communication parties, belonging to the field of information security. The invention does not use the public key algorithm in the whole negotiation process, and only has one-time one-way communication, after the random secret key of one party is sent to the other party, the two parties use the same calculation strategy to obtain the session secret key. In the aspect of security, six layers of security protection are set, and an attacker can break the key negotiation system only by completing six cracking operations at the same time. Even if the principle and the implementation of the system are leaked by bad molecules, the key derivation algorithm, the HASH algorithm, the index calculation method and the method for obtaining the key through the index can be configured through the strategy, and an attacker cannot realize the consummation of stealing system information through communication with the system as long as the algorithm and the strategy are modified.

Description

Key negotiation method suitable for sharing keys of two communication parties
Technical Field
The invention belongs to the field of information security, and particularly relates to a key negotiation method suitable for sharing keys of two communication parties.
Background
The prior general secret key negotiation method is to generate a session secret key through cryptographic calculation after parameter information of two parties is exchanged based on three-way handshake, and the time delay of generating the session secret key is large in the mode, which is mainly embodied in that the communication times are large (three-way handshake is needed), the cryptographic calculation speed is low (public key calculation is used in the negotiation process, and the public key calculation is time-consuming), and the secret key negotiation method has a high requirement on the real-time performance of communication control and is difficult to meet the requirement in an end scene.
Disclosure of Invention
Technical problem to be solved
The technical problem to be solved by the invention is how to provide a key negotiation method suitable for sharing keys of two communication parties, so as to solve the problem that the existing key negotiation method is difficult to meet the requirements of the scene with higher requirements on the real-time performance of communication control.
(II) technical scheme
In order to solve the above technical problem, the present invention provides a key negotiation method suitable for sharing keys of two communication parties, which includes the following steps:
s1, preset key and shared key matrix
Loading a preset secret key and a shared secret key matrix into equipment in a specified mode;
s2 generation of random key
The terminal A generates a random secret key and then carries out randomness verification according to the standard, the random number after the verification is passed is a true random number, and the true random number is the random secret key;
s3, sending the random key to the opposite key negotiation end
After the A terminal generates a random secret key, the random secret key is encrypted by using a preset secret key and then is sent to a communication opposite terminal, and after the communication opposite terminal receives the random secret key, the random secret key is obtained by decrypting the random secret key by using the preset secret key;
s4, negotiating the session key component by random key derivation
Inputting the random key as a parameter into a key derivation function, and performing key derivation operation to obtain a derived key;
s5, calculating HASH value for random key
Taking a random key as an input parameter, and obtaining a 160-bit abstract value through a HASH algorithm;
s6, calculating the shared key matrix index by HASH value
Dividing the 160-bit digest value into 32 segments according to 5 bits as an index value for obtaining the shared key set, wherein the index value array is Kindex [32 ];
s7, obtaining the shared key set from the shared key matrix
The shared key matrix is represented by SKM, wherein SKM { { SKM [0] [0], SKM [0] [1], … SKM [0] [31] }, { … … } … … { SKM [31] [0], SKM [31] [1], … SKM [31] [31] } } has the elements of SKM [ m ] [ n ];
let m be kiddex [ i ], n be kiddex [ j ]; i, j < ═ 31; obtaining a shared key set, which is represented by SKA, wherein SKA [ k ] ═ SKM [ m ] [ n ], k < ═ 31;
s8, obtaining the secondary key from the shared key set and the derived key
The secondary key is calculated by the following formula:
KN ═ E (… E (CK, SKA [ k ]))))))); e represents encryption, the number of encryption layers is greater than 10, and the generated secondary key is the negotiation session key.
Further, the shared key matrix is composed of 32 × 32 keys, and an element corresponding to each column in each row is a true random number key.
Further, the true random number key in the shared key matrix is a 32-byte true random number key.
Further, the step S2 of generating the random key at the end a specifically includes: the A end generates a random secret key through a random number generation chip.
Further, after the step S3, both ends of the communication simultaneously perform subsequent steps to calculate the negotiation session key according to the negotiation policy.
Further, the key derivation function in step S4 is SM3_ KDF.
Further, the HASH algorithm in the step S5 is SM3 digest operation.
Further, in step S7, i is cyclically increased from 0 to 31, and j is cyclically decreased from 31 to 0.
Further, the encryption algorithm represented by E in step S8 is a symmetric encryption algorithm.
Further, the number of encryption layers in step S8 is 32.
(III) advantageous effects
The invention provides a secret key negotiation method suitable for sharing secret keys of two communication parties, the secret key negotiation method based on a shared secret key matrix does not use a public key algorithm in the whole negotiation process, only has one-time one-way communication, and after a random secret key of one party is sent to the other party, the two parties use the same calculation strategy to obtain a session secret key. In the aspect of security, a random key generated at one end is encrypted by using a preset key and then sent to the other end, the encryption in the process is first-layer security protection, the random key does not directly participate in the key negotiation process, but respectively calculates a HASH value and key derivation to indirectly participate in the key negotiation, the two processes are respectively second-layer security protection and third-layer security protection, a key matrix index is calculated by the HASH value, 32 keys are obtained by index values, the process is fourth-layer security protection and fifth-layer security protection, the negotiation session key is obtained by operating the 32 keys and the derived key components by a strong cryptographic algorithm, sixth-layer security protection is realized, an attacker needs to finish six decryption operations at the same time to break the key negotiation system, and the decryption operation is almost impossible. Even if the principle and the implementation of the system are leaked by bad molecules, the key derivation algorithm, the HASH algorithm, the index calculation method and the method for obtaining the key through the index can be configured through the strategy, and an attacker cannot realize the consummation of stealing system information through communication with the system as long as the algorithm and the strategy are modified.
Drawings
Fig. 1 is a flowchart of a key negotiation method according to the present invention.
Detailed Description
In order to make the objects, contents and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
The invention relates to a key negotiation method for two communication parties, which is particularly suitable for an environment with higher requirement on communication real-time performance and limited hardware computing resources.
The following key contents need to be realized in the invention:
1) shared key matrix
The shared key matrix is composed of 32x32 keys, the element corresponding to each column in each row is a true random number key, the length of the key is different according to different requirements, the invention adopts 32 bytes of true random number keys, and keys with other byte numbers also belong to the scope of the invention. According to the design of taking one element from each row and column of each row, taking all 32 elements as a group, calculating the negotiation session key, and the number of key groups which can be realized in total is KCOUNT 3232A key number of this order of magnitude may be suitable for long-term key negotiation at multiple communication ends. The calculation of each group of secret keys has a linear relationship and is easy to crack theoretically, and the session secret key components derived from the random secret keys can realize the negotiation session secret keys obtained by nonlinear calculation, so that the risk of cracking the secret keys is solved.
2) Random key
The random key is a true random number obtained by a random number generator hardware device, the random number needs to be subjected to randomness detection according to a certain standard, and the random key can be put into use after the detection is passed.
3) Key derivation
Key derivation is a deterministic algorithm for deriving symmetric keys from some secret (e.g., master key, cipher) and the present study is to derive symmetric keys from random keys. In the research, the SM3_ KDF algorithm is mainly used for key derivation, and the key derivation algorithm can be selected in various ways.
The key negotiation method of the invention specifically comprises the following steps:
s1, preset key and shared key matrix
The preset secret key and the shared secret key matrix are loaded into the equipment in a specified mode, and the preset secret key is used for protecting the transmission safety of the random secret key and has certain strength safety. The preset key is denoted by PSK.
S2 generation of random key
The terminal A generates a random secret key through a random number generation chip, performs randomness verification according to a standard, and determines the random number after verification as a true random number, wherein the true random number is the random secret key. The random key is used to derive the negotiation session key component as a non-linear part of the negotiation session key generation to participate in the operation, and the a-side random key is represented by RNK.
S3, sending the random key to the opposite key negotiation end
After the A terminal generates the random secret key, the random secret key is encrypted by using a preset secret key and then is sent to the opposite communication terminal on line in a communication mode, and after the opposite communication terminal receives the random secret key, the random secret key is obtained by decrypting the random secret key by using the preset secret key. The opposite end decryption random key is RNK ═ D (PSK, RNK)Secret key)。
The two communication ends simultaneously execute the subsequent steps to calculate the negotiation session key according to the negotiation strategy, so that the negotiation time can be saved.
S4, negotiating the session key component by random key derivation
And inputting the random key serving as a parameter into a key derivation function, and performing key derivation operation to obtain a derived key, wherein the key derivation function is SM3_ KDF, and the derived key generated after the derivation operation is represented by CK.
S5, calculating HASH value for random key
The random key is used as an input parameter, and a 160-bit digest value is obtained through a HASH algorithm. The digest value is denoted by SHASH. The HASH algorithm may be SM3 digest operation.
S6, calculating the shared key matrix index by HASH value
The 160-bit digest value is divided into 32 segments by 5 bits as an index value for obtaining the shared key set, the index value array is kiddex [32], and the value of 5-bit binary maximum representation is 31, which just fills the whole array.
S7, obtaining the shared key set from the shared key matrix
The shared key matrix is represented by SKM, which is { { SKM [0] [0], SKM [0] [1], … SKM [0] [31] }, { … … } … … { SKM [31] [0], SKM [31] [1], … SKM [31] [31] } } whose elements are SKM [ m ] [ n ].
Let m be kiddex [ i ], n be kiddex [ j ]; i, j < ═ 31;
i. j is selected in a conventional manner, for example, i is circularly increased from 0 to 31, and j is circularly decreased from 31 to 0; obtaining a shared key set, which is represented by SKA, wherein SKA [ k ] ═ SKM [ m ] [ n ], k < ═ 31;
s8, obtaining the secondary key from the shared key set SKA and the derived key CK
The secondary key is calculated by the following formula:
KN=E(E(…E(E(CK,SKA[k]) ))); e represents encryption, the number of encryption layers is greater than 10, 32 layers of encryption are generally performed, and the generated secondary key is the negotiation session key. The 32-layer encryption algorithm is a symmetric encryption algorithm.
The key negotiation method based on the shared key matrix does not use a public key algorithm in the whole negotiation process, only has one-time one-way communication, and after the random key of one party is sent to the other party, the two parties use the same calculation strategy to obtain the session key. In the aspect of security, a random key generated at one end is encrypted by using a preset key and then sent to the other end, the encryption in the process is first-layer security protection, the random key does not directly participate in the key negotiation process, but respectively calculates a HASH value and key derivation to indirectly participate in the key negotiation, the two processes are respectively second-layer security protection and third-layer security protection, a key matrix index is calculated by the HASH value, 32 keys are obtained by index values, the process is fourth-layer security protection and fifth-layer security protection, the negotiation session key is obtained by operating the 32 keys and the derived key components by a strong cryptographic algorithm, sixth-layer security protection is realized, an attacker needs to finish six decryption operations at the same time to break the key negotiation system, and the decryption operation is almost impossible. Even if the principle and the implementation of the system are leaked by bad molecules, the key derivation algorithm, the HASH algorithm, the index calculation method and the method for obtaining the key through the index can be configured through the strategy, and an attacker cannot realize the consummation of stealing system information through communication with the system as long as the algorithm and the strategy are modified.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A key agreement method for sharing keys between two parties of communication, the method comprising the steps of:
s1, preset key and shared key matrix
Loading a preset secret key and a shared secret key matrix into equipment in a specified mode;
s2 generation of random key
The terminal A generates a random secret key and then carries out randomness verification according to the standard, the random number after the verification is passed is a true random number, and the true random number is the random secret key;
s3, sending the random key to the opposite key negotiation end
After the A terminal generates a random secret key, the random secret key is encrypted by using a preset secret key and then is sent to a communication opposite terminal, and after the communication opposite terminal receives the random secret key, the random secret key is obtained by decrypting the random secret key by using the preset secret key;
s4, negotiating the session key component by random key derivation
Inputting the random key as a parameter into a key derivation function, and performing key derivation operation to obtain a derived key, wherein the derived key is represented by CK;
s5, calculating HASH value for random key
Taking a random key as an input parameter, and obtaining a 160-bit abstract value through a HASH algorithm;
s6, calculating the shared key matrix index by HASH value
Dividing the 160-bit digest value into 32 segments according to 5 bits as an index value for obtaining the shared key set, wherein the index value array is Kindex [32 ];
s7, obtaining the shared key set from the shared key matrix
The shared key matrix is represented by SKM, wherein SKM { { SKM [0] [0], SKM [0] [1], … SKM [0] [31] }, { … … } … … { SKM [31] [0], SKM [31] [1], … SKM [31] [31] } } has the elements of SKM [ m ] [ n ];
let m be kiddex [ i ], n be kiddex [ j ]; i, j < ═ 31; obtaining a shared key set, which is represented by SKA, wherein SKA [ k ] ═ SKM [ m ] [ n ], k < ═ 31;
s8, obtaining the secondary key from the shared key set and the derived key
The secondary key is calculated by the following formula:
KN ═ E (… E (CK, SKA [ k ]))))))); e represents encryption, the number of encryption layers is greater than 10, and the generated secondary key is the negotiation session key.
2. The method as claimed in claim 1, wherein the shared key matrix is composed of 32x32 keys, and the element corresponding to each column in each row is a true random number key.
3. The method according to claim 2, wherein the true random number key in the shared key matrix is a 32-byte true random number key.
4. The key agreement method for sharing keys between two parties of communication according to claim 1, wherein the step S2 is that the generation of the random key by the a-side specifically comprises: the A end generates a random secret key through a random number generation chip.
5. The key agreement method for key sharing between two communicating parties according to claim 1, wherein after the step S3, the two communicating parties simultaneously perform subsequent steps to calculate the agreement session key according to the agreement policy.
6. The key agreement method for key sharing between two communicating parties according to claim 1, wherein the key derivation function in step S4 is SM3_ KDF.
7. The key agreement method for key sharing between two parties of communication according to claim 1, wherein the HASH algorithm in step S5 is SM3 digest operation.
8. The key agreement method for key sharing between two communicating parties according to claim 1, wherein i is increased from 0 to 31 in a loop starting from 0, and j is decreased from 31 to 0 in a loop starting from 31 in step S7.
9. The key agreement method for key sharing between two communicating parties according to claim 1, wherein the encryption algorithm represented by E in step S8 is a symmetric encryption algorithm.
10. The key agreement method for key sharing between two parties of communication according to claim 1 or 9, wherein the number of encryption layers in step S8 is 32.
CN202110723225.XA 2021-06-29 2021-06-29 Key negotiation method suitable for key sharing of two communication parties Active CN113326530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110723225.XA CN113326530B (en) 2021-06-29 2021-06-29 Key negotiation method suitable for key sharing of two communication parties

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110723225.XA CN113326530B (en) 2021-06-29 2021-06-29 Key negotiation method suitable for key sharing of two communication parties

Publications (2)

Publication Number Publication Date
CN113326530A true CN113326530A (en) 2021-08-31
CN113326530B CN113326530B (en) 2024-02-02

Family

ID=77425075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110723225.XA Active CN113326530B (en) 2021-06-29 2021-06-29 Key negotiation method suitable for key sharing of two communication parties

Country Status (1)

Country Link
CN (1) CN113326530B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114007219A (en) * 2021-10-25 2022-02-01 北京计算机技术及应用研究所 Low-orbit satellite communication-oriented stealth access authentication method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012235214A (en) * 2011-04-28 2012-11-29 Panasonic Corp Encryption communication device and encryption communication system
CN103441839A (en) * 2013-08-15 2013-12-11 国家电网公司 Method and system for using quantum cryptography in safe IP communication
CN106656490A (en) * 2016-12-26 2017-05-10 浙江神州量子网络科技有限公司 Quantum whiteboard data storage method
CN109347809A (en) * 2018-09-25 2019-02-15 北京计算机技术及应用研究所 A kind of application virtualization safety communicating method towards under autonomous controllable environment
CN112715016A (en) * 2018-07-17 2021-04-27 皇家飞利浦有限公司 Key encapsulation protocol

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012235214A (en) * 2011-04-28 2012-11-29 Panasonic Corp Encryption communication device and encryption communication system
CN103441839A (en) * 2013-08-15 2013-12-11 国家电网公司 Method and system for using quantum cryptography in safe IP communication
CN106656490A (en) * 2016-12-26 2017-05-10 浙江神州量子网络科技有限公司 Quantum whiteboard data storage method
CN112715016A (en) * 2018-07-17 2021-04-27 皇家飞利浦有限公司 Key encapsulation protocol
CN109347809A (en) * 2018-09-25 2019-02-15 北京计算机技术及应用研究所 A kind of application virtualization safety communicating method towards under autonomous controllable environment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YUCHEN WANG等: "A Physical Layer Key Generation method with Reliable Negotiation", pages 1 - 5, XP033813377, Retrieved from the Internet <URL:《网页在线公开:https://ieeexplore.ieee.org/abstract/document/9173257/》> DOI: 10.1109/ICSIDP47821.2019.9173257 *
祝烈煌等: "传感器网络上群组密钥协商协议的设计与实现", 《解放军理工大学学报(自然科学版)》, vol. 13, no. 3, pages 266 - 270 *
罗铭等: "一种面向SI P通信的域间认证与密钥协商机制", 《东北大学学报( 自然科学版)》, vol. 30, no. 3, pages 365 - 368 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114007219A (en) * 2021-10-25 2022-02-01 北京计算机技术及应用研究所 Low-orbit satellite communication-oriented stealth access authentication method
CN114007219B (en) * 2021-10-25 2024-03-26 北京计算机技术及应用研究所 Invisible identification access authentication method for low-orbit satellite communication

Also Published As

Publication number Publication date
CN113326530B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
KR102136904B1 (en) Shared secret key generation device, encryption device, decryption device, shared secret key generation method, encryption method, decryption method, and program
CN109274503A (en) Distributed collaboration endorsement method and distributed collaboration signature apparatus, soft shield system
CN108418686A (en) A kind of how distributed SM9 decryption methods and medium and key generation method
CN110958219B (en) SM2 proxy re-encryption method and device for medical cloud shared data
CN103795534A (en) Password-based authentication method and apparatus executing the method
CN111314050B (en) Encryption and decryption method and device
CN107425968A (en) A kind of SM2 elliptic curve public key cryptographic algorithms under binary field F2m realize system
CN106067878A (en) A kind of network data encryption transmission method
CN113711564A (en) Computer-implemented method and system for encrypting data
CN112187461A (en) Weapon equipment data hybrid encryption method based on encryption algorithm
CN113285959A (en) Mail encryption method, decryption method and encryption and decryption system
TW202002564A (en) Data encryption and decryption method and device
CA2639649A1 (en) Cryptography method and system
CN111030801A (en) Multi-party distributed SM9 key generation and ciphertext decryption method and medium
CN113098675B (en) Binary data encryption system and method based on polynomial complete homomorphism
CN106713349A (en) Inter-group proxy re-encryption method capable of resisting selected ciphertext attack
CN114499857A (en) Method for realizing data correctness and consistency in big data quantum encryption and decryption
CN111756537B (en) Two-party cooperative decryption method, system and storage medium based on SM2 standard
CN113326530B (en) Key negotiation method suitable for key sharing of two communication parties
CN110048852A (en) Quantum communications service station Signcryption method and system based on unsymmetrical key pond
CN115766244A (en) Internet of vehicles information encryption method and device, computer equipment and storage medium
CN115865313A (en) Lightweight privacy protection longitudinal federal learning model parameter aggregation method
CN115499118A (en) Message key generation method, message key generation device, file encryption method, message key decryption method, file encryption device, file decryption device and medium
CN111314051B (en) Encryption and decryption method and device
WO2022172041A1 (en) Asymmetric cryptographic schemes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant