WO2016058404A1 - 基于预共享密钥的实体鉴别方法及装置 - Google Patents

基于预共享密钥的实体鉴别方法及装置 Download PDF

Info

Publication number
WO2016058404A1
WO2016058404A1 PCT/CN2015/082041 CN2015082041W WO2016058404A1 WO 2016058404 A1 WO2016058404 A1 WO 2016058404A1 CN 2015082041 W CN2015082041 W CN 2015082041W WO 2016058404 A1 WO2016058404 A1 WO 2016058404A1
Authority
WO
WIPO (PCT)
Prior art keywords
entity
idb
ida
equal
verification
Prior art date
Application number
PCT/CN2015/082041
Other languages
English (en)
French (fr)
Inventor
胡亚楠
杜志强
张国强
李琴
Original Assignee
西安西电捷通无线网络通信股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安西电捷通无线网络通信股份有限公司 filed Critical 西安西电捷通无线网络通信股份有限公司
Priority to EP15851121.2A priority Critical patent/EP3208967B1/en
Priority to JP2017516887A priority patent/JP6417036B2/ja
Priority to KR1020177010578A priority patent/KR101931894B1/ko
Priority to US15/510,006 priority patent/US10439801B2/en
Publication of WO2016058404A1 publication Critical patent/WO2016058404A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response
    • H04L9/3273Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response for mutual authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0869Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0433Key management protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network

Definitions

  • the present invention belongs to the field of network security technologies, and in particular, to an entity identification method and apparatus based on a pre-shared key.
  • An entity-authentication method based on a pre-shared key for authenticating between the entity A and the entity B that share the pre-shared key PSK and know each other's identity IDA and IDB including:
  • Step 2) After receiving the NA, the entity B generates a random number NB and a random number ZSEEDB used as a key seed, and calculates a key MKA
  • MKA is the authentication key
  • KEIA is Message encryption and integrity key
  • KDF1 is a key derivation algorithm
  • IDA is the identity of entity A
  • IDB is the identity of entity B
  • AuthEnc is an encryption authentication algorithm
  • AAD For other authentication data required by the encryption authentication algorithm
  • IV is an initial vector;
  • Step 3 After receiving the NB
  • Step 5 After receiving the NA
  • a device for authenticating with another device comprising a storage unit, a processing unit and a transceiver unit, wherein the storage unit is configured to store a pre-shared key PSK and the other device The identity identifier IDB of the other device; the transceiver unit is configured to send the random number NA to another device, and is configured to receive NB
  • the transceiver unit is further configured to send NA
  • the processing unit is configured to generate a random number NA
  • the processing unit is further configured to perform decryption verification on NB
  • MACA AuthEncKEIA(AAD, IV, NA
  • AuthEnc is an encryption authentication algorithm
  • EncDataA is the encrypted data generated by the device
  • MACA is the integrity authentication code generated by the device
  • AAD For the other authentication data required for the encryption authentication calculation method, IV is the initial vector, IDA is the identity of the device, IDB is
  • MAC message authentication identifier
  • a device for authenticating with another device comprising a storage unit, a processing unit and a transceiver unit, wherein: the storage unit is configured to store a pre-shared key PSK with the other device And an identity ID of the other device;
  • the transceiver unit is configured to receive a random number NA sent by another device
  • the transceiver unit is further configured to send NB
  • the transceiver unit is further configured to send a second message authentication identifier MacTagB to another device;
  • the processing unit is configured to generate a random number NB and a random number ZSEEDB as a key seed, calculate a key MKA
  • MACB AuthEncKEIA(AAD,IV,NB
  • MKA is the authentication key and KEIA is the message encryption and integrity key Key
  • KDF1 is a key derivation algorithm
  • IDB is the identity of the device
  • IDA is the identity of another device
  • AuthEnc is an encryption authentication algorithm
  • EncDataB is the encrypted data generated by the device
  • MACB is the integrity authentication code generated by the device
  • AAD is other authentication data required by the encryption authentication calculation method. Is the initial vector;
  • the processing unit is further configured to perform decryption verification on NA
  • NB), and compare with the received MacTagA, if not equal, terminate the authentication; if equal, consider another device identity legal, and calculate the second message authentication identifier MacTagB MAC (MK, MsgID2
  • a working method of the entity A when the entity A and the entity B perform identity authentication, wherein the entity A has a pre-shared key PSK with the entity B and knows the identity ID of the entity B, which includes:
  • IDA is the identity of entity A
  • IDB is the identity of entity B
  • AuthEnc is an encryption authentication algorithm
  • EncDataA is the encrypted data generated by entity A
  • MACA is the integrity authentication code generated by entity A
  • KDF2 is a kind.
  • the key derivation algorithm, MsgID1 and MsgID2 are respectively a message sequence number, " ⁇ " means bit-by-bit XOR, and MAC is a message authentication code generation algorithm.
  • MACB AuthEncKEIA(AAD, IV, NB
  • IDA is the identity of entity A
  • IDB is the identity of entity B
  • AuthEnc is an encryption authentication algorithm
  • EncDataB is the encrypted data generated by entity B
  • MACB is the integrity authentication code generated by entity B
  • KDF2 is a kind.
  • the key derivation algorithm, MsgID1 and MsgID2 are respectively a message sequence number, " ⁇ " means bit-by-bit XOR, and MAC is a message authentication code generation algorithm.
  • a two-way authentication between two network entities can be implemented and a master key for protecting subsequent communication data can be established;
  • 1 is a schematic diagram of an entity authentication system provided by the present invention, the entity authentication system includes an entity A and an entity B;
  • FIG. 3 is a schematic diagram of an execution flow of an entity B in the present invention.
  • Figure 4 is a schematic structural view of an apparatus corresponding to the entity A in the present invention.
  • FIG. 5 is a schematic structural view of an apparatus corresponding to the entity B in the present invention.
  • the present invention provides a method for entity identification based on a pre-shared key.
  • a pre-shared key PSK
  • the identity of the other party, the identity of entity A is IDA
  • the identity of entity B is IDB.
  • the method includes the following steps:
  • Step 1 Entity A generates a random number NA and sends it to entity B.
  • Step 2 After receiving the NA, the entity B generates a random number NB and a random number ZSEEDB used as a key seed, and calculates a key MKA
  • MACB AuthEncKEIA(AAD, IV, NB
  • EncDataB is the encrypted data generated by entity B
  • MACB is the integrity authentication code generated by entity B
  • AAD is the other authentication data required by the encryption authentication calculation method
  • IV is the initial vector.
  • ” here means the concatenation between the fields, it does not limit the order of the fields, the same below.
  • " concatenated field in the present invention can be considered to constitute a "field group”. It should be noted that the "field group” in the present invention is open, that is, except for the "field group” Except for the included fields, it is not excluded that other fields can also be included in the "field group”.
  • Step 3 After receiving the NB
  • Step 4 Entity A generates a random number ZSEEDA for use as a key seed, and calculates a second addition
  • the secret authentication data AuthEncDataA EncDataA
  • MACA AuthEncKEIA(AAD,IV,NA
  • calculate the shared key seed Z ZSEEDA ⁇ ZSEEDB
  • calculate the master key MK KDF2( NA, NB, Z, IDA, IDB)
  • calculate the first message authentication identifier MacTagA MAC (MK, MsgID1
  • AuthEncDataA includes EncDataA and MACA, which is generated by KEIA calculation, EncDataA is the encrypted data generated by entity A, MACA is the integrity authentication code generated by entity entity A; KDF2 is a key derivation algorithm, and MsgID1 is a message sequence number ( The message sequence number may be pre-determined by both parties, or may be obtained by the two parties through message interaction, " ⁇ " means bit-by-bit XOR, MAC is a message authentication code generation algorithm, and the message authentication code generated by the present invention is generated.
  • the algorithm may be an algorithm such as a Cipher-based Message Authentication Code (CMAC).
  • Entity A sends NA
  • CMAC Cipher-based Message Authentication Code
  • Step 5 After receiving the NA
  • the MsgID2 is a message sequence number (the message sequence number may be pre-determined by both parties, or may be obtained by the two parties through message interaction).
  • MAC message authentication identifier
  • the initial vector IV for calculating the first encrypted authentication data AuthEncDataB is generated by a key derivation algorithm and set to a low 96-bit value of the KDF3 (MKA, KEIA, NA, NB) calculation result.
  • KDF3 is a key derivation algorithm.
  • the entity A receives the NB
  • MACB AuthDecKEIA(AAD, IV, AuthEncDataB) in AuthEncDataB; compare the calculated MACB with the MACB in the received AuthEncDataB Whether it is equal, if not equal, the verification is incorrect; check whether the decrypted IDA and IDB are indeed the identity of entity A and entity B. If not, the verification is incorrect; check whether the NA obtained by decryption and the NA previously sent to entity B are If they are equal, the verification is incorrect.
  • AuthEncDataB includes EncDataB and MACB, which is verified by KEIA decryption;
  • AuthDec is a decryption authentication algorithm, and the decryption authentication algorithm described in the present invention may be an algorithm such as Galois Counter Mode (GCM); AAD and IV values
  • GCM Galois Counter Mode
  • AAD and IV values The setting method is the same as the method of setting the AAD and IV values in step 2.
  • the initial vector IV in the second encrypted authentication data AuthEncDataA is calculated by the key derivation algorithm and set to a high 96-bit value of the KDF3 (MKA, KEIA, NA, NB) calculation result.
  • KDF3 is a key derivation algorithm.
  • entity B receives the decryption test after receiving NA
  • AuthEncDataA includes EncDataA and MACA, which is verified by KEIA decryption; AuthDec is the decryption authentication algorithm, and the AAD and IV values are set in the same way as the AAD and IV values set in step 4.
  • the present invention further provides a working method of the entity A for implementing the foregoing method, including:
  • Step 10 generating a random number NA, and sending to the entity B;
  • Step 20 After receiving the NB
  • MACA AuthEncKEIA(AAD, IV, NA
  • MAC MK, MsgID2
  • the decryption verification is performed, which specifically includes:
  • Step 21 Check whether the received NA is equal to the NA previously sent to the entity B, and if the unequal is equal, the verification is incorrect.
  • Step 22 calculating a key MKA
  • KEIA KDF1 (NA, NB, PSK, IDA, IDB);
  • Step 23 Decrypt EncDataB
  • MACB AuthDecKEIA(AAD, IV, AuthEncDataB) in the first authentication encrypted data AuthEncDataB; compare and calculate the calculated MACB and receive Whether the MACBs in the AuthEncDataB are equal, the authentication is incorrect if they are not equal; check whether the decrypted IDA and IDB are the identity of the entity A and the entity B. If not, the verification is incorrect; check the decrypted NA and send before.
  • the first encrypted authentication data AuthEncDataB includes EncDataB and MACB, and is verified by KEIA decryption;
  • the initial vector IV is generated by the key derivation algorithm, set to the low 96-bit value of the KDF3 (MKA, KEIA, NA, NB) calculation result, and KDF3 is a key derivation algorithm.
  • the two are in accordance with the standard ISO/IEC 13157-1 definition; the initial vector IV is generated by the key derivation algorithm and is set to the high 96-bit value of the KDF3 (MKA, KEIA, NA, NB) calculation result.
  • KDF3 is a key derivation algorithm.
  • the present invention further provides a working method of the entity B for implementing the foregoing method, including:
  • MACB AuthEncKEIA(AAD, IV, NB
  • Step 200 After receiving the NA
  • NB), and compare with the received MacTagA, if not equal, terminate the authentication; if equal, then the entity A identity is considered legal, and calculate the message authentication identifier MacTagB MAC (MK, MsgID2
  • the foregoing calculating the first encrypted authentication data AuthEncDataB includes:
  • AuthEncDataB includes EncDataB and MACB, which are generated by KEIA calculation;
  • the initial vector IV is generated by the key derivation algorithm and is set to the low 96-bit value of the KDF3 (MKA, KEIA, NA, NB) calculation result.
  • KDF3 is a key derivation algorithm.
  • the decryption verification is performed, which specifically includes:
  • Step 201 Check whether the received NA is equal to the NA previously sent to the entity A, and if the unequal is equal, the verification is incorrect.
  • Step 202 Check whether the received NB is equal to the NB previously sent to the entity A, and if the NB is not equal, the verification is incorrect.
  • Step 203 Decrypt EncDataA
  • MACA AuthDec KEIA(AAD, IV, AuthEncDataA); Comparing whether the calculated MACA is equal to the MACA in the received AuthEncDataA, if the unequal is not equal, the verification is incorrect; checking whether the decrypted IDA and IDB are indeed the identity of entity A and entity B, if not, the verification is incorrect; The decrypted NA and NB are equal to the NA and NB previously sent to the entity A. If they are not equal, the verification is incorrect.
  • the present invention further provides an apparatus corresponding to the entity A for implementing the foregoing method, including a storage unit 11, a processing unit 12, and a transceiver unit 13, wherein:
  • the storage unit 11 is configured to store a pre-shared key PSK with the another device and an identity IDB of the other device; the transceiver unit is configured to send the random number NA to another device, and use Receiving NB
  • the transceiver unit 13 is further configured to send NA
  • the processing unit 12 is configured to generate a random number NA
  • the processing unit 12 is further configured to perform decryption verification on the NB
  • MACA AuthEncKEIA(AAD, IV, NA
  • MAC message authentication identifier
  • the processing unit 12 is further configured to perform decryption verification on the NB
  • the processing unit 12 checks whether the received NA is equal to the NA sent to another device, and if not equal, the verification is incorrect;
  • the processing unit 12 calculates a key MKA
  • KEIA KDF1 (NA, NB, PSK, IDA, IDB);
  • the processing unit 12 decrypts EncDataB
  • MACB AuthDecKEIA(AAD, IV, AuthEncDataB); compares the calculated MACB with the received AuthEncDataB Whether the MACBs are equal, the unequal verification is incorrect; check whether the decrypted IDA and IDB are indeed the identity of the device and another device, if not, the verification is incorrect; check the decrypted NA and send it to another Whether the NA of a device is equal, the unequal verification is incorrect; the NB obtained by the decryption is equal to the NB in the received NB
  • the processing unit 12 is further configured to calculate the encrypted authentication data AuthEncDataA, and the AuthEncDataA includes EncDataA and MACA, which are generated by the KEIA calculation;
  • the initial vector IV is generated by a key derivation algorithm, and the processing unit 12 is set to KDF3.
  • KDF3 is a key derivation algorithm.
  • the present invention further provides an apparatus corresponding to the entity B for implementing the foregoing method, including a storage unit 21, a processing unit 22, and a transceiver unit 23, wherein:
  • the storage unit 21 is configured to store a pre-shared key PSK with the other device and an identity IDA of the other device;
  • the transceiver unit 23 is configured to receive a random number NA sent by another device
  • the transceiver unit 23 is further configured to send NB
  • the transceiver unit 23 is further configured to send a second message authentication identifier MacTagB to another device;
  • the processing unit 22 is configured to generate a random number NB and a random number ZSEEDB as a key seed, calculate a key MKA
  • MACB AuthEncKEIA(AAD,IV,NB
  • MKA is the authentication key and KEIA is the message encryption and integrity Key
  • KDF1 is a key derivation algorithm
  • IDB is the identity of the device
  • IDA is the identity of another device
  • AuthEnc is an encryption authentication algorithm
  • EncDataB is the encrypted data generated by the device
  • MACB is the device.
  • the generated integrity authentication code, AAD is other identification data required by the encryption authentication calculation method
  • IV is an initial vector
  • the processing unit 22 is further configured to perform decryption verification on NA
  • NB), and compare with the received MacTagA, if not equal, terminate the authentication; if equal, consider another device to be legal, and calculate the second message authentication identifier MacTagB MAC(MK, MsgID2
  • the processing unit 22 is also used to send to another device NA
  • the processing unit 22 checks whether the received NA is equal to the NA sent to another device, and if the unequal is equal, the verification is incorrect;
  • the processing unit 22 checks whether the received NB is equal to the NB sent to another device, and if the NB is not equal, the verification is incorrect;
  • the processing unit 22 decrypts EncDataA
  • MACA AuthDec KEIA(AAD, IV, AuthEncDataA); compares the calculated MACA with the received Whether the MACBs in AuthEncDataA are equal, if they are not equal, the verification is incorrect; check whether the decrypted IDA and IDB are indeed the identity of another device and the device, if not, the verification is incorrect; check the decrypted NA and NB and before Whether the NA and NB sent to another device are equal, and if they are not equal, the verification is incorrect;
  • the derivation algorithm generates a low 96-bit value set to KDF3 (MKA, KEIA, NA, NB), and KDF3 is a key derivation algorithm.
  • the present invention implements identity authentication between entities with key negotiation function based on a symmetric cryptographic algorithm, and is applicable to a wide range of fields.
  • the invention can be applied to the fields of radio frequency identification RFID, sensor network WSN, near field communication NFC, contactless card, wireless local area network WLAN and the like based on air interface.
  • Entity A and entity B may be readers and tags in the RFID field, nodes in the sensor network, terminal devices in the NFC domain, card readers and cards in the field of contactless card technology, terminals in wireless local area networks, and Access points, etc.
  • the NA sent by the entity A to the entity B is encapsulated and transmitted by using the ACT_REQ protocol data unit
  • AuthEncDataB sent by the entity B to the entity A is encapsulated and transmitted by using the ACT_RES protocol data unit
  • MacTagA is encapsulated and transmitted using the VFY_REQ protocol data unit.
  • the MacTagB sent by entity B to entity A is encapsulated and transmitted using the VFY_RES protocol data unit, where ACT_REQ, ACT_RES VFY_REQ and VFY_RES are protocol data unit formats conforming to the standard ISO/IEC 13157-1. After being encapsulated in this way, the technical solution of the present invention is more compatible with other existing NFC security mechanisms.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明为基于预共享密钥的实体鉴别方法及装置,属网络安全技术领域。该方法是:实体A产生随机数NA并发给实体B;实体B生成随机数NB和ZSEEDB,计算密钥MKA||KEIA、第一加密认证数据AuthEncDataB,发送NB||NA||AuthEncDataB给实体A做验证;实体A产生随机数ZSEEDA,计算第二加密认证数据AuthEncDataA、共享密钥种子Z、主密钥MK、第一消息鉴别标识MacTagA,发送NA||NB||AuthEncDataA||MacTagA给实体B做验证;实体B计算Z、MK,MacTagA并与收到的MacTagA比较,若相等,则认为实体A合法;实体B计算第二消息鉴别标识MacTagB并发给实体A;实体A计算MacTagB并与收到的MacTagB比较,若相等,则认为实体B合法。本发明的装置分别与前述方法中实体A和实体B对应。本发明不仅可实现网络实体间双向鉴别并确定对方的身份;且大大提高了效率和降低了硬件计算资源消耗。

Description

基于预共享密钥的实体鉴别方法及装置
本申请要求于2014年10月17日提交中国专利局、申请号为201410554547.6、发明名称为“基于预共享密钥的实体鉴别方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明属网络安全技术领域,尤其涉及基于预共享密钥的实体鉴别方法及装置。
背景技术
对于通信网络来说,如局域网WLAN、无线传感器网络WSN、近场通信NFC、射频识别RFID、个域网WPAN等,在通信时易遭受伪造、窃听、重放等攻击,因此在通信之前必须解决通信双方之间的身份鉴别问题,以确保通信双方身份的合法性。目前,基于密码算法的,尤其是基于对称密码算法的鉴别方案中,由于鉴别过程中通常不对鉴别双方的身份进行确认,而导致即使身份鉴别通过了,也只能确定对方拥有某个共享的秘密,但实际上仍没法确定对方究竟是谁,存在一定的安全隐患。
发明内容
为了解决背景技术中存在的上述技术问题,有必要提供一种基于预共享密钥的实体鉴别方法及装置。一种基于预共享密钥的实体鉴别方法,用于共享了预共享密钥PSK且相互知晓对方身份标识IDA和IDB的实体A和实体B之间进行身份鉴别,其包括:
步骤1)实体A产生随机数NA,并发送给实体B。
步骤2)实体B收到NA后,生成随机数NB和用于作为密钥种子的随机数ZSEEDB,计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB),计算第一加密认证数据AuthEncDataB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),实体B发送NB||NA||AuthEncDataB给实体A;其中,MKA为鉴别密钥,KEIA为消息加密和完整性密钥,KDF1为一种密钥推导算法,IDA为实体A的身份标识,IDB为实体B的身份标识,AuthEnc为一种加密认证算法,AAD 为所述加密认证算法需要的其他鉴别数据,IV为初始向量;
步骤3)实体A收到NB||NA||AuthEncDataB后进行解密验证;
步骤4)实体A产生用于作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),实体A发送NA||NB||AuthEncDataA||MacTagA给实体B;其中,MsgID1为一消息序列号,“⊕”表示逐比特异或,KDF2为一种密钥推导算法,MAC为一种消息鉴别码生成算法;
步骤5)实体B收到NA||NB||AuthEncDataA||MacTagA后进行解密验证;
步骤6)实体B计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果相等,则认为实体A身份合法;
步骤7)实体B计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),并将MacTagB发送给实体A,其中,MsgID2为一消息序列号;
步骤8)实体A收到MacTagB后,首先计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与收到的MacTagB进行比较,如果相等,则认为实体B身份合法。
一种装置,用于和另一装置进行身份鉴别,该装置包括存储单元、处理单元及收发单元,其中,所述存储单元用于存储与所述另一装置之间的预共享密钥PSK及所述另一装置的身份标识IDB;所述收发单元用于将随机数NA发送给另一装置,并用于接收另一装置发送的NB||NA||AuthEncDataB;
所述收发单元还用于发送NA||NB||AuthEncDataA||MacTagA给另一装置,并用于接收另一装置发来的第二消息鉴别标识MacTagB;
所述处理单元用于产生随机数NA;
所述处理单元还用于对另一装置发来的NB||NA||AuthEncDataB进行解密验证;
所述处理单元还用于产生作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),生成NA||NB||AuthEncDataA||MacTagA;其中AuthEnc为一种加密认证算法,EncDataA为该装置生成的加密数据,MACA为该装置生成的完整性鉴别码,AAD为加密认证计算方法需要的其他鉴别数据,IV为初始向量,IDA为该装置的身份标识,IDB为另一装置的身份标识,KDF2为一种密钥推导算法,MsgID1为一消息序列号,MAC为一种消息鉴别码生成算法,“⊕”表示逐比特异或;
所述处理单元还用于计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与另一装置发来的MacTagB进行比较,如果相等,则另一装置身份合法。
一种装置,用于与另一装置进行身份鉴别,所述装置包括存储单元、处理单元及收发单元,其中:所述存储单元用于存储与所述另一装置之间的预共享密钥PSK及所述另一装置的身份标识IDA;
所述收发单元用于接收另一装置发来的随机数NA;
所述收发单元还用于向另一装置发送NB||NA||AuthEncDataB,并用于接收另一装置发来的NA||NB||AuthEncDataA||MacTagA;
所述收发单元还用于向另一装置发送第二消息鉴别标识MacTagB;
所述处理单元用于生成随机数NB和作为密钥种子的随机数ZSEEDB,计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB),计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),并生成NB||NA||AuthEncDataB;其中MKA为鉴别密钥,KEIA为消息加密和完整性密钥,KDF1为一种密钥推导算法,IDB为该装置的身份标识, IDA为另一装置的身份标识,AuthEnc为一种加密认证算法,EncDataB为该装置生成的加密数据,MACB为该装置生成的完整性鉴别码,AAD为加密认证计算方法需要的其他鉴别数据,IV为初始向量;
所述处理单元还用于对另一装置发来的NA||NB||AuthEncDataA||MacTagA进行解密验证;
所述处理单元还用于计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为另一装置身份合法,并计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA)。
一种实体A与实体B进行身份鉴别时,实体A的工作方法,其中,实体A具有和实体B之间的预共享密钥PSK且知晓实体B的身份标识IDB,其包括:
产生随机数NA,并发送给实体B;
收到实体B发来的NB||NA||AuthEncDataB后进行解密验证;
产生用于作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),发送NA||NB||AuthEncDataA||MacTagA给实体B;
收到实体B发来的第二消息鉴别标识MacTagB后,首先计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与收到的MacTagB进行比较,如果相等,则认为实体B身份合法;
其中IDA为实体A的身份标识,IDB为实体B的身份标识,AuthEnc为一种加密认证算法,EncDataA为实体A生成的加密数据,MACA为实体实体A生成的完整性鉴别码,KDF2为一种密钥推导算法,MsgID1和MsgID2分别为一消息序列号,“⊕”表示逐比特异或,MAC为一种消息鉴别码生成算法。
一种实体A与实体B进行身份鉴别时,实体B的工作方法,其中,实体B具 有和实体B之间的预共享密钥PSK且知晓实体A的身份标识IDA,其特征在于,该方法包括:
收到实体A发来的随机数NA后,生成随机数NB和用于作为密钥种子的随机数ZSEEDB,计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||Z SEEDB),实体B发送NB||NA||AuthEncDataB给实体A;
收到实体A发来的NA||NB||AuthEncDataA||MacTagA后进行解密验证;
计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为实体A身份合法,并计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),将MacTagB发送给实体A;
其中IDA为实体A的身份标识,IDB为实体B的身份标识,AuthEnc为一种加密认证算法,EncDataB为实体B生成的加密数据,MACB为实体实体B生成的完整性鉴别码,KDF2为一种密钥推导算法,MsgID1以及MsgID2分别为一消息序列号,“⊕”表示逐比特异或,MAC为一种消息鉴别码生成算法。
本发明包括如下优点:
1)可实现两网络实体之间双向鉴别并建立用于保护后续通信数据的主密钥;
2)在鉴别的同时确定对方的身份;
3)利用同一算法、同一密钥且同时执行数据加密和完整性保护两种计算,有效的利用并行处理的方式,大大提高了效率和降低了硬件计算资源消耗,有利于降低数据传输延迟和计算操作重叠。
附图说明
图1为本发明所提供的实体鉴别***的示意图,实体鉴别***包括实体A和实体B;
图2为本发明中中实体A的执行流程图;
图3为本发明中实体B的执行流程示意图;
图4为本发明中对应于实体A的装置的结构示意图;
图5为本发明中对应于实体B的装置的结构示意图。
具体实施方式
请参见图1,本发明提供了一种基于预共享密钥的实体鉴别方法,该方法实施时,实体A和实体B之间已共享预共享密钥(Pre-Shared key,PSK)并相互知晓对方的身份标识,实体A的身份标识为IDA,实体B的身份标识为IDB,该方法包括以下步骤:
步骤1、实体A产生随机数NA,并发送给实体B。
步骤2、实体B收到NA后,生成随机数NB和用于作为密钥种子的随机数ZSEEDB,计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB),计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),实体B发送NB||NA||AuthEncDataB给实体A,其中,AuthEncDataB包括EncDataB和MACB,通过KEIA计算产生;MKA为鉴别密钥,KEIA为消息加密和完整性密钥,KDF1为一种密钥推导算法,本发明述及密钥推导算法可以是如-128位的伪随机函数(Pseudo-Random Function-128,PRF-128)等的算法;AuthEnc为一种加密认证算法,本发明述及的加密认证算法可以是如伽罗瓦计数模式(Galois Counter Mode,GCM)等的算法;EncDataB为实体B生成的加密数据,MACB为实体B生成的完整性鉴别码,AAD为加密认证计算方法需要的其他鉴别数据,IV为初始向量。这里的“||”表示字段之间的级联,它不限制字段的先后顺序,下同。另外,本发明中被“||”级联后字段可被认为组成了一“字段组”,需说明的是,本发明中的“字段组”是开放的,即,除“字段组”所包含的字段外,不排除其他字段也可被包含进“字段组”中。
步骤3、实体A收到NB||NA||AuthEncDataB后进行解密验证,若验证不正确,则终止鉴别,若验证正确则执行后续步骤。
步骤4、实体A产生用于作为密钥种子的随机数ZSEEDA,并计算第二加 密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB)。其中,AuthEncDataA包括EncDataA和MACA,通过KEIA计算产生,EncDataA为实体A生成的加密数据,MACA为实体实体A生成的完整性鉴别码;KDF2为一种密钥推导算法,MsgID1为一消息序列号(消息序列号可以是双方预先确定的,也可以是双方通过消息交互来获得的),“⊕”表示逐比特异或,MAC为一种消息鉴别码生成算法,本发明述及的消息鉴别码生成算法可以是如基于密码的消息认证码(Cipher-based Message Authentication Code,CMAC)等的算法。实体A发送NA||NB||AuthEncDataA||MacTagA给实体B。
步骤5、实体B收到NA||NB||AuthEncDataA||MacTagA后进行解密验证,若验证不正确,则终止鉴别,若验证正确则执行后续步骤。
步骤6、实体B计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为实体A身份合法,并执行后续步骤。
步骤7、实体B计算消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),并将MacTagB发送给实体A。其中,MsgID2为一消息序列号(消息序列号可以是双方预先确定的,也可以是双方通过消息交互来获得的)。
步骤8、实体A收到MacTagB后,首先计算消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与收到的MacTagB进行比较,如果相等,则认为实体B身份合法。
上述步骤2中,计算第一加密认证数据AuthEncDataB的其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,二者均符合标准ISO/IEC 13157-1定义;
计算所述第一加密认证数据AuthEncDataB的初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的低96比特值。其中,KDF3为一种密钥推导算法。
上述步骤3中,实体A收到NB||NA||AuthEncDataB后进行解密验证,具体包括:
3.1、检查收到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;
3.2、计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB);
3.3、解密AuthEncDataB中的EncDataB||MACB,NA||NB||IDA||IDB||ZSEEDB||MACB=AuthDecKEIA(AAD,IV,AuthEncDataB);比较计算得到的MACB与收到的AuthEncDataB中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;检查解密得到的NB与收到的NB||NA||AuthEncDataB中的NB是否相等,不相等则验证不正确。其中,AuthEncDataB包括EncDataB和MACB,通过KEIA解密验证;AuthDec为解密认证算法,本发明述及的解密认证算法可以是如伽罗瓦计数模式(Galois Counter Mode,GCM)等的算法;AAD和IV值的设置方法与步骤2中设置的AAD与IV值的方法相同。
需说明的是,以上验证过程并无严格的顺序要求,且任何一项验证不正确,则认为对实体A收到NB||NA||AuthEncDataB验证结果为不正确。
上述步骤4中,计算第二加密认证数据AuthEncDataA中的其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,二者均符合标准ISO/IEC 13157-1定义;
计算所述第二加密认证数据AuthEncDataA中的初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的高96比特值。其中,KDF3为一种密钥推导算法。
上述步骤5中,实体B收到NA||NB||AuthEncDataA||MacTagA后进行解密验 证,具体包括:
5.1、检查收到的NA与之前发送给实体A的NA是否相等,不相等则验证不正确;
5.2、检查收到的NB与之前发送给实体A的NB是否相等,不相等则验证不正确;
5.3、解密AuthEncDataA中的EncDataA||MACA,NA||NB||IDA||IDB||ZSEEDA||MACA=AuthDec KEIA(AAD,IV,AuthEncDataA);比较计算得到的MACA与收到的AuthEncDataA中的MACA是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA和NB与之前发送给实体A的NA和NB是否相等,不相等则验证不正确。其中,AuthEncDataA包括EncDataA和MACA,通过KEIA解密验证;AuthDec为解密认证算法,AAD和IV值的设置方法与步骤4中设置的AAD与IV值的方法相同。
需说明的是,以上验证过程并无严格的顺序要求,且任何一项验证不正确,则认为对实体B收到NA||NB||EncDataA||MACA||MacTagA验证结果为不正确。
参见图2,基于上述实体鉴别方法,本发明还提供了一种用于实现上述方法的实体A的工作方法,包括:
步骤10、产生随机数NA,并发送给实体B;
步骤20、收到实体B发来的NB||NA||AuthEncDataB后进行解密验证,若验证不正确,则终止鉴别,若验证正确则执行后续步骤;
步骤30、产生用于作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),发送NA||NB||AuthEncDataA||MacTagA给实体B;
步骤40、收到实体B发来的第二消息鉴别标识MacTagB后,首先计算第二 消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与收到的MacTagB进行比较,如果相等,则认为实体B身份合法。
上述步骤20中收到实体B发来的NB||NA||AuthEncDataB后进行解密验证,具体包括:
步骤21、检查收到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;
步骤22、计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB);
步骤23、解密第一认证加密数据AuthEncDataB中的EncDataB||MACB,NA||NB||IDA||IDB||ZSEEDB||MACB=AuthDecKEIA(AAD,IV,AuthEncDataB);比较计算得到的MACB与收到的AuthEncDataB中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;检查解密得到的NB与收到的NB||NA||AuthEncDataB中的NB是否相等,不相等则验证不正确。其中,第一加密认证数据AuthEncDataB包括EncDataB和MACB,通过KEIA解密验证;其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,二者均符合标准ISO/IEC 13157-1定义;初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的低96比特值,KDF3为一种密钥推导算法。
需说明的是,以上验证过程并无严格的顺序要求,且任何一项验证不正确,则认为对收到的NB||NA||AuthEncDataB的验证结果为不正确。
上述步骤30中计算的第二加密认证数据AuthEncDataA包括EncDataA和MACA,通过KEIA计算产生;其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,二者均符合标准ISO/IEC 13157-1定义;初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的高96比特值。其中,KDF3为一种密钥推导算法。
参见图3,基于上述实体鉴别方法,本发明还提供了一种用于实现上述方法的实体B的工作方法,包括:
步骤100、收到实体A发来的随机数NA后,生成随机数NB和用于作为密钥种子的随机数ZSEEDB,计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||Z SEEDB),实体B发送NB||NA||AuthEncDataB给实体A;
步骤200、收到实体A发来的NA||NB||AuthEncDataA||MacTagA后进行解密验证,若验证不正确,则终止鉴别,若验证正确则执行后续步骤;
步骤300、计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为实体A身份合法,并计算消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),将MacTagB发送给实体A。
具体的,上述计算第一加密认证数据AuthEncDataB,包括:
AuthEncDataB包括EncDataB和MACB,通过KEIA计算产生;
其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,二者均符合标准ISO/IEC 13157-1定义;
初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的低96比特值。其中,KDF3为一种密钥推导算法。
上述步骤200中收到实体A发来的NA||NB||AuthEncDataA||MacTagA后进行解密验证,具体包括:
步骤201、检查收到的NA与之前发送给实体A的NA是否相等,不相等则验证不正确;
步骤202、检查收到的NB与之前发送给实体A的NB是否相等,不相等则验证不正确;
步骤203、解密AuthEncDataA中的EncDataA||MACA,NA||NB||IDA||IDB||ZSEEDA||MACA=AuthDec KEIA(AAD,IV,AuthEncDataA); 比较计算得到的MACA与收到的AuthEncDataA中的MACA是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA和NB与之前发送给实体A的NA和NB是否相等,不相等则验证不正确。其中,AuthEncDataA包括EncDataA和MACA,通过KEIA解密验证;其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,二者均符合标准ISO/IEC 13157-1定义;初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的高96比特值,KDF3为一种密钥推导算法。
需说明的是,以上验证过程并无严格的顺序要求,且任何一项验证不正确,则认为对收到NA||NB||AuthEncDataA||MacTagA的验证结果为不正确。
参见图4,基于上述实体鉴别方法,本发明还提供了一种用于实现上述方法的对应于实体A的装置,包括存储单元11、处理单元12、收发单元13,其中:
所述存储单元11用于存储与所述另一装置之间的预共享密钥PSK及所述另一装置的身份标识IDB;所述收发单元用于将随机数NA发送给另一装置,并用于接收另一装置发送的NB||NA||AuthEncDataB;
所述收发单元13还用于发送NA||NB||AuthEncDataA||MacTagA给另一装置,并用于接收另一装置发来的第二消息鉴别标识MacTagB;
所述处理单元12用于产生随机数NA;
所述处理单元12还用于对另一装置发来的NB||NA||AuthEncDataB进行解密验证;
所述处理单元12还用于产生作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),生成NA||NB||AuthEncDataA||MacTagA;其中AuthEnc为一种加密认证算法, EncDataA为该装置生成的加密数据,MACA为该装置生成的完整性鉴别码,AAD为加密认证计算方法需要的其他鉴别数据,IV为初始向量,IDA为该装置的身份标识,IDB为另一装置的身份标识,KDF2为一种密钥推导算法,MsgID1为一消息序列号,MAC为一种消息鉴别码生成算法,“⊕”表示逐比特异或;
所述处理单元12还用于计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与另一装置发来的MacTagB进行比较,如果相等,则另一装置身份合法。
所述处理单元12还用于对另一装置发来的NB||NA||AuthEncDataB进行解密验证,具体是:
所述处理单元12检查收到的NA与发送给另一装置的NA是否相等,不相等则验证不正确;
所述处理单元12计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB);
所述处理单元12解密AuthEncDataB中的EncDataB||MACB,NA||NB||IDA||IDB||ZSEEDB||MACB=AuthDecKEIA(AAD,IV,AuthEncDataB);比较计算得到的MACB与收到的AuthEncDataB中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为该装置和另一装置的身份标识,若不是则验证不正确;检查解密得到的NA与之前发送给另一装置的NA是否相等,不相等则验证不正确;检查解密得到的NB与收到的NB||NA||AuthEncDataB中的NB是否相等,不相等则验证不正确;其中AuthDec为解密认证算法;
需说明的是,以上验证过程并无严格的顺序要求,上述任何一项验证不正确,则认为对另一装置发来的NB||NA||AuthEncDataB的验证结果为不正确。
上述的处理单元12还用于计算加密认证数据AuthEncDataA,AuthEncDataA包括EncDataA和MACA,通过KEIA计算产生;
其他鉴别数据AAD由协议参数组成,处理单元12设置为AAD=SEP||PID,SEP和PID符合标准ISO/IEC 13157-1定义;
初始向量IV由密钥推导算法产生,处理单元12设置为KDF3 (MKA,KEIA,NA,NB)计算结果的高96比特值。其中,KDF3为一种密钥推导算法。
参见图5,基于上述鉴别方法,本发明还提供了一种用于实现上述方法的对应于实体B的装置,包括存储单元21、处理单元22、收发单元23,其中:
所述存储单元21用于存储与所述另一装置之间的预共享密钥PSK及所述另一装置的身份标识IDA;
所述收发单元23用于接收另一装置发来的随机数NA;
所述收发单元23还用于向另一装置发送NB||NA||AuthEncDataB,并用于接收另一装置发来的NA||NB||AuthEncDataA||MacTagA;
所述收发单元23还用于向另一装置发送第二消息鉴别标识MacTagB;
所述处理单元22用于生成随机数NB和作为密钥种子的随机数ZSEEDB,计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB),计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),并生成NB||NA||AuthEncDataB;其中MKA为鉴别密钥,KEIA为消息加密和完整性密钥,KDF1为一种密钥推导算法,IDB为该装置的身份标识,IDA为另一装置的身份标识,AuthEnc为一种加密认证算法,EncDataB为该装置生成的加密数据,MACB为该装置生成的完整性鉴别码,AAD为加密认证计算方法需要的其他鉴别数据,IV为初始向量;
所述处理单元22还用于对另一装置发来的NA||NB||AuthEncDataA||MacTagA进行解密验证;
所述处理单元22还用于计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为另一装置身份合法,并计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA)。
所述处理单元22还用于对另一装置发来的 NA||NB||AuthEncDataA||MacTagA进行解密验证,具体是:
所述处理单元22检查收到的NA与发送给另一装置的NA是否相等,不相等则验证不正确;
所述处理单元22检查收到的NB与发送给另一装置的NB是否相等,不相等则验证不正确;
所述处理单元22解密AuthEncDataA中的EncDataA||MACA,NA||NB||IDA||IDB||ZSEEDA||MACA=AuthDec KEIA(AAD,IV,AuthEncDataA);比较计算得到的MACA与收到的AuthEncDataA中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为另一装置和该装置的身份标识,若不是则验证不正确;检查解密得到的NA和NB与之前发送给另一装置的NA和NB是否相等,不相等则验证不正确;
需说明的是,以上验证过程并无严格的顺序要求,上述任何一项验证不正确,则认为对另一装置发来NA||NB||AuthEncDataA||MacTagA的验证结果为不正确。
其中,AuthEncDataB包括EncDataB和MACB,通过KEIA解密验证;其他鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP和PID符合标准ISO/IEC 13157-1定义;初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的低96比特值,KDF3为一种密钥推导算法。
图4及图5述及的分别对应实体A的装置和实体B的装置,其与本发明提供的实体鉴别方法中的对应部分此处不再赘述。
综上,本发明基于对称密码算法实现了带密钥协商功能的实体间的身份鉴别,适用领域非常广泛。本发明可适用于射频识别RFID,传感器网络WSN,近场通信NFC,非接触式卡、无线局域网WLAN等基于空中接口进行通信的领域。实体A和实体B可以是RFID领域中的读写器和标签,传感器网络中的节点,NFC领域中的终端设备,非接触式卡技术领域中的读卡器和卡,无线局域网中的终端和接入点等。
另外,在本发明的较佳实施方式中,当本发明技术方案用于NFC领域时, 实体A发送给实体B的NA是利用ACT_REQ协议数据单元进行封装后传输的,实体B发送给实体A的NB||NA||AuthEncDataB是利用ACT_RES协议数据单元进行封装后传输的,实体A发送给实体B的NA||NB||AuthEncDataA||MacTagA是利用VFY_REQ协议数据单元进行封装后传输的,实体B发送给实体A的MacTagB是利用VFY_RES协议数据单元进行封装后传输的,其中,ACT_REQ、ACT_RES、VFY_REQ及VFY_RES是符合标准ISO/IEC 13157-1定义的协议数据单元格式。如此封装后,本发明技术方案与现有的NFC其他安全机制的兼容性更优。
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个 流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (16)

  1. 一种基于预共享密钥的实体鉴别方法,用于共享了预共享密钥PSK且相互知晓对方身份标识IDA和IDB的实体A和实体B之间进行身份鉴别,其特征在于,所述方法包括:
    步骤1)实体A产生随机数NA,并发送给实体B。
    步骤2)实体B收到NA后,生成随机数NB和用于作为密钥种子的随机数ZSEEDB,计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB),计算第一加密认证数据AuthEncDataB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),实体B发送NB||NA||AuthEncDataB给实体A;其中,MKA为鉴别密钥,KEIA为消息加密和完整性密钥,KDF1为一种密钥推导算法,IDA为实体A的身份标识,IDB为实体B的身份标识,AuthEnc为一种加密认证算法,AAD为所述加密认证算法需要的其他鉴别数据,IV为初始向量;
    步骤3)实体A收到NB||NA||AuthEncDataB后进行解密验证;
    步骤4)实体A产生用于作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),实体A发送NA||NB||AuthEncDataA||MacTagA给实体B;其中,MsgID1为一消息序列号,“⊕”表示逐比特异或,KDF2为一种密钥推导算法,MAC为一种消息鉴别码生成算法;
    步骤5)实体B收到NA||NB||AuthEncDataA||MacTagA后进行解密验证;
    步骤6)实体B计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果相等,则认为实体A身份合法;
    步骤7)实体B计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),并将MacTagB发送给实体A,其中,MsgID2为一 消息序列号;
    步骤8)实体A收到MacTagB后,首先计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与收到的MacTagB进行比较,如果相等,则认为实体B身份合法。
  2. 如权利要求1所述的方法,其特征在于,所述步骤2)中的第一加密认证数据AuthEncDataB包括EncDataB||MACB,其中,EncDataB为实体B生成的加密数据,MACB为实体B生成的完整性鉴别码;
    所述步骤4)中的第二加密认证数据AuthEncDataA包括EncDataA||MACA,其中EncDataA为实体A生成的加密数据,MACA为实体A生成的完整性鉴别码。
  3. 如权利要求1所述的方法,其特征在于,所述步骤2)中计算第一加密认证数据AuthEncDataB以及所述步骤4)中计算第二加密认证数据AuthEncDataA的其它鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,所述SEP和PID符合标准ISO/IEC13157-1定义;
    所述步骤2)中计算第一加密认证数据AuthEncDataB的初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的低96比特值;
    所述步骤4)中计算第二加密认证数据AuthEncDataA的初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的高96比特值;
    其中,KDF3为一种密钥推导算法。
  4. 如权利要求2所述的方法,其特征在于,所述步骤3)实体A收到NB||NA||AuthEncDataB后进行解密验证,具体包括:
    3.1)检查收到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;
    3.2)计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB);
    3.3)解密所述AuthEncDataB中的EncDataB||MACB,NA||NB||IDA||IDB||ZSEEDB||MACB=AuthDecKEIA(AAD,IV,AuthEncDataB);比较计算得到的MACB与收到的AuthEncDataB中的MACB是否相等,不相等则 验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;检查解密得到的NB与收到的NB||NA||AuthEncDataB中的NB是否相等,不相等则验证不正确;其中AuthDec为解密认证算法;
    上述任何一项验证不正确,则认为对实体A收到的NB||NA||AuthEncDataB的验证结果为不正确。
  5. 如权利要求2所述的方法,其特征在于,所述步骤5)实体B收到NA||NB||AuthEncDataA||MacTagA后进行解密验证,具体包括:
    5.1)检查收到的NA与之前发送给实体A的NA是否相等,不相等则验证不正确;
    5.2)检查收到的NB与之前发送给实体A的NB是否相等,不相等则验证不正确;
    5.3)解密所述AuthEncDataA中的EncDataA||MACA,NA||NB||IDA||IDB||ZSEEDA||MACA=AuthDec KEIA(AAD,IV,AuthEncDataA);比较计算得到的MACA与收到的AuthEncDataA中的MACA是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA和NB与之前发送给实体A的NA和NB是否相等,不相等则验证不正确;其中AuthDec为解密认证算法;
    上述任何一项验证不正确,则认为对实体B收到NA||NB||EncDataA||MACA||MacTagA验证结果为不正确。
  6. 如权利要求1-5任一所述的方法,其特征在于,实体A发送给实体B的NA是利用ACT_REQ协议数据单元进行封装后传输的,实体B发送给实体A的NB||NA||AuthEncDataB是利用ACT_RES协议数据单元进行封装后传输的,实体A发送给实体B的NA||NB||AuthEncDataA||MacTagA是利用VFY_REQ协议数据单元进行封装后传输的,实体B发送给实体A的MacTagB是利用VFY_RES协议数据单元进行封装后传输的,其中,ACT_REQ、ACT_RES、VFY_REQ及VFY_RES是符合标准ISO/IEC 13157-1定义的协议数据单元格式。
  7. 一种装置,用于和另一装置进行身份鉴别,该装置包括存储单元、处理单元及收发单元,其特征在于,
    所述存储单元用于存储与所述另一装置之间的预共享密钥PSK及所述另一装置的身份标识IDB;
    所述收发单元用于将随机数NA发送给另一装置,并用于接收另一装置发送的NB||NA||AuthEncDataB;
    所述收发单元还用于发送NA||NB||AuthEncDataA||MacTagA给另一装置,并用于接收另一装置发来的第二消息鉴别标识MacTagB;
    所述处理单元用于产生随机数NA;
    所述处理单元还用于对另一装置发来的NB||NA||AuthEncDataB进行解密验证;
    所述处理单元还用于产生作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),生成NA||NB||AuthEncDataA||MacTagA;其中AuthEnc为一种加密认证算法,EncDataA为该装置生成的加密数据,MACA为该装置生成的完整性鉴别码,AAD为加密认证计算方法需要的其他鉴别数据,IV为初始向量,IDA为该装置的身份标识,IDB为另一装置的身份标识,KDF2为一种密钥推导算法,MsgID1为一消息序列号,MAC为一种消息鉴别码生成算法,“⊕”表示逐比特异或;
    所述处理单元还用于计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与另一装置发来的MacTagB进行比较,如果相等,则另一装置身份合法。
  8. 如权利要求7所述的装置,其特征在于,所述处理单元还用于对另一装置发来的NB||NA||AuthEncDataB进行解密验证,具体是:
    所述处理单元检查收到的NA与发送给另一装置的NA是否相等,不相等则 验证不正确;
    所述处理单元计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB);
    所述处理单元解密AuthEncDataB中的EncDataB||MACB,NA||NB||IDA||IDB||ZSEEDB||MACB=AuthDecKEIA(AAD,IV,AuthEncDataB);比较计算得到的MACB与收到的AuthEncDataB中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为该装置和另一装置的身份标识,若不是则验证不正确;检查解密得到的NA与之前发送给另一装置的NA是否相等,不相等则验证不正确;检查解密得到的NB与收到的NB||NA||AuthEncDataB中的NB是否相等,不相等则验证不正确;其中AuthDec为解密认证算法;
    上述任何一项验证不正确,则认为对另一装置发来的NB||NA||AuthEncDataB的验证结果为不正确。
  9. 一种装置,用于与另一装置进行身份鉴别,所述装置包括存储单元、处理单元及收发单元,其特征在于:
    所述存储单元用于存储与所述另一装置之间的预共享密钥PSK及所述另一装置的身份标识IDA;
    所述收发单元用于接收另一装置发来的随机数NA;
    所述收发单元还用于向另一装置发送NB||NA||AuthEncDataB,并用于接收另一装置发来的NA||NB||AuthEncDataA||MacTagA;
    所述收发单元还用于向另一装置发送第二消息鉴别标识MacTagB;
    所述处理单元用于生成随机数NB和作为密钥种子的随机数ZSEEDB,计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB),计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),并生成NB||NA||AuthEncDataB;其中MKA为鉴别密钥,KEIA为消息加密和完整性密钥,KDF1为一种密钥推导算法,IDB为该装置的身份标识,IDA为另一装置的身份标识,AuthEnc为一种加密认证算法,EncDataB为该装置生成的加密数据,MACB为该装置生成的完整性鉴别码,AAD为加密认证 计算方法需要的其他鉴别数据,IV为初始向量;
    所述处理单元还用于对另一装置发来的NA||NB||AuthEncDataA||MacTagA进行解密验证;
    所述处理单元还用于计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为另一装置身份合法,并计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA)。
  10. 一种如权利要求9所述的装置,其特征在于,所述处理单元还用于对另一装置发来的NA||NB||AuthEncDataA||MacTagA进行解密验证,具体是:
    所述处理单元检查收到的NA与发送给另一装置的NA是否相等,不相等则验证不正确;
    所述处理单元检查收到的NB与发送给另一装置的NB是否相等,不相等则验证不正确;
    所述处理单元解密AuthEncDataA中的EncDataA||MACA,NA||NB||IDA||IDB||ZSEEDA||MACA=AuthDec KEIA(AAD,IV,AuthEncDataA);比较计算得到的MACA与收到的AuthEncDataA中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为另一装置和该装置的身份标识,若不是则验证不正确;检查解密得到的NA和NB与之前发送给另一装置的NA和NB是否相等,不相等则验证不正确;
    上述任何一项验证不正确,则认为对另一装置发来NA||NB||AuthEncDataA||MacTagA的验证结果为不正确。
  11. 一种实体A与实体B进行身份鉴别时,实体A的工作方法,其中,实体A具有和实体B之间的预共享密钥PSK且知晓实体B的身份标识IDB,其特征在于,该方法包括:
    产生随机数NA,并发送给实体B;
    收到实体B发来的NB||NA||AuthEncDataB后进行解密验证;
    产生用于作为密钥种子的随机数ZSEEDA,计算第二加密认证数据AuthEncDataA=EncDataA||MACA=AuthEncKEIA(AAD,IV,NA||NB||IDA||IDB||ZSEEDA),计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),发送NA||NB||AuthEncDataA||MacTagA给实体B;
    收到实体B发来的第二消息鉴别标识MacTagB后,首先计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),然后将计算得到的MacTagB与收到的MacTagB进行比较,如果相等,则认为实体B身份合法;
    其中IDA为实体A的身份标识,IDB为实体B的身份标识,AuthEnc为一种加密认证算法,EncDataA为实体A生成的加密数据,MACA为实体实体A生成的完整性鉴别码,KDF2为一种密钥推导算法,MsgID1和MsgID2分别为一消息序列号,“⊕”表示逐比特异或,MAC为一种消息鉴别码生成算法。
  12. 如权利要求11所述的方法,其特征在于,计算所述第二加密认证数据AuthEncDataA的其它鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,所述SEP和PID符合标准ISO/IEC13157-1定义;
    计算所述第二加密认证数据AuthEncDataA的初始向量IV由密钥推导算法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的高96比特值;
    其中,KDF3为一种密钥推导算法。
  13. 如权利要求11所述的方法,其特征在于,收到实体B发来的NB||NA||AuthEncDataB后进行解密验证,具体是:
    检查收到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;
    计算密钥MKA||KEIA=KDF1(NA,NB,PSK,IDA,IDB);
    解密第一认证加密数据AuthEncDataB中的EncDataB||MACB,NA||NB||IDA||IDB||ZSEEDB||MACB=AuthDecKEIA(AAD,IV,AuthEncDataB);比较计算得到的MACB与收到的AuthEncDataB中的MACB是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标 识,若不是则验证不正确;检查解密得到的NA与之前发送给实体B的NA是否相等,不相等则验证不正确;检查解密得到的NB与收到的NB||NA||AuthEncDataB中的NB是否相等,不相等则验证不正确;
    上述任何一项验证不正确,则认为对收到的NB||NA||AuthEncDataB的验证结果为不正确。
  14. 一种实体A与实体B进行身份鉴别时,实体B的工作方法,其中,实体B具有和实体B之间的预共享密钥PSK且知晓实体A的身份标识IDA,其特征在于,该方法包括:
    收到实体A发来的随机数NA后,生成随机数NB和用于作为密钥种子的随机数ZSEEDB,计算第一加密认证数据AuthEncDataB=EncDataB||MACB=AuthEncKEIA(AAD,IV,NB||NA||IDB||IDA||ZSEEDB),实体B发送NB||NA||AuthEncDataB给实体A;
    收到实体A发来的NA||NB||AuthEncDataA||MacTagA后进行解密验证;
    计算共享密钥种子Z=ZSEEDA⊕ZSEEDB,计算主密钥MK=KDF2(NA,NB,Z,IDA,IDB),计算第一消息鉴别标识MacTagA=MAC(MK,MsgID1||IDA||IDB||NA||NB),并与收到的MacTagA进行比较,如果不相等,终止鉴别;如果相等,则认为实体A身份合法,并计算第二消息鉴别标识MacTagB=MAC(MK,MsgID2||IDB||IDA||NB||NA),将MacTagB发送给实体A;
    其中IDA为实体A的身份标识,IDB为实体B的身份标识,AuthEnc为一种加密认证算法,EncDataB为实体B生成的加密数据,MACB为实体实体B生成的完整性鉴别码,KDF2为一种密钥推导算法,MsgID1以及MsgID2分别为一消息序列号,“⊕”表示逐比特异或,MAC为一种消息鉴别码生成算法。
  15. 如权利要求14所述的方法,其特征在于,计算所述第一加密认证数据AuthEncDataB的其它鉴别数据AAD由协议参数组成,设置为AAD=SEP||PID,SEP为安全协议参数,PID为协议标识符,所述SEP和PID符合标准ISO/IEC13157-1定义;
    计算所述第一加密认证数据AuthEncDataB的初始向量IV由密钥推导算 法产生,设置为KDF3(MKA,KEIA,NA,NB)计算结果的低96比特值;
    其中,KDF3为一种密钥推导算法。
  16. 如权利要求14所述的方法,其特征在于,收到实体A发来的NA||NB||AuthEncDataA||MacTagA后进行解密验证,具体是:
    检查收到的NA与之前发送给实体A的NA是否相等,不相等则验证不正确;
    检查收到的NB与之前发送给实体A的NB是否相等,不相等则验证不正确;
    解密AuthEncDataA中的EncDataA||MACA,NA||NB||IDA||IDB||ZSEEDA||MACA=AuthDec KEIA(AAD,IV,AuthEncDataA);比较计算得到的MACA与收到的AuthEncDataA中的MACA是否相等,不相等则验证不正确;检查解密得到的IDA和IDB是否确实为实体A和实体B的身份标识,若不是则验证不正确;检查解密得到的NA和NB与之前发送给实体A的NA和NB是否相等,不相等则验证不正确;
    上述任何一项验证不正确,则认为对收到NA||NB||AuthEncDataA||MacTagA的验证结果为不正确。
PCT/CN2015/082041 2014-10-17 2015-06-23 基于预共享密钥的实体鉴别方法及装置 WO2016058404A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP15851121.2A EP3208967B1 (en) 2014-10-17 2015-06-23 Entity authentication method and device based on pre-shared key
JP2017516887A JP6417036B2 (ja) 2014-10-17 2015-06-23 事前共有鍵に基づくエンティティ認証方法及び装置
KR1020177010578A KR101931894B1 (ko) 2014-10-17 2015-06-23 사전-공유 키에 기초한 개체 인증 방법 및 디바이스
US15/510,006 US10439801B2 (en) 2014-10-17 2015-06-23 Entity authentication method and device based on pre-shared key

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410554547.6 2014-10-17
CN201410554547.6A CN105577625B (zh) 2014-10-17 2014-10-17 基于预共享密钥的实体鉴别方法及装置

Publications (1)

Publication Number Publication Date
WO2016058404A1 true WO2016058404A1 (zh) 2016-04-21

Family

ID=55746088

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082041 WO2016058404A1 (zh) 2014-10-17 2015-06-23 基于预共享密钥的实体鉴别方法及装置

Country Status (6)

Country Link
US (1) US10439801B2 (zh)
EP (1) EP3208967B1 (zh)
JP (1) JP6417036B2 (zh)
KR (1) KR101931894B1 (zh)
CN (1) CN105577625B (zh)
WO (1) WO2016058404A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109862040A (zh) * 2019-03-27 2019-06-07 北京经纬恒润科技有限公司 一种安全认证方法及认证***
CN112202553A (zh) * 2020-09-27 2021-01-08 北京奇艺世纪科技有限公司 数据传输方法、***、电子设备和存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10263779B2 (en) * 2015-09-24 2019-04-16 Jonetix Corporation Secure communications using loop-based authentication flow
CN107820283B (zh) * 2016-09-13 2021-04-09 华为技术有限公司 一种网络切换保护方法、相关设备及***
US10891366B1 (en) 2017-08-18 2021-01-12 Jonetix Corporation Secure hardware signature and related methods and applications
US10404458B1 (en) * 2017-11-17 2019-09-03 ISARA Corporation Multi-round key encapsulation process
WO2019142307A1 (ja) * 2018-01-19 2019-07-25 ルネサスエレクトロニクス株式会社 半導体装置、更新データ提供方法、更新データ受取方法およびプログラム
JP7096998B2 (ja) * 2018-08-21 2022-07-07 村田機械株式会社 通信許容相手登録方法
CN112118223B (zh) * 2020-08-11 2023-06-20 北京智芯微电子科技有限公司 主站与终端的认证方法、主站、终端及存储介质
CN114760031A (zh) * 2020-12-26 2022-07-15 西安西电捷通无线网络通信股份有限公司 一种身份鉴别方法和装置
CN114760026A (zh) * 2020-12-26 2022-07-15 西安西电捷通无线网络通信股份有限公司 一种身份鉴别方法和装置
JP2023042375A (ja) * 2021-09-14 2023-03-27 Kddi株式会社 無線通信端末装置、認証及び鍵共有方法、プログラム、認証及び鍵共有システム
CN114124355B (zh) * 2021-11-19 2024-01-23 西安热工研究院有限公司 一种基于可扩展认证协议的密钥认证方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242323A (zh) * 2007-02-06 2008-08-13 华为技术有限公司 设备间管道的建立方法和家庭网络***
WO2009139629A1 (en) * 2008-05-14 2009-11-19 Nederlandse Organisatie Voor Toegepast-Natuurwetenschappelijk Onderzoek Tno Shared secret verification method and system
CN101853369A (zh) * 2010-04-01 2010-10-06 西北工业大学 基于随机哈希的双向认证方法
CN102014386A (zh) * 2010-10-15 2011-04-13 西安西电捷通无线网络通信股份有限公司 一种基于对称密码算法的实体鉴别方法及***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003152717A (ja) * 2001-11-19 2003-05-23 Hitachi Ltd 車載機器
CN100403742C (zh) * 2003-07-25 2008-07-16 华为技术有限公司 一种媒体网关与媒体网关控制器之间安全认证的方法
KR101520617B1 (ko) * 2007-04-17 2015-05-15 삼성전자주식회사 메시지의 무결성 유지를 위한 메시지 암호화 방법 및 장치,메시지의 무결성 유지를 위한 메시지 복호화 방법 및 장치
JP4881813B2 (ja) * 2007-08-10 2012-02-22 キヤノン株式会社 通信装置、通信装置の通信方法、プログラム、記憶媒体
CN101222328B (zh) * 2007-12-14 2010-11-03 西安西电捷通无线网络通信股份有限公司 一种实体双向鉴别方法
CN101329720B (zh) * 2008-08-01 2011-06-01 西安西电捷通无线网络通信股份有限公司 一种基于预共享密钥的匿名双向认证方法
CN101442531B (zh) * 2008-12-18 2011-06-29 西安西电捷通无线网络通信股份有限公司 一种安全协议第一条消息的保护方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242323A (zh) * 2007-02-06 2008-08-13 华为技术有限公司 设备间管道的建立方法和家庭网络***
WO2009139629A1 (en) * 2008-05-14 2009-11-19 Nederlandse Organisatie Voor Toegepast-Natuurwetenschappelijk Onderzoek Tno Shared secret verification method and system
CN101853369A (zh) * 2010-04-01 2010-10-06 西北工业大学 基于随机哈希的双向认证方法
CN102014386A (zh) * 2010-10-15 2011-04-13 西安西电捷通无线网络通信股份有限公司 一种基于对称密码算法的实体鉴别方法及***

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109862040A (zh) * 2019-03-27 2019-06-07 北京经纬恒润科技有限公司 一种安全认证方法及认证***
CN109862040B (zh) * 2019-03-27 2021-08-24 北京经纬恒润科技股份有限公司 一种安全认证方法及认证***
CN112202553A (zh) * 2020-09-27 2021-01-08 北京奇艺世纪科技有限公司 数据传输方法、***、电子设备和存储介质

Also Published As

Publication number Publication date
KR20170060072A (ko) 2017-05-31
CN105577625A (zh) 2016-05-11
EP3208967A1 (en) 2017-08-23
US20170310475A1 (en) 2017-10-26
CN105577625B (zh) 2019-04-23
US10439801B2 (en) 2019-10-08
KR101931894B1 (ko) 2019-03-13
EP3208967B1 (en) 2020-04-22
JP6417036B2 (ja) 2018-10-31
JP2017529807A (ja) 2017-10-05
EP3208967A4 (en) 2017-11-01

Similar Documents

Publication Publication Date Title
WO2016058404A1 (zh) 基于预共享密钥的实体鉴别方法及装置
US11323276B2 (en) Mutual authentication of confidential communication
US20240049165A1 (en) Methods and architectures for secure ranging
US10015159B2 (en) Terminal authentication system, server device, and terminal authentication method
US20170085543A1 (en) Apparatus and method for exchanging encryption key
WO2015158172A1 (zh) 一种用户身份识别卡
JP2020530726A (ja) サプライチェーン資産管理を保護するアプリケーションを有する遠隔サーバへのnfcタグ認証
EP3128696B1 (en) Entity authentication method and device
WO2023151479A1 (zh) 数据处理方法及设备
CN109005184A (zh) 文件加密方法及装置、存储介质、终端
CN111130775A (zh) 一种密钥协商方法、装置及设备
CN113905359B (zh) 一种银行外设的蓝牙安全通讯方法、装置、设备和介质
CN104883260A (zh) 证件信息处理和验证方法、处理终端及验证服务器
CN112787990B (zh) 一种电力终端可信接入认证方法和***
EP3185504A1 (en) Security management system for securing a communication between a remote server and an electronic device
KR20150103394A (ko) 암호화 시스템 및 그것의 암호 통신 방법
CN117714185A (zh) 一种基于国密算法的银行柜面数据处理方法及***
CN117675285A (zh) 一种身份验证方法、芯片及设备
CN117201000A (zh) 基于临时密钥协商的海量数据安全通信方法、设备及介质
KR20150098955A (ko) 암호화 시스템 및 그것의 암호 통신 방법

Legal Events

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

Ref document number: 15851121

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15510006

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2017516887

Country of ref document: JP

Kind code of ref document: A

REEP Request for entry into the european phase

Ref document number: 2015851121

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2015851121

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20177010578

Country of ref document: KR

Kind code of ref document: A