WO2018137195A1 - 消息保护方法、用户设备和核心网设备 - Google Patents

消息保护方法、用户设备和核心网设备 Download PDF

Info

Publication number
WO2018137195A1
WO2018137195A1 PCT/CN2017/072665 CN2017072665W WO2018137195A1 WO 2018137195 A1 WO2018137195 A1 WO 2018137195A1 CN 2017072665 W CN2017072665 W CN 2017072665W WO 2018137195 A1 WO2018137195 A1 WO 2018137195A1
Authority
WO
WIPO (PCT)
Prior art keywords
random number
signature
message
response message
hash value
Prior art date
Application number
PCT/CN2017/072665
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 PCT/CN2017/072665 priority Critical patent/WO2018137195A1/zh
Priority to EP17894481.5A priority patent/EP3565178B1/en
Priority to CN201780056174.1A priority patent/CN109691017B/zh
Publication of WO2018137195A1 publication Critical patent/WO2018137195A1/zh
Priority to US16/520,833 priority patent/US10582378B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • H04W12/037Protecting confidentiality, e.g. by encryption of the control plane, e.g. signalling traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • 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
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/047Key management, e.g. using generic bootstrapping architecture [GBA] without using a trusted network node as an anchor
    • H04W12/0471Key exchange
    • 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
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/141Denial of service attacks against endpoints in a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a message protection method, a user equipment, and a core network device.
  • LTE Long Term Evolution
  • messages transmitted before the security context has not been established between the User Equipment (UE) and the network side device are not protected by security. These messages may be subject to forgery or replay attacks.
  • FIG. 1 is a message interaction diagram of an existing forgery attack.
  • the network element may include: a UE, a pseudo base station, an access network device, and a core network device.
  • the pseudo base station is an illegal base station set by the attacker for attracting the UE to camp.
  • the access network device and the core network device are network side devices when the UE normally accesses the network.
  • the pseudo base station directly intercepts the request message 1 and falsifies the abnormal response message 1.
  • the pseudo base station sends the forged abnormal response message 1 to the UE, causing the UE to refuse the service for a long time.
  • the access network device and the core network device may not receive the request message 1 sent by the UE.
  • the UE sends an unsecured request message 2.
  • the request message 2 is forwarded to the core network device.
  • the request message 2 may be rejected by the core network.
  • the core network device will reply to the abnormal response message 2.
  • the pseudo base station buffers the abnormal response message 2
  • the abnormal response message 2 is forwarded to the UE.
  • the UE cannot access the network due to normal reasons.
  • the UE initiates the request again and sends a request message 3.
  • the pseudo base station intercepts the request message 3
  • the previously cached abnormal response message 2 is sent to the UE.
  • the denial of service was due to an abnormal denial of service caused by a replay attack.
  • the access network device and the core network device may not receive the request message 3 sent by the UE.
  • the embodiment of the present invention provides a message protection method, a user equipment, and a core network device, which can perform security protection on a message transmitted before a security context is not established between a user equipment and a core network device, thereby improving network communication security.
  • an embodiment of the present invention provides a message protection method.
  • the method may include: sending an unsecured request message to the core network device. Receive an exception response message. Based on the third random number, the signature, and the obtained credentials, it is determined whether the abnormal response message is a valid message.
  • the message protection method provided by the first aspect may secure the message transmitted before the security context is not established between the user equipment and the core network device, and the user equipment may Identifies whether the received exception response message is a valid message.
  • the user equipment is prevented from denying service for a long time due to a fake base station's forgery attack or replay attack, which improves the security of network communication.
  • determining, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message including: if the first random number and the third random number If the number is the same and the signature verification is passed, it is determined that the abnormal response message is a valid message.
  • the signature verification includes: passing the signature verification of the abnormal response message according to the third random number, the signature, and the credential.
  • the input parameters of the core network device generating the signature include the first random number and the key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the third random number, the received signature, and the obtained credential, and can determine whether the received abnormal response message is a valid message.
  • the first random number, the third random number, and the signature can prevent the user equipment from denying service for a long time due to the fake attack or the replay attack of the pseudo base station, thereby improving the security of the network communication.
  • the abnormal response message may further include a second random number, and determining, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message.
  • the method includes: if the first random number is the same as the third random number, and the signature verification is passed, determining that the abnormal response message is a valid message.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the signature, and the credential.
  • the input parameters of the core network device generating the signature include a first random number, a second random number, and a key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second random number, the third random number, the received signature, and the obtained credential, and can determine whether the received abnormal response message is Valid message.
  • the first random number, the second random number, the third random number, and the signature can prevent the user equipment from denying the service for a long time due to the fake attack or the replay attack of the pseudo base station, thereby improving the security of the network communication.
  • the method further includes: determining a second hash value according to the request message. And determining, according to the third random number, the signature, and the obtained voucher, whether the abnormal response message is a valid message, including: if the first random number is the same as the third random number, and the signature verification is passed, determining that the abnormal response message is a valid message .
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second hash value, the signature, and the credential.
  • the input parameters of the core network device generating the signature include a first random number, a first hash value, and a key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second hash value, the third random number, the received signature, and the obtained credentials, and can determine whether the received abnormal response message is For valid messages.
  • the first random number, the third random number, the first hash value, the second hash value, and the signature can be used to prevent the user equipment from denying service for a long time due to forgery, replay, or tampering attacks of the pseudo base station, thereby improving the network.
  • the security of communication is a first random number, a first hash value, and a key.
  • the method further includes: determining a second hash value according to the request message.
  • the exception response message further includes a first hash value, the first hash value being determined by the core network device according to the request message. And determining, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, including: if the first random number is the same as the third random number, and the first hash value is the same as the second hash value, And if the signature verification is passed, it is determined that the abnormal response message is a valid message.
  • Signature verification by including: root According to the third random number, the first hash value, the signature and the voucher, the signature verification of the abnormal response message is passed.
  • the input parameters of the core network device generating the signature include a first random number, a first hash value, and a key.
  • the core network device sends the first hash value to the user equipment.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the third random number, the first hash value, the received signature, and the obtained credentials, and can determine whether the received abnormal response message is For valid messages.
  • the first random number, the third random number, the first hash value, the second hash value, and the signature can be used to prevent the user equipment from denying service for a long time due to forgery, replay, or tampering attacks of the pseudo base station, thereby improving the network.
  • the security of communication is a first random number, a first hash value, and a key.
  • the method further includes: determining a second hash value according to the request message.
  • the exception response message also includes a second random number.
  • determining, according to the third random number, the signature, and the obtained voucher, whether the abnormal response message is a valid message including: if the first random number is the same as the third random number, and the signature verification is passed, determining that the abnormal response message is a valid message .
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the second hash value, the signature, and the credential.
  • the input parameters of the core network device generating the signature include a first random number, a second random number, a first hash value, and a key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second random number, the third random number, the second hash value, the received signature, and the obtained credentials, and can determine that the received message is received. Whether the exception response message is a valid message.
  • the first random number, the second random number, the third random number, the first hash value, the second hash value, and the signature it is possible to avoid long-term rejection of the user equipment due to forgery, playback, or tampering attacks of the pseudo base station. Service improves the security of network communication.
  • the method further includes: determining a second hash value according to the request message.
  • the exception response message further includes a second random number and a first hash value, the first hash value being determined by the core network device according to the request message. And determining, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, including: if the first random number is the same as the third random number, and the first hash value is the same as the second hash value, And if the signature verification is passed, it is determined that the abnormal response message is a valid message.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the first hash value, the signature, and the credential.
  • the input parameters of the core network device generating the signature include a first random number, a second random number, a first hash value, and a key.
  • the core network device sends the first hash value to the user equipment.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second random number, the third random number, the second hash value, the received signature, and the pre-acquired credential, and can determine that the received message is received. Whether the exception response message is a valid message.
  • the first random number By using the first random number, the second random number, the third random number, the first hash value, the second hash value, and the signature, it is possible to avoid long-term rejection of the user equipment due to forgery, playback, or tampering attacks of the pseudo base station.
  • Service improves the security of network communication.
  • the request message may include an attach request message or a tracking area update request message.
  • the abnormal response message may include an attach reject message, a tracking area update reject message, or an identity request message.
  • the exception response message may further include a credential for verifying the signature.
  • the message protection method provided by the possible implementation provides an implementation manner in which the user equipment obtains the credential.
  • the user equipment can obtain the credentials carried in the abnormal response message.
  • the signature can be verified against the exception response message according to the credential.
  • the method may further include: if the abnormal response message is determined to be an invalid message, changing the accessed access network device, by using the changed access network device Resend the request message to the core network device.
  • the message protection method provided by the possible implementation provides a processing method when the user equipment determines that the received exception response message is an invalid message.
  • the security of network communication is further enhanced by the user equipment changing the access network device and resending the request message.
  • the user equipment may pre-configure the credential.
  • the user equipment may obtain the credential in the message before receiving the abnormal response message.
  • the user equipment may obtain the credential by using the abnormal response message.
  • the user equipment determines that the received abnormal response message is a valid message, performing the first operation according to the abnormal response message.
  • the first operation is an operation performed by the user equipment for a valid exception response message. If the user equipment determines that the received abnormal response message is an invalid message, the abnormal response message is not processed, and the second operation is performed.
  • the second operation is an operation performed by the user equipment for an invalid exception response message.
  • an embodiment of the present invention provides a message protection method.
  • the method may include: receiving an unsecured request message sent by the user equipment. If the request message does not meet the preset condition, an exception response message is generated. Send an exception response message to the user device.
  • the signature is generated according to the input parameter that includes the first random number, and may include: responding to the abnormality according to the pre-acquired key and the first random number.
  • the message generates a signature.
  • the method may further include: generating a second random number.
  • the exception response message also includes a second random number.
  • the signature is generated according to the input parameter including the first random number, and includes: generating a signature on the abnormal response message according to the pre-acquired key, the first random number, and the second random number.
  • the method may further include: determining, according to the request message, the first hash value.
  • the signature is generated according to the input parameter including the first random number, and includes: generating a signature on the abnormal response message according to the pre-acquired key, the first random number, and the first hash value.
  • the method may further include: generating a second random number.
  • the first hash value is determined according to the request message.
  • the exception response message also includes a second random number.
  • the signature is generated according to the input parameter including the first random number, and includes: generating a signature on the abnormal response message according to the pre-acquired key, the first random number, the second random number, and the first hash value.
  • the abnormal response message may further include the first Hash value.
  • the request message may include: an attach request message or a tracking area update request message.
  • the abnormal response message may include: an attach reject message, a tracking area update reject message, or an identity request message.
  • the abnormal response message may further include a credential for the user equipment to verify the signature.
  • an embodiment of the present invention provides a user equipment.
  • the user equipment may include: a transceiver, configured to send an unsecured request message to the core network device. Receive an exception response message. And a processor, configured to determine, according to the third random number, the signature, and the obtained credentials, whether the abnormal response message is a valid message.
  • the processor is configured to: if the first random number is the same as the third random number, and the signature verification is passed, determine that the abnormal response message is a valid message.
  • the signature verification includes: passing the signature verification of the abnormal response message according to the third random number, the signature, and the credential.
  • the abnormal response message may further include a second random number, where the processor is specifically configured to: if the first random number is the same as the third random number, and the signature is verified Pass, then determine that the exception response message is a valid message.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the signature, and the credential.
  • the processor is further configured to: determine, according to the request message, the second hash value.
  • the processor is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second hash value, the signature, and the credential.
  • the processor is further configured to: determine, according to the request message, the second hash value.
  • the exception response message further includes a first hash value, the first hash value being determined by the core network device according to the request message.
  • the processor is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number, the first hash value is the same as the second hash value, and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the first hash value, the signature, and the credential.
  • the processor is further configured to: determine, according to the request message, the second hash value.
  • the exception response message also includes a second random number.
  • the processor is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the second hash value, the signature, and the credential.
  • the processor is further configured to: determine, according to the request message, the second hash value.
  • the exception response message further includes a second random number and a first hash value, the first hash value being determined by the core network device according to the request message.
  • the processor is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number, the first hash value is the same as the second hash value, and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the first hash value, the signature, and the credential.
  • the request message may include: an attach request message or a tracking area update request message.
  • the abnormal response message may include: an attach reject message, a tracking area update reject message, or an identity request message.
  • the exception response message may further include a credential, and the credential is used to verify the signature.
  • the processor is further configured to: if the abnormal response message is determined to be an invalid message, change the accessed access network device.
  • the transceiver is further configured to: resend the request message to the core network device by using the changed access network device.
  • an embodiment of the present invention provides a core network device.
  • the core network device may include: a transceiver, configured to receive an unsecured request message sent by the user equipment.
  • the exception response message generated by the processor is sent to the user equipment.
  • the processor is configured to generate an exception response message when the request message does not meet the preset condition.
  • the processor is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key and the first random number.
  • the processor is further configured to: generate a second random number.
  • the exception response message also includes a second random number.
  • the processor is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, and the second random number.
  • the processor is further configured to: determine, according to the request message, the first hash value.
  • the processor is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, and the first hash value.
  • the processor is further configured to: generate a second random number.
  • the first hash value is determined according to the request message.
  • the exception response message also includes a second random number.
  • the processor is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, the second random number, and the first hash value.
  • the abnormal response message further includes a first hash value.
  • the request message includes: an attach request message or a tracking area update request message.
  • the abnormal response message includes: an attach reject message, a tracking area update reject message, or an identity request message.
  • the abnormal response message further includes a credential for the user equipment to verify the signature.
  • an embodiment of the present invention provides a user equipment.
  • the user equipment may include: a transceiver module, configured to send an unprotected request message to the core network device. Receive an exception response message. And a processing module, configured to determine, according to the third random number, the signature, and the obtained credentials, whether the abnormal response message is a valid message.
  • the processing module is specifically configured to: if the first random number is the same as the third random number, and the signature verification is passed, determine that the abnormal response message is a valid message.
  • Signature The verification pass includes: verifying the signature response of the abnormal response message according to the third random number, signature and credentials.
  • the abnormal response message may further include a second random number
  • the processing module is specifically configured to: if the first random number is the same as the third random number, and the signature is verified Pass, then determine that the exception response message is a valid message.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the signature, and the credential.
  • the processing module is further configured to: determine, according to the request message, the second hash value.
  • the processing module is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second hash value, the signature, and the credential.
  • the processing module is further configured to: determine, according to the request message, the second hash value.
  • the exception response message further includes a first hash value, the first hash value being determined by the core network device according to the request message.
  • the processing module is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number, the first hash value is the same as the second hash value, and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the first hash value, the signature, and the credential.
  • the processing module is further configured to: determine, according to the request message, the second hash value.
  • the exception response message also includes a second random number.
  • the processing module is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the second hash value, the signature, and the credential.
  • the processing module is further configured to: determine, according to the request message, the second hash value.
  • the exception response message further includes a second random number and a first hash value, the first hash value being determined by the core network device according to the request message.
  • the processing module is specifically configured to determine that the abnormal response message is a valid message if the first random number is the same as the third random number, the first hash value is the same as the second hash value, and the signature verification is passed.
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the first hash value, the signature, and the credential.
  • the request message may include: an attach request message or a tracking area update request message.
  • the abnormal response message may include: an attach reject message, a tracking area update reject message, or an identity request message.
  • the abnormal response message may further include a credential, and the credential is used to verify the signature.
  • the processing module is further configured to: if the abnormal response message is determined to be an invalid message, change the accessed access network device.
  • the transceiver module is further configured to: resend the request message to the core network device by using the changed access network device.
  • an embodiment of the present invention provides a core network device.
  • the core network device may include: a transceiver module, configured to receive an unsecured request message sent by the user equipment.
  • the exception response message generated by the processing module is sent to the user equipment.
  • the processing module is configured to generate an exception response message when the request message does not meet the preset condition.
  • the processing module is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key and the first random number.
  • the processing module is further configured to: generate a second random number.
  • the exception response message also includes a second random number.
  • the processing module is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, and the second random number.
  • the processing module is further configured to: determine, according to the request message, the first hash value.
  • the processing module is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, and the first hash value.
  • the processing module is further configured to: generate a second random number.
  • the first hash value is determined according to the request message.
  • the exception response message also includes a second random number.
  • the processing module is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, the second random number, and the first hash value.
  • the abnormal response message further includes a first hash value.
  • the request message includes: an attach request message or a tracking area update request message.
  • the abnormal response message includes: an attach reject message, a tracking area update reject message, or an identity request message.
  • the abnormal response message further includes a credential for the user equipment to verify the signature.
  • the request message includes a first random number.
  • the exception response message includes a third random number and a signature.
  • the exception response message includes a first random number and a signature.
  • the signature is generated from input parameters including the first random number.
  • the embodiment of the present application further provides a computer program product, where the computer program product includes a program code corresponding to any of the message protection methods provided by the first aspect of the foregoing application.
  • the embodiment of the present application further provides a computer program product, where the computer program product includes a program code corresponding to any one of the message protection methods provided by the second aspect of the foregoing application.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store a computer program product, where the computer program product includes: a program code, where the program code may include the first method for performing the foregoing embodiment of the present application.
  • the program code corresponding to any of the message protection methods provided by the aspect.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store a computer program product, where the computer program product includes: a program code, where the program code may include a second method for performing the foregoing embodiment of the present application.
  • the program code corresponding to any of the message protection methods provided by the aspect.
  • the embodiment of the present application provides a message protection method, a user equipment, and a core network device.
  • User equipment to the core
  • the network device sends an unsecured request message, the request message including the first random number. If the core network device determines that the request message does not meet the preset condition, generating an exception response message, where the abnormal response message includes the first random number and the signature.
  • the message transmitted before the security context is not established between the user equipment and the core network device may be securely protected by the first random number and the signature, so that the user equipment can identify whether the received abnormal response message is a valid message.
  • the user equipment is prevented from denying service for a long time due to a fake base station's forgery attack or replay attack, which improves the security of network communication.
  • FIG. 1 is a message interaction diagram of an existing forgery attack
  • FIG. 3 is a structural diagram of a communication system to which an embodiment of the present application is applied;
  • FIG. 4 is a message interaction diagram of Embodiment 1 of a message protection method according to an embodiment of the present disclosure
  • FIG. 5 is a message interaction diagram of Embodiment 2 of a message protection method according to an embodiment of the present disclosure
  • FIG. 6 is a message interaction diagram of Embodiment 3 of a message protection method according to an embodiment of the present disclosure
  • FIG. 7 is a message interaction diagram of Embodiment 4 of a message protection method according to an embodiment of the present disclosure.
  • FIG. 9 is a message interaction diagram of Embodiment 5 of a message protection method according to an embodiment of the present disclosure.
  • FIG. 10 is a message interaction diagram of Embodiment 6 of a message protection method according to an embodiment of the present disclosure.
  • FIG. 11 is a message interaction diagram of Embodiment 7 of a message protection method according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a user equipment according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of another user equipment according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of a core network device according to an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of another core network device according to an embodiment of the present disclosure.
  • FIG. 3 is a structural diagram of a communication system to which an embodiment of the present application is applied.
  • the methods provided by the following embodiments of the present application are applicable to the communication system shown in FIG.
  • the communication system can be a 4G or 5G communication system and its evolved communication system.
  • the user equipment 101, the access network device 102, and the core network device 103 may be included in the communication system.
  • the access network device 102 serves the user equipment 101 over a wireless interface.
  • the access network device 102 and the core network device 103 communicate via a communication interface.
  • FIG. 3 only two user equipments 101, one access network device 102, and one core network device 103 are illustrated by way of example. However, the number of user equipments 101 included in the communication system shown in FIG. 3, the number of access network devices 102, the number of core network devices 103, the number of access network devices 102 served by each core network device 103, The number of user equipments 101 served by each access network device 102 is deployed according to actual network requirements. This application does not specifically limit this.
  • the user device 101 shown in FIG. 3 may be a device that provides data connectivity to a user, a handheld device with wireless connectivity, or a wireless device that is connected to a wireless modem.
  • the wireless terminal can communicate with one or more core networks via a Radio Access Network (RAN), and the wireless terminal can So a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, for example, can be a portable, pocket, handheld, computer built-in or in-vehicle mobile device with wireless access Network exchange language and / or data.
  • RAN Radio Access Network
  • a wireless terminal may also be called a Subscriber Unit, a Subscriber Station, a Mobile Station, a Mobile, a Remote Station, an Access Point, and a Remote Terminal.
  • Remote Terminal Access Terminal, User Terminal, User Agent, User Device, User Equipment, Smartphone, Automated Driving Device (Automotive Device) or Internet Of Things Device.
  • the access network device 102 shown in Figure 3 can be a form of a radio station. Refers to a radio transceiver station that transmits information between a mobile communication switching center and a mobile telephone terminal in a certain radio coverage area; or may refer to an access network that passes through one or more sectors on the air interface.
  • the access network device can be configured to convert the received air frame with an Internet Protocol (IP) packet as a router between the wireless terminal and the rest of the access network, wherein the rest of the access network It can include an Internet Protocol (IP) network.
  • IP Internet Protocol
  • the access network device can also coordinate attribute management of the air interface.
  • the access network device may be an evolved base station (eNB or eNodeB) in an LTE communication system, or a relay station or an access point, or a base station in a 5G network, and the like, which is not limited herein.
  • the core network device 103 shown in FIG. 3 can support non-access stratum (NAS) signaling and its security, management of tracking area list, and packet data network gateway (P-GW). And the selection of the Serving Gateway (S-GW), the selection of the MME when the Mobility Management Entity (MME) is switched, and the serving GPRS support node during the handover to the 2G/3G access system ( Service GPRS Support Node (SGSN) selection, user authentication, roaming control, and bearer management, mobility management between core network nodes of 3GPP different access networks, and reachability management of UEs in idle state.
  • the core network device may be an evolved Packet Core Network (EPC) functional entity, MME in a 4G network. It may also be a mobility management function entity in a 5G network, such as an access and mobility management function (AMF), a Common Control Network Function (CCNF), or a security anchor function entity ( Secuirty anchor fuction, SEAF).
  • EPC evolved Packet Core Network
  • MME Mobility
  • the message interaction between the user equipment 101 and the core network device 103 can be implemented by the access network device 102.
  • the user equipment 101 Before the user equipment 101 and the core network device 103 transmit messages, the user equipment 101 can camp on and access one access network device 102.
  • the access network device 102 may be a legitimate access network device in the communication network, or may be a pseudo base station set by an attacker.
  • the user equipment 101 sends a message to the core network device 103, which may be: the user equipment 101 sends a message to the access network device 102, and the access network device 102 forwards the message to the core network device 103.
  • the core network device 103 sends a message to the user equipment 101, which may be: the core network device 103 sends a message to the access network device 102, and the access network device 102 forwards the message to the user equipment 101.
  • FIG. 4 is a message interaction diagram of Embodiment 1 of a message protection method according to an embodiment of the present disclosure.
  • the embodiment of the present application describes the interaction between the user equipment and the core network device.
  • the message protection method provided by the embodiment of the present application may include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • a security context is generally required between the terminal side and the core network side for integrity protection and encryption protection for NAS signaling between the user equipment and the core network equipment.
  • the unsecured request message in the embodiment of the present application may be any message that the user equipment and the core network device interact before the security context is established.
  • the unsecured request message may include an attach request message or a tracking area update request message.
  • the unsecured request message may include request information.
  • the specific content of the request information is not limited in the embodiment of the present application.
  • the request information may include all or part of the content of the existing request message generated by the user equipment.
  • the request message 1 sent by the UE is an existing request message.
  • the request message in the embodiment of the present application may include a first random number S1 and request information, and the request information may include all or part of the content in the request message 1.
  • the first random number may be generated by the user equipment according to a pseudo random number generation algorithm.
  • the pseudo random number generation algorithm may be any existing algorithm. For example: the Monte-Carlo method.
  • the first random number may be obtained by the user equipment by querying the random number table. Random numbers in the random number table are not repeated.
  • the random number table can be updated periodically, aperiodically, or event triggered.
  • the random number table may be generated by the user equipment or obtained by the user equipment from other devices.
  • the user equipment temporarily saves the first random number for a period of time to check the third random number carried in the abnormal response message.
  • the embodiment of the present application does not specifically limit the carrying manner of the first random number in the request message and the implementation manner of the first random number.
  • the first random number can be multi-bit binary information.
  • the core network device can receive the unsecured request message from the user equipment.
  • the request message may include a first random number.
  • the core network device determines that the request message does not meet the preset condition, generates an exception response message.
  • the exception response message may include a first random number and a signature.
  • the signature is generated based on an input parameter including the first random number.
  • the exception response message may include: an attach rejection message, a tracking area update rejection message, or an identity request message.
  • the core network device determines whether the request message meets a preset condition. If the request message does not meet the preset condition, an exception response message is generated. Correspondingly, if the request message meets the preset condition, the response message generated by the core network device may be referred to as a normal response message.
  • the embodiment of the present application does not make special for the preset conditions. limited.
  • the preset conditions can be different if the request message is different.
  • the exception response message can be different if the request message is different. For example, when the request message is an attach request message, some abnormal event occurs. If the public land mobile network indicated in the request message is not allowed, the core network device may reply to the corresponding abnormal response message attach reject message.
  • the core network device may reply to the corresponding abnormal response message tracking area rejection message.
  • the core network device may reply to the identity request message to request the user equipment to carry the legal identity.
  • the first random number included in the abnormal response message is a first random number included in the request message sent by the user equipment received by the core network device.
  • the core network device returns the received first random number to the user equipment through the abnormal response message.
  • the signature included in the exception response message, the input parameter of which the signature is generated contains the first random number. If the first random number is different, the signature is different.
  • the embodiment of the present application does not limit other content that is included in the input parameter for generating a signature.
  • the algorithm used by the core network device to generate a signature is not limited in this embodiment. Any existing symmetric or asymmetric cryptographic algorithm can be used, and the user equipment has the parameters and capabilities to verify the signature.
  • the key may be acquired in advance, that is, the input parameter may further include the pre-acquired key.
  • the pre-acquisition key of the core network device is different according to the adopted algorithm.
  • the specific implementation manner and the acquisition mode of the pre-acquired key are not limited in this embodiment.
  • the UE and the core network device need to pre-configure the same symmetric key and signature algorithm.
  • the core network device needs to pre-configure its own private key and signature algorithm. The UE needs to obtain the public key of the corresponding private key and the same signature algorithm before verifying the signature.
  • a process for implementing a signature is as follows.
  • a message is used as the input to the hash function to get the hash value Hm.
  • Hm hash value
  • Hm is a hash value
  • HASH is a hash function
  • message includes an input parameter for generating a signature
  • the signature is calculated based on the pre-acquired key and the hash value Hm. For example, you can calculate the signature using the following formula:
  • K is a pre-acquired key.
  • K can be a symmetric key pre-configured by the core network device and the user equipment.
  • K can be the private key of the core network device.
  • K can be a private key generated by the network side itself.
  • IBE Identity Based Encryption
  • K can be a publicly authenticated token (PTU) and a secure subscription key assigned to the network side by a key management system (KMS). (Secret Signing Key, SSK) combination.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the certificate can be a core network device. Certificate.
  • the credential can be the public key of the core network device.
  • the credentials can be the identity of the core network device.
  • generating the exception response message may include: generating exception information according to the request message.
  • the input parameters that generate the signature may also include exception information.
  • the abnormal information refers to the original information generated by the core network device according to the request message.
  • the specific content of the abnormal information is not limited in the embodiment of the present application.
  • the abnormality information may include all or part of the content of the existing abnormal response message generated by the core network device according to the existing request message.
  • the request message 2 sent by the UE is an existing request message.
  • the abnormal response message 2 generated by the core network device according to the request message 2 is an existing abnormal response message.
  • the request message in the embodiment of the present application may include a first random number S2 and request information, and the request information may include all or part of the content in the request message 2.
  • the abnormal response message in the embodiment of the present application may include a first random number S2, abnormal information, and a signature.
  • the abnormality information may include all or part of the content in the abnormal response message 2.
  • the core network device sends an abnormal response message to the user equipment.
  • the abnormal response message in this step is the same as the abnormal response message in S102.
  • the user equipment receives an abnormal response message.
  • the exception response message may include a third random number and a signature.
  • the abnormal response message in this step may be the same as or different from the abnormal response message in S103.
  • the first random number returned by the core network device to the user equipment in S103 may be the same as or may be different from the third random number received by the user equipment in this step.
  • the signature sent by the core network device to the user equipment in S103 may be the same as or different from the signature received by the user equipment in this step.
  • the abnormal response message in this step is the same as the abnormal response message in S103.
  • the first random number returned by the core network device to the user equipment is the same as the third random number received by the user equipment.
  • the signature sent by the core network device to the user equipment is the same as the signature received by the user equipment.
  • the access network device accessed by the user equipment is a pseudo base station, in the scenario of performing a forgery attack or a replay attack, the abnormal response message in this step may be different from the abnormal response message in S103.
  • the first random number returned by the core network device to the user equipment may be different from the third random number received by the user equipment.
  • the signature sent by the core network device to the user device may also be different from the signature received by the user device.
  • the abnormal response message received by the user equipment may further include a credential.
  • the credentials can be used for user device verification signatures.
  • the credentials sent by the core network device to the user equipment may be the same as or different from the credentials received by the user equipment in this step.
  • the user equipment has the ability to verify the validity of the credentials.
  • the certificate may be a certificate of the core network device, and the user equipment verifies the validity of the certificate by signing the signature of the issuing authority of the certificate.
  • the credential may be a public key of the core network device, and the user equipment verifies the validity of the public key by trusting the broadcast of the access network device.
  • the credential may be the identity of the core network device, and the user equipment checks the validity of the identity because the PVT is pre-configured.
  • the user equipment determines, according to the third random number, the signature, and the obtained credentials, whether the abnormal response message is a valid message.
  • the user equipment generates a first random number, and sends the request message to the core network device.
  • the user equipment receives an exception response message including a third random number. It can be understood that if the abnormal response message sent by the core network device to the user equipment is not subjected to a forgery attack or a replay attack, the first random number sent by the user equipment is the same as the third random number received by the user equipment. Therefore, the user equipment can determine, according to the received third random number, whether the received abnormal response message corresponds to the request message.
  • the signature generated by the core network device is generated based on the first random number. If the first random number is different, the signature is different. Therefore, the user equipment can determine whether the received abnormal response message is a valid message according to the received third random number, the signature, and the obtained credential.
  • the forged attack scenario shown in FIG. 1 is applied.
  • the message protection method provided by the embodiment of the present application whether the pseudo base station falsifies the first random number or not, the signature of the pseudo base station forged cannot pass the verification due to the existence of the signature.
  • the user equipment can identify the forged exception response message in the scenario.
  • the replay attack scenario shown in FIG. 2 is shown.
  • the message protection method provided by the embodiment of the present application since the first random number included in the request message sent by the UE twice is different, the signature generated by the core network device must be different. In this way, the pseudo base station cannot use the cached exception response message for the replay attack.
  • the user equipment can recognize the abnormal response message played back in the scene.
  • the message transmitted before the security context is not established between the user equipment and the core network device can be securely protected, so that the user equipment can identify whether the received abnormal response message is a valid message. .
  • the long-term denial of service caused by the attack of the pseudo base station is avoided, which improves the security of the network communication.
  • the user equipment may determine whether the abnormal response message is a valid message according to the first random number, the signature, and the obtained credentials.
  • the two can be replaced with each other. If the first random number is different from the third random number, it indicates that the abnormal response message sent by the core network device to the user equipment may be forged or replayed. Then, according to the first random number, it can also be determined that the abnormal response message at this time is an invalid message.
  • the implementation manner of the user equipment to obtain the credential is not particularly limited in the embodiment of the present application. It can be obtained according to a pre-configured encryption algorithm.
  • the user equipment can pre-configure credentials.
  • the user equipment and the core network device can pre-configure the same symmetric key.
  • the user equipment may obtain the message before receiving the exception response message.
  • the user equipment may obtain the credential by using the abnormal response message.
  • the method provided by the embodiment of the present application may further include:
  • the user equipment determines that the received abnormal response message is a valid message, performing a first operation according to the abnormal response message.
  • the first operation is an operation performed by the user equipment for a valid exception response message.
  • the abnormal response message is not processed, and the second operation is performed.
  • the second operation is for the user equipment to respond to an invalid exception response message. The operation of the line.
  • the first operation and the second operation are not specifically limited in the embodiment of the present application.
  • the first operation may be any processing procedure performed after the user equipment receives the existing abnormal response message.
  • the second operation may include:
  • the access network device accessed by the user equipment is changed, and the request message is resent to the core network device by using the changed access network device.
  • the second operation may include:
  • the user can move and restart the user device.
  • the embodiment of the present application provides a message protection method.
  • the user equipment sends an unsecured request message to the core network device, where the request message includes the first random number. If the core network device determines that the request message does not meet the preset condition, generating an exception response message, where the abnormal response message includes the first random number and the signature.
  • the core network device sends an exception response message to the user equipment.
  • the user equipment receives an exception response message including a third random number and a signature. The user equipment determines, according to the third random number, the signature, and the obtained credentials, whether the received abnormal response message is a valid message.
  • the message protection method provided by the embodiment of the present invention can protect the message transmitted before the security context is not established between the user equipment and the core network device by using the first random number and the signature, so that the user equipment can recognize the abnormality received. Whether the response message is a valid message.
  • the user equipment is prevented from denying service for a long time due to a fake base station's forgery attack or replay attack, which improves the security of network communication.
  • FIG. 5 is a message interaction diagram of Embodiment 2 of a message protection method according to an embodiment of the present disclosure.
  • An embodiment of the present application provides an implementation manner of S102 and S105 on the basis of the foregoing embodiment 1.
  • S102 may be specifically S202, and S105 may include S205-S207.
  • the message protection method provided by the embodiment of the present application may include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • This step can be referred to the description of S101. The principle is similar and will not be described here.
  • the exception response message may include a first random number and a signature.
  • the signature is generated for the exception response message according to the pre-acquired key and the first random number.
  • the input parameters for generating the signature include the pre-acquired key and the first random number.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the voucher can refer to the description of S102.
  • the core network device sends an abnormal response message to the user equipment.
  • the exception response message may include a first random number and a signature.
  • the user equipment receives an abnormal response message.
  • the exception response message may include a third random number and a signature.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the next step is performed. If the first random number is the same as the third random number, the next step is performed. If the first random number is different from the third random number, it is determined that the received exception response message is an invalid message.
  • the user equipment performs signature verification on the received abnormal response message according to any one of the first random number and the third random number, the signature, and the obtained credentials.
  • the input parameter of the verification signature includes any one of the first random number and the third random number.
  • signature verification passes, proceed to the next step. If the signature verification fails, it is determined that the received exception response message is an invalid message.
  • the algorithm used by the user equipment to verify the signature in the embodiment of the present application is not particularly limited. Any existing symmetric or asymmetric cryptographic algorithm can be used.
  • a process for verifying the signature is as follows.
  • the hash value Hm is obtained; according to the signature and the obtained certificate and the formula 3, the hash value Hm' is obtained; comparing Hm and Hm', if the two are different, the signature school If the test is not passed, if the two are the same, the signature verification will pass.
  • the signature is carried in the abnormal response message, and the manner of obtaining the credential may refer to the description in S105.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the input parameter of the signature generated by the core network device includes a first random number and a pre-acquired key, where the first random number is generated by the user equipment and sent to the core network device.
  • the first random number and the pre-acquired key are different as long as there is one difference.
  • the pseudo base station cannot obtain a valid signature key regardless of whether the pseudo base station falsifies the first random number. Due to the existence of the signature, the user equipment can identify the forged exception response message in the scenario.
  • the replay attack scenario shown in FIG. 2 is shown. Since the first random number included in the request message sent by the UE twice is different, the signature generated by the core network device twice in succession must be different. The user equipment can be made to recognize the abnormal response message played back in the scene.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the received abnormal response message according to any one of the first random number and the third random number, the signature, and the obtained credentials.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the embodiment of the present application provides a message protection method.
  • the input parameters for generating signatures by the core network device include a first random number and a pre-acquired key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the third random number, the received signature, and the obtained credential, and can determine whether the received abnormal response message is a valid message.
  • the message protection method provided by the embodiment of the present application by using the first random The number, the third random number, and the signature can prevent the user equipment from denying service for a long time due to a fake base station's forgery attack or replay attack, thereby improving the security of the network communication.
  • FIG. 6 is a message interaction diagram of Embodiment 3 of a message protection method according to an embodiment of the present disclosure.
  • the embodiment of the present application provides another implementation manner of S102 and S105 on the basis of the foregoing embodiment 1.
  • S102 may include S302-S303, and S105 may include S306-S308.
  • the message protection method provided by the embodiment of the present application may include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • This step can be referred to the description of S101. The principle is similar and will not be described here.
  • the second random number is similar to the first random number principle, and is not described here.
  • the core network device generates an abnormal response message.
  • the abnormal response message may include a first random number, a second random number, and a signature.
  • the signature is generated for the exception response message according to the pre-acquired key, the first random number, and the second random number.
  • the input parameter for generating the signature further includes a second random number based on S202.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the voucher can refer to the description of S102.
  • the core network device sends an abnormal response message to the user equipment.
  • the abnormal response message may include a first random number, a second random number, and a signature.
  • the user equipment receives an abnormal response message.
  • the abnormal response message may include a third random number, a second random number, and a signature.
  • the second random number is generated by a core network device.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the next step is performed. If the first random number is the same as the third random number, the next step is performed. If the first random number is different from the third random number, it is determined that the received exception response message is an invalid message.
  • the user equipment performs signature verification on the received abnormal response message according to any one of the first random number and the third random number, the second random number, the signature, and the obtained credentials.
  • signature verification passes, proceed to the next step. If the signature verification fails, it is determined that the received exception response message is an invalid message.
  • the input parameter of the verification signature further includes a second random number based on S206.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the input parameters of the core network device generating the signature include a first random number, a second random number, and a pre-acquired key.
  • the first random number is generated by the user equipment and sent to the core network device.
  • the second random number is generated by the core network device.
  • the first random number, the second random number, and the pre-acquired key are different as long as there is one difference.
  • the message protection method provided by the embodiment of the present application increases the input parameter for generating a signature because the core network device also generates the second random number compared to the example shown in FIG. 5.
  • a second random number is added, which makes the verification condition more secure, and further improves the security of network communication.
  • the forged attack scenario shown in FIG. 1 is applied.
  • the pseudo base station cannot obtain a valid signature key regardless of whether the pseudo base station falsifies the first random number. Due to the existence of the signature, the user equipment can identify the forged exception response message in the scenario.
  • the replay attack scenario shown in FIG. 2 is shown. Since the first random number included in the request message sent by the UE twice is different, the second random number generated by the core network device twice must be different. Therefore, the signatures generated by the core network device twice in succession must be different. The user equipment can be made to recognize the abnormal response message played back in the scene.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the received exception response message according to any one of the first random number and the third random number, the second random number, and the obtained credentials.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the embodiment of the present application provides a message protection method.
  • the input parameters for generating signatures by the core network device include a first random number sent by the user equipment, a second random number generated by the core network device, and a pre-acquired key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second random number, the third random number, the received signature, and the obtained credential, and can determine whether the received abnormal response message is Valid message.
  • the first random number, the second random number, the third random number, and the signature can be used to prevent the user equipment from denying service for a long time due to a fake attack or a replay attack of the pseudo base station. The security of network communication.
  • FIG. 7 is a message interaction diagram of Embodiment 4 of a message protection method according to an embodiment of the present disclosure.
  • the embodiment of the present application provides another implementation manner of S102 and S105 on the basis of the foregoing embodiment 1.
  • S102 may include S402-S403, and S105 may include S408-S410.
  • the message protection method provided by the embodiment of the present application may include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • This step can be referred to the description of S101. The principle is similar and will not be described here.
  • the core network device determines that the request message does not meet the preset condition, determining the first hash value according to the received request message.
  • determining the first hash value according to the request message may adopt any existing hash algorithm.
  • User equipment and core network equipment use the same hash algorithm.
  • the request message includes message information (message1) and a first random value (S1).
  • Hm is a certain hash value
  • HASH is a hash algorithm, such as SHA1, SHA128, MD5, etc., and the hash algorithm is the same as the algorithm used by the user equipment.
  • the first hash value is different if the request message is different.
  • the core network device generates an abnormal response message.
  • the exception response message may include a first random number and a signature.
  • the signature is generated according to the pre-acquired key, the first random number, and the first hash value.
  • the input parameter for generating the signature further includes a first hash value based on S202.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the voucher can refer to the description of S102.
  • the core network device sends an abnormal response message to the user equipment.
  • the exception response message may include a first random number and a signature.
  • the user equipment receives an abnormal response message.
  • the exception response message may include a third random number and a signature.
  • the user equipment determines a second hash value according to the request message.
  • the second hash value is similar to the first hash value, and is not described here.
  • the first hash value is determined by the core network device according to the request message
  • the second hash value is determined by the user equipment according to the request message. If the request message sent by the user equipment and the request message received by the core network device are not changed during the transmission, the first hash value is the same as the second hash value.
  • execution order of S406 may also be before S405.
  • the user will save the second hash value for a while, waiting for the first hash value to be verified.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the next step is performed. If the first random number is the same as the third random number, the next step is performed. If the first random number is different from the third random number, it is determined that the received exception response message is an invalid message.
  • the user equipment performs signature verification on the received abnormal response message according to any one of the first random number and the third random number, the second hash value, the signature, and the obtained credentials.
  • the user equipment may perform signature verification on the abnormal response message according to the second hash value generated by the user equipment.
  • signature verification passes, proceed to the next step. If the signature verification fails, it is determined that the received exception response message is an invalid message.
  • the input parameter of the verification signature further includes a second hash value based on S206.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the input parameters of the core network device generating the signature include a first random number, a first hash value, and a pre-acquired key.
  • the first random number is generated by the user equipment and sent to the core network device.
  • the first hash value is generated by the core network device.
  • the first random number, the first hash value, and the pre-acquired key are different as long as there is one difference.
  • the core network device does not send the first hash value to the user equipment. use
  • the user equipment performs signature verification on the abnormal response message according to the first random number and the second hash value. Through the first random number, the first hash value, the second hash value, and the signature, the message transmitted before the security context is not established between the user equipment and the core network device may be secured.
  • the core network device In the message protection method provided by the embodiment of the present application, the core network device generates an input parameter of the signature compared to the example shown in FIG. 5, and adds a first hash value obtained by the core network device according to the request message. Correspondingly, when the user equipment performs signature verification, a second hash value is added, which makes the verification condition more secure, and further improves the security of network communication.
  • Figure 8 is a message interaction diagram of an existing tampering attack.
  • the UE transmits an unsecured request message 4.
  • the request message 4 ⁇ is changed to the request message 5.
  • the request message 5 is sent to the core network device.
  • the request message 5 is rejected by the core network.
  • the core network device will reply to the abnormal response message 5.
  • the pseudo base station forwards the abnormal response message 5 to the UE.
  • the core network device generates a signature input parameter, and includes a first hash value determined by the core network device according to the request message. If the request message is tampered with, the second hash value generated by the user equipment will be different from the first hash value determined by the core network device. In this way, after the user equipment receives the abnormal response message, the signature verification of the abnormal response message according to the second hash value will not pass. Therefore, through the first hash value and the second hash value, the user equipment can determine whether the received abnormal response message is valid to avoid tampering attacks.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the received exception response message according to any one of the first random number and the third random number, the second hash value, and the obtained credentials.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the embodiment of the present application provides a message protection method.
  • the input parameters of the signature generated by the core network device include a first random number sent by the user equipment, a first hash value determined by the core network device according to the request message, and a pre-acquired key.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second hash value determined according to the request message, the received third random number, the received signature, and the obtained credentials. Determine if the received exception response message is a valid message.
  • the message protection method provided by the embodiment of the present application can prevent the user equipment from being forged, replayed, or falsified by the pseudo base station by using the first random number, the third random number, the first hash value, the second hash value, and the signature. The long-term denial of service caused the security of network communication.
  • FIG. 9 is a message interaction diagram of Embodiment 5 of a message protection method according to an embodiment of the present disclosure.
  • the embodiment of the present application provides another implementation manner of S102 and S105 on the basis of the foregoing embodiment 1.
  • S102 may include S502 to S503, and S105 may include S507 to S510.
  • Information protection methods which can include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • This step can be referred to the description of S101. The principle is similar and will not be described here.
  • the core network device determines that the request message does not meet the preset condition, determining the first hash value according to the received request message.
  • the core network device generates an abnormal response message.
  • the exception response message may include a first random number, a first hash value, and a signature.
  • the signature is generated according to the pre-acquired key, the first random number, and the first hash value.
  • the input parameter for generating the signature further includes a first hash value based on S202.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the voucher can refer to the description of S102.
  • the core network device sends an abnormal response message to the user equipment.
  • the exception response message may include a first random number, a first hash value, and a signature.
  • the user equipment receives an abnormal response message.
  • the exception response message may include a third random number, a first hash value, and a signature.
  • the first hash value is determined by the core network device according to the request message.
  • the user equipment determines a second hash value according to the request message.
  • execution order of S506 may also be before S505.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the next step is performed. If the first random number is the same as the third random number, the next step is performed. If the first random number is different from the third random number, it is determined that the received exception response message is an invalid message.
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the first hash value, the signature, and the obtained credentials.
  • signature verification passes, proceed to the next step. If the signature verification fails, it is determined that the received exception response message is an invalid message.
  • the input parameter of the verification signature further includes a first hash value based on S206.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the next step is performed. If the first hash value is the same as the second hash value, the next step is performed. If the first hash value is different from the second hash value, it is determined that the received exception response message is an invalid message.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the message protection method provided by the embodiment of the present application further includes a first hash value in the exception response message sent by the core network device to the user equipment, compared to the example shown in FIG. 7 .
  • the user equipment can further determine whether the received abnormal response message is a valid message by comparing whether the first hash value and the second hash value are the same. It can prevent attacks and further improve the security of network communication.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment acquires according to any one of the first random number and the third random number, the first hash value, and the second hash value. Credentials, signature verification of exception response messages.
  • the user equipment determines that the received exception response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the first hash value, and the obtained credentials.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment determines that the received exception response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the first hash value, and the obtained credentials.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number and the signature, whether the abnormal response message is a valid message, and may include:
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment obtains the obtained certificate according to any one of the first random number and the third random number, the first hash value, and the second hash value. , signature verification of the abnormal response message.
  • the user equipment determines that the received exception response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment acquires according to any one of the first random number and the third random number, the first hash value, and the second hash value. Credentials, signature verification of exception response messages.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the embodiment of the present application provides a message protection method.
  • the input parameters of the signature generated by the core network device include a first random number sent by the user equipment, a first hash value determined by the core network device according to the request message, and a pre-acquired key.
  • the core network device sends the first hash value to the user equipment.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the third random number, the first hash value, the received signature, and the obtained credentials, and can determine whether the received abnormal response message is For valid messages.
  • the message protection method provided by the embodiment of the present application can prevent the user equipment from being forged, replayed, or falsified by the pseudo base station by using the first random number, the third random number, the first hash value, the second hash value, and the signature.
  • the long-term denial of service caused the security of network communication.
  • FIG. 10 is a message interaction diagram of Embodiment 6 of a message protection method according to an embodiment of the present disclosure.
  • the embodiment of the present application provides another implementation manner of S102 and S105 on the basis of the foregoing embodiment 1.
  • S102 may include S602 to S603, and S105 may include S607 to S609.
  • the message protection method provided by the embodiment of the present application may include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • This step can be referred to the description of S101. The principle is similar and will not be described here.
  • the core network device determines that the request message does not meet the preset condition, generates a second random number, and determines a first hash value according to the received request message.
  • the embodiment of the present application does not limit the execution order of generating the second random number and determining the first hash value according to the received request message.
  • the second random number is similar to the first random number principle, and is not described here.
  • the first hash value is determined according to the received request message, and the description is similar to the description in S402, and details are not described herein again.
  • the core network device generates an abnormal response message.
  • the abnormal response message may include a first random number, a second random number, and a signature.
  • the signature is generated for the exception response message according to the pre-acquired key, the first random number, the second random number, and the first hash value.
  • the input parameter for generating the signature further includes a second random number and a first hash value based on S202.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the voucher can refer to the description of S102.
  • the core network device sends an abnormal response message to the user equipment.
  • the abnormal response message may include a first random number, a second random number, and a signature.
  • the user equipment receives an abnormal response message.
  • the abnormal response message may include a third random number, a second random number, and a signature.
  • the second random number is generated by the core network device.
  • the user equipment determines a second hash value according to the request message.
  • execution order of S606 may also be before S605.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the next step is performed. If the first random number is the same as the third random number, the next step is performed. If the first random number is different from the third random number, it is determined that the received exception response message is an invalid message.
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the second random number, the second hash value, the signature, and the obtained credentials.
  • signature verification passes, proceed to the next step. If the signature verification fails, it is determined that the received exception response message is an invalid message.
  • the input parameter of the verification signature further includes a second random number and a second hash value on the basis of S206.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the input parameter of the core network device to generate the signature further includes the second random number generated by the core network device, which enhances the condition for generating the signature.
  • the user equipment determines, according to the first random number, the second random number, the third random number, the second hash value, and the signature, whether the received abnormal response message is a valid message.
  • the condition that enables the user equipment to verify whether the signature passes is more secure, further improving the security of the network communication.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the second random number, the second hash value, and the obtained credentials.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the embodiment of the present application provides a message protection method.
  • the input parameters of the signature generated by the core network device include a first random number sent by the user equipment, a second random number generated by the core network device, a first hash value determined by the core network device according to the request message, and a pre-acquired key.
  • the user equipment then receives the abnormality according to the first random number, the second random number, the third random number, the second hash value, the received signature, and the obtained credentials.
  • the signature message is verified by the response message, and it can be determined whether the received exception response message is a valid message.
  • the message protection method provided by the embodiment of the present application can prevent the user equipment from being forged by the pseudo base station by using the first random number, the second random number, the third random number, the first hash value, the second hash value, and the signature.
  • the long-term denial of service caused by replaying or tampering attacks improves the security of network communication.
  • FIG. 11 is a message interaction diagram of Embodiment 7 of a message protection method according to an embodiment of the present disclosure.
  • the embodiment of the present application provides another implementation manner of S102 and S105 on the basis of the foregoing embodiment 1.
  • S102 may include S702 to S703, and S105 may include S707 to S710.
  • the message protection method provided by the embodiment of the present application may include:
  • the user equipment sends an unsecured request message to the core network device.
  • the request message may include a first random number.
  • This step can be referred to the description of S101. The principle is similar and will not be described here.
  • the core network device determines that the request message does not meet the preset condition, generates a second random number, and determines a first hash value according to the received request message.
  • the embodiment of the present application does not limit the execution order of generating the second random number and determining the first hash value according to the received request message.
  • the second random number is similar to the first random number principle, and is not described here.
  • the first hash value is determined according to the received request message, and the description is similar to the description in S402, and details are not described herein again.
  • the core network device generates an abnormal response message.
  • the abnormal response message may include a first random number, a second random number, a first hash value, and a signature.
  • the signature is generated for the exception response message according to the pre-acquired key, the first random number, the second random number, and the first hash value.
  • the input parameter for generating the signature further includes a second random number and a first hash value based on S202.
  • the exception response message may further include a credential for the user equipment to verify the signature.
  • the voucher can refer to the description of S102.
  • the core network device sends an abnormal response message to the user equipment.
  • the abnormal response message may include a first random number, a second random number, a first hash value, and a signature.
  • the user equipment receives an abnormal response message.
  • the abnormal response message may include a third random number, a second random number, a first hash value, and a signature.
  • the first hash value is determined by the core network device according to the request message.
  • the second random number is generated for the core network device.
  • the user equipment determines a second hash value according to the request message.
  • execution order of S706 may also be before S705.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the next step is performed. If the first random number is the same as the third random number, the next step is performed. If the first random number is different from the third random number, it is determined that the received exception response message is an invalid message.
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the second random number, the first hash value, the signature, and the obtained credentials.
  • signature verification passes, proceed to the next step. If the signature verification fails, it is determined that the received exception response message is an invalid message.
  • the input parameter of the verification signature further includes a second random number and a first hash value on the basis of S206.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the next step is performed. If the first hash value is the same as the second hash value, the next step is performed. If the first hash value is different from the second hash value, it is determined that the received exception response message is an invalid message.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the exception response message sent by the core network device to the user equipment includes a first hash value.
  • the first hash value is included in the exception response message received by the user equipment. It can be understood that the first hash value sent by the core network device may be the same as or different from the first hash value received by the user equipment. Therefore, the user equipment can further determine whether the received abnormal response message is a valid message by comparing whether the first hash value and the second hash value are the same. It can prevent attacks and further improve the security of network communication.
  • the input parameter of the core network device generating the signature further includes the second random number generated by the core network device, which enhances the condition for generating the signature.
  • the user equipment determines, according to the first random number, the second random number, the third random number, the second hash value, and the signature, whether the received abnormal response message is a valid message.
  • the condition that enables the user equipment to verify whether the signature passes is more secure, further improving the security of the network communication.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment is configured according to any one of the first random number and the third random number, the second random number, the first hash value, and the second hash value. Any one of the obtained credentials and the signature verification of the abnormal response message.
  • the user equipment determines that the received exception response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the second random number, the first hash value, and the obtained credentials.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment determines that the received exception response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment performs signature verification on the abnormal response message according to any one of the first random number and the third random number, the second random number, the first hash value, and the obtained credentials.
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment is configured according to any one of the first random number and the third random number, the second random number, the first hash value, and the second hash value. And the obtained voucher, signature verification of the abnormal response message.
  • the user equipment determines that the received exception response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the user equipment determines, according to the third random number, the signature, and the obtained credential, whether the abnormal response message is a valid message, and may include:
  • the user equipment determines whether the first hash value is the same as the second hash value.
  • the user equipment is configured according to any one of the first random number and the third random number, the second random number, the first hash value, and the second hash value. Any one of the obtained credentials and the signature verification of the abnormal response message.
  • the user equipment determines whether the first random number is the same as the third random number.
  • the user equipment determines that the received abnormal response message is a valid message.
  • the user equipment determines that the received abnormal response message is an invalid message.
  • the embodiment of the present application provides a message protection method.
  • the input parameters of the signature generated by the core network device include a first random number sent by the user equipment, a second random number generated by the core network device, a first hash value determined by the core network device according to the request message, and a pre-acquired key.
  • the core network device sends the first hash value to the user equipment.
  • the user equipment performs signature verification on the received abnormal response message according to the first random number, the second random number, the third random number, the first hash value, the second hash value, the received signature, and the obtained credentials. You can determine if the received exception response message is a valid message.
  • the message protection method provided by the embodiment of the present application, By using the first random number, the second random number, the third random number, the first hash value, the second hash value, and the signature, it is possible to avoid long-term rejection of the user equipment due to forgery, playback, or tampering attacks of the pseudo base station. Service improves the security of network communication.
  • the embodiment of the present application further provides a user equipment.
  • the user equipment may perform the operations performed by the user equipment in the message protection method provided by the foregoing method embodiments in any of the foregoing FIG. 4 to FIG. 7 and FIG.
  • FIG. 12 is a schematic structural diagram of a user equipment according to an embodiment of the present disclosure.
  • the user equipment 100 provided by the embodiment of the present application may include:
  • the transceiver module 11 is configured to send an unsecured request message to the core network device, where the request message includes the first random number. Receiving an exception response message, the exception response message includes a third random number and a signature.
  • the processing module 12 is configured to determine, according to the third random number, the signature, and the obtained credentials, whether the abnormal response message is a valid message.
  • processing module 12 is specifically configured to:
  • the signature verification includes: passing the signature verification of the abnormal response message according to the third random number, the signature, and the credential.
  • the exception response message further includes a second random number
  • the processing module 12 is specifically configured to:
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the signature, and the credential.
  • the processing module 12 is further configured to: determine a second hash value according to the request message.
  • the processing module 12 is specifically configured to:
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second hash value, the signature, and the credential.
  • the processing module 12 is further configured to: determine a second hash value according to the request message.
  • the exception response message further includes a first hash value, the first hash value being determined by the core network device according to the request message.
  • the processing module 12 is specifically configured to:
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the first hash value, the signature, and the credential.
  • the processing module 12 is further configured to: determine a second hash value according to the request message.
  • the exception response message also includes a second random number.
  • the processing module 12 is specifically configured to:
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the second hash value, the signature, and the credential.
  • the processing module 12 is further configured to: determine a second hash value according to the request message.
  • the exception response message further includes a second random number and a first hash value, the first hash value being determined by the core network device according to the request message.
  • the processing module 12 is specifically configured to:
  • the signature verification includes: verifying that the abnormal response message signature is passed according to the third random number, the second random number, the first hash value, the signature, and the credential.
  • the request message includes: an attach request message or a tracking area update request message.
  • the abnormal response message includes: an attach reject message, a tracking area update reject message, or an identity request message.
  • the exception response message further includes a credential, and the credential is used to verify the signature.
  • the processing module 12 is further configured to: if the abnormal response message is determined to be an invalid message, change the accessed access network device.
  • the transceiver module 11 is further configured to: resend the request message to the core network device by using the changed access network device.
  • FIG. 13 is a schematic structural diagram of another user equipment according to an embodiment of the present disclosure.
  • the user equipment 200 can include a processor 22, a transceiver 21, and a memory 23.
  • the processor 22 can be coupled to the transceiver 21.
  • the processor 22 can also be coupled to the memory 23.
  • the processing module 12 as shown above can be implemented by the processor 22 invoking program instructions stored in the memory 23.
  • the transceiver module 11 as shown above can be implemented by the processor 22 controlling the transceiver 21.
  • the embodiment of the present application further provides a computer program product.
  • the computer program product can include: program code.
  • the program code may be a program code corresponding to the message protection method executed by the user equipment in the method embodiment of any of the above-mentioned FIG. 4 to FIG. 7 and FIG. 9 to FIG.
  • the program code in the computer program product can be executed, for example, by the processor 22 in the user device 200 shown in Fig. 13 described above.
  • Storage media can be used to store computer program products.
  • the computer program product can include: program code.
  • the program code may be a program code corresponding to the message protection method executed by the user equipment in the method embodiment of any of the above-mentioned FIG. 4 to FIG. 7 and FIG. 9 to FIG.
  • the storage medium may be an internal memory in the user equipment 200 shown in FIG. 13 described above, or may be an external memory connected to the user equipment 200 shown in FIG. 13 described above.
  • the program code in the computer program product can be executed, for example, by the processor 22 in the user device 200 shown in Fig. 13 described above.
  • the user equipment, the computer program product, and the storage medium provided by the embodiments of the present application may perform the operations performed by the user equipment in the message protection method provided in any of the foregoing method embodiments of FIG. 4 to FIG. 7 and FIG. 9 to FIG. And the beneficial effects can be seen in the above, and will not be described again here.
  • the embodiment of the present application further provides a core network device.
  • the core network device may perform the operations performed by the core network device in the message protection method provided in any of the foregoing method embodiments in FIG. 4 to FIG. 7 and FIG. 9 to FIG.
  • FIG. 14 is a schematic structural diagram of a core network device according to an embodiment of the present application.
  • the core network device 300 provided by the embodiment of the present application may include:
  • the transceiver module 31 is configured to receive an unsecured request message sent by the user equipment, where the request message includes a first random number.
  • the exception response message generated by the processing module 32 is sent to the user equipment.
  • the processing module 32 is configured to generate an exception response message when the request message does not meet the preset condition.
  • the exception response message includes a first random number and a signature.
  • the signature is generated by the processing module 32 based on the input parameters including the first random number.
  • the processing module 32 is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key and the first random number.
  • the processing module 32 is further configured to: generate a second random number.
  • the exception response message also includes a second random number.
  • the processing module 32 is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, and the second random number.
  • processing module 32 is further configured to: determine, according to the request message, the first hash value.
  • the processing module 32 is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, and the first hash value.
  • processing module 32 is further configured to:
  • the first hash value is determined according to the request message.
  • the exception response message also includes a second random number.
  • the processing module 32 is specifically configured to: generate a signature on the abnormal response message according to the pre-acquired key, the first random number, the second random number, and the first hash value.
  • the exception response message further includes a first hash value.
  • the request message includes: an attach request message or a tracking area update request message.
  • the abnormal response message includes: an attach reject message, a tracking area update reject message, or an identity request message.
  • the exception response message further includes a credential for the user equipment to verify the signature.
  • FIG. 15 is a schematic structural diagram of another core network device according to an embodiment of the present disclosure.
  • the core network device 400 can include a processor 42, a transceiver 41, and a memory 43.
  • the processor 42 can be coupled to the transceiver 41.
  • the processor 42 can also be coupled to the memory 43.
  • the processing module 32 as shown above can be implemented by the processor 42 invoking program instructions stored in the memory 43.
  • the transceiver module 31 as shown above can be implemented by the processor 42 controlling the transceiver 41.
  • the embodiment of the present application further provides a computer program product.
  • the computer program product can include: program code.
  • the program code may be a program code corresponding to the message protection method executed by the core network device in the foregoing method embodiment of any of the above-mentioned FIG. 4 to FIG. 7 and FIG. 9 to FIG.
  • the program code in the computer program product can be executed, for example, by the processor 42 in the core network device 400 shown in Fig. 15 described above.
  • Storage media can be used to store computer program products.
  • the computer program product can include: program code.
  • the program code may be a program code corresponding to the message protection method executed by the core network device in the foregoing method embodiment of any of the above-mentioned FIG. 4 to FIG. 7 and FIG. 9 to FIG.
  • the storage medium may be an internal memory in the core network device 400 shown in FIG. 15 described above, or may be an external memory connected to the core network device 400 shown in FIG. 15 described above.
  • the program code in the computer program product can be executed, for example, by the processor 42 in the core network device 400 shown in Fig. 15 described above.
  • the core network device, the computer program product, and the storage medium provided by the embodiment of the present application may perform the operations performed by the core network device in the message protection method provided by the foregoing method embodiments in any of the foregoing FIG. 4 to FIG. 7 and FIG. 9 to FIG.
  • the specific implementation and beneficial effects refer to the above, and details are not described herein again.

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)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例提供一种消息保护方法、用户设备和核心网设备。其中,方法包括:向核心网设备发送未受安全保护的请求消息,请求消息包括第一随机数;接收异常响应消息,异常响应消息包括第三随机数和签名;根据所述第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护,提升了网络通信的安全性。

Description

消息保护方法、用户设备和核心网设备 技术领域
本申请涉及通信技术领域,尤其涉及一种消息保护方法、用户设备和核心网设备。
背景技术
在长期演进(Long Term Evolution,LTE)通信系统中的一些初始接入场景,用户设备(User Equipment,UE)和网络侧设备之间还未建立安全上下文之前传输的消息,不会受到安全保护。这些消息可能遭受伪造或者重放攻击。
图1为现有的伪造攻击的消息交互图。如图1所示,网元可以包括:UE、伪基站、接入网设备和核心网设备。其中,伪基站为攻击者设置的用于吸引UE驻留的非法基站。接入网设备和核心网设备为UE正常接入网络时的网络侧设备。当UE发送未受安全保护的请求消息1时,伪基站直接拦截请求消息1,并伪造异常响应消息1。伪基站将伪造的异常响应消息1发送给UE,导致UE长时间拒绝服务。而接入网设备和核心网设备可能接收不到UE发送的请求消息1。
图2为现有的重放攻击的消息交互图。如图2所示,UE发送未受安全保护的请求消息2。伪基站拦截请求消息2后,将请求消息2转发至核心网设备。请求消息2可能被核心网拒绝,此时,核心网设备将回复异常响应消息2。伪基站缓存异常响应消息2后,将异常响应消息2转发给UE。此时,UE是因为正常原因无法入网。之后,UE再次发起请求,发送请求消息3。伪基站拦截请求消息3后,将之前缓存的异常响应消息2发送给UE。导致UE再次长时间拒绝服务。此次的拒绝服务则是由于重放攻击造成的异常拒绝服务。而接入网设备和核心网设备可能接收不到UE发送的请求消息3。
目前,对于UE和网络侧设备之间传输的不受安全保护的消息可能遭受伪造或者重放攻击,还没有方法可以对这些消息进行识别和保护,造成了UE异常的长时间拒绝服务,降低了网络通信的安全性。
发明内容
本申请实施例提供一种消息保护方法、用户设备和核心网设备,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护,提升了网络通信的安全性。
第一方面,本发明实施例提供一种消息保护方法。其中,该方法可以包括:向核心网设备发送未受安全保护的请求消息。接收异常响应消息。根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。
通过第一方面提供的消息保护方法,通过第一随机数和签名,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护,用户设备可以 识别出接收到的异常响应消息是否为有效消息。避免了用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,包括:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、签名和凭证,对异常响应消息签名验证通过。
通过该可能的实施方式提供的消息保护方法,核心网设备生成签名的输入参数包括第一随机数和密钥。用户设备则根据第一随机数、第三随机数、接收到的签名和获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。通过第一随机数、第三随机数和签名,可以避免用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,异常响应消息还可以包括第二随机数,则根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,包括:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、签名和凭证,对异常响应消息签名验证通过。
通过该可能的实施方式提供的消息保护方法,核心网设备生成签名的输入参数包括第一随机数、第二随机数和密钥。用户设备则根据第一随机数、第二随机数、第三随机数、接收到的签名和获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。通过第一随机数、第二随机数、第三随机数和签名,可以避免用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,该方法还包括:根据请求消息确定第二哈希值。则根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,包括:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
通过该可能的实施方式提供的消息保护方法,核心网设备生成签名的输入参数包括第一随机数、第一哈希值和密钥。用户设备则根据第一随机数、第二哈希值、第三随机数、接收到的签名以及获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。通过第一随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,该方法还包括:根据请求消息确定第二哈希值。异常响应消息还包括第一哈希值,第一哈希值为核心网设备根据请求消息确定的。则根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,包括:若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根 据第三随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
通过该可能的实施方式提供的消息保护方法,核心网设备生成签名的输入参数包括第一随机数、第一哈希值和密钥。核心网设备将第一哈希值发送给用户设备。用户设备则根据第一随机数、第三随机数、第一哈希值、接收到的签名以及获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。通过第一随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,该方法还包括:根据请求消息确定第二哈希值。异常响应消息还包括第二随机数。则根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,包括:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
通过该可能的实施方式提供的消息保护方法,核心网设备生成签名的输入参数包括第一随机数、第二随机数、第一哈希值和密钥。用户设备则根据第一随机数、第二随机数、第三随机数、第二哈希值、接收到的签名以及获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。通过第一随机数、第二随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,该方法还包括:根据请求消息确定第二哈希值。异常响应消息还包括第二随机数和第一哈希值,第一哈希值为核心网设备根据请求消息确定的。则根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,包括:若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
通过该可能的实施方式提供的消息保护方法,核心网设备生成签名的输入参数包括第一随机数、第二随机数、第一哈希值和密钥。核心网设备将第一哈希值发送给用户设备。用户设备则根据第一随机数、第二随机数、第三随机数、第二哈希值、接收到的签名以及预先获取的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。通过第一随机数、第二随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,请求消息可以包括附着请求消息或者跟踪区更新请求消息。
可选的,在第一方面的一种可能的实施方式中,异常响应消息可以包括附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,在第一方面的一种可能的实施方式中,异常响应消息还可以包括凭证,凭证用于验证签名。
通过该可能的实施方式提供的消息保护方法,提供了用户设备获取凭证的一种实现方式。用户设备可以获得异常响应消息中携带的凭证。进而可以根据该凭证对异常响应消息验证签名。
可选的,在第一方面的一种可能的实施方式中,该方法还可以包括:若确定异常响应消息为无效消息,则更改接入的接入网设备,通过更改后的接入网设备向核心网设备重新发送请求消息。
通过该可能的实施方式提供的消息保护方法,提供了用户设备确定接收到的异常响应消息为无效消息时的处理方法。通过用户设备更改接入网设备并重新发送请求消息,进一步提升了网络通信的安全性。
可选的,在第一方面的一种可能的实施方式中,用户设备可以预先配置凭证。
可选的,在第一方面的一种可能的实施方式中,用户设备可以在接收异常响应消息之前的消息中获得凭证。
可选的,在第一方面的一种可能的实施方式中,若用户设备接收到的异常响应消息还包括凭证,则用户设备可以通过该异常响应消息获得该凭证。
可选的,在第一方面的一种可能的实施方式中,若用户设备确定接收到的异常响应消息为有效消息,则根据所述异常响应消息执行第一操作。第一操作为用户设备针对有效的异常响应消息进行的操作。若用户设备确定接收到的异常响应消息为无效消息,则不对所述异常响应消息进行处理,并执行第二操作。第二操作为用户设备针对无效的异常响应消息进行的操作。
第二方面,本发明实施例提供一种消息保护方法。其中,该方法可以包括:接收用户设备发送的未受安全保护的请求消息。若请求消息不符合预设条件,则生成异常响应消息。将异常响应消息发送至用户设备。
可选的,在第二方面的一种可能的实施方式中,签名为根据包括有第一随机数的输入参数生成的,可以包括:根据预先获取的密钥和第一随机数,对异常响应消息生成签名。
可选的,在第二方面的一种可能的实施方式中,该方法还可以包括:生成第二随机数。异常响应消息还包括第二随机数。签名为根据包括有第一随机数的输入参数生成的,包括:根据预先获取的密钥、第一随机数和第二随机数,对异常响应消息生成签名。
可选的,在第二方面的一种可能的实施方式中,该方法还可以包括:根据请求消息确定第一哈希值。签名为根据包括有第一随机数的输入参数生成的,包括:根据预先获取的密钥、第一随机数和第一哈希值,对异常响应消息生成签名。
可选的,在第二方面的一种可能的实施方式中,该方法还可以包括:生成第二随机数。根据请求消息确定第一哈希值。异常响应消息还包括第二随机数。签名为根据包括有第一随机数的输入参数生成的,包括:根据预先获取的密钥、第一随机数、第二随机数和第一哈希值,对异常响应消息生成签名。
可选的,在第二方面的一种可能的实施方式中,异常响应消息还可以包括第一 哈希值。
可选的,在第二方面的一种可能的实施方式中,请求消息可以包括:附着请求消息或者跟踪区更新请求消息。
可选的,在第二方面的一种可能的实施方式中,异常响应消息可以包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,在第二方面的一种可能的实施方式中,异常响应消息还可以包括凭证,凭证用于用户设备验证签名。
第三方面,本发明实施例提供一种用户设备。其中,该用户设备可以包括:收发器,用于向核心网设备发送未受安全保护的请求消息。接收异常响应消息。处理器,用于根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。
可选的,在第三方面的一种可能的实施方式中,处理器具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、签名和凭证,对异常响应消息签名验证通过。
可选的,在第三方面的一种可能的实施方式中,异常响应消息还可以包括第二随机数,则处理器具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、签名和凭证,对异常响应消息签名验证通过。
可选的,在第三方面的一种可能的实施方式中,处理器还用于:根据请求消息确定第二哈希值。则处理器具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第三方面的一种可能的实施方式中,处理器还用于:根据请求消息确定第二哈希值。异常响应消息还包括第一哈希值,第一哈希值为核心网设备根据请求消息确定的。则处理器具体用于:若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第三方面的一种可能的实施方式中,处理器还用于:根据请求消息确定第二哈希值。异常响应消息还包括第二随机数。则处理器具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第三方面的一种可能的实施方式中,处理器还用于:根据请求消息确定第二哈希值。异常响应消息还包括第二随机数和第一哈希值,第一哈希值为核心网设备根据请求消息确定的。则处理器具体用于:若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第三方面的一种可能的实施方式中,请求消息可以包括:附着请求消息或者跟踪区更新请求消息。
可选的,在第三方面的一种可能的实施方式中,异常响应消息可以包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,在第三方面的一种可能的实施方式中,异常响应消息还可以包括凭证,凭证用于验证签名。
可选的,在第三方面的一种可能的实施方式中,处理器还用于:若确定异常响应消息为无效消息,则更改接入的接入网设备。收发器还用于:通过更改后的接入网设备向核心网设备重新发送请求消息。
第四方面,本发明实施例提供一种核心网设备。其中,该核心网设备可以包括:收发器,用于接收用户设备发送的未受安全保护的请求消息。将处理器生成的异常响应消息发送至用户设备。处理器,用于当请求消息不符合预设条件时,生成异常响应消息。
可选的,在第四方面的一种可能的实施方式中,处理器具体用于:根据预先获取的密钥和第一随机数,对异常响应消息生成签名。
可选的,在第四方面的一种可能的实施方式中,处理器还用于:生成第二随机数。异常响应消息还包括第二随机数。处理器具体用于:根据预先获取的密钥、第一随机数和第二随机数,对异常响应消息生成签名。
可选的,在第四方面的一种可能的实施方式中,处理器还用于:根据请求消息确定第一哈希值。处理器具体用于:根据预先获取的密钥、第一随机数和第一哈希值,对异常响应消息生成签名。
可选的,在第四方面的一种可能的实施方式中,处理器还用于:生成第二随机数。根据请求消息确定第一哈希值。异常响应消息还包括第二随机数。处理器具体用于:根据预先获取的密钥、第一随机数、第二随机数和第一哈希值,对异常响应消息生成签名。
可选的,在第四方面的一种可能的实施方式中,异常响应消息还包括第一哈希值。
可选的,在第四方面的一种可能的实施方式中,请求消息包括:附着请求消息或者跟踪区更新请求消息。
可选的,在第四方面的一种可能的实施方式中,异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,在第四方面的一种可能的实施方式中,异常响应消息还包括凭证,凭证用于用户设备验证签名。
第五方面,本发明实施例提供一种用户设备。其中,该用户设备可以包括:收发模块,用于向核心网设备发送未受安全保护的请求消息。接收异常响应消息。处理模块,用于根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。
可选的,在第五方面的一种可能的实施方式中,处理模块具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名 验证通过包括:根据第三随机数、签名和凭证,对异常响应消息签名验证通过。
可选的,在第五方面的一种可能的实施方式中,异常响应消息还可以包括第二随机数,则处理模块具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、签名和凭证,对异常响应消息签名验证通过。
可选的,在第五方面的一种可能的实施方式中,处理模块还用于:根据请求消息确定第二哈希值。则处理模块具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第五方面的一种可能的实施方式中,处理模块还用于:根据请求消息确定第二哈希值。异常响应消息还包括第一哈希值,第一哈希值为核心网设备根据请求消息确定的。则处理模块具体用于:若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第五方面的一种可能的实施方式中,处理模块还用于:根据请求消息确定第二哈希值。异常响应消息还包括第二随机数。则处理模块具体用于:若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第五方面的一种可能的实施方式中,处理模块还用于:根据请求消息确定第二哈希值。异常响应消息还包括第二随机数和第一哈希值,第一哈希值为核心网设备根据请求消息确定的。则处理模块具体用于:若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,在第五方面的一种可能的实施方式中,请求消息可以包括:附着请求消息或者跟踪区更新请求消息。
可选的,在第五方面的一种可能的实施方式中,异常响应消息可以包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,在第五方面的一种可能的实施方式中,异常响应消息还可以包括凭证,凭证用于验证签名。
可选的,在第五方面的一种可能的实施方式中,处理模块还用于:若确定异常响应消息为无效消息,则更改接入的接入网设备。收发模块还用于:通过更改后的接入网设备向核心网设备重新发送请求消息。
第六方面,本发明实施例提供一种核心网设备。其中,该核心网设备可以包括:收发模块,用于接收用户设备发送的未受安全保护的请求消息。将处理模块生成的异常响应消息发送至用户设备。处理模块,用于当请求消息不符合预设条件时,生成异常响应消息。
可选的,在第六方面的一种可能的实施方式中,处理模块具体用于:根据预先获取的密钥和第一随机数,对异常响应消息生成签名。
可选的,在第六方面的一种可能的实施方式中,处理模块还用于:生成第二随机数。异常响应消息还包括第二随机数。处理模块具体用于:根据预先获取的密钥、第一随机数和第二随机数,对异常响应消息生成签名。
可选的,在第六方面的一种可能的实施方式中,处理模块还用于:根据请求消息确定第一哈希值。处理模块具体用于:根据预先获取的密钥、第一随机数和第一哈希值,对异常响应消息生成签名。
可选的,在第六方面的一种可能的实施方式中,处理模块还用于:生成第二随机数。根据请求消息确定第一哈希值。异常响应消息还包括第二随机数。处理模块具体用于:根据预先获取的密钥、第一随机数、第二随机数和第一哈希值,对异常响应消息生成签名。
可选的,在第六方面的一种可能的实施方式中,异常响应消息还包括第一哈希值。
可选的,在第六方面的一种可能的实施方式中,请求消息包括:附着请求消息或者跟踪区更新请求消息。
可选的,在第六方面的一种可能的实施方式中,异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,在第六方面的一种可能的实施方式中,异常响应消息还包括凭证,凭证用于用户设备验证签名。
结合上述第一方面以及第一方面的各可能的实施方式、第二方面以及第二方面的各可能的实施方式、第三方面以及第三方面的各可能的实施方式、第四方面以及第四方面的各可能的实施方式、第五方面以及第五方面的各可能的实施方式、第六方面以及第六方面的各可能的实施方式,请求消息包括第一随机数。异常响应消息包括第三随机数和签名。异常响应消息包括第一随机数和签名。签名为根据包括有第一随机数的输入参数生成的。
第七方面,本申请实施例还提供一种计算机程序产品,该计算机程序产品包括用于执行上述本申请实施例的第一方面所提供的任一消息保护方法对应的程序代码。
第八方面,本申请实施例还提供一种计算机程序产品,该计算机程序产品包括用于执行上述本申请实施例的第二方面所提供的任一任一消息保护方法对应的程序代码。
第九方面,本申请实施例还提供一种存储介质,该存储介质用于存储计算机程序产品,该计算机程序产品包括:程序代码,该程序代码可以包括用于执行上述本申请实施例的第一方面所提供的任一任一消息保护方法对应的程序代码。
第十方面,本申请实施例还提供一种存储介质,该存储介质用于存储计算机程序产品,该计算机程序产品包括:程序代码,该程序代码可以包括用于执行上述本申请实施例的第二方面所提供的任一任一消息保护方法对应的程序代码。
本申请实施例提供一种消息保护方法、用户设备和核心网设备。用户设备向核心 网设备发送未受安全保护的请求消息,请求消息包括第一随机数。如果核心网设备确定请求消息不符合预设条件,则生成异常响应消息,异常响应消息包括第一随机数和签名。通过第一随机数和签名,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护,使得用户设备可以识别出接收到的异常响应消息是否为有效消息。避免了用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
附图说明
图1为现有的伪造攻击的消息交互图;
图2为现有的重放攻击的消息交互图;
图3为本申请实施例适用的通信系统的架构图;
图4为本申请实施例提供的消息保护方法实施例一的消息交互图;
图5为本申请实施例提供的消息保护方法实施例二的消息交互图;
图6为本申请实施例提供的消息保护方法实施例三的消息交互图;
图7为本申请实施例提供的消息保护方法实施例四的消息交互图;
图8为现有的篡改攻击的消息交互图;
图9为本申请实施例提供的消息保护方法实施例五的消息交互图;
图10为本申请实施例提供的消息保护方法实施例六的消息交互图;
图11为本申请实施例提供的消息保护方法实施例七的消息交互图;
图12为本申请实施例提供的一种用户设备的结构示意图;
图13为本申请实施例提供的另一种用户设备的结构示意图;
图14为本申请实施例提供的一种核心网设备的结构示意图;
图15为本申请实施例提供的另一种核心网设备的结构示意图。
具体实施方式
图3为本申请实施例适用的通信系统的架构图。本申请下述各实施例提供的方法可应用于图3所示的通信系统中。通信系统可以为4G或者5G通信系统及其演进的通信系统。如图3所示,通信系统中可以包括用户设备101、接入网设备102和核心网设备103。接入网设备102通过无线接口服务用户设备101。接入网设备102和核心网设备103之间通过通信接口通信。
需要说明的是,在图3中,仅示例性的示意了两个用户设备101、一个接入网设备102和一个核心网设备103。但是,对于图3所示的通信系统中包括的用户设备101的数量、接入网设备102的数量、核心网设备103的数量、每个核心网设备103服务的接入网设备102的数量、每个接入网设备102服务的用户设备101的数量,均根据实际网络需求部署。本申请对此不进行具体限定。
图3中所示的用户设备101,可以是指向用户提供数据连通性的设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的无线设备。无线终端可以经无线接入网(Radio Access Network,RAN)与一个或多个核心网进行通信,无线终端可 以是移动终端,如移动电话(或称为“蜂窝”电话)和具有移动终端的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(Personal Communication Service,PCS)电话、无绳电话、会话发起协议(Session Initiation Protocol,SIP)话机、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal Digital Assistant,PDA)等设备。无线终端也可以称为订户单元(Subscriber Unit)、订户站(Subscriber Station),移动站(Mobile Station)、移动台(Mobile)、远程站(Remote Station)、接入点(Access Point)、远程终端(Remote Terminal)、接入终端(Access Terminal)、用户终端(User Terminal)、用户代理(User Agent)、用户设备(User Device)、或用户装备(User Equipment)、智能手机(smartphone)、自动驾驶设备(Automotive Device)或物联网设备(Internet Of Things Device)。
图3中所示的接入网设备102,可以为无线电台站的一种形式。是指在一定的无线电覆盖区中,通过移动通信交换中心与移动电话终端之间进行信息传递的无线电收发信电台;或者可以是指接入网中在空中接口上通过一个或多个扇区与无线终端通信的设备。该接入网设备可以用于将收到的空中帧与互联网协议(Internet Protocol,IP)分组进行相互转换,作为无线终端与接入网的其余部分之间的路由器,其中接入网的其余部分可包括网际协议(IP)网络。该接入网设备还可协调对空中接口的属性管理。例如,该接入网设备可以为LTE通信系统中的演进型基站(Evolutional Node B,eNB或eNodeB),或者中继站或接入点,或者5G网络中的基站等,在此并不限定。
图3中所示的核心网设备103,可以支持非接入层(Non Access stratum,NAS)信令及其安全、跟踪区域列表的管理、分组数据网络网关(Packet Data Network Gateway,P-GW)和服务网关(Serving Gateway,S-GW)的选择、跨移动性管理实体(Mobility Management Entity,MME)切换时进行MME的选择、在向2G/3G接入系统切换过程中进行服务GPRS支持节点(Service GPRS Support Node,SGSN)的选择、用户的鉴权、漫游控制以及承载管理、3GPP不同接入网络的核心网络节点之间的移动性管理,以及UE在空闲状态下可达性管理。例如,核心网设备可以为4G网络中的演进的分组核心网络(Evolved Packet Core,EPC)功能实体、MME。还可以是5G网络中的移动性管理功能实体,如访问移动性管理功能实体(access and mobility management function,AMF)、统一控制网络功能实体(Common Control Network Function,CCNF)或安全锚点功能实体(secuirty anchor fuction,SEAF)。
本申请所有实施例中,用户设备101与核心网设备103之间的消息交互,可以通过接入网设备102转发实现。在用户设备101与核心网设备103传输消息之前,用户设备101可以驻留并接入一个接入网设备102。该接入网设备102可能是通信网络中合法的接入网设备,也可能是攻击者设置的伪基站。用户设备101向核心网设备103发送消息,可以为:用户设备101向接入网设备102发送消息,接入网设备102将该消息转发至核心网设备103。核心网设备103向用户设备101发送消息,可以为:核心网设备103向接入网设备102发送消息,接入网设备102将该消息转发至用户设备101。
如下结合多个实例进行举例说明。
图4为本申请实施例提供的消息保护方法实施例一的消息交互图。本申请实施例以用户设备与核心网设备的交互进行说明。如图4所述,本申请实施例提供的消息保护方法,可以包括:
S101、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
具体的,在图3所示的通信系统中,终端侧和核心网侧之间通常需要建立安全上下文,用于为用户设备和核心网设备之间交互的NAS信令进行完整性保护以及加密保护。本申请实施例中的未受安全保护的请求消息,可以为用户设备和核心网设备之间在未建立安全上下文之前交互的任意消息。
可选的,未受安全保护的请求消息可以包括:附着请求消息或者跟踪区更新请求消息。
可选的,未受安全保护的请求消息可以包括请求信息。本申请实施例对于请求信息的具体内容不做限定。可选的,请求信息可以包括用户设备生成的现有的请求消息的全部或者部分内容。
下面以具体示例详细说明本申请实施例中的请求消息与现有的请求消息。
如图1所示,UE发送的请求消息1为现有的请求消息。本申请实施例中的请求消息,可以包括第一随机数S1和请求信息,该请求信息可以包括请求消息1中的全部或者部分内容。
可选的,第一随机数可以是用户设备根据伪随机数生成算法生成的。其中,伪随机数生成算法可以为现有的任意一种算法。例如:蒙特-卡罗(Monte-Carlo)方法。
可选的,第一随机数可以是用户设备通过查询随机数表获得的。随机数表中的随机数不重复。随机数表可以周期更新、非周期更新或者事件触发更新。随机数表可以是用户设备生成的,或者是用户设备从其他设备获得的。
用户设备会暂时保存所述第一随机数一段时间,以校验异常响应消息中携带的第三随机数。
需要说明的是,本申请实施例对于第一随机数在请求消息中的携带方式以及第一随机数的实现方式不做特别限定。例如:第一随机数可以为多比特二进制信息。
相应的,核心网设备可以从用户设备接收该未受安全保护的请求消息。其中,请求消息可以包括第一随机数。
S102、若核心网设备确定请求消息不符合预设条件,则生成异常响应消息。所述异常响应消息可以包括第一随机数和签名。所述签名为根据包括有所述第一随机数的输入参数生成的。
可选的,异常响应消息可以包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
具体的,核心网设备确定请求消息是否符合预设条件。如果请求消息不符合预设条件,则生成异常响应消息。相对应的,如果请求消息符合预设条件,则核心网设备生成的响应消息可以称为正常响应消息。本申请实施例对于预设条件不做特别 限定。请求消息不同,则预设条件可以不同。请求消息不同,则异常响应消息可以不同。例如:当请求消息为附着请求消息时,出现某种异常事件,如请求消息中指示的公用陆地移动网不被允许,则核心网设备可回复对应的异常响应消息附着拒绝消息。又例如:当请求消息为跟踪区更新请求消息时,出现某种异常事件,如请求消息中指示的承载服务不被允许,则核心网设备可回复对应的异常响应消息跟踪区拒绝消息。又例如:上述两种消息出现另一种异常事件,如请求消息中携带的身份标识不被识别,则核心网设备可回复身份请求(identity request)消息以请求用户设备带上合法的身份标识。
异常响应消息中包括的第一随机数,为核心网设备接收到的用户设备发送的请求消息中包括的第一随机数。核心网设备通过异常响应消息将接收到的第一随机数再返回给用户设备。
异常响应消息中包括的签名,其生成签名的输入参数包含第一随机数。第一随机数不同,则签名不同。本申请实施例对于生成签名的输入参数还包括的其他内容不做限定。
需要说明的是,本申请实施例对于核心网设备生成签名采用的算法不做特别限定。可以采用现有的任意一种对称或非对称密码算法,且用户设备具备验证该签名的参数和能力。核心网设备生成签名时可以预先获取密钥,即输入参数还可以包括所述预先获取的密钥。核心网设备预先获取的密钥根据采用的算法不同而有所不同,本申请实施例对于预先获取的密钥的具体实现方式以及获取方式不做特别限定。例如:使用对称密码算法时,UE和核心网设备需要预先配置相同的对称密钥和签名算法。使用非对称密码算法时,核心网设备需要预先配置自身的私钥和签名算法,UE需要在校验签名前,获得对应私钥的公钥以及相同的签名算法。
可选的,一种实现签名的流程如下。
将一个消息作为哈希函数的输入,得到哈希(hash)值Hm。例如,采用如下公式:
Hm=HASH(message)          公式一
其中,Hm为hash值,HASH为hash函数,message包括生成签名的输入参数。
根据预先获取的密钥和hash值Hm,计算签名。例如,可以采用如下公式计算签名:
Sign=SN(Hm,K)          公式二
其中,SN是签名函数,Hm为hash值,K为预先获取的密钥。例如,采用对称密码算法时,K可以为核心网设备与用户设备预配置的对称密钥。采用非对称密码算法时,K可以为核心网设备的私钥。例如,使用证书机制或者公私钥对机制时,K可以为网络侧自己生成的私钥。使用基于身份的加密机制(Identity Based Encryption,IBE)时,K可以为密钥管理系统(key management system,KMS)为网络侧分配的公开验证令牌(Public Validation Token,PVT)和安全签约密钥(Secret Signing Key,SSK)的组合。
可选的,在采用非对称密码算法时,异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。例如,在使用证书机制时,该凭证可以为核心网设备 的证书。在使用公私钥对机制时,该凭证可以为核心网设备的公钥。在使用IBE机制时,该凭证可以为核心网设备的身份。
可选的,作为一种示例,生成异常响应消息可以包括:根据请求消息生成异常信息。则生成签名的输入参数还可以包括异常信息。
其中,异常信息是指核心网设备根据请求消息生成的原始信息。本申请实施例对于异常信息的具体内容不做限定。可选的,异常信息可以包括核心网设备根据现有的请求消息生成的现有的异常响应消息中全部或者部分内容。
下面以具体示例详细说明本申请实施例中的异常响应消息与现有的异常响应消息。
如图2所示,UE发送的请求消息2为现有的请求消息。核心网设备根据请求消息2生成的异常响应消息2为现有的异常响应消息。本申请实施例中的请求消息,可以包括第一随机数S2和请求信息,该请求信息可以包括请求消息2中的全部或者部分内容。本申请实施例中的异常响应消息,可以包括第一随机数S2、异常信息和签名。该异常信息可以包括异常响应消息2中的全部或者部分内容。
S103、核心网设备将异常响应消息发送给用户设备。
其中,本步骤中的异常响应消息,与S102中的异常响应消息相同。
S104、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数和签名。
其中,本步骤中的异常响应消息,与S103中的异常响应消息可能相同,也可能不同。进一步的,S103中核心网设备返回给用户设备的第一随机数与本步骤中用户设备接收到的第三随机数可能相同,也可能不同。S103中核心网设备发送给用户设备的签名与本步骤中用户设备接收到的签名可能相同,也可能不同。
具体的,如果用户设备接入的接入网设备正常转发了核心网设备发送给用户设备的消息,则本步骤中的异常响应消息与S103中的异常响应消息相同。此时,核心网设备返回给用户设备的第一随机数与用户设备接收到的第三随机数相同。核心网设备发送给用户设备的签名与用户设备接收到的签名相同。但是,如果用户设备接入的接入网设备为伪基站,在进行伪造攻击或者重放攻击的场景下,则本步骤中的异常响应消息可能与S103中的异常响应消息不同。此时,核心网设备返回给用户设备的第一随机数与用户设备接收到的第三随机数可能不同。核心网设备发送给用户设备的签名与用户设备接收到的签名也可能不同。
可选的,用户设备接收到的所述异常响应消息,还可以包括凭证。凭证可以用于用户设备验证签名。
与上述原理相似,核心网设备发送给用户设备的凭证与本步骤中用户设备接收到的凭证可能相同,也可能不同。但是用户设备具备验证凭证有效性的能力。例如,如使用证书机制时,所述凭证可以为核心网设备的证书,用户设备通过校验证书的签发机构签名验证证书的有效性。如使用公私钥对机制时,所述凭证可以为核心网设备的公钥,用户设备通过信任接入网设备广播的方式验证公钥的有效性。如使用IBE机制时,所述凭证可以是核心网设备的身份,用户设备因为预先配置有PVT而校验身份的有效性。
S105、用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。
具体的,用户设备生成了第一随机数,通过请求消息发送给核心网设备。用户设备接收到了异常响应消息,其中包括第三随机数。可以理解,如果核心网设备发送给用户设备的异常响应消息没有遭到伪造攻击或者重放攻击,那么,用户设备发送的第一随机数与用户设备接收到的第三随机数是相同的。因此,用户设备可以根据接收到的第三随机数,确定接收到的异常响应消息与请求消息是否对应。而且,由于核心网设备生成的签名是根据第一随机数生成的。第一随机数不同,则签名不同。因此,用户设备可以根据接收到的第三随机数、签名以及获取到的凭证确定接收到的异常响应消息是否为有效消息。
具体的,针对图1所示出的伪造攻击场景。通过本申请实施例提供的消息保护方法,无论伪基站是否伪造第一随机数,由于签名的存在,使得伪基站伪造的签名无法通过验证。用户设备可以识别出该场景下伪造的异常响应消息。针对图2所示出的重放攻击场景。通过本申请实施例提供的消息保护方法,由于UE连续两次发送的请求消息中包括的第一随机数一定不同,因此核心网设备生成的签名一定不同。这样,伪基站就无法利用缓存的异常响应消息进行重放攻击。用户设备可以识别出该场景下重放的异常响应消息。
可见,由于第一随机数和签名的存在,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护,使得用户设备可以识别出接收到的异常响应消息是否为有效消息。避免了用户设备因为伪基站的攻击导致的长时间拒绝服务,提升了网络通信的安全性。
可选的,作为S105的另一种实现方式,用户设备也可以根据第一随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。
具体的,若第一随机数与第三随机数相同,则两者之间可以相互替换。若第一随机数与第三随机数不同,则说明核心网设备发送给用户设备的异常响应消息可能遭到伪造攻击或者重放攻击。那么,根据第一随机数也可以确定此时的异常响应消息为无效消息。
需要说明的是,本申请实施例对于用户设备获取凭证的实现方式不做特别限定。可以根据预先配置的加密算法获得。
可选的,用户设备可以预先配置凭证。例如:使用对称密码算法时,用户设备和核心网设备可以预先配置相同的对称密钥。
可选的,用户设备可以在接收异常响应消息之前的消息中获得。
可选的,若用户设备接收到的异常响应消息还包括凭证,则用户设备可以通过该异常响应消息获得该凭证。
可选的,本申请实施例提供的方法,还可以包括:
若用户设备确定接收到的异常响应消息为有效消息,则根据所述异常响应消息执行第一操作。所述第一操作为用户设备针对有效的异常响应消息进行的操作。
若用户设备确定接收到的异常响应消息为无效消息,则不对所述异常响应消息进行处理,并执行第二操作。所述第二操作为用户设备针对无效的异常响应消息进 行的操作。
需要说明的是,本申请实施例对于第一操作和第二操作不做特别限定。第一操作可以为用户设备接收到现有的异常响应消息后进行的任意处理流程。
可选的,作为一种示例,第二操作可以包括:
更改用户设备接入的接入网设备,通过更改后的接入网设备向核心网设备重新发送上述请求消息。
可选的,作为另一种示例,第二操作可以包括:
通知用户,由用户决定下一步操作。可选的,用户可以移动并重启用户设备。
本申请实施例提供了一种消息保护方法。用户设备向核心网设备发送未受安全保护的请求消息,请求消息包括第一随机数。如果核心网设备确定请求消息不符合预设条件,则生成异常响应消息,异常响应消息包括第一随机数和签名。核心网设备将异常响应消息发送给用户设备。用户设备接收异常响应消息,该异常响应消息包括第三随机数和签名。用户设备根据第三随机数、签名和获取到的凭证,确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,通过第一随机数和签名,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护,使得用户设备可以识别出接收到的异常响应消息是否为有效消息。避免了用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
图5为本申请实施例提供的消息保护方法实施例二的消息交互图。本申请实施例在上述实施例一的基础上,提供了S102和S105的一种实现方式。其中,S102可以具体为S202,S105可以包括S205~S207。如图5所示,本申请实施例提供的消息保护方法,可以包括:
S201、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
本步骤可以参考S101的描述,原理相似,此处不再赘述。
S202、若核心网设备确定请求消息不符合预设条件,则生成异常响应消息。
所述异常响应消息可以包括第一随机数和签名。所述签名为根据预先获取的密钥和第一随机数,对异常响应消息生成的。
其中,预先获取的密钥的具体实现方式以及获取方式可以参考S102的描述。此时,生成签名的输入参数包括预先获取的密钥和第一随机数。
可选的,所述异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。所述凭证可以参考S102的描述。
S203、核心网设备向用户设备发送异常响应消息。所述异常响应消息可以包括第一随机数和签名。
S204、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数和签名。
本步骤可以参考S104的描述,原理相似,此处不再赘述。
S205、用户设备判断第一随机数与第三随机数是否相同。
如果第一随机数与第三随机数相同,则执行下一个步骤。如果第一随机数与第三随机数不同,则确定接收到的异常响应消息为无效消息。
S206、用户设备根据第一随机数和第三随机数中的任意一个、签名以及获取到的凭证,对接收到的异常响应消息进行签名验证。此时,验证签名的输入参数包括第一随机数和第三随机数的任意一个。
如果签名验证通过,则执行下一个步骤。如果签名验证不通过,则确定接收到的异常响应消息为无效消息。
需要说明的是,本申请实施例对于用户设备验证签名采用的算法不做特别限定。可以采用现有的任意一种对称或非对称密码算法。
可选的,一种验证签名的流程如下。
根据验证签名的输入参数,以及上述公式一,获得哈希值Hm;根据签名和获取到的凭证以及公式三,获得哈希值Hm’;比较Hm和Hm’,若两者不同,则签名校验不通过,若两者相同,则签名校验通过。
Hm’=Ver(Sign,Kv)         公式三
其中,Ver为验证签名函数,Kv为所述凭证,Sign为所述签名。
其中,签名为异常响应消息中携带的,凭证的获取方式可以参考S105的描述。
S207、用户设备确定接收到的异常响应消息为有效消息。
在本申请实施例中,核心网设备生成签名的输入参数包括第一随机数和预先获取的密钥,第一随机数是用户设备生成并发送给核心网设备的。第一随机数和预先获取的密钥,只要有一个不同,则生成的签名不同。通过第一随机数和签名,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护。
具体的,针对图1所示出的伪造攻击场景,无论伪基站是否伪造第一随机数,伪基站都无法获得有效的签名密钥。由于签名的存在,用户设备可以识别出该场景下伪造的异常响应消息。针对图2所示出的重放攻击场景。由于UE连续两次发送的请求消息中包括的第一随机数一定不同,因此核心网设备连续两次生成的签名一定不同。使得用户设备可以识别出该场景下重放的异常响应消息。
需要说明的是,本申请实施例对于S205~S206的执行顺序不做限定。
可选的,作为另一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、签名以及获取到的凭证,对接收到的异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
本申请实施例提供了一种消息保护方法。核心网设备生成签名的输入参数包括第一随机数和预先获取的密钥。用户设备则根据第一随机数、第三随机数、接收到的签名和获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,通过第一随机 数、第三随机数和签名,可以避免用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
图6为本申请实施例提供的消息保护方法实施例三的消息交互图。本申请实施例在上述实施例一的基础上,提供了S102和S105的另一种实现方式。其中,S102可以包括S302~S303,S105可以包括S306~S308。如图6所示,本申请实施例提供的消息保护方法,可以包括:
S301、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
本步骤可以参考S101的描述,原理相似,此处不再赘述。
S302、若核心网设备确定请求消息不符合预设条件,则生成第二随机数。
其中,第二随机数与第一随机数原理相似,此处不再赘述。
S303、核心网设备生成异常响应消息。
所述异常响应消息可以包括第一随机数、第二随机数和签名。所述签名为根据预先获取的密钥、第一随机数和第二随机数,对异常响应消息生成的。
其中,预先获取的密钥的具体实现方式以及获取方式可以参考S102的描述。此时,生成签名的输入参数在S202基础上还包括第二随机数。
可选的,所述异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。所述凭证可以参考S102的描述。
S304、核心网设备向用户设备发送异常响应消息。所述异常响应消息可以包括第一随机数、第二随机数和签名。
S305、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数、第二随机数和签名。
其中,所述第二随机数为核心网设备生成的。
本步骤可以参考S104的描述,原理相似,此处不再赘述。
S306、用户设备判断第一随机数与第三随机数是否相同。
如果第一随机数与第三随机数相同,则执行下一个步骤。如果第一随机数与第三随机数不同,则确定接收到的异常响应消息为无效消息。
S307、用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、签名和获取到的凭证,对接收到的异常响应消息进行签名验证。
如果签名验证通过,则执行下一个步骤。如果签名验证不通过,则确定接收到的异常响应消息为无效消息。
其中,凭证的获取方式可以参考S206的描述。此时,验证签名的输入参数在S206基础上还包括第二随机数。
S308、用户设备确定接收到的异常响应消息为有效消息。
在本申请实施例中,核心网设备生成签名的输入参数包括第一随机数、第二随机数和预先获取的密钥。第一随机数是用户设备生成并发送给核心网设备的。第二随机数是核心网设备生成的。第一随机数、第二随机数和预先获取的密钥,只要有一个不同,则生成的签名不同。通过第一随机数、第二随机数和签名,可以对用户 设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护。
本申请实施例提供的消息保护方法,相比于图5示出的示例,由于核心网设备还生成了第二随机数,增加了生成签名的输入参数。相应的,用户设备进行签名验证时增加了第二随机数,使得验证条件更加安全,进一步提升了网络通信的安全性。
具体的,针对图1所示出的伪造攻击场景。无论伪基站是否伪造第一随机数,伪基站都无法获得有效的签名密钥。由于签名的存在,用户设备可以识别出该场景下伪造的异常响应消息。针对图2所示出的重放攻击场景。由于UE连续两次发送的请求消息中包括的第一随机数一定不同,核心网设备连续两次生成的第二随机数一定不同,因此核心网设备连续两次生成的签名一定不同。使得用户设备可以识别出该场景下重放的异常响应消息。
需要说明的是,本申请实施例对于S306~S307的执行顺序不做限制。
可选的,作为另一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第二随机数和获取到的凭证,对接收到的异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
本申请实施例提供了一种消息保护方法。核心网设备生成签名的输入参数包括用户设备发送的第一随机数、核心网设备生成的第二随机数和预先获取的密钥。用户设备则根据第一随机数、第二随机数、第三随机数、接收到的签名和获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,通过第一随机数、第二随机数、第三随机数和签名,可以避免用户设备因为伪基站的伪造攻击或者重放攻击导致的长时间拒绝服务,提升了网络通信的安全性。
图7为本申请实施例提供的消息保护方法实施例四的消息交互图。本申请实施例在上述实施例一的基础上,提供了S102和S105的又一种实现方式。其中,S102可以包括S402~S403,S105可以包括S408~S410。如图7所示,本申请实施例提供的消息保护方法,可以包括:
S401、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
本步骤可以参考S101的描述,原理相似,此处不再赘述。
S402、若核心网设备确定请求消息不符合预设条件,则根据接收到的请求消息确定第一哈希值。
其中,根据请求消息确定第一哈希值可以采用现有的任意一种哈希算法。用户设备和核心网设备使用相同的哈希算法。可选的,若请求消息(message)包括请求信息(message1)和第一随机值(S1)。作为一个示例,可以根据公式Hm=HASH(message) 确定第一哈希值。作为另一个示例,可以根据公式Hm=HASH(message1,S1)确定第一哈希值。其中,Hm为确定的哈希值,HASH为某一种哈希算法,如SHA1、SHA128、MD5等,该哈希算法与用户设备使用的算法相同。
可以理解的是,请求消息不同,则第一哈希值不同。
S403、核心网设备生成异常响应消息。
所述异常响应消息可以包括第一随机数和签名。所述签名为根据预先获取的密钥、第一随机数、第一哈希值,对异常响应消息生成的。
其中,预先获取的密钥的具体实现方式以及获取方式可以参考S102的描述。此时,生成签名的输入参数在S202的基础上还包括第一哈希值。
可选的,所述异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。所述凭证可以参考S102的描述。
S404、核心网设备向用户设备发送异常响应消息。所述异常响应消息可以包括第一随机数和签名。
S405、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数和签名。
本步骤可以参考S104的描述,原理相似,此处不再赘述。
S406、用户设备根据请求消息确定第二哈希值。
其中,第二哈希值与第一哈希值的原理类似,此处不再赘述。
具体的,第一哈希值是核心网设备根据请求消息确定的,第二哈希值是用户设备根据请求消息确定的。如果用户设备发送的请求消息与核心网设备接收的请求消息在传输过程中没有发生改动,则第一哈希值与第二哈希值相同。
需要说明的是,S406的执行顺序,还可以在S405之前。此时用户将保存第二哈希值一段时间,以等待校验第一哈希值。
S407、用户设备判断第一随机数与第三随机数是否相同。
如果第一随机数与第三随机数相同,则执行下一个步骤。如果第一随机数与第三随机数不同,则确定接收到的异常响应消息为无效消息。
S408、用户设备根据第一随机数和第三随机数中的任意一个、第二哈希值、签名和获取到的凭证,对接收到的异常响应消息进行签名验证。
具体的,由于第一哈希值与第二哈希值相同,因此用户设备可以根据自己生成的第二哈希值对异常响应消息进行签名验证。
如果签名验证通过,则执行下一个步骤。如果签名验证不通过,则确定接收到的异常响应消息为无效消息。
其中,凭证的获取方式可以参考S206的描述。此时,验证签名的输入参数在S206的基础上还包括第二哈希值。
S409、用户设备确定接收到的异常响应消息为有效消息。
在本申请实施例中,核心网设备生成签名的输入参数包括第一随机数、第一哈希值和预先获取的密钥。第一随机数是用户设备生成并发送给核心网设备的。第一哈希值是核心网设备生成的。第一随机数、第一哈希值和预先获取的密钥,只要有一个不同,则生成的签名不同。核心网设备没有将第一哈希值发送给用户设备。用 户设备根据第一随机数和第二哈希值对异常响应消息进行签名验证。通过第一随机数、第一哈希值、第二哈希值和签名,可以对用户设备与核心网设备之间未建立安全上下文之前传输的消息进行安全保护。
本申请实施例提供的消息保护方法,相比于图5示出的示例,核心网设备生成签名的输入参数,增加了核心网设备根据请求消息获得的第一哈希值。相应的,用户设备进行签名验证时增加了第二哈希值,使得验证条件更加安全,进一步提升了网络通信的安全性。
需要说明的是,本申请实施例提供的消息保护方法,还可以避免伪基站的篡改攻击。图8为现有的篡改攻击的消息交互图。如图8所示,UE发送未受安全保护的请求消息4。伪基站拦截请求消息4后,将请求消息4篡改为请求消息5。并将请求消息5发送至核心网设备。请求消息5被核心网拒绝,此时,核心网设备将回复异常响应消息5。伪基站将异常响应消息5转发给UE。导致UE长时间拒绝服务。
针对图8所示出的篡改攻击场景。本申请实施例提供的消息保护方法,核心网设备生成签名的输入参数,包括核心网设备根据请求消息确定的第一哈希值。如果请求消息被篡改了,那么用户设备生成的第二哈希值与核心网设备确定的第一哈希值将不同。这样,当用户设备接收到异常响应消息后,根据第二哈希值对异常响应消息进行签名验证将无法通过。因此,通过第一哈希值和第二哈希值,用户设备可以确定接收到的异常响应消息是否有效,避免受到篡改攻击。
需要说明的是,本申请实施例对于S407~S408的执行顺序不做限制。
可选的,作为另一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第二哈希值和获取到的凭证,对接收到的异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
本申请实施例提供了一种消息保护方法。核心网设备生成签名的输入参数包括用户设备发送的第一随机数、核心网设备根据请求消息确定的第一哈希值和预先获取的密钥。用户设备则根据第一随机数、根据请求消息确定的第二哈希值、接收到的第三随机数、接收到的签名以及获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,通过第一随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
图9为本申请实施例提供的消息保护方法实施例五的消息交互图。本申请实施例在上述实施例一的基础上,提供了S102和S105的又一种实现方式。其中,S102可以包括S502~S503,S105可以包括S507~S510。如图9所示,本申请实施例提供的消 息保护方法,可以包括:
S501、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
本步骤可以参考S101的描述,原理相似,此处不再赘述。
S502、若核心网设备确定请求消息不符合预设条件,则根据接收到的请求消息确定第一哈希值。
本步骤可以参考S402的描述,原理相似,此处不再赘述。
S503、核心网设备生成异常响应消息。
所述异常响应消息可以包括第一随机数、第一哈希值和签名。所述签名为根据预先获取的密钥、第一随机数、第一哈希值,对异常响应消息生成的。
其中,预先获取的密钥的具体实现方式以及获取方式可以参考S102的描述。此时,生成签名的输入参数在S202的基础上还包括第一哈希值。
可选的,所述异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。所述凭证可以参考S102的描述。
S504、核心网设备向用户设备发送异常响应消息。所述异常响应消息可以包括第一随机数、第一哈希值和签名。
S505、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数、第一哈希值和签名。其中,第一哈希值为核心网设备根据请求消息确定的。
本步骤可以参考S104的描述,原理相似,此处不再赘述。
S506、用户设备根据请求消息确定第二哈希值。
本步骤可以参考S406的描述,此处不再赘述。
需要说明的是,S506的执行顺序,还可以在S505之前。
S507、用户设备判断第一随机数与第三随机数是否相同。
如果第一随机数与第三随机数相同,则执行下一个步骤。如果第一随机数与第三随机数不同,则确定接收到的异常响应消息为无效消息。
S508、用户设备根据第一随机数和第三随机数中的任意一个、第一哈希值、签名和获取到的凭证,对异常响应消息进行签名验证。
如果签名验证通过,则执行下一个步骤。如果签名验证不通过,则确定接收到的异常响应消息为无效消息。
其中,凭证的获取方式可以参考S206的描述。此时,验证签名的输入参数在S206的基础上还包括第一哈希值。
S509、用户设备判断第一哈希值与第二哈希值是否相同。
如果第一哈希值与第二哈希值相同,则执行下一个步骤。如果第一哈希值与第二哈希值不同,则确定接收到的异常响应消息为无效消息。
S510、用户设备确定接收到的异常响应消息为有效消息。
本申请实施例提供的消息保护方法,相比于图7示出的示例,核心网设备发送给用户设备的异常响应消息中还包括有第一哈希值。用户设备通过比较第一哈希值与第二哈希值是否相同,可以进一步确定接收到的异常响应消息是否为有效消息。可以防止攻击,进一步提升了网络通信的安全性。
需要说明的是,本申请实施例对于S507~S509的执行顺序不做限制。
可选的,作为另一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备根据第一随机数和第三随机数中的任意一个、第一哈希值和第二哈希值中的任意一个和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第一哈希值和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第一哈希值和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数和签名,确定异常响应消息是否为有效消息,可以包括:
用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备根据第一随机数和第三随机数中的任意一个、第一哈希值和第二哈希值中的任意一个和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备根据第一随机数和第三随机数中的任意一个、第一哈希值和第二哈希值中的任意一个和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
本申请实施例提供了一种消息保护方法。核心网设备生成签名的输入参数包括用户设备发送的第一随机数、核心网设备根据请求消息确定的第一哈希值和预先获取的密钥。核心网设备将第一哈希值发送给用户设备。用户设备则根据第一随机数、第三随机数、第一哈希值、接收到的签名以及获取到的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,通过第一随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
图10为本申请实施例提供的消息保护方法实施例六的消息交互图。本申请实施例在上述实施例一的基础上,提供了S102和S105的又一种实现方式。其中,S102可以包括S602~S603,S105可以包括S607~S609。如图10所示,本申请实施例提供的消息保护方法,可以包括:
S601、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
本步骤可以参考S101的描述,原理相似,此处不再赘述。
S602、若核心网设备确定请求消息不符合预设条件,则生成第二随机数,并根据接收到的请求消息确定第一哈希值。
其中,本申请实施例对于生成第二随机数和根据接收到的请求消息确定第一哈希值的执行顺序不做限定。
其中,第二随机数与第一随机数原理相似,此处不再赘述。
其中,根据接收到的请求消息确定第一哈希值,可以参考S402的描述,原理相似,此处不再赘述。
S603、核心网设备生成异常响应消息。
所述异常响应消息可以包括第一随机数、第二随机数和签名。所述签名为根据预先获取的密钥、第一随机数、第二随机数和第一哈希值,对异常响应消息生成的。
其中,预先获取的密钥的具体实现方式以及获取方式可以参考S102的描述。此 时,生成签名的输入参数在S202的基础上还包括第二随机数和第一哈希值。
可选的,所述异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。所述凭证可以参考S102的描述。
S604、核心网设备向用户设备发送异常响应消息。所述异常响应消息可以包括第一随机数、第二随机数和签名。
S605、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数、第二随机数和签名。其中,第二随机数为核心网设备生成的。
本步骤可以参考S104的描述,原理相似,此处不再赘述。
S606、用户设备根据请求消息确定第二哈希值。
本步骤可以参考S406的描述,此处不再赘述。
需要说明的是,S606的执行顺序,还可以在S605之前。
S607、用户设备判断第一随机数与第三随机数是否相同。
如果第一随机数与第三随机数相同,则执行下一个步骤。如果第一随机数与第三随机数不同,则确定接收到的异常响应消息为无效消息。
S608、用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第二哈希值、签名和获取到的凭证,对异常响应消息进行签名验证。
如果签名验证通过,则执行下一个步骤。如果签名验证不通过,则确定接收到的异常响应消息为无效消息。
其中,凭证的获取方式可以参考S206的描述。此时,验证签名的输入参数在S206的基础上还包括第二随机数和第二哈希值。
S609、用户设备确定接收到的异常响应消息为有效消息。
本申请实施例提供的消息保护方法,相比于图7示出的示例,核心网设备生成签名的输入参数还包括核心网设备生成的第二随机数,增强了生成签名的条件。相应的,用户设备根据第一随机数、第二随机数、第三随机数、第二哈希值和签名,确定收到的异常响应消息是否为有效消息。使得用户设备验证签名是否通过的条件更加安全,进一步提升了网络通信的安全性。
需要说明的是,本申请实施例对于S607~S608的执行顺序不做限制。
可选的,作为另一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第二哈希值和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
本申请实施例提供了一种消息保护方法。核心网设备生成签名的输入参数包括用户设备发送的第一随机数、核心网设备生成的第二随机数、核心网设备根据请求消息确定的第一哈希值和预先获取的密钥。用户设备则根据第一随机数、第二随机数、第三随机数、第二哈希值、接收到的签名以及获取到的凭证,对接收到的异常 响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法,通过第一随机数、第二随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
图11为本申请实施例提供的消息保护方法实施例七的消息交互图。本申请实施例在上述实施例一的基础上,提供了S102和S105的又一种实现方式。其中,S102可以包括S702~S703,S105可以包括S707~S710。如图11所示,本申请实施例提供的消息保护方法,可以包括:
S701、用户设备向核心网设备发送未受安全保护的请求消息。所述请求消息可以包括第一随机数。
本步骤可以参考S101的描述,原理相似,此处不再赘述。
S702、若核心网设备确定请求消息不符合预设条件,则生成第二随机数,并根据接收到的请求消息确定第一哈希值。
其中,本申请实施例对于生成第二随机数和根据接收到的请求消息确定第一哈希值的执行顺序不做限定。
其中,第二随机数与第一随机数原理相似,此处不再赘述。
其中,根据接收到的请求消息确定第一哈希值,可以参考S402的描述,原理相似,此处不再赘述。
S703、核心网设备生成异常响应消息。
所述异常响应消息可以包括第一随机数、第二随机数、第一哈希值和签名。所述签名为根据预先获取的密钥、第一随机数、第二随机数和第一哈希值,对异常响应消息生成的。
其中,预先获取的密钥的具体实现方式以及获取方式可以参考S102的描述。此时,生成签名的输入参数在S202的基础上还包括第二随机数和第一哈希值。
可选的,所述异常响应消息还可以包括凭证,所述凭证用于用户设备验证所述签名。所述凭证可以参考S102的描述。
S704、核心网设备向用户设备发送异常响应消息。所述异常响应消息可以包括第一随机数、第二随机数、第一哈希值和签名。
S705、用户设备接收异常响应消息。所述异常响应消息可以包括第三随机数、第二随机数、第一哈希值和签名。其中,第一哈希值为核心网设备根据请求消息确定的。第二随机数为核心网设备生成的。
本步骤可以参考S104的描述,原理相似,此处不再赘述。
S706、用户设备根据请求消息确定第二哈希值。
本步骤可以参考S406的描述,此处不再赘述。
需要说明的是,S706的执行顺序,还可以在S705之前。
S707、用户设备判断第一随机数与第三随机数是否相同。
如果第一随机数与第三随机数相同,则执行下一个步骤。如果第一随机数与第三随机数不同,则确定接收到的异常响应消息为无效消息。
S708、用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第一哈希值、签名和获取到的凭证,对异常响应消息进行签名验证。
如果签名验证通过,则执行下一个步骤。如果签名验证不通过,则确定接收到的异常响应消息为无效消息。
其中,凭证的获取方式可以参考S206的描述。此时,验证签名的输入参数在S206的基础上还包括第二随机数和第一哈希值。
S709、用户设备判断第一哈希值与第二哈希值是否相同。
如果第一哈希值与第二哈希值相同,则执行下一个步骤。如果第一哈希值与第二哈希值不同,则确定接收到的异常响应消息为无效消息。
S710、用户设备确定接收到的异常响应消息为有效消息。
本申请实施例提供的消息保护方法,相比于图10示出的示例,核心网设备发送给用户设备的异常响应消息中包括有第一哈希值。用户设备接收到的异常响应消息中包括有第一哈希值。可以理解,核心网设备发送的第一哈希值与用户设备接收到的第一哈希值可能相同,也可能不同。因此,用户设备通过比较第一哈希值与第二哈希值是否相同,可以进一步确定接收到的异常响应消息是否为有效消息。可以防止攻击,进一步提升了网络通信的安全性。
本申请实施例提供的消息保护方法,相比于图9示出的示例,核心网设备生成签名的输入参数还包括核心网设备生成的第二随机数,增强了生成签名的条件。相应的,用户设备根据第一随机数、第二随机数、第三随机数、第二哈希值和签名,确定收到的异常响应消息是否为有效消息。使得用户设备验证签名是否通过的条件更加安全,进一步提升了网络通信的安全性。
需要说明的是,本申请实施例对于S707~S709的执行顺序不做限制。
可选的,作为另一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第一哈希值和第二哈希值中的任意一个和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第一哈希值和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第一哈希值和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第一哈希值和第二哈希值中的任意一个和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
可选的,作为又一个示例,S105,用户设备根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息,可以包括:
用户设备判断第一哈希值与第二哈希值是否相同。
若第一哈希值与第二哈希值相同,则用户设备根据第一随机数和第三随机数中的任意一个、第二随机数、第一哈希值和第二哈希值中的任意一个和获取到的凭证,对异常响应消息进行签名验证。
若签名验证通过,则用户设备判断第一随机数与第三随机数是否相同。
若第一随机数与第三随机数相同,则用户设备确定接收到的异常响应消息为有效消息。
上述任一校验失败,则用户设备确定接收到的异常响应消息为无效消息。
本申请实施例提供了一种消息保护方法。核心网设备生成签名的输入参数包括用户设备发送的第一随机数、核心网设备生成的第二随机数、核心网设备根据请求消息确定的第一哈希值和预先获取的密钥。核心网设备将第一哈希值发送给用户设备。用户设备则根据第一随机数、第二随机数、第三随机数、第一哈希值、第二哈希值、接收到的签名以及获取的凭证,对接收到的异常响应消息进行签名验证,可以确定接收到的异常响应消息是否为有效消息。本申请实施例提供的消息保护方法, 通过第一随机数、第二随机数、第三随机数、第一哈希值、第二哈希值和签名,可以避免用户设备因为伪基站的伪造、重放或者篡改攻击导致的长时间拒绝服务,提升了网络通信的安全性。
本申请实施例还提供一种用户设备。该用户设备可以执行上述图4~图7、图9~图11任一方法实施例提供的消息保护方法中用户设备执行的操作。图12为本申请实施例提供的一种用户设备的结构示意图。如图12所示,本申请实施例提供的用户设备100,可以包括:
收发模块11,用于向核心网设备发送未受安全保护的请求消息,请求消息包括第一随机数。接收异常响应消息,异常响应消息包括第三随机数和签名。
处理模块12,用于根据第三随机数、签名和获取到的凭证,确定异常响应消息是否为有效消息。
可选的,处理模块12具体用于:
若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、签名和凭证,对异常响应消息签名验证通过。
可选的,异常响应消息还包括第二随机数,则处理模块12具体用于:
若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、签名和凭证,对异常响应消息签名验证通过。
可选的,处理模块12还用于:根据请求消息确定第二哈希值。
则处理模块12具体用于:
若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,处理模块12还用于:根据请求消息确定第二哈希值。
异常响应消息还包括第一哈希值,第一哈希值为核心网设备根据请求消息确定的。
则处理模块12具体用于:
若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,处理模块12还用于:根据请求消息确定第二哈希值。
异常响应消息还包括第二随机数。
则处理模块12具体用于:
若第一随机数与第三随机数相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第二哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,处理模块12还用于:根据请求消息确定第二哈希值。
异常响应消息还包括第二随机数和第一哈希值,第一哈希值为核心网设备根据请求消息确定的。
则处理模块12具体用于:
若第一随机数与第三随机数相同、第一哈希值与第二哈希值相同、且签名验证通过,则确定异常响应消息为有效消息。签名验证通过包括:根据第三随机数、第二随机数、第一哈希值、签名和凭证,对异常响应消息签名验证通过。
可选的,请求消息包括:附着请求消息或者跟踪区更新请求消息。
可选的,异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,异常响应消息还包括凭证,凭证用于验证签名。
可选的,处理模块12还用于:若确定异常响应消息为无效消息,则更改接入的接入网设备。
收发模块11还用于:通过更改后的接入网设备向核心网设备重新发送请求消息。
可选的,本申请实施例还可提供一种用户设备。图13为本申请实施例提供的另一种用户设备的结构示意图。如图13所示,该用户设备200可以包括:处理器22、收发器21、存储器23。处理器22可与收发器21连接。处理器22还可与存储器23连接。
如上所示的处理模块12可以通过处理器22调用存储器23中存储的程序指令实现。如上所示的收发模块11可以由处理器22控制收发器21来实现。
可选的,本申请实施例还提供一种计算机程序产品。计算机程序产品可以包括:程序代码。
该程序代码可以为用于执行本申请实施例上述图4~图7、图9~图11任一方法实施例中用户设备执行的消息保护方法对应的程序代码。该计算机程序产品中的程序代码例如可由上述图13所示的用户设备200中的处理器22执行。
可选的,本申请实施例还提供一种存储介质。存储介质可用于存储计算机程序产品。计算机程序产品可包括:程序代码。
该程序代码可以为用于执行本申请实施例上述图4~图7、图9~图11任一方法实施例中用户设备执行的消息保护方法对应的程序代码。
该存储介质可以为上述图13所示的用户设备200中的内部存储器,也可以为与上述图13所示的用户设备200连接的外部存储器。该计算机程序产品中的程序代码例如可由上述图13所示的用户设备200中的处理器22执行。
本申请实施例提供的用户设备、计算机程序产品及存储介质,可执行上述图4~图7、图9~图11任一方法实施例提供的消息保护方法中用户设备执行的操作,其具体实现及有益效果可参见上述,在此不再赘述。
本申请实施例还提供一种核心网设备。该核心网设备可以执行上述图4~图7、图9~图11任一方法实施例提供的消息保护方法中核心网设备执行的操作。图14为本申请实施例提供的一种核心网设备的结构示意图。如图14所示,本申请实施例提供的核心网设备300,可以包括:
收发模块31,用于接收用户设备发送的未受安全保护的请求消息,请求消息包括第一随机数。将处理模块32生成的异常响应消息发送至用户设备。
处理模块32,用于当请求消息不符合预设条件时,生成异常响应消息。异常响应消息包括第一随机数和签名。签名为处理模块32根据包括有第一随机数的输入参数生成的。
可选的,处理模块32具体用于:根据预先获取的密钥和第一随机数,对异常响应消息生成签名。
可选的,处理模块32还用于:生成第二随机数。
异常响应消息还包括第二随机数。
处理模块32具体用于:根据预先获取的密钥、第一随机数和第二随机数,对异常响应消息生成签名。
可选的,处理模块32还用于:根据请求消息确定第一哈希值。
处理模块32具体用于:根据预先获取的密钥、第一随机数和第一哈希值,对异常响应消息生成签名。
可选的,处理模块32还用于:
生成第二随机数。
根据请求消息确定第一哈希值。
异常响应消息还包括第二随机数。
处理模块32具体用于:根据预先获取的密钥、第一随机数、第二随机数和第一哈希值,对异常响应消息生成签名。
可选的,异常响应消息还包括第一哈希值。
可选的,请求消息包括:附着请求消息或者跟踪区更新请求消息。
可选的,异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
可选的,异常响应消息还包括凭证,凭证用于用户设备验证签名。
可选的,本申请实施例还可提供一种核心网设备。图15为本申请实施例提供的另一种核心网设备的结构示意图。如图15所示,该核心网设备400可以包括:处理器42、收发器41、存储器43。处理器42可与收发器41连接。处理器42还可与存储器43连接。
如上所示的处理模块32可以通过处理器42调用存储器43中存储的程序指令实现。如上所示的收发模块31可以由处理器42控制收发器41来实现。
可选的,本申请实施例还提供一种计算机程序产品。计算机程序产品可以包括:程序代码。
该程序代码可以为用于执行本申请实施例上述图4~图7、图9~图11任一方法实施例中核心网设备执行的消息保护方法对应的程序代码。该计算机程序产品中的程序代码例如可由上述图15所示的核心网设备400中的处理器42执行。
可选的,本申请实施例还提供一种存储介质。存储介质可用于存储计算机程序产品。计算机程序产品可包括:程序代码。
该程序代码可以为用于执行本申请实施例上述图4~图7、图9~图11任一方法实施例中核心网设备执行的消息保护方法对应的程序代码。
该存储介质可以为上述图15所示的核心网设备400中的内部存储器,也可以为与上述图15所示的核心网设备400连接的外部存储器。该计算机程序产品中的程序代码例如可由上述图15所示的核心网设备400中的处理器42执行。
本申请实施例提供的核心网设备、计算机程序产品及存储介质,可执行上述上述图4~图7、图9~图11任一方法实施例提供的消息保护方法中核心网设备执行的操作,其具体实现及有益效果可参见上述,在此不再赘述。

Claims (40)

  1. 一种消息保护方法,其特征在于,包括:
    向核心网设备发送未受安全保护的请求消息,所述请求消息包括第一随机数;
    接收异常响应消息,所述异常响应消息包括第三随机数和签名;
    根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息,包括:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  3. 根据权利要求1所述的方法,其特征在于,所述异常响应消息还包括第二随机数,则所述根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息,包括:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二随机数、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据所述请求消息确定第二哈希值;
    则所述根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息,包括:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据所述请求消息确定第二哈希值;
    所述异常响应消息还包括第一哈希值,所述第一哈希值为所述核心网设备根据所述请求消息确定的;
    则所述根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息,包括:
    若所述第一随机数与所述第三随机数相同、所述第一哈希值与所述第二哈希值相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第一哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据所述请求消息确定第二哈希值;
    所述异常响应消息还包括第二随机数;
    则所述根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消 息是否为有效消息,包括:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二随机数、所述第二哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据所述请求消息确定第二哈希值;
    所述异常响应消息还包括第二随机数和第一哈希值,所述第一哈希值为所述核心网设备根据所述请求消息确定的;
    则所述根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息,包括:
    若所述第一随机数与所述第三随机数相同、所述第一哈希值与所述第二哈希值相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二随机数、所述第一哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述请求消息包括:附着请求消息或者跟踪区更新请求消息。
  9. 根据权利要求1至7任一项所述的方法,其特征在于,所述异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
  10. 根据权利要求1至7任一项所述的方法,其特征在于,所述异常响应消息还包括所述凭证,所述凭证用于验证所述签名。
  11. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:
    若确定所述异常响应消息为无效消息,则更改接入的接入网设备,通过更改后的接入网设备向所述核心网设备重新发送请求消息。
  12. 一种消息保护方法,其特征在于,包括:
    接收用户设备发送的未受安全保护的请求消息,所述请求消息包括第一随机数;
    若所述请求消息不符合预设条件,则生成异常响应消息;所述异常响应消息包括所述第一随机数和签名;所述签名为根据包括有所述第一随机数的输入参数生成的;
    将所述异常响应消息发送至所述用户设备。
  13. 根据权利要求12所述的方法,其特征在于,所述签名为根据包括有所述第一随机数的输入参数生成的,包括:
    所述签名为根据预先获取的密钥和所述第一随机数,对所述异常响应消息生成的。
  14. 根据权利要求12所述的方法,其特征在于,所述方法还包括:生成第二随机数;
    所述异常响应消息还包括所述第二随机数;
    所述签名为根据包括有所述第一随机数的输入参数生成的,包括:
    所述签名为根据预先获取的密钥、所述第一随机数和所述第二随机数,对所述异常响应消息生成的。
  15. 根据权利要求12所述的方法,其特征在于,所述方法还包括:根据所述请求消息确定第一哈希值;
    所述签名为根据包括有所述第一随机数的输入参数生成的,包括:
    所述签名为根据预先获取的密钥、所述第一随机数和所述第一哈希值,对所述异常响应消息生成的。
  16. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    生成第二随机数;
    根据所述请求消息确定第一哈希值;
    所述异常响应消息还包括所述第二随机数;
    所述签名为根据包括有所述第一随机数的输入参数生成的,包括:
    所述签名为根据预先获取的密钥、所述第一随机数、所述第二随机数和所述第一哈希值,对所述异常响应消息生成的。
  17. 根据权利要求15或16所述的方法,其特征在于,所述异常响应消息还包括所述第一哈希值。
  18. 根据权利要求12至17任一项所述的方法,其特征在于,所述请求消息包括:附着请求消息或者跟踪区更新请求消息。
  19. 根据权利要求12至17任一项所述的方法,其特征在于,所述异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
  20. 根据权利要求12至17任一项所述的方法,其特征在于,所述异常响应消息还包括凭证,所述凭证用于所述用户设备验证所述签名。
  21. 一种用户设备,其特征在于,包括:
    收发器,用于向核心网设备发送未受安全保护的请求消息,所述请求消息包括第一随机数;接收异常响应消息,所述异常响应消息包括第三随机数和签名;
    处理器,用于根据所述第三随机数、所述签名和获取到的凭证,确定所述异常响应消息是否为有效消息。
  22. 根据权利要求21所述的用户设备,其特征在于,所述处理器具体用于:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  23. 根据权利要求21所述的用户设备,其特征在于,所述异常响应消息还包括第二随机数,则所述处理器具体用于:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二随机数、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  24. 根据权利要求21所述的用户设备,其特征在于,所述处理器还用于:根据 所述请求消息确定第二哈希值;
    则所述处理器具体用于:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  25. 根据权利要求21所述的用户设备,其特征在于,所述处理器还用于:根据所述请求消息确定第二哈希值;
    所述异常响应消息还包括第一哈希值,所述第一哈希值为所述核心网设备根据所述请求消息确定的;
    则所述处理器具体用于:
    若所述第一随机数与所述第三随机数相同、所述第一哈希值与所述第二哈希值相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第一哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  26. 根据权利要求21所述的用户设备,其特征在于,所述处理器还用于:根据所述请求消息确定第二哈希值;
    所述异常响应消息还包括第二随机数;
    则所述处理器具体用于:
    若所述第一随机数与所述第三随机数相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二随机数、所述第二哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  27. 根据权利要求21所述的用户设备,其特征在于,所述处理器还用于:根据所述请求消息确定第二哈希值;
    所述异常响应消息还包括第二随机数和第一哈希值,所述第一哈希值为所述核心网设备根据所述请求消息确定的;
    则所述处理器具体用于:
    若所述第一随机数与所述第三随机数相同、所述第一哈希值与所述第二哈希值相同、且签名验证通过,则确定所述异常响应消息为有效消息;所述签名验证通过包括:根据所述第三随机数、所述第二随机数、所述第一哈希值、所述签名和所述凭证,对所述异常响应消息签名验证通过。
  28. 根据权利要求21至27任一项所述的用户设备,其特征在于,所述请求消息包括:附着请求消息或者跟踪区更新请求消息。
  29. 根据权利要求21至27任一项所述的用户设备,其特征在于,所述异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
  30. 根据权利要求21至27任一项所述的用户设备,其特征在于,所述异常响应消息还包括所述凭证,所述凭证用于验证所述签名。
  31. 根据权利要求21至27任一项所述的用户设备,其特征在于,所述处理器还用于:若确定所述异常响应消息为无效消息,则更改接入的接入网设备;
    所述收发器还用于:通过更改后的接入网设备向所述核心网设备重新发送请求消息。
  32. 一种核心网设备,其特征在于,包括:
    收发器,用于接收用户设备发送的未受安全保护的请求消息,所述请求消息包括第一随机数;将所述处理器生成的异常响应消息发送至所述用户设备;
    处理器,用于当所述请求消息不符合预设条件时,生成异常响应消息;所述异常响应消息包括所述第一随机数和签名;所述签名为所述处理器根据包括有所述第一随机数的输入参数生成的。
  33. 根据权利要求32所述的核心网设备,其特征在于,所述处理器具体用于:根据预先获取的密钥和所述第一随机数,对所述异常响应消息生成所述签名。
  34. 根据权利要求32所述的核心网设备,其特征在于,所述处理器还用于:生成第二随机数;
    所述异常响应消息还包括所述第二随机数;
    所述处理器具体用于:根据预先获取的密钥、所述第一随机数和所述第二随机数,对所述异常响应消息生成所述签名。
  35. 根据权利要求32所述的核心网设备,其特征在于,所述处理器还用于:根据所述请求消息确定第一哈希值;
    所述处理器具体用于:根据预先获取的密钥、所述第一随机数和所述第一哈希值,对所述异常响应消息生成所述签名。
  36. 根据权利要求32所述的核心网设备,其特征在于,所述处理器还用于:
    生成第二随机数;
    根据所述请求消息确定第一哈希值;
    所述异常响应消息还包括所述第二随机数;
    所述处理器具体用于:根据预先获取的密钥、所述第一随机数、所述第二随机数和所述第一哈希值,对所述异常响应消息生成所述签名。
  37. 根据权利要求35或36所述的核心网设备,其特征在于,所述异常响应消息还包括所述第一哈希值。
  38. 根据权利要求32至37任一项所述的核心网设备,其特征在于,所述请求消息包括:附着请求消息或者跟踪区更新请求消息。
  39. 根据权利要求32至37任一项所述的核心网设备,其特征在于,所述异常响应消息包括:附着拒绝消息、跟踪区更新拒绝消息或者身份请求消息。
  40. 根据权利要求32至37任一项所述的核心网设备,其特征在于,所述异常响应消息还包括凭证,所述凭证用于所述用户设备验证所述签名。
PCT/CN2017/072665 2017-01-25 2017-01-25 消息保护方法、用户设备和核心网设备 WO2018137195A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2017/072665 WO2018137195A1 (zh) 2017-01-25 2017-01-25 消息保护方法、用户设备和核心网设备
EP17894481.5A EP3565178B1 (en) 2017-01-25 2017-01-25 Message protection method, user device and core network device
CN201780056174.1A CN109691017B (zh) 2017-01-25 2017-01-25 消息保护方法、用户设备和核心网设备
US16/520,833 US10582378B2 (en) 2017-01-25 2019-07-24 Message protection method, user equipment, and core network device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/072665 WO2018137195A1 (zh) 2017-01-25 2017-01-25 消息保护方法、用户设备和核心网设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/520,833 Continuation US10582378B2 (en) 2017-01-25 2019-07-24 Message protection method, user equipment, and core network device

Publications (1)

Publication Number Publication Date
WO2018137195A1 true WO2018137195A1 (zh) 2018-08-02

Family

ID=62978898

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/072665 WO2018137195A1 (zh) 2017-01-25 2017-01-25 消息保护方法、用户设备和核心网设备

Country Status (4)

Country Link
US (1) US10582378B2 (zh)
EP (1) EP3565178B1 (zh)
CN (1) CN109691017B (zh)
WO (1) WO2018137195A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111713122B (zh) 2018-02-15 2024-02-06 瑞典爱立信有限公司 用于提高数据传输安全性的方法、用户设备和网络节点
US11469881B2 (en) * 2018-12-26 2022-10-11 Korea Institute Of Science And Technology Apparatus and method for forgery prevention of digital information
US11336438B2 (en) * 2020-03-31 2022-05-17 EMC IP Holding Company LLC Remote approval and execution of restricted operations
US11522879B2 (en) * 2020-05-20 2022-12-06 At&T Intellectual Property I, L.P. Scrubber for distributed denial of service attacks targetting mobile networks

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1802018A (zh) * 2005-07-15 2006-07-12 华为技术有限公司 一种消息认证方法
CN1802017A (zh) * 2005-07-15 2006-07-12 华为技术有限公司 一种防止重放攻击的认证方法
US8566465B2 (en) * 2010-09-17 2013-10-22 At&T Intellectual Property I, L.P. System and method to detect and mitigate distributed denial of service attacks using random internet protocol hopping

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8639939B2 (en) * 2006-07-07 2014-01-28 Sandisk Technologies Inc. Control method using identity objects
GB0822599D0 (en) * 2008-12-11 2009-01-21 Vodafone Plc Securing network rejection
CN102055744A (zh) * 2009-11-06 2011-05-11 中兴通讯股份有限公司 一种ip多媒体子系统紧急呼叫业务的实现系统及方法
WO2012174427A2 (en) * 2011-06-16 2012-12-20 OneID Inc. Method and system for determining authentication levels in transactions
US9083531B2 (en) * 2012-10-16 2015-07-14 Symantec Corporation Performing client authentication using certificate store on mobile device
US9460272B2 (en) * 2013-03-14 2016-10-04 Arris Enterprises, Inc. Method and apparatus for group licensing of device features
CN105792194B (zh) * 2016-04-25 2019-06-28 中国联合网络通信集团有限公司 基站合法性的认证方法、认证装置、网络设备、认证系统
US10588019B2 (en) * 2016-05-05 2020-03-10 Qualcomm Incorporated Secure signaling before performing an authentication and key agreement

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1802018A (zh) * 2005-07-15 2006-07-12 华为技术有限公司 一种消息认证方法
CN1802017A (zh) * 2005-07-15 2006-07-12 华为技术有限公司 一种防止重放攻击的认证方法
US8566465B2 (en) * 2010-09-17 2013-10-22 At&T Intellectual Property I, L.P. System and method to detect and mitigate distributed denial of service attacks using random internet protocol hopping

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHU, YINGMIN: "The Analysis and Research on IEEE802.16 Security Sublayer of Wireless Metropolitan Area Networks", MASTER THESIS, vol. 01, 31 January 2010 (2010-01-31), pages 1 - 65, XP009515620 *

Also Published As

Publication number Publication date
EP3565178B1 (en) 2021-03-17
US20190349753A1 (en) 2019-11-14
CN109691017B (zh) 2022-02-01
CN109691017A (zh) 2019-04-26
US10582378B2 (en) 2020-03-03
EP3565178A1 (en) 2019-11-06
EP3565178A4 (en) 2019-11-06

Similar Documents

Publication Publication Date Title
CN113016202B (zh) 用于基站的装置、方法和计算机可读存储介质
US10455414B2 (en) User-plane security for next generation cellular networks
KR102547749B1 (ko) 완전 순방향 비밀성을 통한 인증 및 키 합의
CN108293223B (zh) 一种数据传输方法、用户设备和网络侧设备
US9668139B2 (en) Secure negotiation of authentication capabilities
US10582378B2 (en) Message protection method, user equipment, and core network device
US20200021993A1 (en) Identity-based message integrity protection and verification for wireless communication
WO2020248624A1 (zh) 一种通信方法、网络设备、用户设备和接入网设备
US11997078B2 (en) Secured authenticated communication between an initiator and a responder
US11082843B2 (en) Communication method and communications apparatus
CN110583036B (zh) 网络认证方法、网络设备及核心网设备
WO2017197596A1 (zh) 通信方法、网络侧设备和用户设备
CN113518312B (zh) 一种通信方法、装置及系统
CN101405987A (zh) 无线系统的非对称加密
KR20230101818A (ko) 검증된 디지털 아이덴티티를 사용한 가입 온보딩
KR101539242B1 (ko) 하이브리드 통신 시스템의 도청 타입 공격의 방지 방법
US12113783B2 (en) Wireless-network attack detection
US20080176572A1 (en) Method of handoff
US20200186995A1 (en) Proof-of-presence indicator
WO2022183427A1 (en) Method, device, and system for protecting sequence number in wireless network
Ozhelvaci Secure and efficient authentication schemes for 5G heterogeneous networks
Fidelis et al. ENHANCED ADAPTIVE SECURITY PROTOCOL IN LTE AKA
Akman et al. Providing Identity Privacy in 5G Networks by Using Pseudonyms
Kulshrestha SECURITY ENHANCEMENT OF AUTHENTICATION AND KEY AGREEMENT PROTOCOL FOR WIRELESS COMMUNICATION NETWORK

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017894481

Country of ref document: EP

Effective date: 20190729