WO2021139552A1 - 一种校验中继用户设备的方法及装置 - Google Patents

一种校验中继用户设备的方法及装置 Download PDF

Info

Publication number
WO2021139552A1
WO2021139552A1 PCT/CN2020/139982 CN2020139982W WO2021139552A1 WO 2021139552 A1 WO2021139552 A1 WO 2021139552A1 CN 2020139982 W CN2020139982 W CN 2020139982W WO 2021139552 A1 WO2021139552 A1 WO 2021139552A1
Authority
WO
WIPO (PCT)
Prior art keywords
relay
token
key
identifier
identity
Prior art date
Application number
PCT/CN2020/139982
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 EP20911887.6A priority Critical patent/EP4080927A4/en
Publication of WO2021139552A1 publication Critical patent/WO2021139552A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • 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/3236Cryptographic 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 cryptographic hash functions
    • H04L9/3242Cryptographic 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 cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • 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/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • H04L9/0833Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP] involving conference or group key
    • 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/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
    • 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/3247Cryptographic 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 involving digital signatures
    • 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/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/108Source integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • H04W12/71Hardware identity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/04Terminal devices adapted for relaying to or from another terminal or user

Definitions

  • the application relates to the field of communication technology, and in particular to a method and device for verifying relay user equipment.
  • Proximity Service is a service provided by the 3rd Generation Partnership Project (3rd Generation Partnership Project, 3GPP) system for user equipment (UE) that is close to each other.
  • ProSe business can support multiple application scenarios such as public safety, Internet of Things, and Internet of Vehicles.
  • ProSe technology mainly includes two aspects: ProSe Discovery and ProSe Communication.
  • ProSe discovery refers to the process of mutual detection between UEs to complete identity verification;
  • ProSe communication refers to the process of establishing a secure communication channel between UEs to carry out secure data communication.
  • the source UE and the target UE when they can communicate directly, they can communicate with the target UE through a UE with a relay function (UE-to-UE relay, hereinafter referred to as relay UE).
  • relay UE UE-to-UE relay
  • the source UE sends the identity of the source UE and the identity of the target UE to the relay UE.
  • the relay UE can determine the target UE according to the identity of the target UE and send a message to it. If the target UE agrees to communicate, the relay is The UE sends a response to the UE.
  • the relay UE can send a message to the target UE and receive the response of the target UE at any time. There is a risk that the relay UE obtains the information of the target UE through a malicious call .
  • This application proposes a method and device for verifying relay user equipment (relay UE) to improve the security of communication through the relay UE.
  • relay UE relay user equipment
  • the embodiments of the present application provide a method for verifying a relay UE.
  • the method is suitable for a first user equipment (UE1) to establish a connection with a second user equipment (UE2) through a relay user equipment (relay UE).
  • Communication scenarios including:
  • UE1 receives the message sent by the relay UE, and the message carries the identifier of the relay UE; the UE1 sends a first connection request message to the relay UE, and the first connection request message includes the first token, and the first connection request message.
  • a token is generated based on the first key K1 and the relay UE identity; UE2 receives the second connection request message sent by the relay UE, and the second connection message contains the first token and the relay UE identity; UE2 is in use Following the UE identification and the second key K2, the first token is verified; if the verification of the first token succeeds, UE2 sends a connection response message to the relay UE; and UE1 receives the connection response from the relay UE news.
  • the UE1 receives the message sent by the relay UE.
  • the message may be a broadcast message, or a message received during or after the establishment of secure communication between UE1 and the relay UE.
  • UE1 After UE1 receives the message sent by the relay UE, it verifies the identity of the relay UE. If the verification of the identity of the relay UE fails, the procedure is terminated.
  • the UE1 uses the first key K1 and the relay UE identity to generate the first token.
  • the input parameters for UE1 to generate the first token may also include UE1 identity, UE2 identity, first freshness parameter, and so on.
  • UE1 and UE2 belong to the same group.
  • the UE2 identifier in the input parameter for generating the first token by UE1 may be replaced by the group identifier.
  • the UE1 sends a first connection request message to the relay UE, where the first connection request message carries the first token, and also carries the UE1 identity, the UE2 identity/group identity, and optional first freshness parameters.
  • the relay UE After receiving the first connection request message, the relay UE sends a second connection request message.
  • the second connection request message includes the first token, and also includes the relay UE identity, UE1 identity, UE2 identity/group identity, and optional The first fresh parameter.
  • the relay UE sends the second connection request message by broadcasting, and UE2 obtains the second connection request message by listening to the broadcast message sent by the relay UE; in another possible implementation, when the relay UE has already communicated with When UE2 establishes a secure connection, the relay UE directly sends the second connection request message to UE2.
  • the second connection request sent by the relay UE carries the digital signature of the relay UE.
  • UE2 verifies the identity of the relay UE. Specifically, UE2 can use the The public key of the relay UE verifies the digital signature of the first UE to obtain a verification result of the digital signature. If UE2 fails to verify the identity of the relay UE, the procedure is terminated; UE2 succeeds in verifying the identity of the relay UE and continues to verify the first token.
  • the UE2 checks the first token after receiving the second connection request message sent by the relay UE.
  • UE2 determines whether the relay UE is in the trusted list. Specifically, UE2 matches the relay UE identifier with the relay identifier in the trusted list to obtain Match results. If the matching result is that the matching fails, UE2 verifies the first token, and if UE2 successfully verifies the first token, the relay UE identifier is added to the trusted list; if the matching result is a successful match Then UE2 does not need to verify the first token, thereby shortening the time for establishing communication and improving efficiency.
  • the UE2 verifies the first token, including: UE2 uses the relay UE identifier and the second key K2 as input parameters to perform calculations to obtain the token, and matches the obtained token with the first token to obtain the verification result .
  • K1 and K2 are symmetric keys, UE1 stores K1, and UE2 stores K2.
  • K1 is the private key of UE1
  • K2 is the public key corresponding to the private key K1 saved by UE2.
  • UE2 after UE2 succeeds in verifying the first token or matching the trusted list, UE2 generates a third key K3, and uses K3 as the encryption key and/or integrity of the communication between UE1 and UE2 Protection key; specifically, UE2 generates K3 according to K2; UE2 can also generate K3 according to at least one of the relay UE identity, UE1 identity, UE2 identity, first freshness parameter, second freshness parameter, service identity, and application identity .
  • UE2 sends a connection response message to the relay UE, and the relay UE sends a connection response message to UE1 after receiving the connection response message.
  • UE2 uses K3 to encrypt and/or integrity protect the connection response message; after UE1 receives the connection response message, it generates K3 according to K1, and uses K3 to decrypt and/or integrity verify the connection response message .
  • UE2 after UE2 successfully verifies the first token, it also generates a third token, including: UE2 uses K2 or K3 to relay the UE identity, UE1 identity, UE2 identity and the second freshness parameter as parameters Perform calculations to generate the third token; after UE2 generates the third token, it sends a connection response message to the relay UE, and the connection response message carries the third token; after UE1 receives the connection response message, it generates K3 according to K1, and uses K1 or K3 verifies the third token; after UE1 successfully verifies the third token, K3 is used as the encryption key and/or integrity protection key for communication between UE1 and UE2.
  • the relay UE when the relay UE sends the second connection request message by broadcast, the second relay UE obtains the connection request message and sends it to UE2 sends a third connection request message, the third connection request message carries the first token; the third connection request message also carries the second relay UE identity, UE1 identity, UE2 identity, and optional first freshness parameter.
  • verifying the first token includes: UE2 uses the second relay UE identifier and K3 as input parameters to perform calculations to obtain the token, and compare the obtained token with the first token Match to obtain the verification result.
  • an embodiment of the present application provides a method for verifying a relay UE, and the execution subject is the first user equipment UE1, that is, the user equipment that initiates the connection request.
  • the method is applicable to a scenario where the first user equipment (UE1) establishes communication with the second user equipment (UE2) through a relay user equipment (relay UE), and the method includes:
  • the UE1 receives the message sent by the relay UE, and the message carries the identifier of the relay UE; the UE1 sends a first connection request message to the relay UE, and the first connection request message contains a first token, and the first command
  • the card is generated according to the first key K1 and the identity of the relay UE; the UE1 receives the connection response of the relay UE.
  • the UE1 receives the message sent by the relay UE.
  • the message may be a broadcast message, or a message received during or after the establishment of secure communication between UE1 and the relay UE.
  • UE1 After UE1 receives the message sent by the relay UE, it verifies the identity of the relay UE. If the verification of the identity of the relay UE fails, the procedure is terminated.
  • the UE1 uses the first key K1 and the relay UE identity to generate the first token.
  • the input parameters for UE1 to generate the first token may also include the UE1 identifier, the UE2 identifier, the first freshness parameter, and so on.
  • UE1 and UE2 belong to the same group.
  • the UE2 identifier in the input parameter for generating the first token by UE1 may be replaced by the group identifier.
  • the UE1 sends a first connection request message to the relay UE.
  • the first connection request message carries a first token so that UE2 can calibrate the relay UE according to the first token after receiving the connection request of the relay UE. Test.
  • the first connection request message also carries UE1 identity, UE2 identity/group identity, and optional first freshness parameters.
  • the UE1 receives the connection response of the relay UE, and the connection response is used to indicate that the UE2 successfully verifies the relay UE authorized by the UE1.
  • the connection response is encrypted and/or integrity protected by the third key K3.
  • UE1 After receiving the connection response, UE1 generates K3 according to K1, and decrypts and/or integrity verification of the connection response message according to K3 .
  • the connection response message carries the third token generated by UE2.
  • UE1 After receiving the connection response, UE1 generates a third key K3 according to K1, and uses K1 or K3 to verify the third token; if UE1 successfully verifies the third token, and uses K3 as the encryption key and/or integrity key for communication between UE1 and UE2.
  • an embodiment of the present application provides a method for verifying a relay UE, and the execution subject is the second user equipment UE2, that is, the user equipment that receives the connection request.
  • the method is applicable to a scenario where the first user equipment (UE1) establishes communication with the second user equipment (UE2) through a relay user equipment (relay UE), and the method includes:
  • the UE2 receives the second connection request message, the second connection request message carries the first token; UE2 checks the first token after receiving the second connection request message; UE2 sends to the middle if the verification of the first token succeeds After the UE sends the connection response message, the relay UE sends the connection response message to the UE1 after receiving the connection response message.
  • the UE2 receives the second connection request message, which also carries the relay UE identifier, the UE1 identifier, the UE2 identifier, and the optional first freshness parameter.
  • UE1 and UE2 belong to the same group.
  • the UE2 identifier in the second connection request message may be replaced by the group identifier.
  • the second connection request message also carries the digital signature of the relay UE.
  • UE2 can verify the identity of the relay UE. Specifically, UE2 can use the relay The public key of the UE verifies the digital signature of the first UE to obtain a verification result of the digital signature. If UE2 fails to verify the identity of the relay UE, the procedure is terminated; UE2 succeeds in verifying the identity of the relay UE and continues to verify the first token.
  • UE2 maintains a trusted list. Before verifying the first token, UE2 determines whether the relay UE is in the trusted list. Specifically, UE2 will relay the UE ID to the trusted list. To obtain the matching result. If the matching result is that the matching fails, UE2 verifies the first token, and after the first token is successfully verified, the relay UE identifier is added to the trusted list; if the matching result is that the matching is successful, UE2 There is no need to verify the first token, thereby shortening the communication establishment time and improving efficiency.
  • the UE2 verifying the first token includes: UE2 uses the relay UE identifier and the second key K2 as input parameters to perform calculations to obtain the second token, and to match the obtained second token with the first token to Obtain the verification result.
  • the first keys K1 and K2 are symmetric keys, UE1 stores K1, and UE2 stores K2.
  • K1 is the private key of UE1
  • K2 is the public key corresponding to the private key K1 saved by UE2.
  • K1 is the input parameter for UE1 to generate the first token.
  • UE2 after UE2 successfully verifies the first token, it generates a third key K3, and uses K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2; specifically, UE2 generates K3 according to K2; UE2 may also generate K3 according to at least one of the relay UE identity, UE1 identity, UE2 identity, first freshness parameter, second freshness parameter, service identity, and application identity.
  • UE2 sends a connection response message to the relay UE, so that the relay UE sends a connection response message to UE1 after receiving the connection response message.
  • UE2 uses K3 to encrypt and/or integrity protect the connection response message; after UE1 receives the connection response message, it generates K3 according to K1, and uses K3 to decrypt and/or integrity verify the connection response message .
  • UE2 after UE2 successfully verifies the first token, it also generates a second token, including: UE2 uses K2 or K3 to relay the UE identity, UE1 identity, UE2 identity and the second freshness parameter as parameters Perform calculation to generate the second token; UE2 sends a connection response message to the relay UE, and the connection response message carries the second token.
  • a communication system which includes: a first user equipment UE1, a second user equipment UE2, and a relay user equipment (relay UE).
  • UE1 establishes communication with UE2 through the relay UE.
  • UE1 in the system has the function of realizing the behavior of the first user equipment UE1 in any one of the possible implementations of the first aspect
  • UE2 has the function of realizing the behavior of the second user equipment UE2 in any of the possible implementations of the first aspect.
  • Function; the relay UE has the function of relaying UE behavior in any one of the possible implementations of the first aspect mentioned above;
  • an apparatus which includes:
  • the receiving module is used to receive the message sent by the relay UE, and the message carries the relay UE identity; the processing module is used to generate the first token, specifically, using the first key K1 and the received relay UE identity as Input parameters for calculation to obtain the first token; a sending module for sending a first connection request message to the relay UE, the first connection request message containing the first token generated by the processing module; the receiving module It is also used to receive the connection response of the relay UE.
  • the apparatus has the function of realizing the behavior of the first user equipment UE1 in any one of the possible implementations of the first aspect or the second aspect.
  • an apparatus which includes:
  • a receiving module used to receive a connection request message sent by a relay user equipment (relay UE), the connection request message including a first token; a processing module, used to verify the first token; a sending module , Used to send a connection response message to the relay UE when the processing module successfully verifies the first token.
  • relay UE relay user equipment
  • the device has the function of realizing the behavior of the second user equipment UE2 in any one of the possible implementations of the first aspect or the third aspect.
  • an apparatus which includes:
  • the receiving module is configured to receive a first connection request message sent by the first user equipment UE1, where the first connection request message includes a first token; and the sending module is configured to send a second connection request message, the second connection request The message contains the first token and the identification of the device.
  • the device has the function of realizing the behavior of the relay user equipment (relay UE) in any one of the possible implementations of the first aspect.
  • an apparatus which includes:
  • the receiving module is configured to receive a connection request message sent by a relay user equipment (relay UE), where the connection request message includes the first token; and the sending module is configured to send a third connection request message, the third connection request The message contains the first token and the identification of the device.
  • relay UE relay user equipment
  • the device has the function of realizing the behavior of the second relay user equipment (second relay UE) in any one of the possible implementations of the first aspect described above.
  • a device which includes: a storage unit for storing computer instructions, a communication interface for sending and receiving data, and a processor coupled with the storage unit and the communication interface;
  • the processor executes the computer instructions to implement the function of the behavior of the first user equipment UE1 in any one of the possible designs of the first aspect described above.
  • a device which includes: a storage unit for storing computer instructions, a communication interface for sending and receiving data, and a processor coupled with the storage unit and the communication interface;
  • the processor executes the computer instructions to implement the function of the first user equipment UE1 in any one of the possible designs of the second aspect.
  • a device which includes: a storage unit for storing computer instructions, a communication interface for sending and receiving data, and a processor coupled with the storage unit and the communication interface;
  • the processor executes the computer instructions to implement the function of the second user equipment UE2 in any one of the possible designs of the first aspect.
  • a device which includes: a storage unit for storing computer instructions, a communication interface for sending and receiving data, and a processor coupled with the storage unit and the communication interface;
  • the processor executes the computer instructions to implement the function of the second user equipment UE2 in any one of the possible designs of the third aspect.
  • a device which includes: a storage unit for storing computer instructions, a communication interface for sending and receiving data, and a processor coupled with the storage unit and the communication interface;
  • the processor executes the computer instructions to implement the function of relaying user equipment behavior in any one of the possible designs of the first aspect.
  • a device which includes: a storage unit for storing computer instructions, a communication interface for sending and receiving data, and a processor coupled with the storage unit and the communication interface;
  • the processor executes the computer instructions to implement the function of the second relay user equipment behavior in any one of the possible designs of the first aspect.
  • a device which includes a communication interface for sending and receiving data and a processor coupled with the communication interface;
  • the processor implements the function of the user equipment UE behavior in any one of the possible designs of the first aspect; the processor also executes the first user in any one of the possible designs of the first aspect through the communication interface Data transmission and reception related to the equipment UE1.
  • a device which includes a communication interface for sending and receiving data and a processor coupled with the communication interface;
  • the processor implements the function of the user equipment UE behavior in any one of the possible designs of the first aspect; the processor also executes the first user in any one of the possible designs of the second aspect through the communication interface Data transmission and reception related to the equipment UE1.
  • a device which includes a communication interface for sending and receiving data and a processor coupled with the communication interface;
  • the processor implements the function of the user equipment UE behavior in any one of the possible designs of the first aspect; the processor also executes the second user in any one of the possible designs of the first aspect through the communication interface The data transmission and reception involved in the device UE2.
  • a device which includes a communication interface for sending and receiving data and a processor coupled with the communication interface;
  • the processor implements the function of the user equipment UE behavior in any one of the possible designs of the first aspect; the processor also executes the second user in any one of the possible designs of the third aspect through the communication interface The data transmission and reception involved in the device UE2.
  • a device which includes a communication interface for sending and receiving data and a processor coupled with the communication interface;
  • the processor implements the function of the user equipment UE behavior in any one of the possible designs of the first aspect; the processor also executes the relay user in any one of the possible designs of the first aspect through the communication interface Data transmission and reception involved in the device.
  • a device which includes a communication interface for sending and receiving data and a processor coupled with the communication interface;
  • the processor implements the function of the user equipment UE behavior in any one of the possible designs of the first aspect; the processor also executes the second one in any one of the possible designs of the first aspect through the communication interface. Following the data transmission and reception involved in the user equipment.
  • a non-volatile computer-readable storage medium stores a computer program, and the computer program is executed by a processor to complete the Part or all of the steps of any method executed by any device.
  • a computer program product which when the computer program product runs on a computer device, causes the computer device to execute part or part of any method executed by any device provided in the embodiments of this application. All steps.
  • Fig. 1a, Fig. 1b and Fig. 1c are schematic diagrams of three application scenarios involved in an embodiment of this application;
  • FIG. 2 is a schematic diagram of interaction between UE1 and UE2 through the relay UE.
  • FIG. 3 is a schematic diagram of interaction of a relay UE verification method according to an embodiment of the application.
  • FIG. 4 is a schematic flowchart of a relay UE verification method executed by UE2 according to an embodiment of the application;
  • FIG. 5 is a schematic diagram of interaction of another relay UE verification method according to an embodiment of this application.
  • FIG. 6 is a schematic flowchart of yet another relay UE verification method executed by UE2 according to an embodiment of the application;
  • FIG. 7 is a schematic diagram of interaction of yet another relay UE verification method according to an embodiment of this application.
  • FIG. 8 is a schematic diagram of interaction of yet another relay UE verification method according to an embodiment of this application.
  • FIG. 9 is a schematic diagram of interaction of yet another relay UE verification method according to an embodiment of the application.
  • FIG. 10 is a schematic diagram of interaction based on the group member agent search of the relay UE according to an embodiment of the application.
  • FIG. 11 is a schematic structural diagram of a device according to an embodiment of the application.
  • FIG. 12 is a schematic structural diagram of a device according to an embodiment of the application.
  • FIG. 13 is a schematic structural diagram of a device according to an embodiment of the application.
  • FIG. 14 is a schematic structural diagram of a communication device according to an embodiment of the application.
  • FIG. 15 is a schematic structural diagram of a communication device according to an embodiment of the application.
  • the embodiments of the present application provide a method and device for verifying relay user equipment (relay UE), which is used to verify whether the relay UE is authorized by the source UE when the source UE establishes secure communication with the target UE through the relay UE .
  • relay UE relay user equipment
  • the method and the device are based on the same inventive concept. Since the principles of the method and the device to solve the problem are similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
  • the Proximity Service is a service provided by the 3rd Generation Partnership Project (3GPP) system for user equipment (UE) that is close to each other.
  • 3GPP 3rd Generation Partnership Project
  • UE user equipment
  • the UEs supporting the Prose service can communicate directly within a certain range.
  • the source UE and the target UE cannot communicate directly due to distance and other reasons, they can communicate with the target UE through a UE with a relay function (UE-to-UE relay, hereinafter referred to as a relay UE).
  • UE-to-UE relay hereinafter referred to as a relay UE.
  • UE User Equipment
  • This application relates to a first user equipment (UE1), a second user equipment (UE2), a relay user equipment (relay UE), and a first relay user equipment (the first Following UE), the second relay user equipment (second relay UE), wherein the relay UE, the first relay UE and the second relay UE are UEs with a relay function.
  • the UE involved in this application is a logical entity, which may specifically include, but is not limited to, various devices with wireless communication functions or units, components, modules, devices, chips, or systems on a chip in such devices.
  • the above-mentioned devices with wireless communication functions can be, but are not limited to, terminal equipment (Terminal Equipment), communication equipment (Communication Device), Internet of Things (IoT) equipment, device-to-device communication (device-to-device, D2D) Any of terminal equipment, vehicle to everything (V2X) terminal equipment, machine-to-machine/machine-type communications (M2M/MTC) terminal equipment, and car networking equipment .
  • the terminal device can be a smart phone (smart phone), a smart watch (smart watch), a smart tablet (smart tablet), smart glasses, and other wearable devices, etc.
  • the communication device can be a server, a gateway (Gateway, GW), Controllers, etc.
  • Internet of Things devices can be sensors, electricity meters, water meters, etc.
  • Internet of Vehicles devices can be part of a locomotive (car or electric vehicle), or a vehicle-mounted device, vehicle-mounted terminal or vehicle-mounted unit placed or installed on the vehicle (On Board Unit, OBU) and so on.
  • UE identification (Identifier, ID) and relay UE identification are involved, such as UE1 identification, UE2 identification, first relay UE identification, second relay UE identification, etc.
  • the UE identity or the relay UE identity may be a permanent identity of the UE or a temporary identity.
  • the permanent identity of the UE may include the international mobile subscriber identity (IMSI), the subscription permanent identifier (SUPI), the subscriber package identity (Subscription Concealed Identifier, SUCI), or the general public subscription ID (generic public subscription).
  • IMSI international mobile subscriber identity
  • SUPI subscription permanent identifier
  • SUCI Subscriber package identity
  • general public subscription ID general public subscription ID
  • the temporary identifier of the UE may include a globally unique temporary UE identity (GUTI)
  • the relay UE identifier may also be the relay identifier of the relay UE, where The relay identifier may be the UE identifier of the relay service, or the UE identifier of the Prose service.
  • the UE identifier or the relay UE identifier may also be other identifiers that can uniquely represent the UE, which is not limited in
  • Fig. 1a, Fig. 1b and Fig. 1c are schematic diagrams of three possible application scenarios to which the embodiment of the present application is applicable. The embodiment of the present application is also applicable to other application scenarios, which are not limited here.
  • the user equipment UE3 is a user equipment with a relay function, that is, a relay UE.
  • the UE3 can be connected to the user equipment UE1 and the user equipment UE2 through the PC5 interface, respectively, and connected to the operator's network through the Uu interface.
  • UE1 can communicate with UE2 through UE3 (relay UE).
  • UE1 can be referred to as source user equipment (source UE), UE2 can be referred to as target user equipment (target UE) or remote user equipment (remote UE); UE1 can also be referred to as announcer or discoverer ), UE2 can be called a monitor or a discoveree.
  • the embodiment of the present application does not limit the communication mode adopted between user equipments.
  • the communication mode may be a cellular communication technology, or WiFi, or Bluetooth.
  • UE1 and UE2 belong to the same Prose group.
  • UE1, UE2 and UE3 belong to the same Prose group.
  • the Prose group can also be a normal group, which can be understood as UE1, UE2, and UE3 belong to the same group or group, and the members of the group or group share parameters such as group identification and group key.
  • the scenarios described in Figure 1a, Figure 1b, and Figure 1c may be connected to the vehicle scenario, that is, UE1, UE2, and UE3 are connected to the vehicle devices; the scenario described above may also be other scenarios such as public safety, which is not limited in this application.
  • Figure 2 illustrates a scenario in the prior art where UE1 communicates with UE2 through a relay UE.
  • the relay UE publishes a broadcast message of "I am a relay UE", indicating that the UE receiving the message can communicate with other UEs through the relay UE.
  • the UE1 After receiving the message issued by the relay UE, the UE1 determines to connect to the UE2 through the relay UE.
  • UE1 when UE1 finds that UE2 is not within the direct communication range, it broadcasts "I am UE1, looking for a relay UE", and the relay UE responds to UE1 after receiving the broadcast message.
  • the UE1 sends a connection request message to the relay UE, and the corresponding relay UE receives the connection request message sent by the UE1, and the connection request message carries the UE1 identity and the UE2 identity.
  • the relay UE sends a connection request message to UE2, and correspondingly, UE2 receives a connection request message sent by the relay UE, and the connection request message carries the UE1 identity.
  • the relay UE determines UE2 according to the UE2 identity, and sends a connection request message to UE2;
  • the relay UE broadcasts a connection request message of "I am the relay UE, UE1 requests to connect to UE2".
  • S206 UE2 sends a connection response message to the relay UE, and correspondingly, the relay UE receives the connection response message sent by UE2.
  • UE2 After UE2 receives the connection request message, if it agrees to communicate with UE1, it sends a connection response message to the relay UE.
  • the relay UE After receiving the connection response message, the relay UE sends a connection response message to UE1, and accordingly, UE1 receives the connection response message sent by the relay UE.
  • the relay UE can complete the discovery of UE2 by relaying the UE, and establish communication with UE2.
  • the relay UE can send a message to the target UE and receive a response from the target UE at any time.
  • the relay UE in Figure 2 may send a connection request to UE2 when it does not receive a connection request from UE1.
  • UE2 After UE2 receives the connection request message, it can directly send a connection request to the middle when it cannot confirm whether the relay UE is a relay authorized by UE1.
  • the UE sends a connection response; for another example, after receiving the connection request message of UE1, the relay UE in FIG.
  • connection request message forwards the connection request message to other relay UEs, so that other relay UEs can also call UE2 and receive its connection response.
  • the relay UE maliciously calls the target UE. Therefore, how the UE establishes secure communication with the target UE through the relay UE, specifically, how the target UE checks whether the relay UE is authorized or not is a technical problem to be solved urgently.
  • Fig. 3 is a schematic diagram of interaction for verifying relay user equipment (relay UE) according to an embodiment of the application; this embodiment is applicable to the scenario shown in Fig. 1a.
  • UE2 by binding the relay UE identity in the connection request, UE2 can verify whether the relay UE is authorized.
  • UE1 stores a key K1
  • UE2 stores a key K2.
  • UE1 Before UE1 determines to communicate with UE2 through the relay UE, UE1 saves key K1, and UE2 saves key K2.
  • the key K1 and the key K2 are symmetric keys, at this time K1 and K2 are the same; in another possible implementation, the key K1 is the private key of UE1, and the key K2 is the same as the private key The public key corresponding to K1.
  • UE1 and UE2 may also share a key identifier, and the key identifier is used to identify K1 and K2;
  • K1, K2 and the key identifier can be preset through an application, or distributed through an operator network, or pre-negotiation between UE1 and UE2, and so on.
  • the relay UE sends a message carrying the identifier of the relay UE to the UE1, and accordingly, the UE1 receives the message carrying the identifier of the relay UE sent by the relay UE.
  • the above-mentioned message sent by the relay UE may also carry any one or more of a relay identity indicator, a service identity, an application identity, and a key identity.
  • the relay identity indicator is used for a UE with a relay function to indicate that it is a medium. Following the UE’s identity.
  • the relay UE sends the above message through broadcast or multicast; when UE1 determines to communicate with UE2 through the relay UE, it monitors whether there is a relay UE that provides the relay function; similarly, UE2 can also use Monitor the broadcast message sent by the relay UE to determine the identity of the relay UE.
  • UE1 obtains the relay UE identity during the process of establishing a secure connection with the relay UE, or after the secure connection is established; UE2 can also obtain the relay UE identity by using the same method.
  • UE1 sends a broadcast message to inquire whether there is a relay UE nearby.
  • the relay UE responds to the request of UE1, UE1 obtains the relay UE identity.
  • This application does not limit how UE1 receives messages from the relay UE.
  • the UE1 may verify the identity of the relay UE.
  • the message sent by the relay UE may carry digital signature information.
  • UE1 can verify the identity of the relay UE by verifying the digital signature information, that is, verify whether the identity of the UE relayed Is its own identity. Specifically, UE1 queries the public key corresponding to the relay UE according to the identity of the relay UE or the identity of the network where the relay UE is located, and uses the found public key of the relay UE to verify the digital signature to verify the relay UE identity of.
  • the identifier of the network where the relay UE is located may be an identifier of a tracking area (Tracking Area), or a serving network, or a home network, etc., which is not limited in the embodiment of the present application.
  • UE1 calculates a first token, where the first token is used to establish a connection with UE2 through the relay UE.
  • UE1 calculates the first token according to the key K1 and the relay UE identity, including UE1 using the first key K1, the relay UE identity, the UE1 identity, the UE2 identity and the first freshness parameter as the calculation parameters to generate the token.
  • the first freshness parameter is used to identify the freshness of the above token, thereby preventing replay attacks.
  • the first fresh parameter can be any one of the current time, counter, sequence number, and random number (nonce or RAND) selected by UE1, which is not limited in this application.
  • the calculation parameters for the UE1 to generate the first token may also include any one or more of service identification, application identification, key identification or other parameters, which are not limited in this application.
  • the first token may be an integrity check parameter generated by the above calculation parameters: Message Authentication Code (MAC), and the function for generating the MAC may be a hash type function, HMAC, etc., which is not limited by this application ;
  • the first token can also be a digital signature or other parameters used for UE2 verification, which is not limited in this application.
  • MAC Message Authentication Code
  • UE1 uses the first key K1 to encrypt the relay UE identity to obtain the first token.
  • UE1 sends a first connection request message to the relay UE, and correspondingly, the relay UE receives the first connection request message sent by UE1.
  • the first connection request message sent by the UE1 to the relay UE carries the first token; the first connection request message also carries the UE1 identity, the UE2 identity, the first token and the first freshness parameter;
  • the first connection request message may not carry the first fresh parameter.
  • the first connection request message sent by the UE1 to the relay UE may also carry any one or more of the service ID, the service ID, the key ID or other parameters, which is not limited in this application.
  • the relay UE After receiving the first connection request message sent by UE1, the relay UE determines the identity of UE2, and sends a second connection request message to UE2. Accordingly, UE2 receives the second connection request message sent by the relay UE.
  • the second connection request message sent by the relay UE carries the relay UE identity and the first token; the second connection request message also carries the UE1 identity, the UE2 identity, and the optional first freshness parameter;
  • the second connection request message may also carry any one or more of the service identification, service identification, key identification or other parameters, which is not limited in this application.
  • the relay UE publishes the second connection request message through broadcast, and UE2 obtains the second connection request message by monitoring the broadcast message sent by the relay UE;
  • the relay UE when the relay UE has established a secure connection with UE2, the relay UE directly sends the second connection request message to UE2.
  • the UE2 After receiving the second connection request message sent by the relay UE, the UE2 verifies the identity of the relay UE.
  • the identity of the relay UE is verified.
  • the second connection request message sent by the relay UE carries digital signature information.
  • the UE2 can verify the identity of the relay UE by verifying the digital signature information.
  • the specific verification method refer to the description of UE1 verifying the relayed UE message in S302, which will not be repeated here.
  • UE2 saves the identity of the relay UE (hereinafter referred to as the second relay UE identity), and UE2 verifies whether the relay UE identity in the second connection request message is the same as that of the second relay UE saved by UE2. Following the UE identity is the same.
  • UE2 stores the second relay UE identity. Specifically, in one possible implementation, UE2 determines the second relay UE identity before receiving the second connection request; in another possible implementation, UE2 is receiving the second connection After the request, the identity of the second relay UE is determined.
  • This application does not limit the manner in which UE2 determines the identity of the second relay UE. For example, UE2 can determine the identity of the second relay UE by listening to the broadcast message of the relay UE, or during the process of establishing a secure connection between UE2 and the relay UE. Determine the identity of the second relay UE, or obtain the identity of the second relay UE after UE2 establishes a secure connection with the relay UE.
  • the subsequent steps are continued; if the UE2 fails to verify the identity of the relay UE, the procedure is terminated.
  • the UE2 verifies the first token according to the second key K2.
  • UE2 uses the UE1 identification and/or key identification carried in the second connection request message to query the second key K2 corresponding to the first key K1.
  • UE2 checks the first token carried in the second connection request message according to K2.
  • K2 when K2 is the symmetric key of K1, UE2 uses the relay UE identifier and K2 as input parameters to perform calculations to obtain the second token, and compares the first token with the generated The second token is matched to obtain the verification result; in another possible implementation, when K2 is the public key corresponding to the private key K1, UE2 uses the relay UE identity and K2 to verify the first token, To obtain the verification result.
  • UE2 uses K2 to verify the first token, including decrypting the first token using K2, and combining the relay UE identifier in the first token with the relay UE in the connection request. The mark is compared to obtain the verification result.
  • UE2 checks the first token according to K2 and the second relay UE identity stored by UE2. Thus, it can be verified whether the relay UE identity used by UE1 to calculate the first token is the same as the second relay identity saved by UE2.
  • the failure of the UE2 to verify the first token indicates that the relay UE is not authorized by the UE1, and the UE2 discards the received second connection request message, thereby terminating the process.
  • UE2 sends a rejection message to the relay UE, so that the relay UE sends a rejection message to UE1.
  • the rejection message may also carry a rejection reason, which is used to indicate that the first token verification fails or that the relay UE identity does not match.
  • the UE2 After the UE2 verifies that the first token is passed, it generates a third key K3, and calculates the third token.
  • UE2 generates a third key K3 after verifying that the first token is passed, and uses K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or according to K3 Further derive the encryption key and/or integrity key for communication between UE1 and UE2.
  • K2 is the symmetric key of K1
  • UE2 generates K3 according to K2;
  • UE2 may also relay UE identification, UE1 identification, UE2 identification, first freshness parameter, second freshness parameter, second key identification, At least one of the service identification and the application identification generates K3.
  • the second key identifier is an identifier generated by UE2 for associating with K3.
  • the UE2 calculates the third token after verifying that the first token is passed.
  • UE2 uses K3 or K2 to relay the UE identity, UE1 identity, UE2 identity and the second fresh parameter as calculation parameters to generate the third token;
  • the second freshness parameter is used to indicate the freshness of the third token to prevent replay attacks.
  • the second freshness parameter can be any one of the current time, counter, sequence number, and random number (nonce or RAND) selected by UE1; the second freshness parameter can also be the same as the first freshness parameter or calculated according to the first freshness parameter Obtained, for example, when the first freshness parameter is a counter, the second freshness parameter can be the value of the counter plus n (n is an integer), etc., which is not limited in this application.
  • the calculation parameters for the UE2 to generate the third token may also include any one or more of service identification, application identification, first freshness parameter, second key identification or other parameters, which are not limited in this application.
  • UE2 sends a connection response message to the relay UE, and correspondingly, the relay UE receives the connection response message sent by UE2.
  • connection response message is used to indicate that UE2 succeeds in verifying the relay UE authorized by UE1.
  • connection response message sent by UE2 to the relay UE carries the third token and the second freshness parameter; the connection response message may also carry the first freshness parameter, the key ID, the relay UE ID, and UE1
  • the identifier, any one or more of the UE2 identifiers, is not limited in this application.
  • the relay UE sends a connection response message to UE1, and accordingly, UE1 receives the connection response message sent by the relay UE.
  • the relay UE After the relay UE receives the connection response message sent by UE2, it sends the connection response message to UE1.
  • the UE1 After receiving the connection response message, the UE1 generates a key K3, and verifies the third token in the connection request message.
  • UE1 After UE1 receives the connection response message, it generates a key K3, and verifies the third token according to the generated key K3.
  • UE1 when the key K2 is the symmetric key of the key K1, UE1 generates the key K3 according to K1; UE1 may also relay the UE identity, UE1 identity, UE2 identity, the first freshness parameter, and the second freshness parameter according to the relay UE identity, UE1 identity, and UE2 identity. At least one of the service ID and the application ID generates K3. It should be noted that the input parameters for UE1 to generate K3 should be the same as the input parameters for UE2 to generate K3.
  • UE1 verifies the third token according to the generated key K3, including: UE1 uses the key K3 to relay the UE identity, UE1 identity, UE2 identity and the second fresh parameter as input parameters to calculate to generate the token, and use The generated token is matched with the third token to obtain the verification result.
  • UE2 After UE2 verifies that the third token is passed, it uses key K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or further derives the encryption key for communication between UE1 and UE2 based on key K3. Key and/or integrity key.
  • UE1 after UE1 receives the connection response message, it verifies the third token, and generates the key K3 after successful verification.
  • the UE1 verifies the third token according to the key K1, including: UE1 uses the key K1 to relay the UE identity, the UE1 identity, the UE2 identity and the second freshness parameter Calculate as an input parameter to generate a token, and use the generated token to verify the third token;
  • UE1 After UE1 verifies the third token, it generates key K3, and uses key K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or further deduces UE1 and UE2 based on key K3 Encryption key and/or integrity key for communication between.
  • UE2 generates key K3 according to K1; UE2 can also generate key K3 according to at least one of the relay UE identity, UE1 identity, UE2 identity, first freshness parameter, second freshness parameter, service identity, and application identity. It needs to be pointed out that the input parameters for UE1 to generate K3 should be the same as the input parameters for UE2 to generate K3.
  • UE1 sends a connection request message to UE2 through the relay UE.
  • the connection request message carries the first token generated according to the identifier of the relay UE.
  • UE2 receives the first token sent by the relay UE and the relay After the connection request message identified by the UE, it is verified whether the relay identifier in the first token is the same as the relay UE identifier in the connection request, thereby realizing the verification of the relay UE.
  • Fig. 4 is a flowchart of a method for verifying a relay UE according to an embodiment of the application; this embodiment is applicable to the scenario shown in Fig. 1a.
  • the target user equipment UE2 is used as the executive body to illustrate the process of UE2 checking the relay UE.
  • Step 401 UE2 receives a connection request carrying the first token and the identity of the first relay UE.
  • connection request also includes the UE1 identifier, the UE2 identifier and the optional first fresh parameter.
  • the UE1 identifier the UE1 identifier
  • the UE2 identifier the optional first fresh parameter
  • Step 402 UE2 verifies the identity of the relay UE. If the verification succeeds, it continues to verify the first token (step 403), and if the verification fails, the process is terminated (step 407).
  • UE2 can judge the identity of the relay UE by verifying the digital signature carried in the connection request message; UE2 can also judge the identity of the relay UE according to the pre-stored relay UE identity (second relay identity). For details, please refer to the description in S306 above, which will not be repeated here.
  • Step 403 UE2 verifies the first token according to the second key K2 and the first relay UE identity. If the verification passes, the third key K3 can be generated (go to step 404), and if the verification fails, the process is terminated ( Go to step 408).
  • the UE2 stores the second key K2, and the UE2 queries K2 according to the UE1 identification and/or key identification in the connection request message.
  • the key K2 is the symmetric key of the key K1 saved by the UE1, and the UE2 uses the first relay UE identifier and K3 as input parameters to perform calculations to obtain the token, and compare the generated token with The first token is matched to obtain the verification result;
  • the key K2 is the public key corresponding to the private key K1 saved by the UE1, and the UE1 uses the first relay UE identifier and K2 to pair the first token Perform verification to obtain verification results.
  • Step 404 UE2 generates a third key K3.
  • UE2 can generate a third key K3 after verifying that the first token is passed, and use K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or according to K3 Further derive the encryption key and/or integrity key for communication between UE1 and UE2.
  • K2 is the symmetric key of K1
  • UE2 when K2 is the symmetric key of K1, UE2 generates key K3 according to K2; UE2 can also relay UE ID, UE1 ID, UE2 ID, first freshness parameter, second freshness parameter, and second key according to K2. At least one of the identification, service identification, and application identification generates the key K3. In a possible implementation, UE2 also generates a second key identifier, which is specifically used to associate K3.
  • Step 405 UE2 calculates the third token according to K3 or K2.
  • UE2 uses K2 or K3 to relay the UE identity, UE1 identity, UE2 identity and the second fresh parameter as calculation parameters to generate the third token;
  • the calculation parameters for the UE2 to generate the third token may also include any one or more of service identification, application identification, first freshness parameter, second key identification or other parameters, which are not limited in this application.
  • Step 406 UE2 sends a connection response to the relay UE.
  • connection response is used to indicate that UE2 succeeds in verifying the relay UE authorized by UE1.
  • connection response sent by UE2 also includes the third token and the second freshness parameter; the connection response message may also include the first freshness parameter, the key ID, the relay UE ID, the UE1 ID and the UE2 ID At least one of.
  • Step 407 Terminate the process.
  • UE2 When UE2 fails to verify the identity of the first relay UE or UE2 fails to verify the first token, the received connection request message is discarded, thereby terminating the communication establishment procedure.
  • UE2 sends a rejection message to the relay UE, so that the relay UE sends a rejection message to UE1.
  • the rejection message may also carry a rejection reason, which is used to indicate that the first token verification fails or that the relay UE identity does not match.
  • UE2 after UE2 receives the connection request message carrying the first token and the relay UE identity sent by the relay UE, it uses the stored second key K2 to verify whether the relay identity in the first token is It is the same as the relay UE identifier in the connection request, so as to realize the verification of the relay UE.
  • Fig. 5 is a schematic diagram of interaction of a verification relay UE according to an embodiment of the application; this embodiment is applicable to the scenario shown in Fig. 1a.
  • This embodiment binds the relay UE identity to the connection request so that UE2 can verify whether the relay UE is authorized.
  • the difference between this embodiment and the embodiment described in FIG. 3 is that UE2 maintains a trusted list, and UE2 is in school. Before verifying the first token in the connection request message sent by the relay UE, judge whether the relay UE is in the trusted list. If the judgment is successful, there is no need to verify the first token, thereby shortening the communication establishment time and improving efficiency .
  • UE1 stores the first key K1
  • UE2 stores the second key K2 and maintains a trusted list.
  • K1 and K2 can be a pair of symmetric keys; they can also be a pair of public and private keys, that is, K1 is the private key of UE1, and K2 is the public key corresponding to the private key K1. Please refer to S300 for details, so I won't repeat it here.
  • UE2 also maintains a trusted list, which contains the relay UE identifier, and the relay UE indicated by the relay UE identifier is trusted for UE2.
  • UE2 receives the message sent by the relay UE in the trusted list, there is no need to further check whether the relay UE is authorized.
  • the relay UE identity included in the trusted list is time-sensitive. For example, each relay UE identity in the list has a timer, and the relay UE identity is automatically deleted when the timer expires; or each relay UE identity has a validity period, and UE2 performs relay UE identity matching It is also judged whether the relay UE identity in the list is within the validity period. In addition, UE2 needs to periodically delete the expired relay UE identity; other methods can also be used to achieve the timeliness of the relay UE identity, which is not limited in this application.
  • the trusted list can be preset by the UE2 application or distributed by the operator's network.
  • the UE2 may update the trusted list in the process of establishing a secure connection with the relay UE. Specifically, after the UE2 passes the verification of the relay UE, the identifier of the relay UE is added to the trusted list.
  • steps S501 to S506 is the same as that of steps S301 to S306, and will not be repeated here.
  • S507 UE2 judges whether the relay UE is in the trusted list.
  • UE2 After UE2 receives the second connection request and optionally verifies the identity of the first relay UE, it matches the relay UE identity carried in the second connection request with the relay UE identity in the trusted list maintained by UE2 .
  • the match is successful, it means that the relay UE is trustworthy to UE2, and the UE can skip the step of verifying the first token (ie S508) and perform the subsequent steps;
  • the matching fails, it means that the relay UE is not trustworthy to UE2, and the UE must further verify the first token in the second connection request message, that is, execute S508. After the UE2 verifies that the first token is passed, the trusted list is updated.
  • UE2 When the relay UE identity is not in the trusted list maintained by UE2, UE2 further checks the first token. Specifically, UE2 uses the UE1 identification and/or key identification carried in the second connection request message to query the second key K2 corresponding to the first key K1, and checks the second key K2 carried in the second connection request message according to K2. The first token. For details, see S307, which will not be repeated here.
  • UE2 After UE2 verifies that the first token is passed, it updates the trusted list and continues to perform the subsequent step S509; UE2 updates the trusted list, specifically, UE2 adds the identity of the relay UE to the trusted list;
  • the failure of the UE2 to verify the first token indicates that the relay UE is not authorized by the UE1, and the UE2 discards the received second connection request message, thereby terminating the process.
  • UE2 generates a third key K3.
  • UE2 can generate a third key K3, and use K3 as the encryption key and/or integrity of the communication between UE1 and UE2 Protection key, or further derive the encryption key and/or integrity key for communication between UE1 and UE2 according to K3.
  • K2 is the symmetric key of K1
  • UE2 generates key K3 according to K2
  • UE2 can also relay UE identification, UE1 identification, UE2 identification, first freshness parameter, second freshness parameter, and second key
  • At least one of the identification, service identification, and application identification generates the key K2.
  • the second key identifier is a key identifier generated by UE2 for associating K3 in a possible implementation.
  • the key K3 is used to encrypt and/or integrity protect the connection response message sent by UE2 to the relay UE.
  • S510 UE2 sends a connection response message to the relay UE, and correspondingly, the relay UE receives the connection response message sent by UE2.
  • connection response is used to indicate that UE2 succeeds in verifying the relay UE authorized by UE1.
  • connection response message is encrypted and/or integrity protected by the third key K3;
  • connection response message carries the third token and the second freshness parameter; the connection response message may also carry the first freshness parameter, key ID, relay UE ID, UE1 ID, UE2 ID, Any one or more of the second key identification is not limited in this application.
  • the relay UE After receiving the connection response message sent by UE2, the relay UE sends the connection response message to UE1, and accordingly, UE1 receives the connection response message sent by the relay UE.
  • UE1 After receiving the connection response message, UE1 generates a third key K3.
  • UE1 when the second key K2 is the symmetric key of the first key K1, UE1 generates the key K3 according to K1; UE1 can also generate the key K3 according to the relay UE identity, UE1 identity, UE2 identity, first freshness parameter, and first freshness parameter. At least one of the second fresh parameter, the second key identifier, the service identifier, and the application identifier generates the third key K3. It should be pointed out that the input parameters for UE1 to generate K3 should be the same as the input parameters for UE2 to generate K3.
  • the UE1 uses the generated key K3 to decrypt and/or verify the integrity of the connection response message.
  • UE1 verifies the third token in the connection response message. Specifically, after UE1 receives the connection response message, it generates the third key K3 and verifies the third token according to the generated K3; or after UE1 receives the connection response message, it verifies the third token according to the first key K1 , After the verification is successful, the key K3 is generated. For details, please refer to the description at S311, which will not be repeated here.
  • UE1 sends a connection request message to UE2 through the relay UE.
  • the connection request message carries the first token generated according to the relay UE identifier.
  • UE2 receives the first token and the relay from the relay UE. After the connection request message identified by the UE, it is determined whether the relay UE identifier matches the relay UE identifier in the trusted list of UE2, and if it does not match, it is checked whether the relay identifier in the first token matches the one in the connection request.
  • the identifiers of the relay UEs are the same, so that the verification of the relay UEs is realized.
  • Fig. 6 is a flowchart of a method for verifying a relay UE according to an embodiment of the application; this embodiment is applicable to the scenario shown in Fig. 1a.
  • UE2 is used as the executive body to illustrate the process of UE2 verifying the relay UE.
  • Step 601 UE2 receives a connection request carrying the first token and the identifier of the relay UE.
  • connection request also includes the UE1 identifier, the UE2 identifier and the optional first fresh parameter.
  • the UE1 identifier the UE1 identifier
  • the UE2 identifier the optional first fresh parameter
  • Step 602 UE2 verifies the identity of the relay UE. If the verification is successful, it continues to determine whether the relay UE identity is in the trusted list of UE2 (step 603), and if the verification fails, the process is terminated (step 608). ).
  • UE2 can judge the identity of the relay UE by verifying the digital signature carried in the connection request message; UE2 can also judge the identity of the first relay UE according to the pre-stored relay UE identity (the second relay UE identity is documented below) . For details, please refer to the description in S306 above, which will not be repeated here.
  • Step 603 UE2 judges whether the relay UE can be matched with the trusted list of UE2, if the matching succeeds, the third key K3 is generated (step 606), and if the matching fails, the first token is verified (step 608).
  • UE2 maintains a trusted list, which contains the identifiers of relay UEs trusted by UE2 and the optional validity period of each relay UE identifier.
  • the trusted list can be preset by UE2 or distributed by the operator's network.
  • UE2 can update the trusted list in the process of establishing a secure connection with the relay UE.
  • UE2 matches the received relay UE identity with the relay UE identity in the trusted list. If the match is successful, it means that the relay UE is trustworthy to UE2, and UE2 does not need to verify the relay UE; if the match fails It means that the relay UE is untrustworthy to UE2, and UE2 needs to further verify the relay UE.
  • Step 604 When the relay UE identity is not in the trusted list of UE2, UE2 verifies the first token according to the second key K2, and updates the trusted list if the verification passes (605), and terminates the process if the verification fails ( Go to step 608).
  • the UE2 stores the second key K2, and the UE2 queries K2 according to the UE1 identification and/or key identification in the connection request message.
  • K2 is the symmetric key of the first key K1 saved by UE1, and UE2 uses the relay UE identifier and K2 as input parameters to perform calculations to obtain the second token, and then combines the generated second token The card is matched with the first token to obtain the verification result;
  • K2 is the public key corresponding to the private key K1 saved by UE1, and UE1 uses the relay UE ID and K3 to check the first token. To obtain the verification result.
  • Step 605 After the UE2 successfully verifies the first token, it updates the trusted list.
  • UE2 adds the relay UE identity to the trusted list.
  • UE2 also adds the validity period of the relay UE identity to the trusted list.
  • Step 606 UE2 generates a third key K3.
  • the UE when the relay UE identity matches the trusted list of UE2 successfully or after UE2 verifies the first token, the UE can generate the third key K3, and use K3 as the communication between UE1 and UE2. Encryption key and/or integrity protection key, or further derive the encryption key and/or integrity key for communication between UE1 and UE2 according to K3.
  • K3 After UE2 generates K3, it uses the K3 to encrypt and/or integrity protect the connection response message sent by UE2 to the relay UE, or further calculate the third token. For details, see S509, which will not be repeated here.
  • Step 607 UE2 sends a connection response message to the relay UE.
  • connection response message is used to indicate that UE2 succeeds in verifying the relay UE authorized by UE1.
  • connection response message is encrypted and/or integrity protected by the third key K3;
  • connection response message carries the third token and the second freshness parameter; the connection response message may also carry the first freshness parameter, the second key identifier, the relay UE identifier, the UE1 identifier, and the UE2. Any one or more of the logos are not limited in this application.
  • Step 608 Terminate the process.
  • UE2 When UE2 fails to verify the identity of the relay UE or UE2 fails to verify the first token, the received connection request message is discarded, thereby terminating the communication establishment procedure.
  • UE2 sends a rejection message to the relay UE, so that the relay UE sends a rejection message to UE1.
  • the rejection message may also carry a rejection reason, which is used to indicate that the first token verification fails or that the relay UE identity does not match.
  • UE2 After UE2 receives the connection request message carrying the first token and the relay UE identity sent by the relay UE, it determines whether the relay UE identity matches the relay UE identity in the trusted list of UE2, if If the matching is unsuccessful, it is verified whether the relay identifier in the first token is the same as the relay UE identifier in the connection request, thereby realizing the verification of the relay UE.
  • Figure 7 is a schematic diagram of an interaction for verifying a relay UE according to an embodiment of the application; this embodiment binds the relay UE identity in the connection request so that UE2 can verify whether the relay UE is authorized, as described in this embodiment
  • S700 to S704 are the same as S300 to S304 in FIG. 3, and will not be repeated here.
  • the second connection request message sent by the first relay UE carries the UE1 identity, the UE2 identity, the first relay UE identity, the first token and the optional first freshness parameter;
  • the second connection request message may also carry any one or more of the service identification, service identification, key identification or other parameters, which is not limited in this application.
  • the third connection request message sent by the second relay UE carries the UE1 identity, the UE2 identity, the second relay UE identity, the first token and the optional first freshness parameter;
  • the third connection request message may also carry any one or more of the service identification, service identification, key identification or other parameters included in the second connection request, which is not limited in this application.
  • the second relay UE sends the third connection request message by broadcasting, and UE2 obtains the third connection request message by monitoring the broadcast message sent by the second relay UE;
  • the second relay UE when the second relay UE has established a secure connection with UE2, the second relay UE directly sends the third connection request message to UE2.
  • the UE2 After receiving the third connection request message sent by the second relay UE, the UE2 verifies the identity of the second relay UE.
  • the specific content is the same as that of UE2 verifying the identity of the relay UE in S306, and will not be repeated here.
  • UE2 After UE2 succeeds in verifying the identity of the relay UE, it continues to perform the subsequent steps; if UE2 fails to verify the identity of the relay UE, the procedure is terminated.
  • S708 UE2 judges whether the connection request initiated by UE1 has been processed.
  • UE2 After UE2 successfully verifies the identity of the second relay UE, it continues to determine whether UE2 has processed the connection request message initiated by UE1.
  • UE2 has processed the second connection request sent by the first relay UE before receiving the third connection request message sent by the second relay UE. At this time, UE2 will discard the third connection request message, thereby Terminate the process.
  • the UE2 matches the second relay UE identity with the relay identity in the trusted list.
  • UE2 If the matching is successful, it indicates that the first relay UE is trustworthy to UE2.
  • UE2 generates the third key K3 and uses K3 as the encryption key and/or integrity protection key for the communication between UE1 and UE2, or further derives the encryption of the communication between UE1 and UE2 according to K3.
  • Key and/or integrity key when K2 is the symmetric key of K1, UE2 generates K3 according to K2; UE2 can also generate K3 according to UE1 identity, UE2 identity, first freshness parameter, second freshness parameter, second key identity, service identity, and application identity At least one of the items generates K3.
  • the second key identifier is the key identifier generated by UE2 for associating K3.
  • the key K3 is used to encrypt and/or integrity protect the connection response message sent by UE2 to the second relay UE.
  • UE2 after UE2 generates the third key K3, it further calculates the third token. Specifically, UE2 uses the second key K2 or the third key K3, the first relay UE identity, the UE1 identity, the UE2 identity and the second freshness parameter as input parameters for calculation to generate the second token.
  • the calculation parameters for the UE2 to generate the second token may also include any one or more of service identification, application identification, first freshness parameter, second key identification or other parameters, which are not limited in this application.
  • the match fails, it means that the second relay UE is not trusted to UE2, and the UE must further verify the first token in the third connection request message.
  • UE2 uses the UE1 identification and/or key identification carried in the third connection request message to query the second key K2 corresponding to the first key K1.
  • UE2 checks the first token carried in the third connection request message according to K2 and the second relay UE identity. Since the first token is generated based on the key K1 and the identity of the first relay UE, UE2 will fail to verify the first token.
  • the third connection request message is discarded, thereby terminating the process.
  • UE2 sends a connection response message to the second relay UE, and correspondingly, the second relay UE receives the connection response message sent by UE2.
  • connection response message is encrypted and/or integrity protected by the third key K3;
  • connection response message carries the third token, the UE2 identifier and the second freshness parameter; the connection response message may also carry the first freshness parameter, the second key identifier, the UE1 identifier, and the second freshness parameter.
  • any one or more of the first relay UE identity is not limited in this application.
  • the second relay UE After receiving the connection response message sent by UE2, the second relay UE sends the connection response message to the first relay UE, and correspondingly, the first relay UE receives the connection response message.
  • the first relay UE After receiving the connection response message, the first relay UE identifies the connection response message and judges the connection response message.
  • the first relay UE identifier determines whether the connection response message carrying the UE2 identifier comes from UE2, and discards the message if the determination fails.
  • the first relay UE determines whether the connection response message returned by UE2 has been processed, discards the message if it has been processed, and sends the connection response message to UE1 if it has not been processed.
  • the first relay UE sends the connection response message to UE1, and correspondingly, UE1 receives the connection response message sent by the first relay UE.
  • the UE1 After receiving the connection response message, the UE1 generates a key K3.
  • the connection request message initiated by UE1 is sent to UE2 via the first relay UE and the second relay UE.
  • UE2 determines whether the connection request initiated by UE1 has been processed to avoid repeated responses;
  • a relay UE determines whether the connection response is sent by UE2 or whether the connection response initiated by UE2 has been processed, so as to prevent UE1 from receiving repeated responses.
  • FIG. 8 is a schematic diagram of interaction of a verification relay UE in an embodiment of the application.
  • the embodiment in FIG. 8 binds the relay UE identity in the connection request so that UE2 can verify whether the relay UE is authorized.
  • This embodiment is applicable to the scenario shown in FIG. 1a.
  • the difference between this embodiment and the embodiment in FIG. 3 is that the relay UE verifies the third token sent by UE2, and directly ends the process when the verification fails, thereby reducing signaling overhead and improving efficiency.
  • S800 UE1 stores a first key K1, and UE2 stores a second key K2.
  • UE1 Before UE1 determines to communicate with UE2 through the relay UE, UE1 stores the first key K1, and UE2 stores the second key K2.
  • K1 and K2 are symmetric keys.
  • UE1 and UE2 can also share a key identifier, which is used to identify K1 and K2;
  • K1, K2, and key identifiers can be preset through applications, or distributed through an operator's network, or pre-negotiation between UE1 and UE2, and so on.
  • the relay UE sends a message carrying the identifier of the relay UE to UE1, and correspondingly, UE1 receives the message carrying the identifier of the relay UE sent by the relay UE.
  • UE1 After UE1 receives the message sent by the relay UE, it verifies the identity of the relay UE.
  • UE1 calculates the first token and the fourth token.
  • UE1 calculates the first token and the fourth token according to the first key K1 and the relay UE identity, including: UE1 uses K1, relay UE identity, UE1 identity, UE2 identity and the first freshness parameter as calculation parameters Generate the first token; UE1 uses K1, relay UE identity, UE1 identity, UE2 identity and the second fresh parameter as calculation parameters to generate the fourth token.
  • the first freshness parameter and the second freshness parameter are used to identify the freshness of the token, so as to prevent replay attacks.
  • the first fresh parameter can be any one of the current time, counter, sequence number, and random number (nonce or RAND) selected by UE1, which is not limited in this application.
  • the calculation parameters for the UE1 to generate the first token or the fourth token may also include any one or more of service identification, application identification, key identification or other parameters, which is not limited in this application.
  • S804 UE1 sends a first connection request message to the relay UE, and correspondingly, the relay UE receives the first connection request message sent by UE1.
  • the first connection request message sent by the UE1 to the relay UE carries the UE1 identity, the UE2 identity, the first token, the fourth token, the first freshness parameter and the second freshness parameter.
  • the first A connection request message may not carry the first freshness parameter and/or the second freshness parameter.
  • the first connection request message sent by the UE1 to the relay UE may also carry any one or more of the service ID, the service ID, the key ID or other parameters, which is not limited in this application.
  • the relay UE saves the fourth token.
  • the relay UE After receiving the first connection request message sent by UE1, the relay UE saves the fourth token, and the fourth token is used to verify the third token sent by UE2.
  • the relay UE After receiving the first connection request message sent by UE1, the relay UE determines the identity of UE2 and sends a second connection request message to UE2. Accordingly, UE2 receives the second connection request message sent by the relay UE.
  • the second connection request message sent by the relay UE carries the UE1 identity, the UE2 identity, the relay UE identity, the first token and the optional first freshness parameter and/or the second freshness parameter;
  • the second connection request message may also carry any one or more of the service identification, service identification, key identification or other parameters, which is not limited in this application.
  • the relay UE sends the second connection request message by broadcasting, and UE2 obtains the second connection request message by monitoring the broadcast message sent by the relay UE;
  • the relay UE when the relay UE has established a secure connection with UE2, the relay UE directly sends the second connection request message to UE2.
  • the UE2 After receiving the second connection request message sent by the relay UE, the UE2 verifies the identity of the relay UE.
  • UE2 generates a third key K3 after verifying that the first token is passed, and uses K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or further based on K3 Derive the encryption key and/or integrity key for communication between UE1 and UE2.
  • UE2 generates K3 according to K2; UE2 may also relay according to at least one of UE identification, UE1 identification, UE2 identification, first freshness parameter, second freshness parameter, second key identification, service identification, and application identification Generate K3.
  • the second key identifier is the key identifier generated by UE2 for associating K3.
  • UE2 calculates the third token after verifying that the first token is passed. Specifically, UE2 uses K2, relay UE identity, UE1 identity, UE2 identity and the second freshness parameter as calculation parameters to generate the first token. Three tokens.
  • Other calculation parameters for UE2 to generate the third token may also include any one or more of service identification, application identification, first freshness parameter, second key identification or other parameters. It should be pointed out that UE2 generates the third token. The other calculation parameters of the UE1 should be the same as the other calculation parameters of the UE1 generating the fourth token.
  • S810 UE2 sends a connection response message to the relay UE, and correspondingly, the relay UE receives the connection response message sent by UE2.
  • connection response message sent by UE2 to the relay UE carries the third token; the connection response message may also carry the second freshness parameter, the first freshness parameter, the second key ID, the relay UE ID, the UE1 ID, and the UE2 ID. Any one or more of, this application is not limited.
  • the relay UE checks the third token in the connection response.
  • the relay UE After the relay UE receives the connection response carrying the third token sent by UE2, it verifies the third token. Specifically, the relay UE verifies whether the received third token is the same as the third token stored by the relay UE. The four tokens are the same.
  • the communication establishment procedure is terminated.
  • the relay UE After successfully verifying the third token, the relay UE sends a verification result to UE1, and correspondingly, UE1 receives the verification result sent by the relay UE.
  • the UE1 After receiving the verification result sent by the relay UE, the UE1 generates a third key K3.
  • UE1 generates K3 according to K1; UE1 can also generate a key according to at least one of the relay UE identity, UE1 identity, UE2 identity, first freshness parameter, second freshness parameter, service identity, application identity and other parameters. K2, it should be pointed out that the other parameters of UE1 generating K3 should be the same as those of UE2 generating K3.
  • UE1 uses the generated K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or further derives the encryption key and/or integrity key for communication between UE1 and UE2 based on the key K2 .
  • UE1 when UE1 sends the first token generated according to the relay UE identifier to UE2 through the relay UE, it also sends a fourth token to the relay UE, and the relay UE saves the fourth token; UE2 checks After the first token passes, the third token is sent to the relay UE; the relay UE verifies the third token of the token according to the stored fourth token, and sends the verification result to UE1, so as to realize the relay UE The checksum. It should be pointed out that before verifying the first token, UE2 can also verify whether the relay UE is in the trusted list. If the verification is successful, you can skip the step of verifying the first token and directly generate the third token. Therefore, the time for establishing communication is shortened, and the relevant description of the trusted list is shown in the embodiment in Fig. 5, which will not be repeated here.
  • FIG. 9 is a schematic diagram of an interaction for verifying a relay UE according to an embodiment of the application; this embodiment binds the relay UE identity to the connection request sent by the UE1 so that the UE2 can verify whether the relay UE is authorized by the UE1.
  • the difference between this embodiment and the embodiment in FIG. 3 is that UE1 can discover UE2 according to the group identifier, which is suitable for the group communication scenario shown in FIG. 1b.
  • UE1 and UE2 belong to the same group, and the group identifier of the group is saved;
  • UE1 and UE2 also share a key K1, where K1 is the key of the group to which UE1 and UE2 belong.
  • UE1 and UE2 may also share a key identifier, which is used to identify K1.
  • This application does not restrict how UE1 and UE2 obtain K1 and/or group identification and/or key identification.
  • the key K1, and/or the group identification, and/or the key identification can be preset through an application, or distributed through an operator network, or pre-negotiation between UE1 and UE2, and so on.
  • the relay UE sends a message carrying the identifier of the relay UE to UE1, and correspondingly, UE1 receives the message carrying the identifier of the relay UE sent by the relay UE.
  • the UE1 may verify the identity of the relay UE.
  • UE1 calculates a first token, where the first token is used to establish a connection with the group member through the relay UE.
  • UE1 calculates the first token according to the first key K1 and the relay UE identity, including UE1 using K1, the relay UE identity, the UE1 identity, the group identity, and the first freshness parameter as the calculation parameters to generate the first token. .
  • the first freshness parameter is used to identify the freshness of the above token, thereby preventing replay attacks.
  • the first fresh parameter can be any one of the current time, counter, sequence number, and random number (nonce or RAND) selected by UE1, which is not limited in this application.
  • the calculation parameters for the UE1 to generate the first token may also include any one or more of service identification, application identification, key identification or other parameters, which are not limited in this application.
  • the first token may be the integrity check parameter MAC generated by the above calculation parameters, and the function for generating the MAC may be a hash type function, HMAC, etc., which is not limited in this application; the first token may also be a digital signature Or other parameters used for UE2 verification are not limited in this application.
  • UE1 sends a first connection request message to the relay UE, and correspondingly, the relay UE receives the first connection request message sent by UE1.
  • the first connection request message sent by UE1 to the relay UE carries the UE1 identifier, the group identifier, the first token and the first freshness parameter;
  • the first connection request message may not carry the first freshness parameter. parameter.
  • the first connection request message sent by the UE1 to the relay UE may also carry any one or more of the service ID, the service ID, the key ID or other parameters, which is not limited in this application.
  • the relay UE After receiving the first connection request message sent by UE1, the relay UE sends a second connection request message to the group members of UE1 according to the group identifier, and correspondingly, the group member receives the second connection request message sent by the relay UE. .
  • the second connection request message sent by the relay UE carries the UE1 identity, the group identity, the relay UE identity, the first token and the optional first freshness parameter, where the relay UE identity is the identity of the relay UE;
  • the second connection request message may also carry any one or more of the service identification, service identification, key identification or other parameters, which is not limited in this application.
  • the relay UE sends the second connection request message by broadcasting, and the group member UE2 obtains the second connection request message by monitoring the broadcast message sent by the relay UE;
  • the relay UE may directly send the second connection request message to UE2.
  • S907 UE2 verifies the first token according to the key K1.
  • UE2 uses the UE1 identification and/or group identification and/or key identification carried in the second connection request to query the first key K1, and verifies the first key K1 carried in the second connection request according to the first key K1. Token.
  • UE2 uses the relay UE identifier and K1 as input parameters to perform calculations to obtain the second token, and matches the first token with the generated second token to obtain the verification result.
  • UE2 verifies that the first token passes, it means that the relay UE passes UE1, and UE2 continues to perform the subsequent steps;
  • the failure of the UE2 to verify the first token indicates that the relay UE is not authorized by the UE1, and the UE2 discards the received second connection request message, thereby terminating the process.
  • the UE2 After the UE2 verifies that the first token is passed, it generates a third key K3, and calculates the third token.
  • UE2 generates a third key K3 after verifying that the first token is passed, and uses K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or further according to K3
  • K3 The encryption key and/or the integrity key of the communication between UE1 and UE2 are derived; in another possible implementation, K3 can be used as the group communication key or the group communication key can be further derived based on the key K2.
  • UE2 generates K3 according to K1; UE2 can also relay according to at least one of UE identification, UE1 identification, group identification, UE2 identification, first freshness parameter, second freshness parameter, key identification, service identification, and application identification.
  • One item generates K3.
  • the UE2 calculates the third token after verifying that the first token is passed.
  • UE2 uses the third key K3 to relay the UE identity, UE1 identity, UE2 identity, group identity and the second freshness parameter as calculation parameters to generate the third token;
  • UE2 uses the key K1, the relay UE identity, the UE1 identity, the UE2 identity, the group identity and the second freshness parameter as calculation parameters to generate the third token.
  • the second freshness parameter is used to indicate the freshness of the third token to prevent replay attacks.
  • the calculation parameters for UE2 to generate the third token may also include any one or more of service identification, application identification, key identification or other parameters, which are not limited in this application.
  • UE2 sends a connection response message to the relay UE, and correspondingly, the relay UE receives the connection response message sent by UE2.
  • connection response message sent by UE2 to the relay UE carries the third token, the UE2 identifier, and the second freshness parameter; the connection response message may also carry the first freshness parameter, the key identifier, the relay UE identifier, the UE1 identifier, and the group Any one or more of the logos are not limited in this application.
  • the relay UE sends a connection response message to UE1, and correspondingly, UE1 receives the connection response message sent by the relay UE.
  • the relay UE After the relay UE receives the connection response message sent by UE2, it sends the connection response message to UE1.
  • the UE1 After receiving the connection response message, the UE1 generates a third key K3, and verifies the third token in the connection request message.
  • the UE1 after receiving the connection response message, the UE1 verifies the third token, and generates the third key K3 after successful verification. Specifically, UE1 uses the key K1, the relay UE identity, the UE1 identity, the UE2 identity, the group identity, and the second freshness parameter as input parameters for calculation to generate a token, and uses the generated token and the third token Perform a match to obtain the verification result.
  • UE1 after UE1 receives the connection response message, it generates the third key K3, and verifies the third token according to the generated K3. Specifically, UE1 uses K2, the relay UE identity, UE1 identity, UE2 identity, group identity, and the second freshness parameter as input parameters for calculation to generate a token, and uses the generated token to match the third token To obtain the verification result.
  • UE1 generates K3, specifically, UE1 generates K3 according to K1; UE1 can also relay UE identity, UE1 identity, group identity, UE2 identity, first freshness parameter, second freshness parameter, key identity, service identity, application At least one of the other parameters such as the identifier generates K3. It should be pointed out that the other parameters used by UE1 to generate K3 should be the same as those used by UE2 to generate K3.
  • UE1 sends a connection request message to the group member through the relay UE.
  • the connection request message carries the first token generated according to the relay UE identifier, and the group member UE2 receives the first token sent by the relay UE. After the token and the connection request message identified by the relay UE, it is verified whether the relay identifier in the first token is the same as the relay UE identifier in the connection request. After UE2 successfully verifies the first token, it calculates the communication Key K3 and the third token, and send a connection response.
  • UE2 can also verify whether the relay UE is in the trusted list. If the verification is successful, the step of verifying the first token can be skipped, thereby shortening the time for communication establishment. See the embodiment in Fig. 5 or Fig. 6 for details, and will not be repeated here.
  • UE2 After UE2 generates the third key K3, it can directly use K3 to encrypt and/or protect the integrity of the connection response message. After receiving the connection response message, UE1 derives K3 and uses the deduced K3 for the connection. The response message is decrypted and/or integrity verified, as shown in the embodiment in Figure 5 for details, and will not be repeated here.
  • the embodiment in FIG. 8 is also applicable to the process of establishing a secure connection with the UE1 in this embodiment through the relay UE and group members, that is, the relay UE in this embodiment can also save the UE1 generated And verify the third token sent by UE2 according to the fourth token, and the specific content will not be repeated.
  • FIG. 10 is a schematic diagram of interaction based on the group member agent search of a relay UE according to an embodiment of the application.
  • the embodiment shown in FIG. 10 is applicable to the scenario shown in FIG. 1c, that is, UE1, relay UE, and UE2 belong to the same Group.
  • the relay UE after the relay UE receives the connection request of UE1, it looks for and verifies UE2 or any group member on behalf of UE1, and sends the verification result and the identification of UE2 or other group members to UE1, so as to realize the relay UE Complete the discovery of members in the group.
  • S1000, UE1, UE2, and relay UE store a key K1 and a group identity.
  • UE1, UE2 and the relay UE belong to the same group, and the group identifier of the group is stored.
  • the group may also include other group members, and the group members also store a key K1 and an optional key identifier.
  • This application does not limit how group members can obtain the key K1 and/or the group ID and/or the key ID.
  • the key K1, and/or the group identification, and/or the key identification may be preset through the application, or distributed through the operator network, or through pre-negotiation between group members, and so on.
  • the relay UE sends a message carrying the identifier of the relay UE to UE1, and correspondingly, UE1 receives the message carrying the identifier of the relay UE sent by the relay UE.
  • the UE1 may verify the identity of the relay UE.
  • UE1 calculates a first token, where the first token is used to establish a connection with a group member through the relay UE.
  • UE1 calculates the first token according to the first key K1 and the relay UE identity.
  • UE1 discovers UE2 in the group through the relay UE, and UE1 calculates the first token, including UE1 using K1, relay UE identity, UE1 identity, UE2 identity and the first freshness parameter as calculation parameters to generate Token.
  • UE1 discovers any group member through the relay UE, UE1 calculates the first token, including UE1 using K1, relay UE identity, UE1 identity, group identity and the first freshness parameter as calculation Parameter generation token.
  • the first fresh parameter can be any one of the current time, counter, sequence number, and random number (nonce or RAND) selected by UE1, which is not limited in this application.
  • the calculation parameters for the UE1 to generate the first token may also include any one or more of service identification, application identification, key identification or other parameters, which are not limited in this application.
  • the first token may be an integrity check parameter generated by the above calculation parameters: a message verification code MAC, and the function for generating the MAC may be a hash type function, HMAC, etc., which is not limited by this application; the first token is also It can be a digital signature or other parameters used for UE2 verification, which is not limited in this application.
  • UE1 sends a first connection request message to the relay UE, and correspondingly, the relay UE receives the first connection request message sent by UE1.
  • the first connection request message sent by the UE1 to the relay UE carries the UE1 identity, the UE2 identity or the group identity, the first token and the first freshness parameter;
  • the first connection request message may not carry the first freshness parameter. parameter.
  • the first connection request message sent by the UE1 to the relay UE may also carry any one or more of the service ID, the service ID, the key ID or other parameters, which is not limited in this application.
  • the relay UE After receiving the first connection request message, the relay UE verifies the first token in the first connection request message, and calculates the fourth token after the verification succeeds.
  • the relay UE After the relay UE receives the first connection request message, it queries the key K1 according to the group ID and/or the UE1 ID and/or the key ID, and uses the key K1 and the relay UE ID as input parameters to perform calculations to obtain the command And match the first token with the generated token to obtain the verification result.
  • the input parameters for verifying the first token also include UE1 identification, group identification or UE2 identification and the first freshness parameter; the input parameters for verifying the first token may also include service identification, application identification, key identification or other parameters Any one or more of
  • the relay UE After the relay UE successfully verifies the first token, it calculates the fourth token.
  • the calculation of the input parameters of the fourth token by the relay UE is similar to the calculation of the input parameters of the first token by UE1.
  • the difference is that the freshness parameters used are different.
  • the input parameters for calculating the fourth token include the fourth freshness parameter.
  • the parameter can be any one of the current time, counter, sequence number, and random number (nonce or RAND) selected by UE1, which is not limited in this application.
  • the relay UE After successfully verifying the first token, the relay UE sends a second connection request to the group member, and correspondingly, the group member receives the second connection request message sent by the relay UE.
  • the second connection request message sent by the relay UE carries the UE1 identity, the group identity or the UE2 identity, the relay UE identity, the fourth token and an optional fourth freshness parameter, where the relay UE identity is the relay UE
  • the second connection request message can also carry any one or more of the service ID, service ID, key ID or other parameters, which is not limited in this application.
  • the relay UE sends the second connection request message by broadcasting, and the group member UE2 obtains the second connection request message by monitoring the broadcast message sent by the relay UE;
  • the relay UE may directly send the second connection request message to UE2.
  • the UE2 After receiving the second connection request message sent by the relay UE, the UE2 verifies the identity of the relay UE.
  • UE2 uses the group identifier carried in the second connection request to query the first key K1, and verifies the fourth token carried in the second connection request according to K1.
  • UE2 uses the relay UE identifier and K1 as input parameters to perform calculations to obtain the token, and matches the fourth token with the generated token to obtain the verification result.
  • the input parameters for verifying the fourth token also include UE1 identification, group identification or UE2 identification and the fourth freshness parameter; the input parameters for verifying the first token may also include service identification, application identification, key identification or other parameters Any one or more of.
  • the UE2 After the UE2 verifies that the fourth token is passed, it generates a third key K3 and calculates the third token.
  • This step is the same as that in S908 after UE2 verifies that the first token is passed, generates K3 and calculates the third token, and will not be repeated here.
  • the UE2 sends a first connection response message to the relay UE, and correspondingly, the relay UE receives the first connection response message sent by the UE2.
  • connection response message sent by UE2 to the relay UE carries the third token, the UE2 identifier, and the second freshness parameter; the connection response message may also carry the fourth freshness parameter, the key identifier, the relay UE identifier, the UE1 identifier, and the group. Any one or more of the logos are not limited in this application.
  • the relay UE verifies the third token in the first connection response.
  • the relay UE After the relay UE receives the connection response carrying the third token sent by UE2, it verifies the third token.
  • the specific content is the same as that of the third token verified by UE1 in S911, and will not be repeated here.
  • relay UE If the relay UE succeeds in verifying the third token, send a second connection response message to UE1;
  • the communication establishment procedure is terminated.
  • the relay UE sends a second connection response message to UE1 after successfully verifying the third token, and correspondingly, UE1 receives the second connection response message sent by the relay UE.
  • the second connection response message carries the UE2 identifier and the second freshness parameter.
  • the second connection response message may also carry any one or more of the key ID, the relay UE ID, the UE1 ID, and the group ID, which is not limited in this application.
  • the UE1 After receiving the second connection response message sent by the relay UE, the UE1 generates a third key K3.
  • UE1 generates K3 according to K1; UE1 may also generate K3 according to at least one of the relay UE identity, UE1 identity, UE2 identity, first freshness parameter, second freshness parameter, service identity, application identity and other parameters. It should be pointed out that the other parameters for UE1 to generate K3 should be the same as the other parameters for UE2 to generate K3.
  • UE1 uses the generated K3 as the encryption key and/or integrity protection key for communication between UE1 and UE2, or further derives the encryption key and/or integrity key for communication between UE1 and UE2 according to K3.
  • the UE sends a first connection request message to the relay UE, and the first connection request message carries the first token generated according to the identifier of the relay UE; the relay UE generates the first token after successfully verifying the first token.
  • the relay UE calculates the communication key K3 and the third token after successfully verifying the fourth token, and sends them to the relay UE Return a connection response carrying the third token; the relay UE sends a connection response carrying the UE2 identifier to UE1 after successfully verifying the third token, so that the relay UE can look up and verify group members on behalf of UE1.
  • an embodiment of the present application provides an apparatus 1100, which includes a receiving module 1101, a processing module 1102, and a sending module 1103.
  • the apparatus 1100 may be used for UE1 or UE1, and the apparatus may perform operations performed by UE1 in the foregoing method embodiments.
  • the receiving module 1101 is used to receive the relay UE identity sent by the relay UE, and is also used to receive the connection response message sent by the relay UE;
  • the processing module 1102 is used to verify The identity of the relay UE is also used to calculate the first token;
  • the sending module 1103 is used to send a first connection request message to the relay UE, and the connection request message carries the first token calculated by the processing module 1102;
  • the apparatus 1100 may be used for a relay UE or a relay UE, and the apparatus may perform operations performed by the relay UE in the foregoing method embodiments.
  • the receiving module 1101 is used to receive the first connection request message sent by the UE1, and the connection request message carries the first token;
  • the processing module 1102 is used to store the fourth token
  • the sending module 1103 is used to send a second connection request message to the UE2, the connection request message carries the first token and the relay UE identity;
  • the receiving module 1101 is also used to receive the connection response message sent by the UE2, the connection response message carries The third token; after the receiving module 1101 receives the connection response message, the processing module 1102 is also used to verify the third token in the connection response message according to the stored fourth token; the processing module 1102 successfully verifies the fourth token
  • the sending module 1103 is also used to send the verification result to UE1.
  • the apparatus 1100 may be used for UE2 or UE2, and the apparatus may perform operations performed by UE2 in the foregoing method embodiments.
  • the receiving module 1101 is configured to receive the second connection request message sent by the relay UE, and the connection request message carries the first token and the relay UE identifier; processing module 1102 It is used to save the second key K2, it can also be used to maintain the trusted list, it can also be used to verify the identity of the relay UE, it is also used to verify whether the relay UE is in the trusted list, and it is also used to verify the A token, optionally, is also used to generate a third key K3, and can also be used to use K3 to encrypt and/or integrity protection of the connection response message or to generate a third token; the sending module 1103 is used to send a message to the first The relay UE sends a connection response.
  • an embodiment of the present application provides an apparatus 1200, which includes a receiving module 1201 and a sending module 1202.
  • the apparatus 1200 may be used for a second relay UE or a second relay UE, and the apparatus may perform operations performed by the second relay UE in FIG. 7.
  • the receiving module 1201 is configured to receive a second connection request message sent by the first relay UE, and the connection request message carries the first token;
  • the sending module 1202 is configured to send a third connection request message to the UE2, and the connection request message carries The first token and the second relay UE identifier;
  • the receiving module 1201 is also used to receive the connection response message sent by the UE2; after the receiving module 1201 receives the connection response message, the sending module 1202 is also used to send the connection to the first relay UE Response message.
  • the device 1200 may be used for a relay UE or a relay UE, and the device may perform operations performed by the relay UE in the method embodiments shown in FIG. 3, FIG. 5, and FIG. 9.
  • the receiving module 1201 is configured to receive a first connection request message sent by UE1, and the connection request message carries a first token; and the sending module 1202 is configured to send a second connection request message to UE2.
  • connection request message the connection request message carries the first token and the relay UE identifier; the receiving module 1201 is also used to receive the connection response message sent by UE2; after the receiving module 1201 receives the connection response message, the sending module 1202 is also used to send UE1 sends a connection response message.
  • an embodiment of the present application provides an apparatus 1300, which includes a receiving module 1301, a processing module 1302, and a sending module 1303.
  • the processing module 1302 further includes a verification unit 1304, a storage unit 1305, and a calculation unit 1306.
  • the apparatus 1300 may be used for UE1 or UE1, and the apparatus may perform operations performed by UE1 in the foregoing method embodiments.
  • the receiving module 1301 is used to receive the relay UE identity sent by the relay UE;
  • the storage unit 1305 in the processing module 1302 is used to store the key K1, the UE1 identity, and the UE2 identity.
  • the verification unit 1304 in the processing module 1302 can be used to verify the identity of the relay UE; the calculation unit 1306 in the processing module 1302 is used to verify the identity of the relay UE
  • the first token is calculated by the identification; the sending module 1303 is used to send a first connection request message to the relay UE, and the connection request message carries the first token calculated by the calculation unit 1306; the receiving module 1301 is also used to receive the relay UE sent A connection response message, which carries the second token; after the receiving module 1301 receives the connection response message, the calculation unit 1306 is also used to calculate the third key K3, and the verification unit 1304 is also used to verify the third token .
  • the apparatus 1300 may be used for UE2 or UE2, and the apparatus may perform operations performed by UE2 in the foregoing method embodiments.
  • the receiving module 1301 is configured to receive the second connection request message sent by the relay UE, and the connection request message carries the first token and the relay UE identifier;
  • the processing module 1302 The storage unit 1305 in the processing module 1302 can be used to store the second key K2, and can also be used to maintain a trusted list;
  • the verification unit 1304 in the processing module 1302 can be used to verify the identity of the relay UE and also to verify whether the relay UE is
  • the trusted list in the storage unit 1305 is also used to verify the first token according to the second key K2 in the storage unit 1305; optionally, the calculation unit 1306 in the processing module 1302 is also used to generate a third key
  • the key K3 can also be used to encrypt and/or protect the integrity of the connection response message using K3, and can also be used to generate a second token;
  • an embodiment of the present application further provides a device 1400.
  • the device 1400 includes a processor 1401, a communication interface 1402, and a memory 1403.
  • the processor 1401 is configured to execute program instructions, and when the program is executed, the processor 1401 executes the operations performed by the UE1, UE2, relay UE, first relay UE, and second relay UE in the various methods provided in the foregoing embodiments .
  • the processor 1401 may, but is not limited to, a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), or a combination of CPU and NP.
  • the processor 1401 is a CPU
  • the CPU may be a single-core CPU or a multi-core CPU.
  • the processor 1401 may further include a hardware chip.
  • the aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (Programmable Logic Device, PLD), or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD may be a complex programmable logic device (Complex Programmable Logic Device, CPLD), a Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), a Generic Array Logic (GAL) or any combination thereof.
  • CPLD Complex Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • GAL Generic Array Logic
  • the communication interface 1402 is used to communicate with other devices under the control of the processor 1401, such as sending data and/or receiving data.
  • the sending module 1103 and the receiving module 1101 in FIG. 11, and the sending module 1203 and the receiving module in FIG. 12 are described above. Both 1201 and the sending module 1303 and the receiving module 1301 in FIG. 13 can be implemented through the communication interface 1402.
  • the memory 1403 is used to store programs executed by the processor 1401.
  • the memory 1403 may include, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read-Only Memory (EPROM), Portable read-only memory (Compact Disc Read-Only Memory, CD-ROM), flash memory (flash memory), hard disk drive (HDD) or solid-state drive (SSD); memory 1403 may also include Any combination of the above types of memory.
  • an embodiment of the present application provides a communication device 1500.
  • the device includes a communication interface 1502 for sending and receiving data and a processor 1501 coupled to the communication interface, wherein the processor 1501 executes the functions provided by the foregoing embodiments.
  • the processor 1501 also executes the data transceiving involved in the foregoing embodiment through the communication interface 1502.
  • the embodiment of the present application provides a computer-readable storage medium that stores a computer program, and the computer program includes instructions for executing the method provided in the foregoing embodiment.
  • the embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method provided in the above-mentioned embodiments.
  • this application can be provided as methods, devices, equipment (systems) or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

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

Abstract

本申请实施例公开了一种校验中继用户设备的方法及装置,该方法包括:第一用户设备通过中继用户设备与第二用户设备建立通信时,在连接请求中携带了第一用户设备生成的令牌,第二用户设备通过校验该令牌以确定中继用户设备是否被第一用户设备授权,若第二用户设备校验该令牌成功,则发送连接响应消息,以防止没有授权的中继用户设备通过恶意呼叫第二用户设备,获取第二用户设备的信息。

Description

一种校验中继用户设备的方法及装置
本申请要求于2020年01月08日提交国家知识产权局、申请号为202010018580.2、申请名称为“一种校验中继用户设备的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
申请涉及通信技术领域,尤其涉及一种校验中继用户设备的方法及装置。
背景技术
近距离通信业务(Proximity Service,ProSe)是第三代合作伙伴计划(3rd Generation Partnership Project,3GPP)系统为距离较近的用户设备(User Equipment,UE)提供的业务。ProSe业务可以支持公共安全,物联网,车联网等多种应用场景。ProSe技术主要包含两个方面:ProSe发现(ProSe Discovery)和ProSe通信(ProSe Communication)。在ProSe发现是指,UE之间可以相互检测,从而完成身份校验的过程;ProSe通信是指UE之间建立安全的通信信道,从而进行安全的数据通信的过程。
在Prose场景中,当源UE与目标UE无法直接通信时,可以通过具有中继功能的UE(UE-to-UE relay,以下简称中继UE)与目标UE进行通信。举例来说,源UE向中继UE发送所述源UE的标识与目标UE的标识,中继UE可以根据目标UE的标识确定目标UE并向其发送消息,若目标UE同意通信则通过中继UE向UE发送响应。针对上述利用中继UE进行通信的场景,若中继UE被劫持,则该中继UE可以随时向目标UE发送消息并接收目标UE的响应,存在中继UE通过恶意呼叫获取目标UE信息的风险。
发明内容
本申请提出一种校验中继用户设备(中继UE)的方法及装置,提升通过中继UE进行通信的安全性。用以解决UE通过中继UE与目标UE建立通信时,中继UE恶意呼叫目标UE的问题,
第一方面,本申请实施例提供了一种校验中继UE的方法,该方法适用于第一用户设备(UE1)通过中继用户设备(中继UE)与第二用户设备(UE2)建立通信的场景,包括:
UE1接收中继UE发送的消息,该消息携带中继UE标识;所述UE1向所述中继UE发送第一连接请求消息,所述第一连接请求消息包含所述第一令牌,该第一令牌根据第一密钥K1和中继UE标识生成;UE2接收中继UE发送的第二连接请求消息,该第二连接消息包含第一令牌和所述中继UE标识;UE2利用中继UE标识和第二密钥K2对该第一令牌进行校验;UE2若校验第一令牌成功则向中继UE发送连接响应消息;以及UE1接收来自中继UE的所述连接响应消息。
UE1接收中继UE发送的消息。该消息可以是广播消息,也可以是UE1与中继UE建立安全通信过程中或者建立安全通信之后接收到的消息。
一种可能的实现中,UE1接收中继UE发送的消息之后,校验该中继UE的身份。若校验中继UE的身份失败则终止流程。
UE1利用第一密钥K1和中继UE标识生成第一令牌,UE1生成第一令牌的输入参数还可以包括UE1标识,UE2标识,第一新鲜参数等。一种可能的实现中,UE1和UE2属于同一群组,此时UE1生成第一令牌的输入参数中的UE2标识可以由群组标识代替。
UE1向中继UE发送第一连接请求消息,所述第一连接请求消息携带第一令牌,还携带UE1标识,UE2标识/群组标识,和可选的第一新鲜参数。
中继UE接收第一连接请求消息之后发送第二连接请求消息,该第二连接请求消息中包含第一令牌,还包含中继UE标识,UE1标识,UE2标识/群组标识,和可选的第一新鲜参数。一种可能的实现中,中继UE通过广播发送该第二连接请求消息,UE2通过监听中继UE发送的广播消息获取第二连接请求消息;另一种可能的实现中,当中继UE已经与UE2建立安全连接时,中继UE直接向UE2发送该第二连接请求消息。
一种可能的实现中,中继UE发送的第二连接请求携带该中继UE的数字签名,UE2收到第二连接请求后校验该中继UE的身份,具体地,UE2可以利用所述中继UE的公钥对所述第一UE的数字签名进行验证以获取数字签名的验证结果。若UE2校验中继UE的身份失败则终止流程;UE2校验中继UE的身份成功则继续对第一令牌进行校验。
UE2收到中继UE发送的第二连接请求消息后对第一令牌进行校验。
一种可能的实现中,在校验第一令牌之前,UE2判断中继UE是否在可信列表中,具体地,UE2将中继UE标识与可信列表中的中继标识进行匹配以获得匹配结果。若匹配结果为匹配失败,则UE2对第一令牌进行校验,若UE2校验第一令牌成功则将所述中继UE标识添加至所述可信列表中;若匹配结果为匹配成功则UE2无需校验第一令牌,从而缩短通信建立的时间,提高效率。
UE2校验第一令牌,包括:UE2利用中继UE标识和第二密钥K2作为输入参数进行计算以获取令牌,并将获取的令牌与第一令牌进行匹配以获取校验结果。一种可能的实现中,K1与K2为对称密钥,UE1保存有K1,UE2保存有K2。另一种可能的实现中,K1为UE1的私钥,K2为UE2保存的私钥K1对应的公钥。
一种可能的实现中,UE2校验第一令牌成功或匹配可信列表成功后,UE2生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥;具体地,UE2根据K2生成K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数,第二新鲜参数,业务标识,应用标识中的至少一项生成K3。
UE2向中继UE发送连接响应消息,中继UE接收连接响应消息后向UE1发送连接响应消息。
一种可能的实现中,UE2利用K3对连接响应消息进行加密和/或完整性保护;UE1接收连接响应消息后,根据K1生成K3,并利用K3对连接响应消息进行解密和/或完整性验证。
另一种可能的实现中,UE2校验第一令牌成功后,还生成第三令牌,包括:UE2利用K2或K3,中继UE标识,UE1标识,UE2标识和第二新鲜参数作为参数进行计算以生成第三令牌;UE2生成第三令牌后,向中继UE发送连接响应消息,该连接响应消息携带第三令牌;UE1接收连接响应消息后,根据K1生成K3,并利用K1或K3校验所述第三令牌;UE1校验所述第三令牌成功后,将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥。
根据上述第一方面所述各种可能的实现方式中的方法,一种可能的实现中,当中继UE通过广播发送第二连接请求消息时,第二中继UE获取该连接请求消息,并向UE2发送第三连接请求消息,所述第三连接请求消息携带第一令牌;所述第三连接请求消息还携带第二中继UE标识,UE1标识,UE2标识,以及可选的第一新鲜参数。UE2接收第三连接消息之后对第一令牌进行校验,包括:UE2利用第二中继UE标识和K3作为输入参数进行计算以获取令牌,并将获取的令牌与第一令牌进行匹配以获取校验结果。
第二方面,本申请实施例提供了一种校验中继UE的方法,其执行主体为第一用户设备UE1,即发起连接请求的用户设备。该方法适用于第一用户设备(UE1)通过中继用户设备(中继UE)与第二用户设备(UE2)建立通信的场景,该方法包括:
UE1接收中继UE发送的消息,该消息携带中继UE标识;所述UE1向所述中继UE发送第一连接请求消息,所述第一连接请求消息包含第一令牌,该第一令牌根据第一密钥K1和中继UE标识生成;所述UE1接收中继UE的连接响应。
UE1接收中继UE发送的消息。该消息可以是广播消息,也可以是UE1与中继UE建立安全通信过程中或者建立安全通信之后接收到的消息。
一种可能的实现中,UE1接收中继UE发送的消息之后,校验该中继UE的身份。若校验中继UE的身份失败则终止流程。
UE1利用第一密钥K1和中继UE标识生成第一令牌。UE1生成第一令牌的输入参数还可以包括UE1标识,UE2标识,第一新鲜参数等。一种可能的实现中,UE1和UE2属于同一群组,此时UE1生成第一令牌的输入参数中的UE2标识可以由群组标识代替。
UE1向中继UE发送第一连接请求消息,所述第一连接请求消息携带第一令牌,以使得UE2能够在接收中继UE的连接请求之后根据该第一令牌对中继UE进行校验。该第一连接请求消息还携带UE1标识,UE2标识/群组标识,和可选的第一新鲜参数。
UE1接收中继UE的连接响应,该连接响应用于指示UE2校验UE1授权的中继UE成功。一种可能的实现中,该连接响应经第三密钥K3加密和/或完整性保护,UE1接收连接响应后,根据K1生成K3,并根据K3对连接响应消息进行解密和/或完整性验证。另一种可能的实现中,该连接响应消息携带由UE2生成的第三令牌,UE1接收连接响应后,根据K1生成第三密钥K3,并利用K1或K3校验第三令牌;若UE1校验第三令牌成功,则将K3作为UE1与UE2之间通信的加密密钥和/或完整性密钥。
第三方面,本申请实施例提供了一种校验中继UE的方法,其执行主体为第二用户设备UE2,即接收连接请求的用户设备。该方法适用于第一用户设备(UE1)通过中继用户设备(中继UE)与第二用户设备(UE2)建立通信的场景,该方法包括:
UE2接收第二连接请求消息,该第二连接请求消息携带第一令牌;UE2收到第二连接请求消息后对第一令牌进行校验;UE2若校验第一令牌成功则向中继UE发送连接响应消息,以使得中继UE接收连接响应消息后向UE1发送连接响应消息。
UE2接收第二连接请求消息,该第二连接请求消息还携带中继UE标识,UE1标识,UE2标识,以及可选的第一新鲜参数。一种可能的实现中,UE1和UE2属于同一群组,此时第二连接请求消息中的UE2标识可以由群组标识代替。
一种可能的实现中,该第二连接请求消息还携带中继UE的数字签名,UE2收到第二连接请求后可校验该中继UE的身份,具体地,UE2可以利用所述中继UE的公钥对所述第一UE的数字签名进行验证以获取数字签名的验证结果。若UE2校验中继UE的身份失败则终止流程;UE2校验中继UE的身份成功则继续对第一令牌进行校验。
一种可能的实现中,UE2维护一个可信列表,UE2在校验第一令牌之前,判断中继UE是否在在可信列表中,具体地,UE2将中继UE标识与可信列表中的中继标识进行匹配以获得匹配结果。若匹配结果为匹配失败,则UE2对第一令牌进行校验,校验第一令牌成功后将所述中继UE标识添加至所述可信列表中;若匹配结果为匹配成功则UE2无需校验第一令牌,从而缩短通信建立的时间,提高效率。
UE2校验第一令牌,包括:UE2利用中继UE标识和第二密钥K2作为输入参数进行计算以获取第二令牌,并将获取的第二令牌与第一令牌进行匹配以获取校验结果。一种可能的实现中,第一密钥K1与K2为对称密钥,UE1保存有K1,UE2保存有K2。另一种可能的实现中,K1为UE1的私钥,K2为UE2保存的私钥K1对应的公钥。其中K1为UE1生成第一令牌的输入参数。
一种可能的实现中,UE2校验第一令牌成功后,生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥;具体地,UE2根据K2生成K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数,第二新鲜参数,业务标识,应用标识中的至少一项生成K3。
UE2向中继UE发送连接响应消息,以使得中继UE接收连接响应消息后向UE1发送连接响应消息。
一种可能的实现中,UE2利用K3对连接响应消息进行加密和/或完整性保护;UE1接收连接响应消息后,根据K1生成K3,并利用K3对连接响应消息进行解密和/或完整性验证。
另一种可能的实现中,UE2校验第一令牌成功后,还生成第二令牌,包括:UE2利用K2或K3,中继UE标识,UE1标识,UE2标识和第二新鲜参数作为参数进行计算以生成第二令牌;UE2向中继UE发送连接响应消息,该连接响应消息携带第二令牌。
第四方面,提供一种通信系统,该系统包括:第一用户设备UE1,第二用户设备UE2和中继用户设备(中继UE)。UE1通过中继UE与UE2建立通信。
该系统中的UE1具有实现上述第一方面的任意一种可能的实现中第一用户设备UE1行为的功能;UE2具有实现上述第一方面的任意一种可能的实现中第二用户设备UE2行为的功能;中继UE具有上述第一方面的任意一种可能的实现中中继UE行为的功能;
第五方面,提供一种装置,该装置包括:
接收模块,用于接收中继UE发送的消息,该消息携带中继UE标识;处理模块,用于生成第一令牌,具体地,利用第一密钥K1和接收到的中继UE标识作为输入参数进行计算以获取第一令牌;发送模块,用于向所述中继UE发送第一连接请求消息,该第一连接请求消息包含处理模块所生成的第一令牌;所述接收模块还用于接收中继UE的连接响应。
该装置具有实现上述第一方面或第二方面的任意一种可能的实现中第一用户设备UE1行为的功能。
第六方面,提供一种装置,该装置包括:
接收模块,用于接收中继用户设备(中继UE)发送的连接请求消息,所述连接请求消息 包含第一令牌;处理模块,用于对所述第一令牌进行校验;发送模块,用于,当所述处理模块校验第一令牌成功时,向所述中继UE发送连接响应消息。
该装置具有实现上述第一方面或第三方面的任意一种可能的实现中第二用户设备UE2行为的功能。
第七方面,提供一种装置,该装置包括:
接收模块,用于接收第一用户设备UE1发送的第一连接请求消息,所述第一连接请求消息包含第一令牌;发送模块,用于发送第二连接请求消息,所述第二连接请求消息包含第一令牌和所述装置的标识。
该装置具有实现上述第一方面任意一种可能的实现中中继用户设备(中继UE)行为的功能。
第八方面,提供一种装置,该装置包括:
接收模块,用于接收中继用户设备(中继UE)发送的连接请求消息,所述连接请求消息包含第一令牌;发送模块,用于发送第三连接请求消息,所述第三连接请求消息包含第一令牌和所述装置的标识。
该装置具有实现上述第一方面任意一种可能的实现中第二中继用户设备(第二中继UE)行为的功能。
第九方面,提供一种设备,该设备包括:用于存储计算机指令的存储单元、用于收发数据的通信接口,以及与所述存储单元和通信接口耦合的处理器;
所述处理器执行所述计算机指令以实现上述第一方面的任意一种可能的设计中第一用户设备UE1行为的功能。
第十方面,提供一种设备,该设备包括:用于存储计算机指令的存储单元、用于收发数据的通信接口,以及与所述存储单元和通信接口耦合的处理器;
所述处理器执行所述计算机指令以实现上述第二方面的任意一种可能的设计中第一用户设备UE1行为的功能。
第十一方面,提供一种设备,该设备包括:用于存储计算机指令的存储单元、用于收发数据的通信接口,以及与所述存储单元和通信接口耦合的处理器;
所述处理器执行所述计算机指令以实现上述第一方面的任意一种可能的设计中第二用户设备UE2行为的功能。
第十二方面,提供一种设备,该设备包括:用于存储计算机指令的存储单元、用于收发数据的通信接口,以及与所述存储单元和通信接口耦合的处理器;
所述处理器执行所述计算机指令以实现上述第三方面的任意一种可能的设计中第二用户设备UE2行为的功能。
第十三方面,提供一种设备,该设备包括:用于存储计算机指令的存储单元、用于收发数据的通信接口,以及与所述存储单元和通信接口耦合的处理器;
所述处理器执行所述计算机指令以实现上述第一方面的任意一种可能的设计中中继用户设备行为的功能。
第十四方面,提供一种设备,该设备包括:用于存储计算机指令的存储单元、用于收发数据的通信接口,以及与所述存储单元和通信接口耦合的处理器;
所述处理器执行所述计算机指令以实现上述第一方面的任意一种可能的设计中第二中继 用户设备行为的功能。
第十五方面,提供一种设备,该设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;
所述处理器实现上述第一方面的任意一种可能的设计中用户设备UE行为的功能;所述处理器还通过所述通信接口执行上述第一方面的任意一种可能的设计中第一用户设备UE1所涉及的数据收发。
第十六方面,提供一种设备,该设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;
所述处理器实现上述第一方面的任意一种可能的设计中用户设备UE行为的功能;所述处理器还通过所述通信接口执行上述第二方面的任意一种可能的设计中第一用户设备UE1所涉及的数据收发。
第十七方面,提供一种设备,该设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;
所述处理器实现上述第一方面的任意一种可能的设计中用户设备UE行为的功能;所述处理器还通过所述通信接口执行上述第一方面的任意一种可能的设计中第二用户设备UE2所涉及的数据收发。
第十八方面,提供一种设备,该设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;
所述处理器实现上述第一方面的任意一种可能的设计中用户设备UE行为的功能;所述处理器还通过所述通信接口执行上述第三方面的任意一种可能的设计中第二用户设备UE2所涉及的数据收发。
第十九方面,提供一种设备,该设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;
所述处理器实现上述第一方面的任意一种可能的设计中用户设备UE行为的功能;所述处理器还通过所述通信接口执行上述第一方面的任意一种可能的设计中中继用户设备所涉及的数据收发。
第二十方面,提供一种设备,该设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;
所述处理器实现上述第一方面的任意一种可能的设计中用户设备UE行为的功能;所述处理器还通过所述通信接口执行上述第一方面的任意一种可能的设计中第二中继用户设备所涉及的数据收发。
第二十一方面,提供一种非易失性计算机可读存储介质,该非易失性计算机可读存储介质存储计算机程序,所述计算机程序被处理器执行,以完成本申请实施例提供的任意一个设备执行的任意一种方法的部分或全部步骤。
第二十二方面,提供一种计算机程序产品,当所述计算机程序产品在计算机设备上运行时,使得所述计算机设备执行本申请实施例提供的任意一个设备执行的任意一种方法的部分或全部步骤。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。
图1a,图1b和图1c为本申请实施例涉及的三种应用场景示意图;
图2为一种UE1通过中继UE与UE2进行通信的交互示意图。
图3为本申请实施例的一种中继UE校验方法的交互示意图;
图4为本申请实施例的一种由UE2执行的中继UE校验方法的流程示意图;
图5为本申请实施例的又一种中继UE校验方法的交互示意图;
图6为本申请实施例的又一种由UE2执行的中继UE校验方法的流程示意图;
图7为本申请实施例的又一种中继UE校验方法的交互示意图;
图8为本申请实施例的又一种中继UE校验方法的交互示意图;
图9为本申请实施例的又一种中继UE校验方法的交互示意图;
图10为本申请实施例的一种根据中继UE的群组成员代理查找的交互示意图;
图11为本申请实施例的一种装置的结构示意图;
图12为本申请实施例的一种装置的结构示意图;
图13为本申请实施例的一种装置的结构示意图;
图14为本申请实施例的一种通信设备的结构示意图;
图15为本申请实施例的一种通信设备的结构示意图。
具体实施方式
本申请实施例提供一种校验中继用户设备(中继UE)的方法及装置,用以实现源UE通过中继UE与目标UE建立安全的通信时校验中继UE是否被源UE授权。其中,方法和装置是根据同一发明构思的,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。
在近距离通信业务(Proximity Service,ProSe)是第三代合作伙伴计划(3rd Generation Partnership Project,3GPP)系统为距离较近的用户设备(User Equipment,UE)提供的业务。支持Prose业务的UE之间可以在一定范围之内进行直接通信。当源UE与目标UE由于距离等原因无法进行直接通信时,可以通过具有中继功能的UE(UE-to-UE relay,以下简称中继UE)与目标UE进行通信。
首先对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
1)用户设备(User Equipment,UE):本申请涉及第一用户设备(UE1)、第二用户设备(UE2),中继用户设备(中继UE),第一中继用户设备(第一中继UE),第二中继用户设备(第二中继UE),其中中继UE,第一中继UE和第二中继UE为具有中继功能的UE。
本申请涉及的UE为逻辑实体,具体可以包括但不限于各种具有无线通信功能的设备或者此设备中的单元、部件、模块、装置、芯片或者片上系统。上述具有无线通信功能的设备可以但不限于是终端设备(Terminal Equipment)、通信设备(Communication Device)、物联 网(Internet of Things,IoT)设备、设备到设备通信(device-to-device,D2D)终端设备、车到一切(vehicle to everything,V2X)终端设备、机器到机器/机器类通信(machine-to-machine/machine-type communications,M2M/MTC)终端设备、车联网设备中的任意一种。其中,终端设备可以是智能手机(smart phone)、智能手表(smart watch),智能平板(smart tablet)、智能眼镜以及其他穿戴式设备等等;通信设备可以是服务器、网关(Gateway,GW)、控制器等等;物联网设备可以是传感器,电表以及水表等等;车联网设备可以是机车(汽车或电动车)的一部分,或者是放置或安装在车辆上的车载设备、车载终端或车载单元(On Board Unit,OBU)等等。
2)本申请实施例中,涉及UE标识(Identifier,ID)和中继UE标识,例如UE1标识,UE2标识,第一中继UE标识,第二中继UE标识等。
UE标识或中继UE标识可以是UE的永久标识,或者临时标识。UE的永久标识可以包括国际移动用户识别码(international mobile subscriber identity,IMSI)、用户永久标识(subscription permanent identifier,SUPI)、用户封装标识(Subscription Concealed Identifier,SUCI)或者一般公共签约ID(generic public subscription identifier,GPSI)中的任一项或多项;UE的临时标识可以包括全球唯一临时标识(globally unique temporary UE identity,GUTI);中继UE标识还可以是该中继UE的中继标识,其中中继标识可以是中继业务的UE标识,或者,Prose业务的UE标识。UE标识或中继UE标识还可以是其他能唯一代表该UE的标识,本申请不作限制。
3)本申请实施例的描述中,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。本申请中所涉及的至少一个是指一项或多项;多个,是指两个或两个以上。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。本申请实施例提供的方法可以应用于各种通信系统,包括但不限于5G通信系统以及未来的各种通信系统。
下面结合本申请实施例中的附图对本申请实施例进行描述。本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
图1a,图1b和图1c为本申请实施例适用的三种可能的应用场景示意图,本申请实施例还适用于其他应用场景,在此不做限定。
如图1a所示,用户设备UE3为具有中继功能的用户设备,即中继UE。UE3可以通过PC5接口分别与用户设备UE1和用户设备UE2连接,并通过Uu接口与运营商网络连接。UE1与UE3,UE2与UE3之间可以进行直接通信。UE1可以通过UE3(中继UE)与UE2进行通信。其中,UE1可以称为源用户设备(source UE),UE2可以称为目标用户设备(target UE)或远端用户设备(remote UE);UE1还可以称为广播者(announcer)或发现者(discoverer),UE2可以称为监听者(monitor)或被发现者(discoveree)。本申请实施例对用户设备之间采用的通信方式不作限制,例如通信方式可以为蜂窝通信技术,或者WiFi,或者蓝牙等等。
本申请实施例还适用于群组通信的场景。如图1b所示,UE1和UE2属于同一Prose群组。如图1c所示,UE1,UE2和UE3属于同一Prose群组。其中Prose群组也可以为普通的群组,可以理解为UE1、UE2和UE3属于同一个群组或者团体,群组或团体内的成员共享群组标识 和群组密钥等参数。
上述图1a、图1b和图1c所述的场景可以为车联网场景,即UE1、UE2、UE3为车联网设备;上述场景还可以为公共安全等其他场景,本申请不做限制。
图2描述了现有技术中的一种UE1通过中继UE与UE2进行通信的场景。
S201、中继UE发布“我是中继UE”的广播消息,指示接收该消息的UE可以通过该中继UE与其他UE进行通信。
S202、UE1接收中继UE发布的消息后,确定通过该中继UE连接UE2。
另一种可能的实现中,当UE1发现UE2不在直接通信的范围之内时,通过广播发布“我是UE1,寻找中继UE”,中继UE接收广播消息后响应UE1。
S203、UE1向中继UE发送连接请求消息,相应的中继UE接收UE1发送的连接请求消息,该连接请求消息携带UE1标识和UE2标识。
S204、中继UE接收UE1发送的连接请求消息后,确定连接UE2。
S205、中继UE向UE2发送连接请求消息,相应的,UE2接收中继UE发送的连接请求消息,该连接请求消息携带UE1标识。
一种可能的实现中,中继UE根据UE2标识确定UE2,并向UE2发送连接请求消息;
另一种可能的实现中,中继UE通过广播发布“我是中继UE,UE1请求连接UE2”的连接请求消息。
S206、UE2向中继UE发送连接响应消息,相应的,中继UE接收UE2发送的连接响应消息。
UE2接收连接请求消息后,若同意与UE1通信,则向中继UE发送连接响应消息。
S207、中继UE接收上述连接响应消息后,向UE1发送连接响应消息,相应的,UE1接收中继UE发送的连接响应消息。
通过上述流程,UE1可以通过中继UE完成对UE2的发现,并与UE2建立通信。现有技术中,中继UE可以随时向目标UE发送消息并接收目标UE的响应。例如图2中中继UE可能在没有收到UE1连接请求时,向UE2发送连接请求,UE2接收到该连接请求消息后在无法确认中继UE是否为UE1授权的中继情况下,直接向中继UE发送连接响应;再例如,图2中的中继UE收到UE1的连接请求消息后向其他中继UE转发该连接请求消息,使得其他中继UE也可以呼叫UE2并接收其连接响应。由此可见,现有技术中存在中继UE恶意呼叫目标UE的风险。因此,UE如何通过中继UE与目标UE建立安全的通信,具体地,目标UE如何校验中继UE的是否被授权,是亟待解决的技术问题。
图3为本申请实施例的一种校验中继用户设备(中继UE)的交互示意图;本实施例适用于图1a所示的场景。本实施例通过在连接请求中绑定中继UE标识使得UE2能够校验中继UE是否被授权。
S300、UE1保存有密钥K1,UE2保存有密钥K2。
UE1确定通过中继UE与UE2进行通信之前,UE1保存有密钥K1,UE2保存有密钥K2。
一种可能的实现中,密钥K1和密钥K2为对称密钥,此时K1与K2相同;另一种可能的实现中,密钥K1为UE1的私钥,密钥K2为与私钥K1对应的公钥。
可选的,UE1与UE2还可以共享密钥标识,该密钥标识用于标识K1和K2;
本申请对UE1和UE2如何获取K1、K2和/或密钥标识不作限制。举例来说,K1、K2 以及密钥标识可以通过应用预置,或者通过运营商网络分发,或者通过UE1与UE2预先协商等等。
S301、中继UE向UE1发送携带中继UE标识的消息,相应的,UE1接收中继UE发送的携带中继UE标识的消息。
上述中继UE发送的消息还可能携带中继身份指示、业务标识、应用标识、密钥标识中的任意一项或多项,其中中继身份指示用于具有中继功能的UE指示自己是中继UE的身份。
在一种可能的实现中,中继UE通过广播或组播发送上述消息;UE1确定通过中继UE与UE2通信时,监听是否有提供中继功能的中继UE;同样的,UE2也可以通过监听中继UE发送的广播消息确定中继UE标识。
在一种可能的实现中,UE1跟中继UE建立安全连接的过程中,或者建立安全连接之后得到中继UE标识;UE2也可以采用相同的方法获取中继UE标识。
在一种可能的实现中,UE1发送广播消息,询问附近是否有中继UE。当中继UE响应UE1请求时,UE1得到中继UE标识。本申请对UE1如何接收中继UE的消息不作限制。
S302、UE1接收中继UE发送的消息之后,可以验证该中继UE的身份。
一种可能的实现中,中继UE发送的消息中可能携带数字签名信息,此时UE1可以通过校验数字签名信息来验证该中继UE的身份,即校验该UE中继发送的标识是否为自身的标识。具体地,UE1根据中继UE标识或者中继UE所在网络的标识查询该中继UE对应的公钥,并利用找出的中继UE的公钥对数字签名进行校验以验证该中继UE的身份。其中,中继UE所在网络的标识可能为跟踪区(Tracking Area),或者服务网络,或者归属网络等的标识,本申请实施例不作限制。
若校验结果为成功则继续后续步骤,即UE1计算第一令牌;
若校验结果为失败则终止流程。
S303、UE1计算第一令牌,该第一令牌用于通过中继UE与UE2建立连接。
具体地,UE1根据密钥K1和中继UE标识计算第一令牌,包括UE1利用第一密钥K1,中继UE标识,UE1标识,UE2标识以及第一新鲜参数作为计算参数生成令牌。
其中,第一新鲜参数用于标识上述令牌的新鲜性,从而防止重放攻击。第一新鲜参数可以是当前的时间,计数器,序列号,UE1选择的的随机数(nonce或RAND)中的任意一个,本申请不作限制。
UE1生成第一令牌的计算参数还可以包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项,本申请不作限制。
所述第一令牌可以为由上述计算参数生成的完整性校验参数:消息验证码(Message Authentication Code,MAC),生成MAC的函数可以为哈希类型的函数,HMAC等,本申请不作限制;第一令牌还可以为数字签名或者其他用于UE2校验的参数,本申请不作限制。
另一种可能的实现中,UE1利用第一密钥K1对中继UE标识进行加密得到第一令牌。
S304、UE1向中继UE发送第一连接请求消息,相应的,中继UE接收UE1发送的第一连接请求消息。
UE1向中继UE发送的第一连接请求消息携带第一令牌;该第一连接请求消息还携带UE1标识,UE2标识,第一令牌和第一新鲜参数;
一种可能的实现中,若UE1和UE2共享第一新鲜参数,或者第一新鲜参数可以根据UE1 和UE2共享的参数计算得出时,第一连接请求消息可以不携带第一新鲜参数。
UE1向中继UE发送的第一连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
S305、中继UE接收UE1发送的第一连接请求消息后,确定UE2标识,并向UE2发送第二连接请求消息,相应的,UE2接收中继UE发送的第二连接请求消息。
中继UE发送的第二连接请求消息携带中继UE标识,第一令牌;该第二连接请求消息还携带UE1标识,UE2标识,和可选的第一新鲜参数;
第二连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
一种可能的实现中,中继UE通过广播发布该第二连接请求消息,UE2通过监听中继UE发送的广播消息获取第二连接请求消息;
另一种可能的实现中,当中继UE已经与UE2建立安全连接时,中继UE直接向UE2发送该第二连接请求消息。
S306、UE2接收中继UE发送的第二连接请求消息后,校验中继UE的身份。
一种可能的实现中,UE2接收中继UE发送的第二连接请求消息,且尚未与该中继UE建立安全连接时,验证中继UE的身份。
一种可能的实现中,中继UE发送的第二连接请求消息中携带数字签名信息,此时UE2可以通过校验数字签名信息来验证该中继UE的身份。具体校验方法参考S302中UE1校验中继UE消息的描述,此处不再赘述。
另一种可能的实现中,UE2保存有该中继UE的标识(以下称为第二中继UE标识),UE2验证第二连接请求消息中的中继UE标识是否与UE2保存的第二中继UE标识相同。
UE2保存有第二中继UE标识,具体地,一种可能的实现中,UE2在接收第二连接请求之前确定第二中继UE标识;另一种可能的实现中,UE2在接收第二连接请求之后确定第二中继UE标识。本申请不对UE2确定第二中继UE标识的方式做限制,举例来说,UE2可以通过监听中继UE的广播消息确定第二中继UE标识,或者UE2跟中继UE建立安全连接的过程中确定第二中继UE标识,或者UE2跟中继UE建立安全连接之后得到第二中继UE标识。
UE2验证中继UE的合法性成功后继续执行后续步骤;若UE2校验中继UE的身份失败则终止流程。
S307、UE2根据第二密钥K2校验第一令牌。
首先,UE2利用第二连接请求消息中携带的UE1标识和/或密钥标识,查询出第一密钥K1对应的第二密钥K2。
UE2根据K2校验第二连接请求消息中携带的第一令牌。
具体地,在一种可能的实现中,K2是K1的对称密钥时,UE2利用中继UE标识和K2作为输入参数进行计算以获取第二令牌,并将第一令牌与所生成的第二令牌进行匹配以获取校验结果;在另一种可能的实现中,K2是与私钥K1对应的公钥时,UE2利用中继UE标识和K2对第一令牌进行校验,以获取校验结果。
另一种可能的实现中,UE2利用K2校验第一令牌,包括利用K2对第一令牌进行解密,并将该第一令牌中的中继UE标识与连接请求中的中继UE标识进行对比,以获取校验结果。
另一种可能的实现中,UE2根据K2和UE2所保存的第二中继UE标识校验第一令牌。由此,可校验UE1计算第一令牌所采用的中继UE标识是否与UE2所保存的第二中继标识相同。
UE2校验第一令牌通过后继续执行后续步骤;
UE2校验第一令牌不通过则说明该中继UE没有经过UE1授权,UE2丢弃接收到的第二连接请求消息,从而终止流程。一种可能的实现中,UE2向中继UE发送拒绝消息,以使中继UE向UE1发送拒绝消息。其中该拒绝消息还可以携带拒绝原因,用于指示第一令牌校验不通过,或者中继UE标识不匹配。
S308、UE2校验第一令牌通过后,生成第三密钥K3,并计算第三令牌。
在一种可能的实现中,UE2校验第一令牌通过后生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。具体地,当K2为K1的对称密钥时,UE2根据K2生成K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数、第二新鲜参数、第二密钥标识、业务标识、应用标识中的至少一项生成K3。其中,第二密钥标识为UE2所生成的用于关联K3的标识。
在一种可能的实现中,UE2校验第一令牌通过后还计算第三令牌。一种可能的实现中,UE2利用K3或K2,中继UE标识,UE1标识,UE2标识和第二新鲜参数作为计算参数生成第三令牌;
需要指出的是,所述第二新鲜参数用于表示第三令牌的新鲜性,防止重放攻击。第二新鲜参数可以为当前的时间,计数器,序列号,UE1选择的的随机数(nonce或RAND)中的任意一个;第二新鲜参数还可以跟第一新鲜参数相同或者根据第一新鲜参数计算得到,例如,当第一新鲜参数为计数器时,第二新鲜参数可以为计数器加n的值(n为整数)等等,本申请不作限制。
UE2生成第三令牌的计算参数还可以包含业务标识,应用标识,第一新鲜参数,第二密钥标识或其他参数的任意一项或多项,本申请不作限制。
S309、UE2向中继UE发送连接响应消息,相应的,中继UE接收UE2发送的连接响应消息。
该连接响应消息用于指示UE2校验UE1授权的中继UE成功。
一种可能的实现中,UE2向中继UE发送的连接响应消息携带第三令牌和第二新鲜参数;该连接响应消息还可以携带第一新鲜参数,密钥标识,中继UE标识,UE1标识,UE2标识中的任意一项或多项,本申请不作限定。
S310、中继UE向UE1发送连接响应消息,相应的,UE1接收中继UE发送的连接响应消息。
中继UE接收UE2发送的连接响应消息后,向UE1发送该连接响应消息。
S311、UE1接收连接响应消息后,生成密钥K3,并校验连接请求消息中的第三令牌。
一种可能的实现中,UE1接收连接响应消息后,生成密钥K3,并根据所生成的密钥K3校验第三令牌。
具体地,当密钥K2为密钥K1的对称密钥时,UE1根据K1生成密钥K3;UE1还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数,第二新鲜参数,业务标识,应用 标识中的至少一项生成K3,需要指出的是,UE1生成K3的输入参数应当与UE2生成K3的输入参数相同。
UE1根据所生成的密钥K3校验第三令牌,包括:UE1利用密钥K3,中继UE标识,UE1标识,UE2标识以及第二新鲜参数作为输入参数进行计算以生成令牌,并利用所生成的令牌与第三令牌进行匹配以获取校验结果。
UE2校验第三令牌通过后,将密钥K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据密钥K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。
另一种可能的实现中,UE1接收连接响应消息后,校验第三令牌,校验成功后生成密钥K3。
具体地,当密钥K2为K1的对称密钥时,UE1根据密钥K1校验第三令牌,包括:UE1利用密钥K1,中继UE标识,UE1标识,UE2标识以及第二新鲜参数作为输入参数进行计算以生成令牌,并利用所生成的令牌校验第三令牌;
UE1校验第三令牌通过后,生成密钥K3,并将密钥K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据密钥K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。具体地,UE2根据K1生成密钥K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数,第二新鲜参数,业务标识,应用标识中的至少一项生成密钥K3,需要指出的是,UE1生成K3的输入参数应当与UE2生成K3的输入参数相同。
本实施例中,UE1通过中继UE向UE2发送连接请求消息,该连接请求消息携带根据中继UE标识生成的第一令牌,UE2收到中继UE发送的携带第一令牌和中继UE标识的连接请求消息后,校验该第一令牌中的中继标识是否与连接请求中的中继UE标识相同,从而实现对中继UE的校验。
图4为本申请实施例的一种校验中继UE的方法流程图;本实施例适用于图1a所示的场景。该实施例以目标用户设备UE2作为执行主体说明了UE2校验中继UE的过程。
步骤401、UE2接收携带第一令牌和第一中继UE标识的连接请求。
该连接请求还包含UE1标识,UE2标识和可选的第一新鲜参数,具体详见上文S305中的描述,此处不再赘述。
步骤402、可选的,UE2校验中继UE的身份,若校验通过则继续校验校验第一令牌(转步骤403),若校验失败则终止流程(转步骤407)。
UE2可以通过校验连接请求消息中携带的数字签名判断中继UE的身份;UE2还可以根据预先保存的中继UE的标识(第二中继标识)判断中继UE的身份。具体详见上文S306中的描述,此处不再赘述。
步骤403、UE2根据第二密钥K2和第一中继UE标识校验第一令牌,若校验通过则可以生成第三密钥K3(转步骤404),若校验失败则终止流程(转步骤408)。
UE2保存有第二密钥K2,UE2根据连接请求消息中的UE1标识和/或密钥标识查询K2。一种可能的实现中,密钥K2为UE1保存的密钥K1的对称密钥,UE2利用第一中继UE标识和K3作为输入参数进行计算以获取令牌,并将所生成的令牌与第一令牌进行匹配以获取校验结果;另一种可能的实现中,密钥K2为UE1保存的私钥K1对应的公钥,UE1利用第一中继UE标识和K2对第一令牌进行校验以获取校验结果。
步骤404、UE2生成第三密钥K3。
一种可能的实现中,UE2校验第一令牌通过后可生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。
具体地,当K2为K1的对称密钥时,UE2根据K2生成密钥K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数、第二新鲜参数、第二密钥标识、业务标识、应用标识中的至少一项生成密钥K3。一种可能的实现中,UE2还生成第二密钥标识,具体用于关联K3。
步骤405、UE2根据K3或K2计算第三令牌。
一种可能的实现中,UE2利用K2或K3,中继UE标识,UE1标识,UE2标识和第二新鲜参数作为计算参数生成第三令牌;
UE2生成第三令牌的计算参数还可以包含业务标识,应用标识,第一新鲜参数,第二密钥标识或其他参数的任意一项或多项,本申请不作限制。
步骤406、UE2向中继UE发送连接响应。
该连接响应用于指示UE2校验UE1授权的中继UE成功。
一种可能的实现中,UE2发送的连接响应还包含第三令牌和第二新鲜参数;该连接响应消息还可能包含第一新鲜参数,密钥标识,中继UE标识,UE1标识和UE2标识中的至少一项。
步骤407、终止流程。
当UE2校验第一中继UE的身份失败或者UE2校验第一令牌失败时丢弃接收到的连接请求消息,从而终止通信建立的流程。一种可能的实现中,UE2向中继UE发送拒绝消息,以使中继UE向UE1发送拒绝消息。其中该拒绝消息还可以携带拒绝原因,用于指示第一令牌校验不通过,或者中继UE标识不匹配。
本实施例中,UE2收到中继UE发送的携带第一令牌和中继UE标识的连接请求消息后,利用保存的第二密钥K2校验该第一令牌中的中继标识是否与连接请求中的中继UE标识相同,从而实现对中继UE的校验。
图5为本申请实施例的一种校验中继UE的交互示意图;本实施例适用于图1a所示的场景。该实施例通过在连接请求中绑定中继UE标识使得UE2能够校验中继UE是否被授权,该实施例与图3描述的实施例的区别在于,UE2维护一个可信列表,UE2在校验中继UE发送的连接请求消息中的第一令牌之前,判断该中继UE是否在可信列表中,若判断成功则无需校验第一令牌,从而缩短通信建立的时间,提高效率。
S500、UE1保存有第一密钥K1,UE2保存有第二密钥K2并维护一个可信列表。
UE1确定通过中继UE与UE2进行通信之前,UE1保存有第一密钥K1,UE2保存有第二密钥K2。K1和K2可以是一对对称密钥;还可以是一对公私钥,即K1为UE1的私钥,K2为私钥K1对应的公钥。详见S300,此处不再赘述。
一种可能的实现中,UE2还维护一个可信列表,其中包含中继UE标识,中继UE标识所指示的中继UE对UE2而言是可信的。当UE2收到可信列表中的中继UE发送的消息时,无需进一步校验该中继UE是否被授权。
一种可能的实现中,该可信列表中包含的中继UE标识具有时效性。举例来说,列表中的每个中继UE标识均有一个定时器,定时器到时则自动删除该中继UE标识;或者每个中继 UE标识具有一个有效期,UE2进行中继UE标识匹配时还判断列表中的中继UE标识是否在有效期内,此外,UE2还需定期删除到期的中继UE标识;还可以采用其他方式实现中继UE标识的时效性,本申请不作限制。
该可信列表可以由UE2应用预置,或者由运营商网络分发。UE2可以在与中继UE建立安全连接的过程中更新该可信列表,具体地,UE2对中继UE进行校验通过后,将该中继UE的标识添加到可信列表中。
步骤S501至S506的内容同步骤S301至S306,此处不再赘述。
S507、UE2判断中继UE是否在可信列表中。
UE2接收到第二连接请求,并可选的验证了第一中继UE的身份之后,将第二连接请求中携带的中继UE标识与UE2维护的可信列表中的中继UE标识进行匹配。
若匹配成功,则说明该中继UE对UE2是可信的,UE可以跳过校验第一令牌的步骤(即S508),执行后续步骤;
若匹配失败,则说明该中继UE对UE2是不可信的,UE须进一步校验第二连接请求消息中的第一令牌,即执行S508。UE2校验第一令牌通过后,更新可信列表。
S508、UE2根据第二密钥K2校验第一令牌。
当中继UE标识不在UE2维护的可信列表里时,UE2进一步校验第一令牌。具体地,UE2利用第二连接请求消息中携带的UE1标识和/或密钥标识,查询出第一密钥K1对应的第二密钥K2,并根据K2校验第二连接请求消息中携带的第一令牌。具体内容详见S307,此处不再赘述。
UE2校验第一令牌通过后,更新可信列表,并继续执行后续步骤S509;UE2更新可信列表,具体地,UE2将该中继UE的标识添加至可信列表中;
UE2校验第一令牌不通过则说明该中继UE没有经过UE1授权,UE2丢弃接收到的第二连接请求消息,从而终止流程。
S509、可选的,UE2生成第三密钥K3。
UE2校验第一令牌通过或者中继UE标识与UE2的可信列表匹配成功后,UE2可以生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。具体地,当K2为K1的对称密钥时,UE2根据K2生成密钥K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数、第二新鲜参数、第二密钥标识、业务标识、应用标识中的至少一项生成密钥K2。其中第二密钥标识为在一种可能的实现中UE2所生成的用于关联K3的密钥标识。
一种可能的实现中,UE2生成密钥K3后,利用该密钥K3对UE2向中继UE发送的连接响应消息进行加密和/或完整性保护
另一种可能的实现中,UE2生成密钥K3后,进一步计算第三令牌,具体内容详见S308处的描述,此处不再赘述。
S510、UE2向中继UE发送连接响应消息,相应的,中继UE接收UE2发送的连接响应消息。
该连接响应用于指示UE2校验UE1授权的中继UE成功。
一种可能的实现中,该连接响应消息经第三密钥K3加密和/或完整性保护;
另一种可能的实现中,该连接响应消息携带第三令牌和第二新鲜参数;该连接响应消息 还可以携带第一新鲜参数,密钥标识,中继UE标识,UE1标识,UE2标识,第二密钥标识中的任意一项或多项,本申请不作限定。
S511、中继UE接收UE2发送的连接响应消息之后,向UE1发送该连接响应消息,相应的,UE1接收中继UE发送的连接响应消息。
S512、UE1接收连接响应消息后,生成第三密钥K3。
具体地,当第二密钥K2为第一密钥K1的对称密钥时,UE1根据K1生成密钥K3;UE1还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数、第二新鲜参数、第二密钥标识、业务标识、应用标识中的至少一项生成第三密钥K3,需要指出的是UE1生成K3的输入参数应当与UE2生成K3的输入参数相同。
一种可能的实现中,UE1利用所生成的密钥K3对连接响应消息进行解密和/或完整性验证。
另一种可能的实现中,UE1对连接响应消息中的第三令牌进行校验。具体地,UE1接收连接响应消息后,生成第三密钥K3,并根据所生成的K3校验第三令牌;或者UE1接收连接响应消息后,根据第一密钥K1校验第三令牌,校验成功后生成密钥K3。具体内容详见S311处的描述,此处不再赘述。
本实施例中,UE1通过中继UE向UE2发送连接请求消息,该连接请求消息携带根据中继UE标识生成的第一令牌,UE2收到中继UE发送的携带第一令牌和中继UE标识的连接请求消息后,判断中继UE标识是否在UE2的可信列表中的中继UE标识匹配,若不匹配则校验该第一令牌中的中继标识是否与连接请求中的中继UE标识相同,从而实现对中继UE的校验。
图6为本申请实施例的一种校验中继UE的方法流程图;本实施例适用于图1a所示的场景。该实施例以UE2作为执行主体说明了UE2校验中继UE的过程。
步骤601、UE2接收携带第一令牌和中继UE标识的连接请求。
该连接请求还包含UE1标识,UE2标识和可选的第一新鲜参数,具体详见上文S305中的描述,此处不再赘述。
步骤602、可选的,UE2校验中继UE的身份,若验证通过则继续判断中继UE标识是否在UE2的可信列表中(转步骤603),若验证失败则终止流程(转步骤608)。
UE2可以通过校验连接请求消息中携带的数字签名判断中继UE的身份;UE2还可以根据预先保存的中继UE的标识(以下成文第二中继UE标识)判断第一中继UE的身份。具体详见上文S306中的描述,此处不再赘述。
步骤603、UE2判断中继UE是否能与UE2的可信列表匹配,若匹配成功则生成第三密钥K3(转步骤606),若匹配失败则校验第一令牌(转步骤608)。
UE2维护一个可信列表,该列表中包含UE2信任的中继UE的标识以及可选的每个中继UE标识的有效期。该可信列表可由UE2预置,或者由运营商网络分发。UE2可以在与中继UE建立安全连接的过程中更新该可信列表。
UE2将接收到的中继UE标识与可信列表中的中继UE标识进行匹配,若匹配成功则说明中继UE对UE2而言是可信的,UE2无需校验中继UE;若匹配失败则说明中继UE对UE2而言是不可信的,UE2需进一步校验中继UE。
步骤604、当中继UE标识不在UE2的可信列表时,UE2根据第二密钥K2校验第一令 牌,若校验通过则更新可信列表(605),若校验失败则终止流程(转步骤608)。
UE2保存有第二密钥K2,UE2根据连接请求消息中的UE1标识和/或密钥标识查询K2。一种可能的实现中,K2为UE1保存的第一密钥K1的对称密钥,UE2利用中继UE标识和K2作为输入参数进行计算以获取第二令牌,并将所生成的第二令牌与第一令牌进行匹配以获取校验结果;另一种可能的实现中,K2为UE1保存的私钥K1对应的公钥,UE1利用中继UE标识和K3对第一令牌进行校验以获取校验结果。
步骤605、UE2校验第一令牌成功后,更新可信列表。
具体地,UE2将中继UE标识添加到可信列表中。可选的,UE2还将中继UE标识的有效期添加至可信列表中。
步骤606、UE2生成第三密钥K3。
一种可能的实现中,当中继UE标识与UE2的可信列表匹配成功或者UE2校验第一令牌通过后,UE可生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。
UE2生成K3后,利用该K3对UE2向中继UE发送的连接响应消息进行加密和/或完整性保护,或者进一步计算第三令牌。具体内容详见S509,此处不再赘述。
步骤607、UE2向中继UE发送连接响应消息。
该连接响应消息用于指示UE2校验UE1授权的中继UE成功。
一种可能的实现中,该连接响应消息经第三密钥K3加密和/或完整性保护;
另一种可能的实现中,该连接响应消息携带第三令牌和第二新鲜参数;该连接响应消息还可以携带第一新鲜参数,第二密钥标识,中继UE标识,UE1标识,UE2标识中的任意一项或多项,本申请不作限定。
步骤608、终止流程。
当UE2校验中继UE的身份失败或者UE2校验第一令牌失败时丢弃接收到的连接请求消息,从而终止通信建立的流程。一种可能的实现中,UE2向中继UE发送拒绝消息,以使中继UE向UE1发送拒绝消息。其中该拒绝消息还可以携带拒绝原因,用于指示第一令牌校验不通过,或者中继UE标识不匹配。
本实施例中,UE2收到中继UE发送的携带第一令牌和中继UE标识的连接请求消息后,判断中继UE标识是否与UE2的可信列表中的中继UE标识匹配,若匹配不成功则校验该第一令牌中的中继标识是否与连接请求中的中继UE标识相同,从而实现对中继UE的校验。
图7为本申请实施例的一种校验中继UE的交互示意图;该实施例通过在连接请求中绑定中继UE标识使得UE2能够校验中继UE是否被授权,该实施例中描述了第二中继UE采用由第一中继UE标识生成的第一令牌向UE2发送连接请求时的交互示意图。
S700至S704同图3中的S300至S304,此处不再赘述。
S705、第一中继UE接收UE1发送的第一连接请求标识后,通过广播发送第二连接请求消息,第二UE中继通过监听广播接收该第二连接请求消息。
第一中继UE发送的第二连接请求消息携带UE1标识,UE2标识,第一中继UE标识,第一令牌和可选的第一新鲜参数;
第二连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
S706、第二中继UE接收第一中继UE发送的第二连接请求后,向UE2发送第三连接请求,相应的,UE2接收第二中继UE发送的第三连接请求。
第二中继UE发送的第三连接请求消息携带UE1标识,UE2标识,第二中继UE标识,第一令牌和可选的第一新鲜参数;
第三连接请求消息还可以携带第二连接请求中包含的业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
一种可能的实现中,第二中继UE通过广播发送该第三连接请求消息,UE2通过监听第二中继UE发送的广播消息获取第三连接请求消息;
另一种可能的实现中,当第二中继UE已经与UE2建立安全连接时,第二中继UE直接向UE2发送该第三连接请求消息。
S707、UE2接收第二中继UE发送的第三连接请求消息后,校验第二中继UE的身份。
具体内容同S306中UE2校验中继UE的身份相同,此处不再赘述。
UE2校验中继UE的身份成功后继续执行后续步骤;若UE2校验中继UE的身份失败则终止流程。
S708、UE2判断是否已经处理过UE1发起的连接请求。
UE2校验第二中继UE的身份成功后,继续判断UE2是否已经处理过UE1发起的连接请求消息。
一种可能的情况中,UE2在接收第二中继UE发送的第三连接请求消息前已经处理第一中继UE发送的第二连接请求,此时UE2将丢弃该第三连接请求消息,从而终止流程。
若UE2在接收第三连接请求之前未处理过UE1发起的连接请求则继续执行后续步骤。
S709、UE2判断第二中继UE是否在可信列表之中。
UE2将第二中继UE标识与可信列表中的中继标识进行匹配。
若匹配成功,则说明第一中继UE对UE2是可信的。一种可能的实现中,UE2生成第三密钥K3并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。具体地,当K2为K1的对称密钥时,UE2根据K2生成K3;UE2还可以根据UE1标识、UE2标识、第一新鲜参数、第二新鲜参数、第二密钥标识、业务标识、应用标识中的至少一项生成K3。其中,第二密钥标识为UE2所生成的用于关联K3的密钥标识。
一种可能的实现中,UE2生成第三密钥K3后,利用该密钥K3对UE2向第二中继UE发送的连接响应消息进行加密和/或完整性保护
另一种可能的实现中,UE2生成第三密钥K3后,进一步计算第三令牌。具体地,UE2利用第二密钥K2或第三密钥K3,第一中继UE标识,UE1标识,UE2标识和第二新鲜参数作为输入参数进行计算以生成第二令牌。UE2生成第二令牌的计算参数还可以包含业务标识,应用标识,第一新鲜参数,第二密钥标识或其他参数的任意一项或多项,本申请不作限制。
若匹配失败,则说明第二中继UE对UE2是不可信的,UE须进一步校验第三连接请求消息中的第一令牌。
具体地,UE2利用第三连接请求消息中携带的UE1标识和/或密钥标识,查询出第一密钥K1对应的第二密钥K2。UE2根据K2和第二中继UE标识校验第三连接请求消息中携带的第一令牌。由于第一令牌是根据密钥K1和第一中继UE标识生成的,UE2校验第一令牌将 会失败。
UE2校验第一令牌失败后丢弃该第三连接请求消息,从而终止流程。
S710、UE2向第二中继UE发送连接响应消息,相应的,第二中继UE接收UE2发送的连接响应消息。
一种可能的实现中,该连接响应消息经第三密钥K3加密和/或完整性保护;
另一种可能的实现中,该连接响应消息携带第三令牌,UE2标识和第二新鲜参数;该连接响应消息还可以携带第一新鲜参数,第二密钥标识,UE1标识,第二中继UE标识,第一中继UE标识的任意一项或多项,本申请不作限定。
S711、第二中继UE接收UE2发送的连接响应消息后向第一中继UE发送该连接响应消息,相应的,第一中继UE接收该连接响应消息。
S712、第一中继UE标识接收连接响应消息后,对该连接响应消息进行判断。
一种可能的实现中,第一中继UE标识判断该携带UE2标识的连接响应消息是否来自UE2,判断失败则丢弃该消息。
另一种可能的实现中,第一中继UE判断是否已经处理UE2返回的连接响应消息,已处理则丢弃该消息,未处理则向UE1发送该连接响应消息。
S713、第一中继UE向UE1发送该连接响应消息,相应的,UE1接收第一中继UE发送的连接响应消息。
S714、UE1接收连接响应消息后,生成密钥K3。
具体内容详见S512,此处不再赘述。
本实施例中UE1发起的连接请求消息,经第一中继UE和第二中继UE发送至UE2,UE2接收连接请求消息后,判断是否已经处理过UE1发起的连接请求,避免重复响应;第一中继UE接收UE2发起的连接响应后,判断该连接响应是否由UE2发送或者判断是否已经处理过UE2发起的连接响应,避免UE1接收重复的响应。
图8为本申请实施例中的一种校验中继UE的交互示意图。图8中的实施例通过在连接请求中绑定中继UE标识使得UE2能够校验中继UE是否被授权。本实施例适用于图1a所示的场景。本实施例与图3中的实施例的区别在于,由中继UE校验UE2发送的第三令牌,校验失败时直接结束流程,从而减少信令开销,提高效率。
S800、UE1保存有第一密钥K1,UE2保存有第二密钥K2。
UE1确定通过中继UE与UE2进行通信之前,UE1保存有第一密钥K1,UE2保存有第二密钥K2。
K1和K2为对称密钥,可选的,UE1与UE2还可以共享密钥标识,该密钥标识用于标识K1和K2;
本申请对UE1和UE2如何获取K1、K2和/或密钥标识不作限制。举例来说,K1、K2以及密钥标识可以通过应用预置,或者通过运营商网络分发,或者通过UE1与UE2预先协商等等。
S801、中继UE向UE1发送携带中继UE标识的消息,相应的,UE1接收中继UE发送的携带中继UE标识的消息。
具体内容同S301,此处不再赘述。
S802、可选的,UE1接收中继UE发送的消息之后,校验该中继UE的身份。
具体内容同S302,此处不再赘述。
S803、UE1计算第一令牌和第四令牌。
具体地,UE1根据第一密钥K1和中继UE标识计算第一令牌和第四令牌,包括:UE1利用K1,中继UE标识,UE1标识,UE2标识以及第一新鲜参数作为计算参数生成第一令牌;UE1利用K1,中继UE标识,UE1标识,UE2标识以及第二新鲜参数作为计算参数生成第四令牌。
其中,第一新鲜参数和第二新鲜参数用于标识上述令牌的新鲜性,从而防止重放攻击。第一新鲜参数可以是当前的时间,计数器,序列号,UE1选择的的随机数(nonce或RAND)中的任意一个,本申请不作限制。
UE1生成第一令牌或第四令牌的计算参数还可以包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项,本申请不作限制。
S804、UE1向中继UE发送第一连接请求消息,相应的,中继UE接收UE1发送的第一连接请求消息。
UE1向中继UE发送的第一连接请求消息携带UE1标识,UE2标识,第一令牌,第四令牌,第一新鲜参数和第二新鲜参数。
一种可能的实现中,若UE1和UE2共享第一新鲜参数和/或第二新鲜参数,或者第一新鲜参数和/或第二新鲜参数可以根据UE1和UE2共享的参数计算得出时,第一连接请求消息可以不携带第一新鲜参数和/或第二新鲜参数。
UE1向中继UE发送的第一连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
S805、中继UE保存第四令牌。
中继UE接收UE1发送的第一连接请求消息后,保存第四令牌,该第四令牌用于校验UE2发送的第三令牌。
S806、中继UE接收UE1发送的第一连接请求消息后,确定UE2标识,并向UE2发送第二连接请求消息,相应的,UE2接收中继UE发送的第二连接请求消息。
中继UE发送的第二连接请求消息携带UE1标识,UE2标识,中继UE标识,第一令牌和可选的第一新鲜参数和/或第二新鲜参数;
第二连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
一种可能的实现中,中继UE通过广播发送该第二连接请求消息,UE2通过监听中继UE发送的广播消息获取第二连接请求消息;
另一种可能的实现中,当中继UE已经与UE2建立安全连接时,中继UE直接向UE2发送该第二连接请求消息。
S807、UE2接收中继UE发送的第二连接请求消息后,校验中继UE的身份。
具体内容同S306,此处不再赘述。
S808、UE2根据第二密钥K2校验第一令牌。
具体内容同S307,此处不再赘述。
S809、UE2校验第一令牌通过后,生成第三密钥K3,并计算第三令牌。
一种可能的实现中,UE2校验第一令牌通过后生成第三密钥K3,并将K3作为UE1与 UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。
具体地,UE2根据K2生成K3;UE2还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数、第二新鲜参数、第二密钥标识、业务标识、应用标识中的至少一项生成K3。其中第二密钥标识为UE2生成的用于关联K3的密钥标识。
一种可能的实现中,UE2校验第一令牌通过后还计算第三令牌,具体地,UE2利用K2,中继UE标识,UE1标识,UE2标识和第二新鲜参数作为计算参数生成第三令牌。
UE2生成第三令牌的其它计算参数还可以包含业务标识,应用标识,第一新鲜参数,第二密钥标识或其他参数的任意一项或多项,需要指出的是UE2生成第三令牌的其它计算参数应当与UE1生成第四令牌的其他计算参数相同。
S810、UE2向中继UE发送连接响应消息,相应的,中继UE接收UE2发送的连接响应消息。
UE2向中继UE发送的连接响应消息携带第三令牌;该连接响应消息还可以携带第二新鲜参数,第一新鲜参数,第二密钥标识,中继UE标识,UE1标识,UE2标识中的任意一项或多项,本申请不作限定。
S811、中继UE校验连接响应中的第三令牌。
中继UE收到UE2发送的携带第三令牌的连接响应后,校验该第三令牌,具体地,中继UE校验接收到的第三令牌是否与中继UE所保存的第四令牌相同。
若中继UE校验第三令牌成功则向UE1发送校验结果;
若中继UE校验第三令牌失败则终止通信建立流程。
S812、中继UE校验第三令牌成功后向UE1发送校验结果,相应的,UE1接收中继UE发送的校验结果。
S813、UE1接收中继UE发送的校验结果后,生成第三密钥K3。
具体地,UE1根据K1生成K3;UE1还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数,第二新鲜参数,业务标识,应用标识等其他参数中的至少一项生成密钥K2,需要指出的是,UE1生成K3的其他参数应当与UE2生成K3的其他参数相同。
UE1将所生成的K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据密钥K2进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。
本实施例中,UE1通过中继UE向UE2发送携带根据中继UE标识生成的第一令牌时还向中继UE发送第四令牌,中继UE保存该第四令牌;UE2校验第一令牌通过后向中继UE发送第三令牌;中继UE根据所保存的第四令牌验证该令牌第三令牌,并向UE1发送校验结果,从而实现对中继UE的校验。需要指出的是,在校验第一令牌前UE2还可以验证中继UE是否在可信列表中,若验证成功则可以跳过校验第一令牌的步骤,直接生成第三令牌,从而缩短通信建立的时间,可信列表的相关描述详见图5中的实施例,此处不再赘述。
图9为本申请实施例的一种校验中继UE的交互示意图;该实施例通过在UE1发送的连接请求中绑定中继UE标识使得UE2能够校验中继UE是否被UE1授权。本实施例与图3中的实施例的区别在于,UE1可以根据群组标识发现UE2,适用于图1b所示的群组通信的场景。
S900、UE1和UE2保存有密钥K1和群组标识。
UE1和UE2属于同一个群组,并保存有该群组的群组标识;
UE1和UE2还共享密钥K1,其中K1为UE1和UE2所属群组的密钥。
UE1和UE2还可以共享密钥标识,该密钥标识用于标识K1。
本申请对UE1和UE2如何获取K1和/或群组标识和/或密钥标识不作限制。举例来说,密钥K1,和/或群组标识,和/或密钥标识可以通过应用预置,或者通过运营商网络分发,或者通过UE1与UE2预先协商等等。
S901、中继UE向UE1发送携带中继UE标识的消息,相应的,UE1接收中继UE发送的携带中继UE标识的消息。
具体内容同S301,此处不再赘述。
S902、UE1接收中继UE发送的消息之后,可以校验该中继UE的身份。
具体内容同S302,此处不再赘述。
S903、UE1计算第一令牌,该第一令牌用于通过中继UE与群组成员建立连接。
具体地,UE1根据第一密钥K1和中继UE标识计算第一令牌,包括UE1利用K1,中继UE标识,UE1标识,群组标识以及第一新鲜参数作为计算参数生成第一令牌。
其中,第一新鲜参数用于标识上述令牌的新鲜性,从而防止重放攻击。第一新鲜参数可以是当前的时间,计数器,序列号,UE1选择的的随机数(nonce或RAND)中的任意一个,本申请不作限制。
UE1生成第一令牌的计算参数还可以包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项,本申请不作限制。
所述第一令牌可以为由上述计算参数生成的完整性校验参数MAC,生成MAC的函数可以为哈希类型的函数,HMAC等,本申请不作限制;第一令牌还可以为数字签名或者其他用于UE2校验的参数,本申请不作限制。
S904、UE1向中继UE发送第一连接请求消息,相应的,中继UE接收UE1发送的第一连接请求消息。
UE1向中继UE发送的第一连接请求消息携带UE1标识,群组标识,第一令牌和第一新鲜参数;
一种可能的实现中,若UE1和群组成员共享第一新鲜参数,或者第一新鲜参数可以根据UE1和群组成员共享的参数计算得出时,第一连接请求消息可以不携带第一新鲜参数。
UE1向中继UE发送的第一连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
S905、中继UE接收UE1发送的第一连接请求消息之后,根据群组标识向UE1的群组成员发送第二连接请求消息,相应的,群组成员接收中继UE发送的第二连接请求消息。
中继UE发的的第二连接请求消息携带UE1标识,群组标识,中继UE标识,第一令牌和可选的第一新鲜参数,其中中继UE标识为该中继UE的标识;第二连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
一种可能的实现中,中继UE通过广播发送该第二连接请求消息,群组成员UE2通过监听中继UE发送的广播消息获取第二连接请求消息;
另一种可能的实现中,当中继UE已经与UE2建立安全连接,且已知UE2的群组标识时,中继UE可直接向UE2发送该第二连接请求消息。
S906、UE2接收中继UE发送的第二连接请求消息后,校验该中继UE的身份。
具体内容详见S306,此处不再赘述。
S907、UE2根据密钥K1校验第一令牌。
UE2利用第二连接请求中携带的UE1标识和/或群组标识和/或密钥标识,查询出第一密钥K1,并根据第一密钥K1校验第二连接请求中携带的第一令牌。
具体地,UE2利用中继UE标识和K1作为输入参数进行计算以获取第二令牌,并将第一令牌与所生成的第二令牌进行匹配以获取校验结果。
UE2校验第一令牌通过则说明该中继UE经过UE1,UE2继续执行后续步骤;
UE2校验第一令牌不通过则说明该中继UE没有经过UE1授权,UE2丢弃接收到的第二连接请求消息,从而终止流程。
S908、UE2校验第一令牌通过后,生成第三密钥K3,并计算第三令牌。
一种可能的实现中,UE2校验第一令牌通过后生成第三密钥K3,并将K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥;另一种可能的实现中K3可以作为群组通信密钥或者根据密钥K2进一步推演群组通信密钥。
具体地,UE2根据K1生成K3;UE2还可以根据中继UE标识、UE1标识、群组标识、UE2标识、第一新鲜参数、第二新鲜参数、密钥标识、业务标识、应用标识中的至少一项生成K3。
一种可能的实现中,UE2校验第一令牌通过后还计算第三令牌。
在一种可能的实现中,UE2利用第三密钥K3,中继UE标识,UE1标识,UE2标识,群组标识和第二新鲜参数作为计算参数生成第三令牌;
在另一种可能的实现中,UE2利用密钥K1,中继UE标识,UE1标识,UE2标识,群组标识和第二新鲜参数作为计算参数生成第三令牌。
需要指出的是,所述第二新鲜参数用于表示第三令牌的新鲜性,防止重放攻击。
UE2生成第三令牌的计算参数还可以包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项,本申请不作限制。
S909、UE2向中继UE发送连接响应消息,相应的,中继UE接收UE2发送的连接响应消息。
UE2向中继UE发送的连接响应消息携带第三令牌,UE2标识以及第二新鲜参数;该连接响应消息还可以携带第一新鲜参数,密钥标识,中继UE标识,UE1标识,群组标识中的任意一项或多项,本申请不作限定。
S910、中继UE向UE1发送连接响应消息,相应的,UE1接收中继UE发送的连接响应消息。
中继UE接收UE2发送的连接响应消息后,向UE1发送该连接响应消息。
S911、UE1接收连接响应消息后,生成第三密钥K3,并校验连接请求消息中的第三令牌。
一种可能的实现中,UE1接收连接响应消息后,校验第三令牌,校验成功后生成第三密钥K3。具体地,UE1利用密钥K1,中继UE标识,UE1标识,UE2标识,群组标识以及第二新鲜参数作为输入参数进行计算以生成令牌,并利用所生成的令牌与第三令牌进行匹配以获取校验结果。
另一种可能的实现中,UE1接收连接响应消息后,生成第三密钥K3,并根据所生成的 K3校验第三令牌。具体地,UE1利用K2,中继UE标识,UE1标识,UE2标识,群组标识以及第二新鲜参数作为输入参数进行计算以生成令牌,并利用所生成的令牌与第三令牌进行匹配以获取校验结果。
UE1生成K3,具体地,UE1根据K1生成K3;UE1还可以根据中继UE标识、UE1标识、群组标识、UE2标识、第一新鲜参数、第二新鲜参数、密钥标识、业务标识、应用标识等其他参数中的至少一项生成K3,需要指出的是,UE1生成K3的采用其他参数应当与UE2生成K3采用的其他参数相同。
本实施例中,UE1通过中继UE向群组成员发送连接请求消息,该连接请求消息携带根据中继UE标识生成的第一令牌,群组成员UE2收到中继UE发送的携带第一令牌和中继UE标识的连接请求消息后,校验该第一令牌中的中继标识是否与连接请求中的中继UE标识相同,UE2校验该第一令牌成功后,计算通信密钥K3和第三令牌,并发送连接响应。
需要指出的是,在校验第一令牌前UE2还可以验证中继UE是否在可信列表中,若验证成功则可以跳过校验第一令牌的步骤,从而缩短通信建立的时间,详见图5或图6中的实施例,此处不再赘述。
还需要指出的是,UE2生成第三密钥K3后还可以直接利用K3对连接响应消息进行加密和/或完整性保护,UE1收到连接响应消息后推演K3并根据推演出的K3对该连接响应消息进行解密和/或完整性验证,详见图5中的实施例,此处不再赘述。
另外,还需要指出的是,图8中的实施例也适用于与本实施例中UE1通过中继UE与群组成员建立安全连接的过程,即本实施例中中继UE也可以保存UE1生成的第四令牌,并根据该第四令牌校验UE2发送的第三令牌,具体内容不再赘述。
图10为本申请实施例的一种根据中继UE的群组成员代理查找的交互示意图,图10所示的实施例适用于图1c所示的场景,即UE1,中继UE以及UE2属于同一群组。该实施例中,中继UE接收UE1的连接请求后代理UE1查找并校验UE2或任意群组成员,并向UE1发送校验结果以及UE2或其它群组成员的标识,以实现通过中继UE完成群组内成员的发现。
S1000、UE1、UE2和中继UE保存有密钥K1和群组标识。
UE1、UE2和中继UE属于同一个群组,并保存有该群组的群组标识。除UE1、UE2和中继UE以外,该群组还可以包含其他群组成员,群组成员还保存有密钥K1和可选的密钥标识。
本申请对群组成员如何获取密钥K1和/或群组标识和/或密钥标识不作限制。举例来说,密钥K1,和/或群组标识,和/或密钥标识可以通过应用预置,或者通过运营商网络分发,或者通过群组成员之间预先协商等等。
S1001、中继UE向UE1发送携带中继UE标识的消息,相应的,UE1接收中继UE发送的携带中继UE标识的消息。
具体内容同S301,此处不再赘述。
S1002、UE1接收中继UE发送的消息之后,可以校验该中继UE的身份。
具体内容同S302,此处不再赘述。
S1003、UE1计算第一令牌,该第一令牌用于通过中继UE与群组成员建立连接。
具体地,UE1根据第一密钥K1和中继UE标识计算第一令牌。
一种可能的实现中,UE1通过中继UE发现群组内的UE2,UE1计算第一令牌,包括UE1 利用K1,中继UE标识,UE1标识,UE2标识以及第一新鲜参数作为计算参数生成令牌。
另一种可能的实现中,UE1通过中继UE发现任意群组成员,UE1计算第一令牌,包括包括UE1利用K1,中继UE标识,UE1标识,群组标识以及第一新鲜参数作为计算参数生成令牌。
第一新鲜参数可以是当前的时间,计数器,序列号,UE1选择的的随机数(nonce或RAND)中的任意一个,本申请不作限制。
UE1生成第一令牌的计算参数还可以包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项,本申请不作限制。
所述第一令牌可以为由上述计算参数生成的完整性校验参数:消息验证码MAC,生成MAC的函数可以为哈希类型的函数,HMAC等,本申请不作限制;第一令牌还可以为数字签名或者其他用于UE2校验的参数,本申请不作限制。
S1004、UE1向中继UE发送第一连接请求消息,相应的,中继UE接收UE1发送的第一连接请求消息。
UE1向中继UE发送的第一连接请求消息携带UE1标识,UE2标识或群组标识,第一令牌和第一新鲜参数;
一种可能的实现中,若UE1和群组成员共享第一新鲜参数,或者第一新鲜参数可以根据UE1和群组成员共享的参数计算得出时,第一连接请求消息可以不携带第一新鲜参数。
UE1向中继UE发送的第一连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
S1005、中继UE接收第一连接请求消息后,校验第一连接请求消息中的第一令牌,校验成功后计算第四令牌。
中继UE接收第一连接请求消息后,根据群组标识和/或UE1标识和/或密钥标识查询出密钥K1,并利用密钥K1和中继UE标识作为输入参数进行计算以获取令牌,并将第一令牌与所生成的令牌进行匹配以获取校验结果。校验第一令牌的输入参数还包括UE1标识,群组标识或UE2标识以及第一新鲜参数;校验第一令牌的输入参数还可能包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项
中继UE校验第一令牌成功后,计算第四令牌。
中继UE计算第四令牌的输入参数与UE1计算第一令牌的输入参数相似,区别在于所采用的新鲜参数不同,计算第四令牌的输入参数包括第四新鲜参数,该第四新鲜参数可以是当前的时间,计数器,序列号,UE1选择的的随机数(nonce或RAND)中的任意一个,本申请不作限制。
S1006、中继UE校验第一令牌成功后,向群组成员发送第二连接请求,相应的,群组成员接收中继UE发送的第二连接请求消息。
中继UE发的的第二连接请求消息携带UE1标识,群组标识或UE2标识,中继UE标识,第四令牌和可选的第四新鲜参数,其中中继UE标识为该中继UE的标识;第二连接请求消息还可以携带业务标识、服务标识、密钥标识或其他参数中的任意一项或多项,本申请不作限制。
一种可能的实现中,中继UE通过广播发送该第二连接请求消息,群组成员UE2通过监听中继UE发送的广播消息获取第二连接请求消息;
另一种可能的实现中,当中继UE已经与UE2建立安全连接,且已知UE2的群组标识时,中继UE可直接向UE2发送该第二连接请求消息。
S1007、UE2接收中继UE发送的第二连接请求消息后,校验中继UE的身份。
具体内容详见S306,此处不再赘述。
S1008、UE2根据第一密钥K1校验第四令牌。
UE2利用第二连接请求中携带的群组标识,查询出第一密钥K1,并根据K1校验第二连接请求中携带的第四令牌。
具体地,UE2利用中继UE标识和K1作为输入参数进行计算以获取令牌,并将第四令牌与所生成的令牌进行匹配以获取校验结果。校验第四令牌的输入参数还包括UE1标识,群组标识或UE2标识以及第四新鲜参数;校验第一令牌的输入参数还可能包含业务标识,应用标识,密钥标识或其他参数的任意一项或多项。
S1009、UE2校验第四令牌通过后,生成第三密钥K3,并计算第三令牌。
本步骤与S908中UE2校验第一令牌通过后生成K3,并计算第三令牌相同,此处不再赘述。
S1010、UE2向中继UE发送第一连接响应消息,相应的,中继UE接收UE2发送的第一连接响应消息。
UE2向中继UE发送的连接响应消息携带第三令牌,UE2标识以及第二新鲜参数;该连接响应消息还可以携带第四新鲜参数,密钥标识,中继UE标识,UE1标识,群组标识中的任意一项或多项,本申请不作限定。
S1011、中继UE校验第一连接响应中的第三令牌。
中继UE收到UE2发送的携带第三令牌的连接响应后,校验该第三令牌,具体内容同S911中UE1校验第三令牌相同,此处不再赘述。
若中继UE校验第三令牌成功则向UE1发送第二连接响应消息;
若中继UE校验第三令牌失败则终止通信建立流程。
S1012、中继UE校验第三令牌成功后向UE1发送第二连接响应消息,相应的,UE1接收中继UE发送的第二连接响应消息。
该第二连接响应消息携带UE2标识和第二新鲜参数。该第二连接响应消息还可以携带密钥标识,中继UE标识,UE1标识,群组标识中的任意一项或多项,本申请不作限定。
S1013、UE1接收中继UE发送的第二连接响应消息后,生成第三密钥K3。
具体地,UE1根据K1生成K3;UE1还可以根据中继UE标识、UE1标识、UE2标识、第一新鲜参数,第二新鲜参数,业务标识,应用标识等其他参数中的至少一项生成K3,需要指出的是,UE1生成K3的其他参数应当与UE2生成K3的其他参数相同。
UE1将所生成的K3作为UE1与UE2之间通信的加密密钥和/或完整性保护密钥,或者根据K3进一步推演UE1与UE2之间通信的加密密钥和/或完整性密钥。
本实施例中,UE向中继UE发送第一连接请求消息,该第一连接请求消息携带根据中继UE标识生成的第一令牌;中继UE校验该第一令牌成功后生成第四令牌,并向群组成员发送携带第四令牌的第二连接请求消息;群组成员UE2校验第四令牌成功后计算通信密钥K3和第三令牌,并向中继UE返回携带第三令牌的连接响应;中继UE校验该第三令牌成功后向UE1发送携带UE2标识的连接响应,从而实现中继UE代理UE1查找并校验群组成员。
参见图11,本申请实施例提供了一种装置1100,该装置包括接收模块1101、处理模块1102以及发送模块1103。
该装置1100可以用于UE1,也可以是UE1,该装置可以执行上述各个方法实施例中UE1所执行的操作。以图3中的中继UE校验方法为例,接收模块1101用于接收中继UE发送的中继UE标识,还用于接收中继UE发送的连接响应消息;处理模块1102用于校验中继UE的身份,还用于计算第一令牌;发送模块1103用于向中继UE发送第一连接请求消息,该连接请求消息携带处理模块1102计算的第一令牌;
该装置1100可以用于中继UE,也可以是中继UE,该装置可以执行上述各个方法实施例中中继UE所执行的操作。以图8中的中继UE校验方法为例,接收模块1101用于接收UE1发送的第一连接请求消息,该连接请求消息中携带第一令牌;处理模块1102用于保存第四令牌;发送模块1103用于向UE2发送第二连接请求消息,该连接请求消息中携带第一令牌和中继UE标识;接收模块1101还用于接收UE2发送的连接响应消息,该连接响应消息携带第三令牌;接收模块1101接收连接响应消息后,处理模块1102还用于根据保存的第四令牌校验连接响应消息中的第三令牌;处理模块1102校验第四令牌成功之后,发送模块1103还用于向UE1发送校验结果。
该装置1100可以用于UE2,也可以是UE2,该装置可以执行上述各个方法实施例中UE2所执行的操作。以图5中的中继UE校验方法为例,接收模块1101用于接收中继UE发送的第二连接请求消息,该连接请求消息中携带第一令牌和中继UE标识;处理模块1102用于保存第二密钥K2,还可用于维护可信列表,还可用于校验中继UE的身份,还用于验证中继UE是否在可信列表中,还用于根据K2校验第一令牌,可选的,还用于生成第三密钥K3,还可用于利用K3对连接响应消息进行加密和/或完整性保护或者生成第三令牌;发送模块1103用于向第一中继UE发送连接响应。
参见图12,本申请实施例提供了一种装置1200,该装置包括接收模块1201和发送模块1202。
该装置1200可以用于第二中继UE,也可以是第二中继UE,该装置可以执行图7中第二中继UE所执行的操作。接收模块1201用于接收第一中继UE发送的第二连接请求消息,该连接请求消息中携带第一令牌;发送模块1202用于向UE2发送第三连接请求消息,该连接请求消息中携带第一令牌和第二中继UE标识;接收模块1201还用于接收UE2发送的连接响应消息;接收模块1201接收连接响应消息后,发送模块1202还用于向第一中继UE发送该连接响应消息。
该装置1200可以用于中继UE,也可以是中继UE,该装置可以执行图3、图5、图9所示方法实施例中中继UE所执行的操作。以图3中的中继UE校验方法为例,接收模块1201用于接收UE1发送的第一连接请求消息,该连接请求消息中携带第一令牌;发送模块1202用于向UE2发送第二连接请求消息,该连接请求消息中携带第一令牌和中继UE标识;接收模块1201还用于接收UE2发送的连接响应消息;接收模块1201接收连接响应消息后,发送模块1202还用于向UE1发送连接响应消息。
参见图13,本申请实施例提供了一种装置1300,该装置包括接收模块1301、处理模块1302以及发送模块1303,其中处理模块1302还包括校验单元1304,存储单元1305和计算单元1306。
该装置1300可以用于UE1,也可以是UE1,该装置可以执行上述各个方法实施例中UE1所执行的操作。以图3中的中继UE校验方法为例,接收模块1301用于接收中继UE发送的中继UE标识;处理模块1302中的存储单元1305用于保存密钥K1、UE1标识、UE2标识等参数,还用于保存接收模块1301接收到中继UE标识;处理模块1302中的校验单元1304可用于校验中继UE的身份;处理模块1302中的计算单元1306用于根据中继UE标识计算第一令牌;发送模块1303用于向中继UE发送第一连接请求消息,该连接请求消息携带计算单元1306计算的第一令牌;接收模块1301还用于接收中继UE发送的连接响应消息,该连接响应消息携带第二令牌;接收模块1301接收连接响应消息之后,计算单元1306还用于计算第三密钥K3,以及校验单元1304还用于校验第三令牌。
该装置1300可以用于UE2,也可以是UE2,该装置可以执行上述各个方法实施例中UE2所执行的操作。以图5中的中继UE校验方法为例,接收模块1301用于接收中继UE发送的第二连接请求消息,该连接请求消息中携带第一令牌和中继UE标识;处理模块1302中的存储单元1305用于保存第二密钥K2,还可用于维护可信列表;处理模块1302中的校验单元1304可用于校验中继UE的身份,还用于验证中继UE是否在存储单元1305中的可信列表中,还用于根据存储单元1305中的第二密钥K2校验第一令牌;可选的,处理模块1302中的计算单元1306还用于生成第三密钥K3,还可用于利用K3对连接响应消息进行加密和/或完整性保护,还可用于生成第二令牌;发送模块1303用于向第一中继UE发送连接响应,可选的该连接响应消息由第三密钥K3进行加密和/或完整性保护,或者可选的,该连接响应消息携带第二令牌。
参见图14,本申请实施例还提供了一种设备1400,该设备1400包括处理器1401、通信接口1402和存储器1403。
处理器1401用于执行程序指令,当程序被执行时,使得处理器1401执行上述实施例提供的各个方法中UE1、UE2、中继UE、第一中继UE和第二中继UE执行的操作。处理器1401可以但不限于是中央处理器(Central Processing Unit,CPU),网络处理器(Network Processor,NP)或者CPU和NP的组合。在处理器1401是CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。
处理器1401还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(Application-specific Integrated Circuit,ASIC),可编程逻辑器件(Programmable Logic Device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD),现场可编程逻辑门阵列(Field-programmable Gate Array,FPGA),通用阵列逻辑(Generic Array Logic,GAL)或其任意组合。
通信接口1402用于在处理器1401的控制下与其他设备进行通信,例如发送数据和/或接收数据,上述图11中的发送模块1103和接收模块1101、图12中的发送模块1203和接收模块1201以及图13中的发送模块1303和接收模块1301均可以通过通信接口1402来实现。
存储器1403用于存储处理器1401所执行的程序。存储器1403可以包括但不限于是随机存储记忆体(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、便携式只读存储器(Compact Disc Read-Only Memory,CD-ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器1403还可以包括上述 种类存储器的任意组合。
参见图15,本申请实施例提供了一种通信设备1500,该设备包括用于收发数据的通信接口1502以及与所述通信接口耦合的处理器1501,其中处理器1501执行上述各个实施例提供的方法,该处理器1501还通过通信接口1502执行上述实施例中涉及的数据收发。
本申请实施例提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序包括用于执行上述实施例提供的方法的指令。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例提供的方法。
本领域内的技术人员应明白,本申请的实施例可提供为方法、装置、设备(系统)或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一项或多项其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、装置、设备(系统)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图中的每一流程。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的一些具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可对这些实施例做出另外的变更和修改。因此,所附权利要求意欲解释为包括上述实施例以及落入本申请范围的说是有变更和修改。因此,本申请保护范围应以所述权利要求的保护范围为准。

Claims (59)

  1. 一种校验中继用户设备的方法,其特征在于,所述方法适用于第一用户设备UE1通过所述中继用户设备UE与第二用户设备UE2建立通信的场景,所述方法包括:
    所述UE1接收所述中继UE发送的第一消息,所述第一消息携带中继UE标识;
    所述UE1向所述中继UE发送第一连接请求消息,所述第一连接请求消息包含第一令牌,所述第一令牌根据第一密钥K1和所述中继UE标识生成;
    所述UE2接收所述中继UE发送的第二消息,所述第二消息中包含所述第一令牌和所述中继UE标识;
    所述UE2利用所述中继UE标识和第二密钥K2对所述第一令牌进行校验;
    若所述第一令牌被校验成功,则所述UE2向所述中继UE发送连接响应消息;以及
    所述UE1接收来自所述中继UE的所述连接响应消息。
  2. 根据权利要求1所述的方法,其特征在于,
    所述UE2对所述第一令牌进行校验之前,所述方法还包括:
    所述UE2将所述中继UE标识与可信列表中的中继标识进行匹配以获得匹配结果;
    所述UE2对所述第一令牌进行校验,包括:
    若所述匹配结果为匹配失败,则对所述第一令牌进行校验。
  3. 根据权利要2所述的方法,其特征在于,所述方法还包括:
    若所述第一令牌被校验成功,则将所述中继UE标识添加到所述可信列表中。
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述UE2利用所述中继UE标识和第二密钥K2对所述第一令牌进行校验,包括:
    所述UE2利用所述中继UE标识和所述K2作为输入参数进行计算以获取第二令牌;其中,所述K2与所述K1为对称密钥;
    所述UE2将所述第一令牌与所述第二令牌进行匹配以获取校验结果。
  5. 根据权利要求1至4任一所述的方法,其特征在于,所述方法还包括:
    若所述UE2校验所述第一令牌成功,所述UE2生成第三密钥K3;
    所述UE2向所述中继UE发送连接响应消息,包括:
    所述UE2向所述中继UE发送利用所述K3加密的连接响应消息。
  6. 根据权利要5所述的方法,其特征在于,所述方法还包括:
    响应于所述连接响应消息,所述UE1根据所述K1生成所述K3;以及利用所述K3对所述连接响应消息进行解密。
  7. 根据权利要求1至4任一所述的方法,其特征在于,所述方法还包括:
    若所述UE2校验所述第一令牌成功,所述UE2利用所述K2和所述中继UE标识作为输入参数进行计算以获取第三令牌;
    所述UE2向所述中继UE发送连接响应消息,包括:
    所述UE2向所述中继UE发送包含所述第三令牌的连接响应消息。
  8. 根据权利要7所述的方法,其特征在于,所述方法还包括:
    所述UE1利用所述中继UE标识和所述K1对所述第三令牌进行校验;
    若所述第三令牌被校验成功,所述UE1通过所述中继UE向所述UE2发送利用所述K1或K1衍生的密钥进行加密的消息。
  9. 根据权利要求1至4任一所述的方法,其特征在于,所述方法还包括:
    若所述UE2校验所述第一令牌成功,所述UE2利用所述K2生成第三密钥K3;
    所述UE2利用所述K3和所述中继UE标识作为输入参数进行计算以获取第三令牌;
    所述UE2向所述中继UE发送连接响应消息,包括:
    所述UE2向所述中继UE发送包含所述第三令牌的连接响应消息。
  10. 根据权利要9所述的方法,其特征在于,所述方法还包括:
    所述UE1利用所述K1生成所述K3,并利用所述中继UE标识和所述K3对所述第三令牌进行校验;
    若所述第三令牌被校验成功,所述UE1通过所述中继UE向所述UE2发送利用所述K1或K1衍生的密钥进行加密的消息。
  11. 根据权利要求1至10任一所述的方法,其特征在于,所述输入参数还包括UE1标识、UE2标识、所述UE1和所述UE2所属群组的群组标识以及第一新鲜参数中的至少一个参数。
  12. 根据权利要求1至11任一所述的方法,其特征在于,所述第一消息还携带所述中继UE的数字签名;所述UE1利用所述中继UE标识和第一密钥K1作为输入参数进行计算以获取第一令牌之前,所述方法还包括:
    所述UE1利用所述中继UE的公钥对所述中继UE的数字签名进行验证以获取数字签名的验证结果;
    所述UE1利用所述中继UE标识和第一密钥K1作为输入参数进行计算以获取第一令牌,包括:
    若所述数字签名的验证结果为验证成功,所述UE1利用所述中继UE标识和第一密钥K1作为输入参数进行计算以获取第一令牌。
  13. 一种通信装置,其特征在于,所述通信装置应用于通过中继用户设备UE与目标用户设备建立通信连接的场景,所述通信装置包括:
    接收模块,用于接收中继UE发送的第一消息,所述第一消息携带中继UE标识;
    发送模块,用于向所述中继UE发送第一连接请求消息,所述第一连接请求消息包含第一令牌,所述第一令牌根据第一密钥K1和所述中继UE标识生成;
    所述接收模块,还用于接收中继UE发送的连接响应消息。
  14. 根据权利要求13所述的通信装置,其特征在于,所述装置还包括:
    处理模块,用于根据所述K1生成所述K3;以及用于利用所述K3对所述连接响应消息进行解密。
  15. 根据权利要求13所述的通信装置,其特征在于,所述连接响应消息包含第三令牌,所述装置还包括:
    处理模块,用于对所述第三令牌进行校验;
    所述发送模块,还用于当所述第三令牌被校验成功后,通过所述中继UE向所述UE2发送利用所述K1或K1衍生的密钥进行加密的消息。
  16. 根据权利要求15所述的通信装置,其特征在于:
    所述处理模块,具体用于利用所述中继UE标识和所述K1对所述第三令牌进行校验。
  17. 根据权利要求15所述的通信装置,其特征在于:
    所述处理模块,具体用于利用所述K1生成第三密钥K3,并利用所述中继UE标识和所述K3对所述第三令牌进行校验。
  18. 根据权利要求13至17任一所述的通信装置,其特征在于:
    生成所述第一令牌的输入参数还包括UE1标识、UE2标识、所述UE1和所述UE2所属群组的群组标识以及第一新鲜参数中的至少一个参数。
  19. 根据权利要求13至18任一所述的通信装置,其特征在于:
    所述第一消息还携带所述中继UE的数字签名;
    所述处理模块,还用于利用所述中继UE的公钥对所述中继UE的数字签名进行验证以获取数字签名的验证结果;若所述数字签名的验证结果为验证成功,利用所述第一中继UE标识和所述K1作为输入参数进行计算以获取第一令牌。
  20. 一种通信方法,应用于通过中继用户设备UE与目标用户设备建立通信连接的场景,其特征在于,所述方法包括:
    接收中继UE发送的第一消息,所述第一消息携带中继UE标识;
    向所述中继UE发送第一连接请求消息,所述第一连接请求消息包含第一令牌,所述第一令牌根据第一密钥K1和所述中继UE标识生成;
    接收中继UE发送的连接响应消息。
  21. 根据权利要求20所述的方法,其特征在于,所述方法还包括:
    根据所述K1生成所述K3;以及用于利用所述K3对所述连接响应消息进行解密。
  22. 根据权利要求20或21所述的方法,其特征在于,所述连接响应消息包含第三令牌,所述方法还包括:
    对所述第三令牌进行校验;
    当所述第三令牌被校验成功后,通过所述中继UE向所述UE2发送利用所述K1或K1衍生的密钥进行加密的消息。
  23. 根据权利要求22所述的方法,其特征在于,所述对所述第三令牌进行校验包括:
    利用所述中继UE标识和所述K1对所述第三令牌进行校验。
  24. 根据权利要求22或23所述的方法,其特征在于,所述对所述第三令牌进行校验包括:
    利用所述K1生成第三密钥K3,并利用所述中继UE标识和所述K3对所述第三令牌进行校验。
  25. 根据权利要求20至24任一所述的方法,其特征在于,
    生成所述第一令牌的输入参数还包括UE1标识、UE2标识、所述UE1和所述UE2所属群组的群组标识以及第一新鲜参数中的至少一个参数。
  26. 根据权利要求20至25任一所述的方法,其特征在于,所述第一消息还携带所述中继UE的数字签名,所述方法还包括:
    利用所述中继UE的公钥对所述中继UE的数字签名进行验证以获取数字签名的验证结果;若所述数字签名的验证结果为验证成功,利用所述第一中继UE标识和所述K1作为输入参数进行计算以获取第一令牌。
  27. 一种通信装置,其特征在于,所述通信装置应用于通过中继用户设备UE与源用户设备建立通信连接的场景,所述通信装置包括:
    接收模块,用于接收中继UE发送的连接请求消息,所述连接请求消息包含第一令牌和中继UE标识;
    处理模块,用于利用第二密钥K2和所述中继UE标识对所述第一令牌进行校验;
    发送模块,用于当第一令牌被校验成功时,向所述中继UE发送连接响应消息。
  28. 根据权利要求27所述的通信装置,其特征在于,
    所述处理模块还用于,将所述中继UE标识与可信列表中的中继标识进行匹配以获得匹配结果;若所述匹配结果为匹配失败,则对所述第一令牌进行校验。
  29. 根据权利要求27所述的通信装置,其特征在于,
    所述处理模块还用于,在所述第一令牌被校验成功时,将所述第一中继UE标识添加至所述可信列表中。
  30. 根据权利要求27至29任一项所述的通信装置,其特征在于,
    所述处理模块,具体用于利用所述中继UE标识和所述K2作为输入参数进行计算以获取第二令牌;其中,所述K2和第一密钥K1为对称密钥;所述K1为所述源用户设备生成第一令牌时所采用的密钥;
    所述处理模块,用于将所述第一令牌与所述第二令牌进行匹配以获取校验结果。
  31. 根据权利要求27至30任一项所述的装置,其特征在于,
    所述处理模块,还用于在所述第一令牌被校验成功后,生成第三密钥K3;
    所述发送模块,具体用于向所述中继UE发送所述处理模块利用所述K3进行加密的连接响应消息。
  32. 根据权利要求27至30任一所述的装置,其特征在于,
    所述处理模块,还用于在所述第一令牌被校验成功后,利用所述K2和所述中继UE标识作为输入参数进行计算以获取第三令牌;
    所述发送模块,具体用于向所述中继UE发送包含所述第三令牌的连接响应消息。
  33. 根据权利要求27至30任一项所述的装置,其特征在于,
    所述处理模块,用于当所述第一令牌被校验成功后,利用所述K2生成第四密钥K4;
    所述处理模块还用于利用所述K4和所述中继UE标识作为输入参数进行计算以获取第三令牌;
    所述发送模块,具体用于向所述中继UE发送包含所述第三令牌的连接响应消息。
  34. 根据权利要求27至33任一项所述的通信装置,其特征在于,
    所述连接请求消息还携带所述中继UE的数字签名;
    所述处理模块,还用于利用所述中继UE的公钥对所述第一UE的数字签名进行验证以获取数字签名的验证结果;若所述数字签名的验证结果为验证成功,则校验第一令牌。
  35. 一种通信方法,应用于通过中继用户设备UE与源用户设备建立通信连接的场景,其特征在于,所述方法包括:
    接收中继UE发送的连接请求消息,所述连接请求消息包含第一令牌和中继UE标识;
    利用第二密钥K2和所述中继UE标识对所述第一令牌进行校验;
    当第一令牌被校验成功时,向所述中继UE发送连接响应消息。
  36. 根据权利要求35所述的方法,其特征在于,还包括:
    将所述中继UE标识与可信列表中的中继标识进行匹配以获得匹配结果;若所述匹配结果为匹配失败,则对所述第一令牌进行校验。
  37. 根据权利要求36所述的方法,其特征在于,还包括:
    在所述第一令牌被校验成功时,将所述第一中继UE标识添加至所述可信列表中。
  38. 根据权利要求35至37任一项所述的方法,其特征在于,所述利用第二密钥K2和所述中继UE标识对所述第一令牌进行校验,包括:
    利用所述中继UE标识和所述K2作为输入参数进行计算以获取第二令牌;其中,所述K2和第一密钥K1为对称密钥;所述K1为所述源用户设备生成第一令牌时所采用的密钥;
    将所述第一令牌与所述第二令牌进行匹配以获取校验结果。
  39. 根据权利要求35至38任一项所述的方法,其特征在于,还包括:
    在所述第一令牌被校验成功后,生成第三密钥K3;以及
    向所述中继UE发送利用所述K3进行加密的连接响应消息。
  40. 根据权利要求35至38任一项所述的方法,其特征在于,
    在所述第一令牌被校验成功后,利用所述K2和所述中继UE标识作为输入参数进行计算以获取第三令牌;以及
    向所述中继UE发送包含所述第三令牌的连接响应消息。
  41. 根据权利要求35至38任一所述的方法,其特征在于,
    当所述第一令牌被校验成功后,利用所述K2生成第四密钥K4;
    利用所述K4和所述中继UE标识作为输入参数进行计算以获取第三令牌;以及
    向所述中继UE发送包含所述第三令牌的连接响应消息。
  42. 根据权利要求35至41所述的方法,其特征在于,所述连接请求消息还携带所述中继UE的数字签名,所述方法还包括:
    利用所述中继UE的公钥对所述第一UE的数字签名进行验证以获取数字签名的验证结果;若所述数字签名的验证结果为验证成功,则校验第一令牌。
  43. 一种通信装置,该装置包括:
    接收模块,用于接收第一用户设备UE1发送的第一连接请求消息,所述第一连接请求消息包含第一令牌;所述第一令牌根据第一密钥K1和所述通信装置的标识生成;
    发送模块,用于向第二用户设备UE2发送第二连接请求消息,所述第二连接请求消息包含第一令牌和所述通信装置的标识;
    所述接收模块,还用于接收UE2根据所述通信装置的标识校验所述第一令牌成功后发送的连接响应消息;
    所述发送模块还用于向所述UE1发送所述连接响应消息。
  44. 根据权利要求43所述的通信装置,
    所述连接响应消息为所述UE2利用校验所述第一令牌成功后生成的第三密钥K3加密的连接响应消息。
  45. 根据权利要求43或44所述的通信装置,
    所述连接响应消息包含第三令牌,所述第三令牌为所述UE校验所述第一令牌成功后利用第二密钥K2和所述通信装置的标识作为输入参数进行计算获得的。
  46. 根据权利要求45所述的通信装置,
    所述接收模块,还用于接收所述UE1利用所述通信装置的标识和所述K1校验所述第三令牌成功之后发送的利用所述K1或K1衍生的密钥进行加密的消息;
    所述发送模块,还用于向所述UE2发送利用所述K1或K1衍生的密钥进行加密的消息。
  47. 一种通信方法,应用于源用户设备通过中继用户设备与目标用户设备建立通信的场景,其特征在于,包括:
    接收第一用户设备UE1发送的第一连接请求消息,所述第一连接请求消息包含第一令牌;所述第一令牌根据第一密钥K1和所述通信装置的标识生成;
    向第二用户设备UE2发送第二连接请求消息,所述第二连接请求消息包含第一令牌和所述通信装置的标识;
    接收UE2根据所述通信装置的标识校验所述第一令牌成功后发送的连接响应消息;
    向所述UE1发送所述连接响应消息。
  48. 根据权利要求47所述的方法,其特征在于,
    所述连接响应消息为所述UE2利用校验所述第一令牌成功后生成的第三密钥K3加密的连接响应消息。
  49. 根据权利要求47或48所述的方法,其特征在于,
    所述连接响应消息包含第三令牌,所述第三令牌为所述UE校验所述第一令牌成功后利用第二密钥K2和所述通信装置的标识作为输入参数进行计算获得的。
  50. 根据权利要求49所述的方法,其特征在于,还包括:
    接收所述UE1利用所述通信装置的标识和所述K1校验所述第三令牌成功之后发送的利用所述K1或K1衍生的密钥进行加密的消息;以及
    向所述UE2发送利用所述K1或K1衍生的密钥进行加密的消息。
  51. 一种设备,其特征在于,所述设备包括:用于存储计算机指令的存储器、用于收发数据的通信接口,以及与所述存储器和通信接口耦合的处理器;当所述计算机指令被运行时,所述处理器执行权利要求1~12任意一项所述方法中所述UE1所执行的步骤;或者执行权利要求20~26任意一项所述的方法。
  52. 一种设备,其特征在于,所述设备包括:用于存储计算机指令的存储器、用于收发数据的通信接口,以及与所述存储器和通信接口耦合的处理器;当所述计算机指令被运行时,所述处理器执行权利要求1~12任意一项所述方法中所述UE2所执行的步骤,或者执行权利要求35~42任意一项所述的方法。
  53. 一种设备,其特征在于,所述设备包括:用于存储计算机指令的存储器、用于收发数据的通信接口,以及与所述存储器和通信接口耦合的处理器;当所述计算机指令被运行时,所述处理器执行权利要求1~12任意一项所述方法中所述中继UE所执行的步骤,或者执行权利要求47~50任意一项所述的方法。
  54. 一种设备,其特征在于,所述设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;所述处理器用于执行权利要求1~12任意一项所述方法中所述UE1所执行的步骤,或者执行权利要求20~26任意一项所述的方法;
    其中,所述处理器通过所述通信接口执行权利要求1~12任意一项中所述UE1所涉及的数据或信令收发,或者执行权利要求20~26任意一项中涉及的数据或信令收发所述的方法。
  55. 一种设备,其特征在于,所述设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;所述处理器用于执行权利要求1~12任意一项所述方法中所述UE2所执行的步骤,或者执行权利要求20~26任意一项所述的方法;
    其中,所述处理器通过所述通信接口执行权利要求1~12任意一项中所述UE2所涉及的数据或信令收发,或者执行权利要求35~42任意一项中涉及的数据或信令收发所述的方法。
  56. 一种设备,其特征在于,所述设备包括用于收发数据的通信接口以及与所述通信接口耦合的处理器;所述处理器用于执行权利要求1~12任意一项所述方法中所述中继UE所执行的步骤,或者执行权利要求47~50任意一项所述的方法;
    其中,所述处理器通过所述通信接口执行权利要求1~12任意一项中所述UE2所涉及的数据或信令收发,或者执行权利要求47~50任意一项中涉及的数据或信令收发所述的方法。
  57. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质中存储有计算机程序,当所述计算机程序被执行时,权利要求1~12所述的任意一项所述方法会被运行;或者权利要求20~26任意一项所述的方法被执行;或者35~42任意一项所述的方法被执行;或者权利要求47~50任意一项所述的方法被执行。
  58. 一种计算机程序产品,当其在计算机上运行时,权利要求1~12所述的任意一项所述方法会被运行;或者权利要求20~26任意一项所述的方法被执行;或者35~42任意一项所述的方法被执行;或者权利要求47~50任意一项所述的方法被执行。
  59. 一种通信系统,其特征在于,包括权利要求13至19任一项所述的通信装置、权利要求27至34任一项所述的通信装置,以及权利要求13至19和权利要求43至46任一项中所述的通信装置。
PCT/CN2020/139982 2020-01-08 2020-12-28 一种校验中继用户设备的方法及装置 WO2021139552A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP20911887.6A EP4080927A4 (en) 2020-01-08 2020-12-28 METHOD AND APPARATUS FOR CONTROLLING RELAY USER EQUIPMENT

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010018580.2 2020-01-08
CN202010018580.2A CN113179515B (zh) 2020-01-08 2020-01-08 一种校验中继用户设备的方法及装置

Publications (1)

Publication Number Publication Date
WO2021139552A1 true WO2021139552A1 (zh) 2021-07-15

Family

ID=76788398

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/139982 WO2021139552A1 (zh) 2020-01-08 2020-12-28 一种校验中继用户设备的方法及装置

Country Status (3)

Country Link
EP (1) EP4080927A4 (zh)
CN (2) CN116828468A (zh)
WO (1) WO2021139552A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115052020B (zh) * 2022-06-23 2024-02-02 阿波罗智联(北京)科技有限公司 设备互连系统、方法、装置以及连接设备
WO2024092796A1 (zh) * 2022-11-04 2024-05-10 北京小米移动软件有限公司 信息处理方法及装置、通信设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101815293A (zh) * 2009-02-20 2010-08-25 华为技术有限公司 无线中继网络中的链路安全认证方法、装置和系统
CN107211264A (zh) * 2015-03-10 2017-09-26 英特尔Ip公司 用于基于邻近的服务的经由ue到ue中继建立的连接
CN107439026A (zh) * 2015-04-03 2017-12-05 高通股份有限公司 Ue至ue中继列表和楼层仲裁者的确定
WO2019134868A1 (en) * 2018-01-04 2019-07-11 Signify Holding B.V. System and method for end-to-end secure communication in device-to-device communication networks

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196436B (zh) * 2010-03-11 2014-12-17 华为技术有限公司 安全认证方法、装置及系统
KR20170002201A (ko) * 2015-06-29 2017-01-06 삼성전자주식회사 무선 통신 시스템에서 근접 서비스 통신을 수행하는 방법 및 장치
US20170325270A1 (en) * 2016-05-06 2017-11-09 Futurewei Technologies, Inc. System and Method for Device Identification and Authentication
WO2018126452A1 (zh) * 2017-01-06 2018-07-12 华为技术有限公司 授权验证方法和装置
KR102468390B1 (ko) * 2017-05-31 2022-11-18 삼성에스디에스 주식회사 토큰 관리 방법 및 이를 수행하기 위한 서버
US10362159B1 (en) * 2017-10-12 2019-07-23 Zoho Corporation Private Limited Controlling devices using short message service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101815293A (zh) * 2009-02-20 2010-08-25 华为技术有限公司 无线中继网络中的链路安全认证方法、装置和系统
CN107211264A (zh) * 2015-03-10 2017-09-26 英特尔Ip公司 用于基于邻近的服务的经由ue到ue中继建立的连接
CN107439026A (zh) * 2015-04-03 2017-12-05 高通股份有限公司 Ue至ue中继列表和楼层仲裁者的确定
WO2019134868A1 (en) * 2018-01-04 2019-07-11 Signify Holding B.V. System and method for end-to-end secure communication in device-to-device communication networks

Also Published As

Publication number Publication date
EP4080927A4 (en) 2023-01-18
CN113179515B (zh) 2023-07-18
EP4080927A1 (en) 2022-10-26
CN113179515A (zh) 2021-07-27
CN116828468A (zh) 2023-09-29

Similar Documents

Publication Publication Date Title
US10237718B2 (en) Proximity discovery, authentication and link establishment between mobile devices in 3GPP LTE
KR102398221B1 (ko) 무선 직접통신 네트워크에서 비대칭 키를 사용하여 아이덴티티를 검증하기 위한 방법 및 장치
US10959092B2 (en) Method and system for pairing wireless mobile device with IoT device
CN110678770A (zh) 定位信息验证
EP3493571A1 (en) Authenticity verification of authentication messages
WO2021169880A1 (zh) 一种安全认证方法、装置及电子设备
JP2013545367A (ja) ローミングネットワークにおけるアクセス端末識別情報の認証
CN102137397A (zh) 机器类型通信中基于共享群密钥的认证方法
WO2021139552A1 (zh) 一种校验中继用户设备的方法及装置
WO2013185709A1 (zh) 一种呼叫认证方法、设备和系统
CN110730447B (zh) 一种用户身份保护方法、用户终端和核心网
CN111031475B (zh) 采集终端位置信息的方法、终端、位置采集端及存储介质
CN115885496B (zh) 一种通信方法及相关装置
US11979743B2 (en) Systems and methods for secure access to 5G non-public networks using mobile network operator credentials
CN117240486A (zh) 一种认证方法和通信装置
CN117256166A (zh) 信息处理方法及装置、通信设备及存储介质
CN117915314A (zh) 设备间通信安全系统、方法及车辆
CN116897550A (zh) Ue发现消息保护方法、装置、通信设备及存储介质
CN117083892A (zh) 信息传输方法、装置、通信设备和存储介质
CN113194471A (zh) 基于区块链网络的无线网络接入方法、装置和终端

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: 20911887

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020911887

Country of ref document: EP

Effective date: 20220722

NENP Non-entry into the national phase

Ref country code: DE