WO2020216109A1 - 一种安全保护方法及装置 - Google Patents

一种安全保护方法及装置 Download PDF

Info

Publication number
WO2020216109A1
WO2020216109A1 PCT/CN2020/084843 CN2020084843W WO2020216109A1 WO 2020216109 A1 WO2020216109 A1 WO 2020216109A1 CN 2020084843 W CN2020084843 W CN 2020084843W WO 2020216109 A1 WO2020216109 A1 WO 2020216109A1
Authority
WO
WIPO (PCT)
Prior art keywords
network element
mobility management
mac
public key
management network
Prior art date
Application number
PCT/CN2020/084843
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 华为技术有限公司
Publication of WO2020216109A1 publication Critical patent/WO2020216109A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • 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/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]

Definitions

  • This application relates to the field of communication technology, and in particular to a security protection method and device.
  • the attacker can induce the terminal to reside on the pseudo base station, and the pseudo base station can attack the network side. Attacks the NAS message sent to the terminal and sends the tampered NAS message to the terminal, causing the terminal to perform corresponding actions according to the tampered NAS message.
  • the original NAS message sent by the network side to the terminal is to notify the terminal to stay on the 5th generation (5G) network, but after tampering with the attacker, the NAS message can be tampered with: Notifying the terminal to return from the 5G network to the fourth ( 4th generation, 4G) network.
  • the 5G network has made security improvements, such as permanent identity encryption, initial message protection, etc. Returning from the 5G network to the 4G network will cause a downgrade attack on the terminal, which will reduce the security of the terminal and make the terminal enter a relatively low security level Low-standard network.
  • the prior art proposes the following method: the network side uses the network side private key to protect the integrity of the NAS message, and sends the integrity protected NAS message to the terminal, and the terminal receives the complete After the NAS message is protected, the public key on the network side can be used to verify the integrity of the NAS message to obtain the NAS message.
  • this method needs to modify the existing NAS protocol and change the NAS protocol to use a public and private key mechanism to protect the integrity of NAS messages.
  • multiple network-side public keys need to be configured on the terminal, and public key management is relatively complicated.
  • the embodiments of the present application provide a security protection method and device to improve the security of NAS message transmission.
  • an embodiment of the present application provides a security protection method, including: a mobility management network element performs integrity protection on NAS messages to generate a first MAC, and sends the first MAC, second MAC, and mobility to the terminal The public key of the management network element and the NAS message, where the second MAC is the MAC generated after the public key authorized network element signs the public key of the mobility management network element.
  • the mobility management network element can sign the public key generated by the public key authorized by the network element to generate the second MAC, the first MAC generated by the integrity check of the NAS message, and the mobility management network element
  • the public key and the NAS message are sent to the terminal.
  • the terminal verifies the second MAC according to the public key authorized by the public key of the network element and the public key of the mobility management network element, and if the second MAC verification succeeds, the terminal Knowing that the received mobility management network element is authentic, the first MAC can be verified with confidence based on the received public key of the mobility management network element, thereby performing integrity verification on the NAS message.
  • the terminal only needs the mobility management network element to configure the public key of a public key authorization network element for it, instead of configuring the public keys of multiple mobility management network elements, which can greatly reduce the mobility management network configured on the terminal.
  • the complexity of the public key of the meta avoids tampering of NAS messages.
  • the method further includes: the mobility management network element receives an initial NAS message from the terminal, and in response to the initial NAS message, sends the public key authorization network element the public key of the mobility management network element. Key, the mobility management network element receives the second MAC sent by the public key authorized network element.
  • the mobility management network element can obtain the second MAC from the public key authorized network element.
  • the initial NAS message includes the terminal's home network information
  • the mobility management network element determines that the mobility management network element does not store the home network information or the second MAC corresponding to the home network information according to the terminal's home network information, the mobility management network element sends a message to the public key authorized network element The public key of the mobility management network element.
  • the mobility management network element sends the public key of the mobility management network element to the public key authorization network element in response to the initial NAS message, include:
  • the mobility management network element sends the public key of the mobility management network element to the public key authorized network element according to the home network information of the terminal.
  • the second MAC is a public key authorized network element to sign according to the public key of the mobility management network element and the validity time of the second MAC After the generated MAC; the method further includes: the mobility management network element receives the valid time of the second MAC sent by the public key authorization network element, and the valid time of the second MAC is the available time of the second MAC.
  • the valid time of the second MAC is also added.
  • the valid time of the second MAC is set so that the second MAC is available within the valid time , To avoid the problem of integrity protection failure due to theft or failure of the second MAC when the same second MAC is used for a long time.
  • the initial NAS message further includes a first random value
  • the mobility management network element performs integrity protection on the non-access stratum NAS message
  • Generating the first MAC includes: the mobility management network element generates the first MAC according to the private key of the mobility management network element and the first random value.
  • the first random value can be introduced when generating the first MAC, and the MAC generated after the integrity protection of the two adjacent NAS messages is different, which can prevent an attacker from replaying a MAC with the same MAC NAS messages to avoid replay attacks.
  • the initial NAS message further includes a first random value
  • the mobility management network element performs integrity protection on the non-access stratum NAS message
  • To generate the first MAC includes: the mobility management network element generates the second random value; the mobility management network element generates the first MAC according to the first random value, the second random value, and the private key of the mobility management network element.
  • the first random value and the second random value can be introduced when generating the first MAC, and the MAC generated after the integrity protection of the two adjacent NAS messages is different, which can prevent attackers from repeating Put a NAS message with the same MAC to avoid replay attacks.
  • the method further includes: the mobility management network element sends to the terminal the first random value, or the first random value And the second random value.
  • the mobility management network element can send the random value used for generating the first MAC to the terminal to ensure that the terminal successfully completes the integrity check of the NAS message.
  • the method further includes: the mobility management network element receives the capability information of the terminal, and the capability information of the terminal is used to indicate that the terminal is capable of The capability of NAS message integrity protection; the mobility management network element determines that the terminal has the capability of integrity protection for NAS messages according to the capability information of the terminal.
  • the terminal informs the mobility management network element of its own capabilities, so that the mobility management network element can perform integrity protection on the NAS message when it determines that the terminal has the ability to perform integrity protection on the NAS message .
  • the mobility management network element performs integrity protection on the non-access stratum NAS message to generate the first MAC, including: When the mobility management network element determines that the NAS security protection between the mobility management network element and the terminal is not activated, the mobility management network element performs integrity protection on the NAS message to generate the first MAC.
  • the integrity of the NAS message can be protected to ensure the security of the NAS message sent before the NAS security protection is not activated.
  • the present application provides a communication device, which may be a mobility management network element or a chip or a system on a chip in a mobility management network element.
  • the communication device can implement the above aspects or the mobility in each possible design.
  • the functions performed by the management network element can be implemented by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the aforementioned functions.
  • the communication device may include: a generating unit and a sending unit;
  • the sending unit is used to send the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message to the terminal, where the second MAC is a public key that authorizes the network element to sign according to the public key of the mobility management network element MAC generated afterwards.
  • the specific implementation of the communication device may refer to the behavior function of the mobility management network element in the security protection method provided by the first aspect or any possible design of the first aspect, which is not repeated here. Therefore, the provided communication device can achieve the same beneficial effects as the first aspect or any possible design of the first aspect.
  • a communication device including: a processor and a memory; the memory is used to store computer execution instructions, and when the communication device is running, the processor executes the computer execution instructions stored in the memory to enable the The communication device executes the security protection method as described in the first aspect or any possible design of the first aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is a non-volatile readable storage medium.
  • the computer-readable storage medium stores instructions, which when run on a computer, enable the computer to execute the security protection method described in the first aspect or any one of the possible designs of the foregoing aspects.
  • a computer program product containing instructions, which when running on a computer, enables the computer to execute the security protection method described in the first aspect or any one of the possible designs of the foregoing aspects.
  • a chip system in a sixth aspect, includes a processor and a communication interface for supporting the chip system to implement the functions involved in the above aspects.
  • the processor performs integrity protection on the NAS message to generate the first MAC, and send the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message to the terminal through the communication interface, where the second MAC is the public key to authorize the network element according to the public key of the mobility management network element.
  • MAC generated after signing In a possible design, the chip system further includes a memory, and the memory is used to store necessary program instructions and data of the communication device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • the technical effects brought about by any one of the design methods of the third aspect to the sixth aspect may refer to the technical effects brought about by the above-mentioned first aspect or any possible design of the first aspect, and will not be repeated.
  • a security protection method further includes: the terminal receives the first MAC, the second MAC, the public key of the mobility management network element, and the non-access stratum NAS message sent by the mobility management network element ;
  • the first MAC is the MAC generated after integrity protection of the NAS message
  • the second MAC is the MAC generated after the public key authorization network element signs the public key of the mobility management network element according to the private key of the public key authorization network element ;
  • the terminal performs integrity verification on the NAS message according to the public key of the public key authorized network element, the public key of the mobility management network element, the second MAC, and the first MAC.
  • the terminal can receive the public key sent by the mobility management network element to authorize the network element to sign the second MAC generated by the public key generated by the mobility management network element, and the second MAC generated by the integrity check of the NAS message.
  • the terminal only needs the mobility management network element to configure the public key of a public key authorization network element for it, instead of configuring the public keys of multiple mobility management network elements, which can greatly reduce the mobility management network configured on the terminal.
  • the complexity of the public key of the meta at the same time, avoids tampering of NAS messages.
  • the terminal performs integrity verification on the NAS message according to the public key of the public key authorized network element, the public key of the mobility management network element, the second MAC, and the first MAC, including: The terminal verifies the second MAC according to the public key of the public key authorized by the network element and the public key of the mobility management network element; when the second MAC verification succeeds, it checks the public key of the mobility management network element and the first MAC pair NAS messages are checked for integrity.
  • the terminal verifies the second MAC according to the public key of the public key authorized network element and the public key of the mobility management network element, and if the second MAC verification succeeds, the terminal knows the received The mobility management network element is real, and the first MAC can be verified according to the received public key of the mobility management network element, so as to perform integrity verification on the NAS message.
  • the mobility management network element further sends the valid time of the first MAC and/the valid time of the second MAC to the terminal.
  • the effective time of the first MAC and/the effective time of the second MAC can be set, and the effective time of the first MAC and/the effective time of the second MAC can be sent to the terminal so that the The validity period and/or the validity period of the second MAC perform integrity check on the NAS message to prevent the attacker from replaying a NAS message with the same MAC when the same MAC is used for a long time, and avoid replay attacks.
  • the terminal performs integrity verification on the NAS message according to the public key of the public key authorized network element and the first MAC, including:
  • the terminal authorizes the public key of the network element, the second MAC, and the first MAC according to the public key, and sends the NAS message Perform an integrity check.
  • the terminal can perform integrity check on the NAS message within the effective time of the first MAC and/or the effective time of the second MAC, ensuring the accuracy of the integrity check on the NAS message.
  • the terminal performs integrity verification on the NAS message according to the public key, the second MAC, and the first MAC of the public key authorized network element ,include:
  • the terminal performs integrity verification on the NAS message according to the public key of the public key authorized network element, the second MAC, and the first MAC.
  • the public key, second MAC, and first MAC of the network element are authorized according to the public key.
  • the method further includes: the terminal receives a protection indication sent by the mobility management network element; wherein the protection indication is used to instruct the terminal to pair The integrity check of the NAS message is performed by the terminal according to the public key, the second MAC, and the first MAC of the network element authorized by the public key.
  • the terminal authorizes the network according to the public key The public key of the element, the second MAC, and the first MAC perform integrity verification on the NAS message.
  • the terminal authorizes the network element’s public key, the second MAC, and the first MAC under the direction of the mobility management network element to perform integrity verification on the NAS message, which reduces the terminal’s ability to determine whether to check the NAS.
  • the complexity of message integrity verification is simple and easy.
  • the terminal performs integrity verification on the NAS message according to the public key, the second MAC, and the first MAC of the public key authorized network element , Including: the terminal performs an integrity check on the NAS message according to the public key, the second MAC, the first MAC, and the first random value of the network element authorized by the public key.
  • the first random value can be introduced when the integrity check of the NAS message is performed, which can prevent an attacker from replaying a NAS message with the same MAC and avoid replay attacks.
  • the terminal performs integrity verification on the NAS message according to the public key, the second MAC, and the first MAC of the public key authorized network element , Including: the terminal performs integrity verification on the NAS message according to the public key of the public key authorized network element, the second MAC, the first MAC, the first random value, and the second random value.
  • the first random value and the second random value can be introduced during the integrity check of the NAS message, which can prevent an attacker from replaying a NAS message with the same MAC and avoid replay attacks.
  • the method further includes: the terminal sends the capability information of the terminal to the mobility management network element, and the capability information of the terminal is used to indicate the terminal Have the ability to protect the integrity of NAS messages.
  • the terminal can inform the mobility management network element of its own capabilities, so that the mobility management network element can perform integrity protection on the NAS message when it determines that the terminal has the ability to perform integrity protection on the NAS message .
  • the present application provides a communication device.
  • the communication device may be a terminal or a chip or a system on a chip in the terminal.
  • the communication device may implement the functions performed by the terminal in the above-mentioned aspects or various possible designs. It can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • the communication device may include: a receiving unit and an integrity checking unit;
  • the receiving unit is used to receive the first MAC, the second MAC, the public key of the mobility management network element, and the non-access stratum NAS message sent by the mobility management network element; the first MAC is generated after integrity protection of the NAS message The second MAC is the MAC generated after the public key authorized network element signs the public key of the mobility management network element according to the private key of the public key authorized network element;
  • the integrity check unit is used to perform integrity check on the NAS message according to the public key of the public key authorized network element, the public key of the mobility management network element, the second MAC and the first MAC.
  • the communication device For the specific implementation of the communication device, reference may be made to the behavior and function of the terminal in the security protection method provided by the seventh aspect or any one of the possible designs of the seventh aspect, which will not be repeated here. Therefore, the provided communication device can achieve the same beneficial effects as the seventh aspect or any possible design of the seventh aspect.
  • a communication device including: a processor and a memory; the memory is used to store computer execution instructions, and when the communication device is running, the processor executes the computer execution instructions stored in the memory to enable the The communication device executes the security protection method as described in the seventh aspect or any one of the possible designs of the seventh aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is a non-volatile readable storage medium.
  • the computer-readable storage medium stores instructions, which when run on a computer, enable the computer to execute the security protection method described in the seventh aspect or any one of the possible designs of the foregoing aspects.
  • the eleventh aspect provides a computer program product containing instructions, which when running on a computer, enables the computer to execute the security protection method described in the seventh aspect or any one of the possible designs of the foregoing aspects.
  • a chip system in a twelfth aspect, includes a processor and a communication interface for supporting the chip system to implement the functions involved in the above aspects.
  • the processor receives and receives the mobility management network element through the communication interface.
  • the MAC is generated after the element signs the public key of the mobility management network element according to the private key of the public key authorized network element, and the public key of the mobility management network element, the public key of the mobility management network element, the second MAC, and the first One MAC, performs integrity check on the NAS message.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data of the communication device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • a security protection method is further provided, the method further includes: the public key authorized network element receives the public key of the mobility management network element sent by the mobility management network element; the public key authorized network element authorizes the network element according to the public key The private key of the network element signs the public key of the mobility management network element to obtain the second MAC; the public key authorizes the network element to send the second MAC to the mobility management network element.
  • the public key can authorize the network element to sign the public key of the mobility management network element, and send the signed second MAC to the mobility management network element.
  • the public key The authorized network element signs the public key of the mobility management network element, and configures the public key of the mobility management network element to the terminal, reducing the number of public keys of the mobility management network element configured on the terminal, and reducing the terminal management mobility
  • the complexity of the public key of the network element is managed.
  • the public key authorization network element signs the public key of the mobility management network element according to the private key of the public key authorization network element to obtain the second MAC, including: public key authorization network The element signs the public key of the mobility management network element according to the public key to authorize the private key of the network element and the valid time of the second MAC to obtain the second MAC.
  • the effective time of the second MAC can be introduced to make the second MAC available during the effective time and avoid using the same second MAC for a long time.
  • the second MAC is stolen or becomes invalid, which leads to the failure of integrity protection.
  • the method further includes: the public key authorized network element sends the effective time of the second MAC to the mobility management network element.
  • the effective time of the second MAC is introduced, the effective time of the second MAC is sent to the mobility management network element to pass the mobility management network element.
  • the sexual management network element sends the effective time of the second MAC to the terminal to ensure that the terminal smoothly checks the second MAC according to the effective time of the second MAC.
  • this application provides a communication device.
  • the communication device may be a public key authorized network element or a chip or a system on a chip in a public key authorized network element.
  • the communication device can implement the above aspects or various possible designs.
  • the functions performed by the public key authorized network element may be implemented by hardware or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the aforementioned functions.
  • the communication device may include: a receiving unit, a signing unit, and a sending unit;
  • the receiving unit is configured to receive the public key of the mobility management network element sent by the mobility management network element;
  • the signature unit is used to sign the public key of the mobility management network element according to the private key of the public key authorized network element to obtain the second MAC;
  • the sending unit is used to send the second MAC to the mobility management network element.
  • the specific implementation of the communication device can refer to the behavior and function of the public key authorized network element in the security protection method provided by the thirteenth aspect or any possible design of the thirteenth aspect, which will not be repeated here. Therefore, the provided communication device can achieve the same beneficial effects as the thirteenth aspect or any possible design of the thirteenth aspect.
  • a communication device including: a processor and a memory; the memory is used to store computer-executable instructions, and when the communication device is running, the processor executes the computer-executable instructions stored in the memory to enable
  • the communication device implements the security protection method described in the above-mentioned thirteenth aspect or any one of the possible designs of the thirteenth aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is a non-volatile readable storage medium.
  • the computer-readable storage medium stores instructions that, when run on a computer, enable the computer to execute the security protection method described in the thirteenth aspect or any one of the possible designs of the foregoing aspects.
  • the seventeenth aspect provides a computer program product containing instructions that, when run on a computer, enables the computer to execute the security protection method described in the thirteenth aspect or any possible design of the foregoing aspects.
  • a chip system includes a processor and a communication interface for supporting the chip system to implement the functions involved in the above aspects.
  • the processor receives transmissions from the mobility management network element through the communication interface.
  • the public key of the mobility management network element, and the public key of the mobility management network element is signed according to the private key of the public key authorized network element to obtain the second MAC, and the second MAC is sent to the mobility management network element through the communication interface MAC.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data of the communication device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • a security protection method includes: a mobility management network element sends a non-access stratum NAS message to an access network device; and the mobility management network element sends a first instruction to the access network device Information; the first indication information is used to instruct the access network device to perform integrity protection on the NAS message.
  • the mobility management network element when the mobility management network element sends a NAS message to the terminal, the mobility management network element can notify the access network device to protect the integrity of the NAS message to ensure the security of the NAS message and avoid The NAS message has been tampered with.
  • the integrity protection is performed by the mobility management network element notifying the access network equipment, there is no need to require the mobility management network element to perform security protection, and the NAS protocol may not be changed.
  • the method before the mobility management network element sends the NAS message to the access network device, the method further includes: the mobility management network element according to the first condition and/or the second condition , Determine the integrity protection of the NAS message; the first condition includes: the NAS security protection between the mobility management network element and the terminal is not activated; the second condition includes: the terminal has been registered to the network; or the terminal has an access network stored on it The public key of the device; where the public key of the access network device is used to verify the integrity of the message verification code MAC generated according to the private key of the access network device; or the terminal has the ability to protect the integrity of the NAS message.
  • the integrity protection of the NAS message can be determined when the first condition and/or the second condition are met, which can ensure that the NAS message before the NAS security protection is not activated is protected.
  • the method when the second condition includes that the terminal has the ability to perform integrity protection on NAS messages, the method further includes: mobility
  • the management network element receives the capability information of the terminal, and determines according to the capability information that the terminal has the capability to protect the integrity of the NAS message; the capability information of the terminal is used to indicate the capability of the terminal to support the integrity protection of the NAS message.
  • the terminal informs the mobility management network element of its own capabilities, so that the mobility management network element can perform integrity protection on the NAS message when it is determined that the terminal has the ability to perform integrity protection on the NAS message.
  • the present application provides a communication device, which may be a mobility management network element or a chip or a system on a chip in a mobility management network element, and the communication device can implement the above aspects or the mobility in each possible design.
  • the functions performed by the network element can be implemented by hardware or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the aforementioned functions.
  • the communication device may include: a sending unit;
  • the sending unit is used for sending a non-access stratum NAS message to the access network device and sending first indication information to the access network device; the first indication information is used for instructing the access network device to perform integrity protection on the NAS message.
  • the specific implementation of the communication device may refer to the behavior function of the mobility management network element in the security protection method provided by the first aspect or any possible design of the first aspect, which is not repeated here. Therefore, the provided communication device can achieve the same beneficial effects as the first aspect or any possible design of the first aspect.
  • a communication device including: a processor and a memory; the memory is used to store computer-executed instructions, and when the communication device is running, the processor executes the computer-executed instructions stored in the memory to The communication device is caused to execute the security protection method as described in the first aspect or any one of the possible designs of the first aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is a non-volatile readable storage medium.
  • the computer-readable storage medium stores instructions, which when run on a computer, enable the computer to execute the security protection method described in the first aspect or any one of the possible designs of the foregoing aspects.
  • a computer program product containing instructions which when running on a computer, enables the computer to execute the security protection method described in the first aspect or any one of the possible designs of the foregoing aspects.
  • a chip system in a twenty-fourth aspect, includes a processor and a communication interface, and is used to support the chip system to implement the functions involved in the above aspects.
  • the processor sends data to the access network device through the communication interface.
  • Non-access stratum NAS message and sending first indication information to the access network device; the first indication information is used to instruct the access network device to perform integrity protection on the NAS message.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data of the communication device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • the technical effect brought by any one of the design methods of the twenty-first aspect to the twenty-fourth aspect can be referred to the technical effect brought about by the above-mentioned first aspect or any possible design of the first aspect. Repeat it again.
  • a security protection method includes: an access network device receives a NAS message sent by a mobility management network element and first indication information; wherein the first indication information is used to indicate access The network device performs integrity protection on the NAS message; the access network device performs integrity protection on the NAS message according to the first instruction information to obtain the message verification code MAC, and sends the first message to the terminal; therefore, the first message includes MAC and NAS message .
  • the access network device protects the integrity of the NAS message to ensure the security of the NAS message and prevent the NAS message from being tampered with.
  • the integrity protection is performed by the mobility management network element notifying the access network equipment, there is no need to require the mobility management network element to perform security protection, and the NAS protocol may not be changed.
  • there is no need to configure a public and private key pair for the mobility management network element which simplifies the network configuration of the mobility management network element.
  • the method further includes: the access network device sends second indication information to the terminal; wherein the second indication information is used to instruct the terminal to respond to the NAS message included in the first message Perform an integrity check.
  • the access network device can instruct the terminal to perform integrity check on the NAS message included in the first message, which reduces the complexity of the terminal determining whether to perform integrity check on the NAS message included in the first message.
  • the access network device performs integrity protection on the NAS message according to the first indication information to obtain the message verification code MAC, including: The RRC layer of the network access device or the PDCP layer of the access network device performs integrity protection on the NAS message according to the first indication information to obtain the MAC.
  • the RRC layer or the PDCP layer of the access network device can perform integrity protection on the NAS message to obtain the MAC, which improves the flexibility of integrity protection on the NAS message.
  • the present application provides a communication device, which may be an access network device or a chip or a system on a chip in the access network device.
  • the communication device can implement the above-mentioned aspects or various possible designs.
  • the functions performed by the networked device may be implemented by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the aforementioned functions.
  • the communication device may include: a receiving unit, an integrity protection unit, and a sending unit;
  • the receiving unit is configured to receive the NAS message and the first indication information sent by the mobility management network element; wherein the first indication information is used to instruct the access network device to perform integrity protection on the NAS message;
  • the integrity protection unit is configured to perform integrity protection on the NAS message to obtain the MAC according to the first indication information
  • the sending unit is used to send the first message to the terminal; therefore, the first message includes MAC and NAS messages.
  • the specific implementation of the communication device may refer to the behavior and function of the access network device in the security protection method provided by the twenty-fifth aspect or any one of the possible designs of the twenty-fifth aspect, which will not be repeated here. Therefore, the provided communication device can achieve the same beneficial effects as the twenty-fifth aspect or any possible design of the twenty-fifth aspect.
  • a communication device including: a processor and a memory; the memory is used to store computer-executable instructions, and when the communication device is running, the processor executes the computer-executable instructions stored in the memory to The communication device is made to execute the security protection method as described in the above twenty-fifth aspect or any one of the possible designs of the twenty-fifth aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is a non-volatile readable storage medium.
  • the computer-readable storage medium stores instructions that, when run on a computer, enable the computer to execute the security protection method described in the twenty-fifth aspect or any one of the possible designs of the foregoing aspects.
  • a computer program product containing instructions is provided, which when it runs on a computer, enables the computer to execute the security protection described in the twenty-fifth aspect or any one of the possible designs of the foregoing aspects method.
  • a chip system in a thirtieth aspect, includes a processor and a communication interface, and is used to support the chip system to implement the functions involved in the above aspects.
  • the processor receives transmission from the mobility management network element through the communication interface. NAS message and first indication information; wherein the first indication information is used to instruct the access network device to perform integrity protection on the NAS message; and according to the first indication information, integrity protection is performed on the NAS message to obtain the MAC, which is sent to the terminal The first message; so the first message includes MAC and NAS messages.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data of the communication device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • a security protection method includes: a terminal receives a first message sent by an access network device; wherein, the first message includes MAC and NAS message; MAC generated after integrity protection; the terminal performs integrity verification on the NAS message according to the public key and MAC of the access network device.
  • the access network device performs integrity protection on the NAS message, and sends the integrity-protected NAS message to the terminal to ensure the security of the NAS message and prevent the NAS message from being tampered with.
  • the integrity protection is performed by the mobility management network element notifying the access network equipment, there is no need to require the mobility management network element to perform security protection, and the NAS protocol may not be changed.
  • there is no need to configure a public and private key pair for the mobility management network element which simplifies the network configuration of the mobility management network element.
  • the terminal checks the integrity of the NAS message according to the public key and MAC of the access network device, including: the radio access control RRC layer of the terminal or the PDCP layer of the terminal according to The MAC and the public key of the access network device perform integrity verification on the NAS message.
  • the RRC layer or PDCP layer of the terminal can perform integrity verification on the NAS message according to the MAC and the public key of the access network device, which improves the flexibility of performing integrity verification on the NAS message.
  • the method further includes: the terminal sends the capability information of the terminal to the mobility management network element; the capability information of the terminal is used to indicate the terminal Support the integrity protection of NAS messages; the terminal receives the response message sent by the mobility management network element; the response message includes the correspondence between the area information and the public key of the access network device.
  • the terminal can inform the mobility management network element of its own capabilities, so that the mobility management network element can perform integrity protection on the NAS message when it determines that the terminal has the ability to perform integrity protection on the NAS message .
  • the method further includes: the terminal according to the corresponding relationship between the area information and the public key of the access network device, and the current location of the terminal The area information of the area determines the public key of the access network device.
  • the public key of the access network device can be configured corresponding to the region information to ensure that the terminal uses the public key corresponding to the region in which it is located to perform integrity verification on the NAS verification.
  • the present application provides a communication device, which may be a terminal or a chip or a system on a chip in the terminal.
  • the communication device can implement the functions performed by the terminal in the above aspects or in each possible design.
  • the functions described above can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the aforementioned functions.
  • the communication device may include: a receiving unit and an integrity checking unit;
  • the receiving unit is configured to receive the first message sent by the access network device; wherein, the first message includes MAC and NAS message; the MAC is the MAC generated after integrity protection of the NAS message;
  • the integrity check unit is used to check the integrity of the NAS message according to the public key and MAC of the access network device.
  • the specific implementation of the communication device may refer to the behavior and function of the terminal in the security protection method provided by the thirty-first aspect or any one of the possible designs of the thirty-first aspect, which will not be repeated here. Therefore, the provided communication device can achieve the same beneficial effects as the thirty-first aspect or any possible design of the thirty-first aspect.
  • a communication device including: a processor and a memory; the memory is used to store computer execution instructions, and when the communication device is running, the processor executes the computer execution instructions stored in the memory to The communication device is caused to execute the security protection method as described in the above-mentioned thirty-first aspect or any one of the possible designs of the thirty-first aspect.
  • a computer-readable storage medium is provided, and the computer-readable storage medium is a non-volatile readable storage medium.
  • the computer-readable storage medium stores instructions, which when run on a computer, enable the computer to execute the security protection method described in the thirty-first aspect or any one of the possible designs of the foregoing aspects.
  • a computer program product containing instructions which when running on a computer, enables the computer to execute the security protection described in the thirty-first aspect or any one of the possible designs of the foregoing aspects method.
  • a chip system in a thirty-sixth aspect, includes a processor and a communication interface, and is used to support the chip system to implement the functions involved in the above aspects.
  • the processor receives data from the access network device through the communication interface.
  • the first message where, so the first message includes MAC and NAS message; the MAC is the MAC generated after integrity protection of the NAS message; and the integrity of the NAS message is performed according to the public key and MAC of the access network device check.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data of the communication device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • a security protection system may include the mobility management network element according to any one of the second aspect to the sixth aspect, and any one of the eighth aspect to the twelfth aspect
  • Figure 1 is a schematic diagram of a system framework provided by an embodiment of the application.
  • Figure 2a is a schematic diagram of a 5G network
  • Figure 2b is a schematic diagram of a 4G network
  • Figure 3a is a schematic diagram of encryption protection
  • Figure 3b is a schematic diagram of integrity protection
  • FIG. 4 is a schematic diagram of the composition of a communication device provided by an embodiment of the application.
  • FIG. 5 is a flowchart of another security protection method provided by an embodiment of the application.
  • FIG. 6 is a flowchart of another security protection method provided by an embodiment of this application.
  • FIG. 7 is a flowchart of another security protection method provided by an embodiment of this application.
  • FIG. 8 is a flowchart of yet another security protection method provided by an embodiment of this application.
  • FIG. 9 is a flowchart of yet another security protection method provided by an embodiment of this application.
  • FIG. 10 is a flowchart of yet another security protection method provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of the composition of a communication device 110 provided by an embodiment of this application.
  • FIG. 12 is a schematic diagram of the composition of a communication device 120 provided by an embodiment of this application.
  • FIG. 13 is a schematic diagram of the composition of a communication device 130 provided by an embodiment of the application.
  • FIG. 14 is a schematic diagram of the composition of a security protection system provided by an embodiment of this application.
  • FIG. 1 shows an example diagram of the architecture of a communication network provided by an embodiment of the present application, and the security protection method provided by the embodiment of the present application may be executed based on the communication network.
  • the network may include terminals, access network equipment, mobility management network elements, and may also include other network functions (such as session management network elements, user plane network elements, etc.) and data network (data network, DN).
  • the terminal can be connected to the access network device or the mobility management network element, and the access network device can be connected to the mobility management network element.
  • a terminal may be called a terminal equipment (terminal equipment) or a user equipment (UE) or a mobile station (mobile station, MS) or a mobile terminal (mobile terminal, MT), etc.
  • the terminal in Figure 1 can be a mobile phone, a tablet computer, or a computer with wireless transceiver function, it can also be a virtual reality (VR) terminal, an augmented reality (AR) terminal, an industrial Wireless terminals in control, wireless terminals in unmanned driving, wireless terminals in telemedicine, wireless terminals in smart grids, wireless terminals in smart cities, smart homes, vehicle terminals, etc.
  • VR virtual reality
  • AR augmented reality
  • the device for implementing the function of the terminal may be a terminal, or a device capable of supporting the terminal to implement the function, such as a chip system.
  • the security protection method provided by the embodiment of the present application will be described by taking an example in which the device used to implement the function of the terminal is a terminal.
  • Access network equipment is mainly used to implement functions such as physical layer functions, resource scheduling and management, terminal access control, and mobility management.
  • the access network device can be a device that supports wired access or a device that supports wireless access.
  • the access network equipment may be an access network (access network, AN)/radio access network (RAN), which consists of multiple 5G-AN/5G-RAN nodes, and 5G-AN/5G-RAN nodes can be: access point (AP), base station (nodeB, NB), enhanced base station (enhance nodeB, eNB), next-generation base station (NR nodeB, gNB), and transmission receiver point (TRP) ), transmission point (TP), or some other access node, etc.
  • access network access network
  • AN access network
  • RAN radio access network
  • AP access point
  • base station nodeB, NB
  • enhanced base station enhanced base station
  • TRP transmission receiver point
  • TP transmission point
  • TP transmission point
  • the device used to implement the function of the access network device may be the access network device, or may be a device or functional module capable of supporting the access network device to implement the function, such as a chip system.
  • the security protection method provided by the embodiment of the present application is described by taking an example in which the device for implementing the function of the access network device is the access network device.
  • the mobility management network element is mainly responsible for terminal access authentication, mobility management, and signaling interaction among various functional network elements.
  • the device used to implement the function of the mobility management network element may be a mobility management network element, or may be a device capable of supporting the mobility management network element to implement the function, such as a chip system.
  • the security protection method provided by the embodiments of the present application is described by taking an example in which the device for implementing the function of the mobility management network element is a mobility management network element.
  • Figure 1 is only an exemplary architecture diagram.
  • the network may also include other functional network elements, such as policy control network elements, unified data management, UDM), operation and management (O&M) network elements, etc., which are not limited in the embodiment of the present application.
  • the name of each device in FIG. 1 is not limited.
  • each device can also be named with other names, such as replacing the name of a network element with the same or similar functions, without limitation.
  • the communication network shown in Fig. 1 may be the fifth generation (5G) network shown in Fig. 2a, or the fourth generation (4G) shown in Fig. 2b (e.g., evolved packet System (evolved packet system, EPS) networks and other networks, such as long term evolution (LTE) networks, new radio (NR) networks, or other next-generation communication networks, are not restricted.
  • 5G fifth generation
  • 4G fourth generation
  • EPS evolved packet System
  • LTE long term evolution
  • NR new radio
  • the mobility management network element in Figure 1 is the access and mobility management function in Figure 2a.
  • AMF the session management network element in Figure 1 is the session management function (session management function, SMF) in Figure 2a
  • the user plane network element in Figure 1 is the user plane function (UPF) in Figure 2a
  • the terminal connects to the access network equipment through the air interface (such as Uu port), and connects to the AMF through the next generation network (NG) interface 1 (N1 interface for short), and the access network equipment can pass NG Interface 2 (N2 interface for short) is connected to the AMF.
  • NG next generation network
  • the mobility management network element in Figure 1 is the mobile management entity (MME) in Figure 2b
  • the session management network element of Figure 2b is the control plane serving gateway (serving gateWay-control, SGW-C)/control plane public data network gateway (public data networks gateway-control, PGW-C), and the user plane in Figure 1
  • the network element may be a user plane service gateway (serving gateWay-user, SGW-U)/user plane public data network gateway (public data networks gateway-user, PGW-U) in FIG. 2b.
  • the terminal can connect to the access network equipment through the air interface, and connect to the MME through a non-access stratum (NAS) interface, and the access network equipment can connect to the MME through the S1 interface.
  • NAS non-access stratum
  • the mobility management network element in order to ensure the security of the message (such as NAS message) sent by the mobility management network element to the terminal, the mobility management network element can send a NAS message to the access network device and instruct the access network The device performs security protection on the NAS message. After receiving the NAS message, the access network device performs security protection on the NAS message, and sends the secured NAS message to the terminal. After receiving the secured NAS message, the terminal can perform corresponding processing (such as decryption and/or integrity verification) on the secured NAS message to obtain the NAS message.
  • the implementation process may refer to the description in the embodiments corresponding to FIGS. 5 to 8 below.
  • the security protection in the embodiment of the present application may include the following three protection methods: 1) encryption protection; 2) integrity protection; 3) encryption protection and integrity protection.
  • a public and private key mechanism can be used to implement confidentiality protection and integrity protection, as shown in Fig. 3a and Fig. 3b.
  • the basic principle of encryption protection is shown in Figure 3a.
  • the process can include: the sender transfers the public key, plaintext and other parameters of the receiver (such as: count, direction), length parameter (key stream length length ), etc.) (as not shown in 3a) input into the encryption security algorithm (for example: (rivest-shamir-adleman, RSA) encryption algorithm), get the ciphertext (ciphertext) and send it out; after the receiver receives the ciphertext, Enter the private key, ciphertext, and other parameters used by the sender (such as count, direction, length, etc.) (not shown in Figure 3a) of the receiving end into the security algorithm (such as RSA security algorithm) to obtain the plaintext .
  • the encryption security algorithm for example: (rivest-shamir-adleman, RSA) encryption algorithm
  • the basic principle of integrity protection is shown in Figure 3b, and the process can include: the sender inputs the sender’s private key, plaintext, and some other parameters (count, direction, etc.) into the integrity protection security algorithm (such as RSA signature algorithm) , Get the message authentication code (MAC), and send the MAC and plaintext; after receiving the MAC and plaintext, the receiver will calculate again according to the public key of the sender, the received plaintext and other parameters used by the sender Get the MAC and compare whether the received MAC is the same as the MAC calculated by yourself. If they are the same, the integrity check succeeds and the plain text has not been tampered with; otherwise, the integrity check fails and the plain text has been tampered with.
  • the integrity protection security algorithm such as RSA signature algorithm
  • public key and private key are relative concepts.
  • Public key can refer to a key publicly known by multiple devices, and private key is a key known only by oneself.
  • the sending end and the sending end are relative concepts.
  • the sending end may be a device that sends NAS messages
  • the receiving end may be a device that receives NAS messages.
  • each device shown in FIG. 1 may adopt the composition structure shown in FIG. 4 or include the components shown in FIG. 4.
  • the communication device 400 may be a centralized controller or a chip or a system on a chip in a centralized controller, and may also be a functional entity or a chip in a functional entity or System on chip.
  • the communication device 400 includes a processor 401, a communication line 402, and a communication interface 403.
  • the communication device 400 may further include a memory 404.
  • the processor 401, the memory 404, and the communication interface 403 may be connected through a communication line 402.
  • the processor 401 may be a central processing unit (CPU), a general-purpose processor network processor (network processor, NP), a digital signal processor (digital signal processing, DSP), a microprocessor, a microcontroller , Programmable logic device (PLD) or any combination of them.
  • the processor 401 may also be any other device with processing functions, such as a circuit, a device, or a software module, without limitation.
  • the communication line 402 is used to transmit information between various components included in the communication device 400.
  • the communication interface 403 is used to communicate with other devices or other communication networks.
  • the other communication network may be Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
  • the communication interface 403 may be a module, a circuit, a transceiver or any device capable of implementing communication.
  • the memory 404 is used to store instructions. Among them, the instructions can be computer programs.
  • the memory 404 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and/or instructions, or it may be a random access memory (RAM) or Other types of dynamic storage devices that store information and/or instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory, CD- ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, etc., are not restricted.
  • EEPROM electrically erasable programmable read-only memory
  • CD- ROM compact disc read-only memory
  • optical disc storage including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
  • the memory 404 may exist independently of the processor 401, or may be integrated with the processor 401.
  • the memory 404 may be used to store instructions or program codes or some data.
  • the memory 404 may be located in the communication device 400 or outside the communication device 400, without limitation.
  • the processor 401 is configured to execute instructions stored in the memory 404 to implement the security protection method provided in the following embodiments of the present application.
  • the processor 401 may execute instructions stored in the memory 404 to implement the steps performed by the centralized controller in the following embodiments of the present application .
  • the processor 401 may execute instructions stored in the memory 404 to implement the steps performed by the functional entity in the following embodiments of the present application.
  • the processor 401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 4.
  • the communication device 400 includes multiple processors, for example, in addition to the processor 401 in FIG. 4, it may also include a processor 407.
  • the communication apparatus 400 further includes an output device 405 and an input device 406.
  • the input device 406 is a device such as a keyboard, a mouse, a microphone, or a joystick
  • the output device 405 is a device such as a display screen and a speaker.
  • the communication device 400 may be a desktop computer, a portable computer, a network server, a mobile phone, a tablet computer, a wireless terminal, an embedded device, a chip system, or a device with a similar structure in FIG. 4.
  • the composition structure shown in FIG. 4 does not constitute a limitation on the communication device.
  • the communication device may include more or less components than those shown in the figure, or combine certain components. , Or different component arrangements.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the network element in the following embodiment may have the components shown in FIG. 4.
  • FIG. 5 is a security protection method provided by an embodiment of this application. As shown in FIG. 5, the method may include:
  • Step 501 The mobility management network element sends a NAS message and first indication information to the access network device.
  • the NAS message may refer to the NAS message sent by the mobility management network element to the terminal through the access network device, and the NAS message may also be described as a downlink NAS message.
  • the mobility management network element can be the AMF in Figure 2a, and the access network device can be any access network device connected to the AMF and the terminal, or the mobility management network element can be the MME in Figure 2b.
  • the device can be any access network device connected to the MME and the terminal in Figure 2b.
  • the mobility management network element may send the NAS message and the first indication information to the access network device through the N2 interface.
  • the mobility management network element is an MME
  • the mobility management network element may send the NAS message and the first indication information to the access network device through the S1 interface.
  • the first indication information may be used to instruct the access network device to protect the integrity of the NAS message, or the first indication information may also be described as used to instruct the access network device to use the public and private key mechanism to protect the integrity of the NAS message .
  • the first indication information can be carried in the same message (such as an N2 message) with the NAS message and sent to the access network device, or can be carried in a different message and sent to the access network device, without limitation.
  • the first indication information may be binary bits or other indicators formed by combining letters or numbers. Taking the first indication information as a binary bit as an example, when the first indication information is a binary bit 1, it indicates that integrity protection of the NAS message is performed.
  • the access network device may also be instructed to perform integrity protection on the NAS message through an implicit indication method, such as:
  • the mobility management network element may include the NAS message in a certain message (such as a new N2 message) and send it to the access network device.
  • the message type of this message corresponds to instructing the access network device to protect the integrity of the NAS message.
  • the network access device can determine the integrity protection of the NAS message according to the type of the message.
  • the message type of a certain message carrying the NAS message may be used to instruct the access network device to protect the integrity of the NAS message, which is simple and easy.
  • Step 502 The access network device receives the NAS message and the first indication information sent by the mobility management network element, and performs integrity protection on the NAS message according to the first indication information to obtain a MAC.
  • the first indication information may be used as a trigger condition for the access network device to perform integrity protection on the NAS message.
  • the access network device performs integrity protection on the NAS message after receiving the first indication information.
  • the access network equipment can use the principle shown in Figure 3b to protect the integrity of the NAS message.
  • the radio resource control (redio resource control, RRC) layer or the packet data convergence protocol (packet data convergence protocol, PDCP) layer of the access network device can protect the integrity of the NAS message.
  • RRC radio resource control
  • PDCP packet data convergence protocol
  • the RRC layer of the access network device Take the RRC layer of the access network device to protect the integrity of the NAS message as an example.
  • the RRC layer of the access network device can refer to Figure 3b above.
  • the shown method protects the integrity of the NAS message.
  • the RRC layer of the access network device can obtain the MAC according to the private key of the access network device, the NAS message, and other parameters (such as count, direction, etc.). Further, the RRC layer of the access network device may also include the obtained MAC and NAS messages in the RRC message.
  • the RRC message can be a new type of RRC message (such as signaling radio bear (SRB)), and the message type of the new type of RRC message can implicitly instruct the terminal (using the public and private key mechanism) to complete the NAS message
  • the RRC message may further include second indication information, and the second indication information may be used to instruct the terminal (using a public-private key mechanism) to perform an integrity check on the NAS message.
  • the RRC layer of the access network device can process the NAS message to obtain the RRC message including the NAS message, and include the NAS message.
  • the RRC message is delivered to the PDCP layer of the access network device.
  • the PDCP layer of the access network device receives the RRC message including the NAS message, it can perform integrity protection on the NAS message with reference to the method shown in Figure 3b, such as:
  • the PDCP layer of the access network device can obtain the MAC according to the private key, NAS message, and other parameters (such as count, direction, etc.) of the access network device.
  • the PDCP layer of the access network device may also include the obtained MAC and the RRC message including the NAS message in the PDCP data packet.
  • the PDCP data packet may be a new type of PDCP data packet, and the format of the new type of PDCP data packet can implicitly instruct the terminal (using the public and private key mechanism) to protect the integrity of the NAS message, or the PDCP data packet may also include the first Two indication information, the second indication information may be used to instruct the terminal (using a public-private key mechanism) to perform integrity check on the NAS message, and the second indication information may be located in a certain reserved bit in the header of the PDCP data packet.
  • the second indication information may be binary bits or other indicators formed by combining letters or numbers. Taking the second indication information as a binary bit as an example, when the second indication information is a binary bit 1, it indicates that integrity protection of the NAS message is performed.
  • Step 503 The access network device sends a first message to the terminal.
  • the first message may include the RRC message described in step 502 above, and the first message sent by the access network device to the terminal may include:
  • the RRC layer of the device passes through the PDCP layer of the access network device, the radio link control (RLC) of the access network device, the media access control (MAC) layer of the access network device, and the access network device.
  • the physical layer (physical, PHY) of the networked device sends the first message to the terminal.
  • the first message may include the PDCP data packet described in step 502 above, and the first message sent by the access network device to the terminal may include: the access network device
  • the PDCP layer sends the first message to the terminal through the RLC of the access network device, the MAC layer of the access network device, and the PHY of the access network device in turn.
  • Step 504 The terminal receives the first message sent by the access network device, and performs an integrity check on the NAS message according to the public key of the access network device and the MAC included in the first message.
  • the terminal may determine, according to the message type of the RRC message, to perform an integrity check on the NAS message according to the public key of the access network device and the MAC included in the first message; or In the case that the RRC message includes the second indication information, according to the indication of the second indication information, it is determined to perform an integrity check on the NAS message according to the public key of the access network device and the MAC included in the first message.
  • the RRC layer of the terminal may perform an integrity check on the NAS message according to the public key of the access network device and the MAC included in the first message. For example, after the RRC layer of the terminal receives the first message 3b, the MAC is calculated according to the public key of the access network device, the NAS message included in the first message, and other parameters, and the MAC calculated by itself is compared with the MAC included in the first message. If both Same, it is determined that the NAS message included in the first message has not been tampered with, and the subsequent process is performed according to the NAS message included in the first message. Otherwise, it is determined that the NAS message included in the first message has been tampered with, and the verification fails. Provision is made for subsequent procedures, such as the NAS message can be discarded.
  • the terminal may determine, according to the type of the PDCP data packet, to perform an integrity check on the NAS message according to the public key of the access network device and the MAC included in the first message Or, in the case that the PDCP data packet includes the second indication information, according to the indication of the second indication information, it is determined that the integrity check of the NAS message is performed according to the public key of the access network device and the MAC included in the first message.
  • the PDCP layer of the terminal may perform integrity verification on the NAS message according to the public key of the access network device and the MAC included in the first message, for example, the PDCP layer of the terminal receives the first
  • the message stipulates the follow-up process, for example, the NAS message can be discarded.
  • the mobility management network element when the mobility management network element sends a NAS message to the terminal, the mobility management network element can notify the access network device to protect the integrity of the NAS message to ensure the security of the NAS message and prevent the NAS message from being tamper.
  • the integrity protection is performed by the mobility management network element notifying the access network equipment, there is no need to require the mobility management network element to perform security protection, and the NAS protocol may not be changed.
  • the private key of the access network device and the related description of the public key of the access network device are as follows:
  • the private key of the access network device is a key that only the access network device knows.
  • the private key of the access network device and the public key of the access network device appear in pairs, and the public key of the access network device is public access Network device key, such as: in the embodiment of this application, the RRC layer or PDCP layer of the access network device protects the integrity of the NAS message according to the private key of the access network device to generate MAC, the RRC layer or PDCP layer of the terminal can Perform integrity verification based on the public key of the access network device.
  • the private key of the access network device can be pre-configured on the access network device. For example, when the network is established, the private key of the access network device can be pre-configured on the access network device by the network management system.
  • the public key of the access network device can be pre-configured on the terminal, for example, written into the SIM card of the terminal; or, the mobility management network element can interact with the mobility management network element through the signaling interaction between the terminal and the mobility management network element (e.g., registration process) ), configure the public key of the access network device to the terminal without restriction.
  • the public key of the access network device is related to the area where the terminal is located, and there is a correspondence between the public key of the access network device and the area where the terminal is located, and the access network devices corresponding to different areas The public key is different.
  • the area where the terminal is located may refer to an area of any granularity such as the routing area (RA) of the terminal, the location area (LA) of the terminal, and the tracking area (TA) of the terminal.
  • the corresponding relationship between the public key of the access network device and the area where the terminal is located can be configured by the network side to the terminal.
  • the mobility management network element can be described in the second scenario of the method shown in Figure 5 below.
  • the terminal is configured with the correspondence between the public key of the access network device and the area where the terminal is located.
  • step 504 before the terminal uses the public key of the access network device to perform the integrity check on the first message, the terminal can compare the public key of the access network device with the area where the terminal is located according to the area information of the area where it is currently located. In the corresponding relationship, the public key of the access network device corresponding to the area information of the area where the terminal is currently located is selected, and the integrity check of the first message is performed using the public key of the selected access network device.
  • TA is uniquely identified by TA identification (tracking area identity, TAI) as an example.
  • TAI tracking area identity
  • Table 1 shows the correspondence between the public key of the access network device and TAI, as shown in Table 1.
  • TAI1 corresponds to PubKey1
  • TAI2 corresponds to PubKey2
  • TAI3 corresponds to PubKey3. If the current area of the terminal is the TA identified by TAI1, the terminal uses PubKey1 to verify the integrity of the NAS message.
  • the area where the terminal is located Public key of access network device TAI1 PubKey1 TAI2 PubKey2 TAI3 PubKey3
  • the mobility management network element determines whether to perform integrity protection on the NAS message. If it is determined to perform integrity protection on the NAS message, perform step 501; otherwise, The method shown in Figure 5 is not performed.
  • the mobility management network element can determine whether to perform the integrity of the NAS message through any of the following methods 1 to 4, or through a combination of the following methods 1 and any of methods 2 to 4 protection:
  • Method 1 The mobility management network element determines whether the NAS security protection between the mobility management network element and the terminal is activated. If it is not activated, it determines the integrity protection of the NAS message. On the contrary, if the mobility management network element and the terminal If the NAS security protection between the terminals is activated, it is determined that the integrity protection of the NAS message is not performed through the method shown in FIG. 5.
  • the mobility management network element determining whether the NAS security protection between the mobility management network element and the terminal is activated may include: the mobility management network element determining whether it has sent a NAS security mode command (SMC) message to the terminal, If the mobility management network element has sent a NAS SMC message to the terminal, it is determined that the NAS security protection between the mobility management network element and the terminal is activated. On the contrary, if it is determined that the NAS security protection between the mobility management network element and the terminal is not Activated.
  • SMC NAS security mode command
  • the NAS SMC message can instruct the terminal to use a symmetric key to protect the integrity of the NAS message between the terminal and the mobility management network element.
  • the NAS SMC message may include the symmetric key.
  • Method 2 The mobility management network element determines whether the terminal has been registered to the network. If the terminal is registered to the network, it determines the integrity protection of the NAS message. On the contrary, if the terminal is not registered to the network, it is determined not to pass as shown in Figure 5. The method protects the integrity of NAS messages.
  • the mobility management network element determining whether the terminal has been registered to the network may include: if the mobility management network element receives the initial registration request of the terminal, and the mobility management network element has returned a response to the initial registration request to the terminal, determining the terminal Registered to the network. Conversely, if the mobility management network element does not receive the terminal’s initial registration request, or receives the terminal’s initial registration request but does not return a response to the terminal’s initial registration request, it is determined that the terminal is not registered to the network .
  • the initial registration request can be used to request registration to the network, and the response of the initial registration request can be used to indicate that the terminal successfully registers to the network.
  • the response to the initial registration request may include keys required for integrity protection of the NAS message, such as the private key of the terminal, the public key of the access network device, and so on.
  • Manner 3 The mobility management network element determines whether a key required for integrity protection of the NAS message is stored on the terminal, such as the public key of the access network device. If it is determined that the public key of the access network device is stored on the terminal, it is determined that the integrity of the NAS message is protected; otherwise, it is determined that the integrity of the NAS message is not protected by the method shown in FIG. 5.
  • the mobility management network element can determine whether the terminal has been registered to the network. If it is determined that the terminal has been registered to the network, it is determined that the key required for integrity protection of the NAS message is stored on the terminal; otherwise, it is determined that the terminal is not stored There are keys required to protect the integrity of NAS messages.
  • the manner in which the mobility management network element determines whether the terminal has been registered to the network can be referred to in the second manner, which will not be repeated.
  • Method 4 The mobility management network element determines whether the terminal has the ability to protect the integrity of the NAS message. If it is determined that the terminal has the ability to protect the integrity of the NAS message, it determines the integrity of the NAS message. Otherwise, if it is determined If the terminal does not have the ability to perform integrity protection on the NAS message, it is determined not to perform integrity protection on the NAS message through the method shown in FIG. 5.
  • the mobility management network element determines that the NAS security protection between the mobility management network element and the terminal is not activated, thereby triggering the use of the public and private key mechanism described in the method shown in FIG. 5 to protect the NAS message. Further optionally, in order to reduce the algorithm overhead, when the NAS security protection has been activated, the public and private key mechanism shown in Figure 5 is no longer used to protect the NAS message. At this time, the terminal and the mobility management network element can be protected by the symmetric key mechanism NAS news.
  • the mobility management network element can determine whether the terminal has the ability to protect the integrity of NAS messages through the registration process of the terminal, such as:
  • the terminal sends a registration request to the mobility management network element.
  • the registration request is used to request registration to the network.
  • the registration request includes the capability information of the terminal.
  • the capability information of the terminal is used to indicate that the terminal supports the integrity of the NAS message (using the public and private key mechanism) protection;
  • the mobility management network element receives the registration request sent by the terminal, and according to the capability information of the terminal included in the registration request, determines that the terminal has the ability to protect the integrity of the NAS message.
  • Integrity protection such as:
  • the registration request can also be used to request the public key of the access network device.
  • the terminal requesting the public key of the access network device means that the terminal needs to protect the integrity of the NAS message according to the public key of the access network device.
  • the registration request It is not necessary to carry the capability information of the terminal, and the mobility management network element can determine that the terminal has the ability to protect the integrity of the NAS message according to the content of the registration request.
  • the mobility management network element can also send a response to the registration request to the terminal.
  • the response to the registration request can be used to indicate that the terminal successfully registered to the network.
  • the response to the registration request can also be used to indicate that the network side also has the ability to perform integrity protection on the NAS message.
  • the response to the registration request may include the corresponding relationship between the area information and the public key of the access network device.
  • the area information may be used to indicate a certain area.
  • the corresponding relationship can implicitly indicate that the network side is also equipped with the NAS The capability of message integrity protection.
  • the response to the registration request may also include a capability tag.
  • the capability tag may be used to indicate that the network side in the area is The capability of message integrity protection.
  • the capability tag included in the corresponding relationship can explicitly indicate that the network side in a certain area also has the ability to protect the integrity of the NAS message.
  • the terminal can negotiate with the network side whether to use the method shown in the embodiment of this application to protect the integrity of the NAS information, so as to avoid communication when either the terminal or the access network device does not support the integrity protection of the NAS information.
  • the problem of failure is the reason for failure.
  • step 504 except that the calculated MAC is different from the MAC included in the first message, if the verification fails, if any of the following conditions exists, it also means Verification failed:
  • Case 1 The terminal does not obtain the public key of the access network device.
  • the public key of the access network device when the public key of the access network device is configured to the terminal by the network side, if the correspondence between the public key of the access network device and the area where the terminal is located does not include the access network corresponding to the current area of the terminal The public key of the device, the terminal cannot obtain the public key of the access network device, and thus cannot perform integrity verification on the NAS message according to the public key of the access network device, the integrity verification fails, and the process ends.
  • Case 2 The terminal finds a MAC that is not included in the first message it receives.
  • the terminal cannot obtain the MAC determined by the access network device, and thus cannot perform the integrity check on the NAS message, and the integrity check fails. , The process ends.
  • FIG. 6 is another security protection method provided by an embodiment of the application. As shown in FIG. 6, the method includes:
  • Step 601 The terminal sends a registration request to the mobility management network element.
  • the mobility management network element can be the AMF in Figure 2a, and the terminal can be any terminal connected to the AMF in Figure 2a; or the mobility management network element can be the MME in Figure 2b, and the terminal can be the MME in Figure 2b. Any terminal connected.
  • the registration request can be as described above, for example, the registration request can be used to request registration to the network, the registration request can include the capability information of the terminal, and the capability information of the terminal can be used to indicate that the terminal has the ability to protect the integrity of the NAS message. Alternatively, the registration request is used to request the public key of the access network device.
  • the terminal when the terminal accesses the network for the first time or the registration area of the terminal changes and moves from another registration area to the area where the mobility management network element is located, the terminal may send a registration request to the mobility management network element.
  • Step 602 The mobility management network element receives the registration request, and sends a response to the registration request to the terminal.
  • the response to the registration request can be as described above, for example: the response to the registration request can not only be used to indicate that the terminal successfully registered to the network, but also can be used to instruct the network when the network side also supports integrity protection of NAS messages
  • the side supports integrity protection of NAS messages, such as:
  • the registration request may include area information, a capability tag, and a public key of the access network device.
  • the area information may be used to indicate a certain area, and the area may be RA or LA or TA.
  • the capability tag can be used to indicate that the area has the capability to securely protect NAS messages.
  • the registration request may include ⁇ TAI1, capability tag 1, PubKey1 ⁇ , ⁇ TAI2, capability tag 2, PubKey1 ⁇ , ⁇ TAI3, capability tag 3, PubKey1 ⁇ .
  • the registration request may include area information and the public key of the access network device.
  • the public key of the access network device is bound to the area information.
  • the terminal receives the public key of the access network device, it means that the area bound to the public key of the access network device supports the integrity of the NAS message protection. For example, if the terminal receives ⁇ TAI1, PubKey1 ⁇ , it means that the network side in the area of TAI1 supports the use of a public key mechanism to protect NAS messages.
  • Step 603 The mobility management network element determines to perform integrity protection on the NAS message.
  • the NAS message is any NAS message after the terminal completes network registration.
  • the mobility management network element may refer to the method described in the first scenario of the method shown in FIG. 5 to determine the integrity protection of the NAS message, which is not repeated here.
  • Step 604 The mobility management network element sends a NAS message and indication information 1 to the access network device.
  • the indication information 1 may be used to instruct the access network device to perform integrity protection on the NAS.
  • step 604 refer to the description of step 501, which will not be repeated.
  • Step 605 The access network device receives the NAS message and the indication information 1, and performs integrity protection on the NAS message according to the indication information 1 to obtain the MAC.
  • step 605 can refer to the description of step 502, for example, the access network device can perform integrity protection on the NAS message according to the private key of the access network device.
  • Step 606 The access network device sends a first message to the terminal.
  • the first message may include a NAS message and a MAC generated after integrity protection of the NAS message is performed according to the private key of the access network device.
  • the first message may also include indication information 2, which may be used to indicate to the terminal that the first message includes information generated after integrity protection of the NAS message.
  • step 606 refer to the description of step 503, which will not be repeated.
  • step 606 refers to the description of step 503, which will not be described in detail again.
  • Step 607 The terminal receives the first message, and performs integrity verification on the NAS message according to the MAC included in the first message and the public key of the access network device.
  • step 607 can refer to the description of step 504, and will not be repeated.
  • the mobility management network element can notify the access network device to perform integrity protection of the NAS message, and send the integrity protection information To the terminal to ensure that the NAS message is not tampered with.
  • FIG. 7 is a security protection method provided by an embodiment of the application, which is used to encrypt and protect NAS messages. As shown in FIG. 7, the method may include:
  • Step 701 The mobility management network element sends a NAS message and third indication information to the access network device.
  • the NAS message may refer to the NAS message sent by the mobility management network element to the terminal through the access network device, and the NAS message may also be described as a downlink NAS message.
  • the mobility management network element can be the AMF in Figure 2a, and the access network device can be any access network device connected to the AMF and the terminal, or the mobility management network element can be the MME in Figure 2b.
  • the device can be any access network device connected to the MME and the terminal in Figure 2b.
  • the mobility management network element may send the NAS message and the third indication information to the access network device through the N2 interface.
  • the mobility management network element is an MME
  • the mobility management network element may send the NAS message and the third indication information to the access network device through the S1 interface.
  • the third indication information may be used to instruct the access network device to encrypt and protect the NAS message, or the third indication information may also be described as used to instruct the access network device to encrypt and protect the NAS message using a public-private key mechanism.
  • the third indication information can be carried in the same message (such as an N2 message) with the NAS message and sent to the access network device, or can be carried in a different message and sent to the access network device, without limitation.
  • the third indication information may be binary bits or other indicators formed by combining letters or numbers. Taking the third indication information as a binary bit as an example, when the third indication information is a binary bit 1, it means that the NAS message is encrypted and protected.
  • the access network device may also be instructed to encrypt and protect the NAS message through an implicit indication method, such as:
  • the mobility management network element may include the NAS message in a certain message (such as a new N2 message) and send it to the access network device.
  • the message type of this message corresponds to instruct the access network device to encrypt and protect the NAS message.
  • the network device can determine to encrypt and protect the NAS message according to the type of the message.
  • the message type of a certain message carrying the NAS message can be used to instruct the access network device to encrypt and protect the NAS message, which is simple and easy.
  • Step 702 The access network device receives the NAS message and the third indication information sent by the mobility management network element, and performs encryption protection on the NAS message according to the third indication information to generate an encrypted NAS message.
  • the third indication information can be used as a trigger condition for the access network device to encrypt and protect the NAS message.
  • the access network device encrypts and protects the NAS message when it receives the third indication information.
  • the access network device can use the principle shown in Figure 3a to encrypt and protect the NAS message.
  • the NAS message may be encrypted and protected by the RRC layer or the PDCP layer of the access network device.
  • the RRC layer of the access network device Take the RRC layer of the access network device to encrypt and protect the NAS message as an example.
  • the RRC layer of the access network device can refer to the above figure 3a.
  • the shown method encrypts and protects the NAS message.
  • the RRC layer of the access network device can encrypt the NAS message according to the public key of the terminal and other parameters (such as count, direction, and length) to obtain the encrypted NAS message.
  • the RRC layer of the access network device may also include the encrypted NAS message in the RRC message.
  • the RRC message can be a new type of RRC message (such as SRB), and the message type of the new type of RRC message can implicitly instruct the terminal (using a public and private key mechanism) to encrypt and protect the NAS message, or the RRC message can also include Fourth indication information, the fourth indication information may be used to instruct the terminal (using a public and private key mechanism) to perform integrity verification on the NAS message.
  • RRC message can be a new type of RRC message (such as SRB)
  • the message type of the new type of RRC message can implicitly instruct the terminal (using a public and private key mechanism) to encrypt and protect the NAS message, or the RRC message can also include Fourth indication information, the fourth indication information may be used to instruct the terminal (using a public and private key mechanism) to perform integrity verification on the NAS message.
  • the RRC layer of the access network device can process the NAS message to obtain the RRC message including the NAS message, and will include the NAS message.
  • the RRC message is sent to the PDCP layer of the access network device, and the PDCP layer of the access network device can encrypt the NAS message according to the public key of the terminal and other parameters (such as count, direction, and length) to obtain the encrypted NAS message.
  • the PDCP layer of the access network device may also include the encrypted NAS message in the PDCP data packet.
  • the PDCP data packet may be a new type of PDCP data packet, and the format of the new type of PDCP data packet can implicitly instruct the terminal (using a public and private key mechanism) to encrypt and protect the NAS message, or the PDCP data packet may also include a fourth Indication information, the fourth indication information may be used to instruct the terminal (using a public-private key mechanism) to perform integrity check on the NAS message, and the fourth indication information may be located in a certain reserved bit in the packet header of the PDCP data packet.
  • the fourth indication information may be binary bits or other indicators formed by combining letters or numbers. Taking the fourth indication information as a binary bit as an example, when the fourth indication information is a binary bit 1, it means that the NAS message is encrypted and protected.
  • the description of the private key of the terminal and the method of obtaining the private key of the terminal can refer to the following.
  • Step 703 The access network device sends an encrypted NAS message to the terminal.
  • the encrypted NAS message may include the RRC message described in step 702
  • the encrypted NAS message sent by the access network device to the terminal may include :
  • the RRC layer of the access network equipment sequentially passes through the PDCP layer of the access network equipment, the radio link control (RLC) of the access network equipment, and the media access control (MAC) of the access network equipment.
  • The) layer and the physical layer (physical, PHY) of the access network device send the RRC message including the encrypted NAS message to the terminal.
  • the encrypted NAS message may include the PDCP data packet described in step 702 and the first message sent by the access network device to the terminal may include: access The PDCP layer of the network device sequentially sends the PDCP data packet including the encrypted NAS message to the terminal through the RLC of the access network device, the MAC layer of the access network device, and the PHY of the access network device.
  • Step 704 The terminal receives the encrypted NAS message sent by the access network device, and decrypts the encrypted NAS message according to the private key of the terminal.
  • the terminal may determine according to the message type of the RRC message to decrypt the encrypted NAS message according to the private key of the terminal; or, the RRC message includes the fourth indication In the case of information, according to the indication of the fourth indication information, it is determined to decrypt the encrypted NAS message according to the private key of the terminal.
  • the RRC layer of the terminal can decrypt the encrypted NAS message according to the private key of the terminal.
  • the RRC layer of the terminal receives the RRC message including the encrypted NAS message, it can refer to the figure In the method shown in 3a, the encrypted NAS message is decrypted according to the private key of the terminal and other parameters.
  • the terminal when the encrypted NAS message is included in the PDCP data packet, the terminal can determine according to the message type of the PDCP data packet to decrypt the encrypted NAS message according to the private key of the terminal; or, in the PDCP data packet In the case where the fourth instruction information is included, it is determined according to the instruction of the fourth instruction information to decrypt the encrypted NAS message according to the private key of the terminal.
  • the PDCP layer of the terminal can decrypt the encrypted NAS message according to the private key of the terminal.
  • the PDCP layer of the terminal receives the PDCP data packet including the encrypted NAS message, it can refer to The method shown in Figure 3a decrypts the encrypted NAS message according to the private key of the terminal and other parameters.
  • the public key of the terminal can refer to the public terminal key.
  • the public key of the terminal and the private key of the terminal appear in pairs.
  • the private key of the terminal is a key that only the terminal knows.
  • the ciphertext encrypted by the public key of the terminal can only be used by the terminal.
  • the private key can be unlocked. For example, after the RRC layer or PDCP layer of the access network device encrypts and protects the downlink NAS message according to the public key of the terminal to generate a ciphertext, the RRC layer or PDCP layer of the terminal can decrypt the ciphertext according to the private key of the terminal.
  • the public key of the terminal can be pre-configured on the access network equipment.
  • the public key of the terminal can be pre-configured on the access network equipment by the network management system; or the mobility management network element can pre-configure the public key of the terminal.
  • the key is sent to the access network device.
  • the mobility management network element can send an N2 message to the access network device, and the N2 message includes the public key of the terminal; or the terminal sends the public key of the terminal to the access network device,
  • the terminal can send an RRC message to the access network device, and the RRC message includes the public key of the terminal.
  • the private key of the terminal can be pre-stored on the terminal before the terminal enters the network, for example, written into the subscriber identification module (SIM) card of the terminal; or the mobility management network element can be connected to the mobility management network element through the terminal
  • SIM subscriber identification module
  • the signaling interaction such as: registration process
  • the private key of the terminal is configured to the terminal, and there is no restriction.
  • the mobility management network element when the mobility management network element sends a NAS message to the terminal, the mobility management network element can notify the access network device to encrypt the NAS message to ensure the security of the NAS message and prevent the NAS message from being Leaks.
  • the mobility management network element may refer to the method described in the first scenario of the method shown in FIG. 5 to determine whether to encrypt the NAS message ,No longer.
  • the mobility management network element can also determine whether the terminal has the ability to encrypt and protect NAS messages through the registration process of the terminal. For details, refer to Figure 5 above for this process. In the second scenario of the method, the process by which the mobility management network element determines whether the terminal has the ability to perform integrity protection on the NAS message will not be repeated.
  • step 704 when step 704 is performed, if any of the following conditions exists, the decryption fails, and the process ends: Case 1: The terminal does not obtain the private key of the terminal. Case 2: The terminal finds that the message sent by the access network device does not include the encrypted NAS message.
  • the following takes the encryption and protection of NAS messages as an example to describe the method provided in the embodiment of the present application.
  • FIG. 8 is another security protection method provided by an embodiment of this application. As shown in FIG. 8, the method includes:
  • Step 801 The terminal sends a registration request to the mobility management network element.
  • the mobility management network element can be the AMF in Figure 2a, and the terminal can be any terminal connected to the AMF in Figure 2a; or the mobility management network element can be the MME in Figure 2b, and the terminal can be the MME in Figure 2b. Any terminal connected.
  • the registration request can be used to request registration to the network
  • the registration request can include the capability information of the terminal
  • the capability information of the terminal can be used to indicate that the terminal has the ability to encrypt and protect the NAS message.
  • the terminal when the terminal accesses the network for the first time or the registration area of the terminal changes and moves from another registration area to the area where the mobility management network element is located, the terminal sends a registration request to the mobility management network element.
  • Step 802 The mobility management network element receives the registration request, and sends a response to the registration request to the terminal.
  • the response to the registration request can be used not only to indicate that the terminal has successfully registered to the network, but also can be used to instruct the network side to support encryption protection of NAS messages when the network side also supports encryption protection of NAS messages.
  • the registration request may include the private key of the terminal.
  • Step 803 The mobility management network element determines to encrypt and protect the NAS message.
  • the NAS message is any NAS message after the terminal completes network registration.
  • step 803 can be described with reference to the first scenario of the method shown in FIG. 7. No longer.
  • Step 804 The mobility management network element sends a NAS message and indication information 3 to the access network device.
  • the indication information 3 may be used to instruct the access network device to encrypt and protect the NAS.
  • step 804 refer to the description of step 701, which will not be repeated.
  • Step 805 The access network device receives the NAS message and the instruction information 3, and encrypts the NAS message according to the instruction information 3.
  • step 805 refer to step 702.
  • the access network device can encrypt and protect the NAS message according to the public key of the terminal.
  • Step 806 The access network device sends an encrypted NAS message to the terminal.
  • step 806 refer to the description of step 703, which will not be repeated.
  • Step 807 The terminal receives the encrypted NAS message, and decrypts the encrypted NAS message according to the private key of the terminal.
  • step 807 can refer to the description of step 704, and will not be repeated.
  • the mobility management network element can notify the access network device to encrypt and protect the NAS message, and send the encrypted protected information to the terminal. This ensures that NAS messages are not leaked.
  • the embodiment of the present application also provides another method for integrity protection of NAS messages.
  • FIG. 9 is another security protection method provided by an embodiment of the application to implement integrity protection of NAS messages. As shown in FIG. 9, the method may include:
  • Step 901 The mobility management network element performs integrity protection on the NAS message, and generates a first MAC.
  • the mobility management network element is the AMF in FIG. 2a, and may also be the MME in FIG. 2b.
  • the NAS message may be a message sent by the mobility management network element to the terminal before the NAS security protection between the mobility management network element and the terminal is activated.
  • the NAS message is a NAS rejection message sent by the mobility management network element to the terminal, or when the temporary identity of the terminal cannot be found, the NAS message is mobile
  • the identity request message sent by the mobility management network element to the terminal, or, when the terminal is initially authenticated, the NAS message is an authentication request message sent by the mobility management network element to the terminal.
  • the mobility management network element can refer to the method described in the first scenario of the method shown in FIG. 5 to determine whether the NAS security protection between the mobility management network element and the terminal is activated, which will not be repeated.
  • the mobility management network element may use the method shown in FIG. 3b to perform integrity protection on the NAS message to generate the first MAC.
  • the mobility management network element can perform integrity protection on the NAS message to generate the first MAC according to the private key and other parameters of the mobility management network element.
  • the process refer to the process of the access network device performing integrity protection on the NAS message in step 502, which is not repeated here.
  • Other parameters can be described as freshness parameters for generating the first MAC.
  • Other parameters can include but are not limited to count value, direction, length, and can also include a first random value, or a first random value and a second random data value. And so on, without restriction.
  • the mobility management network element may receive the initial NAS message sent by the terminal, the initial NAS message may include the first random value, and the mobility management network element may refer to Figure 3b In this way, the first MAC is generated according to the first random value and the NAS message.
  • the mobility management network element can perform integrity protection on the NAS message to generate the first MAC according to the private key of the mobility management network element, the first random value, and the count value, direction, and length.
  • the mobility management network element may receive the initial NAS message sent by the terminal, and the initial NAS message may include the first random value.
  • the mobility management network The element may also randomly generate a second random value, and with reference to the method shown in FIG. 3b, generate the first MAC according to the first random value, the second random value and the NAS message.
  • the mobility management network element can perform integrity protection on the NAS message to generate the first MAC according to the private key of the mobility management network element, the first random value, the second random value, and the count value, direction, and length.
  • the first random value may be generated by the terminal, and the second random value may be generated by the mobility management network element.
  • a random value can be introduced when generating the first MAC to ensure that the MAC generated after the integrity protection of two adjacent NAS messages is different, which can prevent an attacker from replaying a NAS message with the same MAC and avoid Replay attack.
  • Step 902 The mobility management network element sends the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message to the terminal.
  • the second MAC is the MAC obtained by signing the public key of the mobility management network element according to the public key of the mobility management network element and other parameters by the public key authorized network element.
  • the manner in which the mobility management network element obtains the second MAC may refer to the description in the first scenario of the method shown in FIG. 9 below.
  • the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message may be included in one message, such as included in a second message, the second message may be called an integrity-protected NAS message, Or, it can also be described as information elements carried in the NAS message, etc., without limitation.
  • the mobility management network element may also provide a protection instruction to the terminal, and the protection instruction may be used to indicate that the terminal uses a public key mechanism for integrity protection of the NAS message.
  • the protection indication may be a newly added indication in the message header of the first message, and may be named integrity protected with private key.
  • the mobility management network element also needs to send the valid time of the second MAC to the terminal.
  • the mobility management network element may also send the first random value to the terminal;
  • the mobility management network element may also send the first random value and the second random value to the terminal.
  • Step 903 The terminal receives the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message, and authorizes the public key of the network element according to the first MAC, the second MAC, the public key of the mobility management network element, and the public key.
  • the key performs integrity verification on the NAS message.
  • the public key of the public key authorized network element is pre-configured by the operator on the SIM card of the terminal. After the SIM card is inserted into the terminal, the terminal can configure the public key of the public key authorized network element on the SIM card to the terminal.
  • the terminal authorizing the public key of the network element according to the public key and performing integrity verification on the NAS message may include the following two processes (a) and (b):
  • the terminal will not perform the action required by the NAS message. For example, if the NAS message is used to request the terminal to fall back from the 5G network to the 4G network, the terminal does not perform the action of falling back from the 5G network to the 4G network. Further optionally, the terminal releases the connection with the current access network device and reselects the cell.
  • the terminal can verify the second MAC with reference to the method shown in Figure 3b.
  • the terminal can authorize the received public key to the public key of the network element, the mobility management network
  • the element’s public key and other parameters are input to the integrity protection security algorithm, the MAC is calculated, and the calculated MAC is compared with the received second MAC. If the two are the same, the second MAC verification is successful. Different, the second MAC verification fails.
  • the terminal performs integrity verification on the received NAS message according to the public key of the mobility management network element and the first MAC.
  • the terminal can input the received public key and other parameters of the mobility management network element into the integrity protection security algorithm, calculate the MAC, and compare the calculated MAC with the received first MAC, if the two are the same , The first MAC check succeeds, indicating that the NAS message has not been tampered with, and the action required by the NAS message can be performed. If the two are different, the first MAC verification fails, the process ends, and the above failure process is executed.
  • the above process (a) can be replaced by the terminal authorizing according to the public key
  • the public key of the network element, the public key of the mobility management network element, and the valid time of the second MAC are verified against the second MAC.
  • the terminal verifies the second MAC according to the public key authorized by the public key of the network element, the public key of the mobility management network element, and the valid time of the second MAC, and the terminal determines whether the current moment is within the valid time of the second MAC (Or describe whether the second MAC is within the valid time), if not, such as: the second MAC expires, the verification fails and the execution fails, otherwise, the terminal authorizes the public key and mobility management of the network element according to the public key The public key of the network element and the valid time of the second MAC are verified against the second MAC.
  • the process of verifying the second MAC by the terminal according to the public key of the public key authorized network element, the public key of the mobility management network element, and the validity time of the second MAC can refer to the method shown in FIG. 3b, which will not be repeated.
  • the private key of the public key authorized network element and the related description of the public key of the public key authorized network element are as follows:
  • the private key of the public key authorized network element is a key that only the public key authorized network element knows.
  • the private key of the public key authorized network element and the public key of the public key authorized network element appear in pairs.
  • the public key authorizes the public key of the network element.
  • the public key authorization network element can sign the public key of the mobility management network element according to the private key of the public key authorization network element to generate a second MAC, and the terminal can The second MAC is verified according to the public key of the public key authorized network element.
  • the public key of the public key authorization network element can be pre-configured on the terminal, for example, written into the SIM card of the terminal; or, the public key authorization network element uses the signaling interaction between the terminal and the mobility management network element to transfer the public key
  • the public key of the authorized network element is configured to the terminal.
  • the private key of the mobility management network element and the public key of the mobility management network element may be a pair of public and private keys generated by the mobility management network element according to the asymmetric key generation algorithm.
  • the related descriptions of the private key of the element and the public key of the mobility management network element are as follows:
  • the private key of the mobility management network element is a key that only the mobility management network element knows.
  • the private key of the mobility management network element and the public key of the mobility management network element appear in pairs, and the public key of the mobility management network element
  • the mobility management network element can perform integrity protection on the NAS according to the mobility management network element’s private key to generate the first MAC, and the terminal can generate the first MAC according to the mobility management network element.
  • the public key of the yuan verifies the first MAC, and then verifies the integrity of the NAS message.
  • the mobility management network element obtains the second MAC generated by the public key authorized network element to sign the public key generated by itself, and then the second MAC and the first generated by the integrity check of the NAS message
  • the MAC and the public key of the mobility management network element are sent to the terminal.
  • the terminal is configured with a public key of the public key authorized network element.
  • the terminal performs the second MAC on the second MAC according to the public key of the public key authorized network element and the public key of the mobility management network element. If the second MAC verification succeeds, the terminal knows that the received mobility management network element is authentic, and can safely check the first MAC according to the received public key of the mobility management network element. In order to verify the integrity of the NAS message.
  • the terminal only needs the mobility management network element to configure the public key of a public key authorization network element for it, instead of configuring the public keys of multiple mobility management network elements, which can greatly reduce the mobility management network configured on the terminal.
  • the complexity of the public key of the meta avoids tampering of NAS messages.
  • the second MAC may be the MAC generated by the public key authorized network element after signing the public key of the mobility management network element according to the private key of the public key authorized network element, such as: public key authorized network element
  • the MAC is generated after the key authorization network element signs the public key of the mobility management network element according to the private key of the public key authorization network element, the valid time of the second MAC and other parameters; for example, the public key authorization network element can refer to Figure 3b
  • the private key of the public key authorization network element, the public key of the mobility management network element, the effective time of the second MAC or other parameters are input into the integrity protection security algorithm to obtain the second MAC.
  • Other parameters can include count value, direction, length, etc.
  • the second MAC may be stored in the mobility management network element, and may be stored in correspondence with the home network information of the terminal, or may be stored in correspondence with the home network information of the terminal and the public key of the mobility management network element.
  • the home network information of the terminal may be any one or a combination of public land mobile network identifier (PLMN ID), routing identity (Routing Identity), and public key identity (Public Key Identity).
  • the public key authorization network element may be called public key authorization (PKA), and the public key authorization network element has the function of signing the public key of the core network network element (such as the mobility management network element).
  • PKA public key authorization
  • the public key authorization function can be integrated in a unified data manager (UDM), which is a functional module in UDM that can implement actions performed by public key authorization network elements.
  • UDM unified data manager
  • the mobility management network element may obtain the second MAC in the following manner:
  • the mobility management network element may receive the initial NAS message sent by the terminal, and the initial NAS message may include the identification of the terminal; the mobility management network element may be based on the identification of the terminal. Determine the home network information of the terminal; the mobility management network element checks whether it has stored the determined home network information, or the second MAC corresponding to the determined home network information, if the second MAC corresponding to the home network information is stored, then Obtain the second MAC directly, and perform step 901.
  • the mobility management network element may obtain the second MAC from the public key authorized network element. Specifically, the The process includes:
  • the mobility management network element generates the public key of the mobility management network element and the private key of the mobility management network element;
  • the mobility management network element sends the private key of the mobility management network element to the public key authorized network element;
  • the public key authorized network element receives the private key of the mobility management network element, uses its private key to sign the public key of the mobility management network element to generate a second MAC, and sends the second MAC to the mobility management network element;
  • the mobility management network element receives the second MAC sent by the public key authorized network element.
  • the mobility management network element can generate a pair of public and private keys according to the public and private key generation method.
  • the public and private key generation method can be an RSA key generation algorithm.
  • the generation method can refer to the prior art, and this solution is not limited. .
  • the public key authorization network element can also use its own private key and the validity time of the second MAC to verify the mobility management network element
  • the public key is signed to generate the second MAC.
  • the response of the request message may also include the valid time of the second MAC. The valid time may be pre-configured by the public key authorized network element.
  • the mobility management network element sending the private key of the mobility management network element to the public key authorization network element may include: the mobility management network element finds the public key authorization network element according to the identification information of the terminal, and sends it to the public key authorization network element.
  • the element sends a request message, where the mobility management network element can find the public key authorized network element according to the Home PLMN ID in the identification of the terminal.
  • the public-private key pair generated by the mobility management network element uses the home network information as the granularity, and the mobility management network element can use the same public and private key to protect messages when facing terminals under the same home network information.
  • the mobility management network element even if the mobility management network element finds that it stores the second MAC corresponding to the home network information, but if the discovery process is relatively long, such as exceeding the set threshold, the mobility management network element still The method described in the first scenario of the method shown in FIG. 9 needs to be adopted to obtain the second MAC through interaction with the public key authorization network element.
  • the mobility management network element may receive the initial NAS message sent by the terminal, and the initial NAS message may include the terminal's identity
  • the mobility management network element determines the terminal’s home network information according to the terminal’s identity; the mobility management network element checks whether it has stored the second MAC corresponding to the determined home network information and the public key of the mobility management network element, if stored If there is a second MAC corresponding to the home network information, or if the second MAC corresponding to the home network information and the public key of the mobility management network element are stored, the second MAC is directly acquired, and step 901 is performed.
  • the mobility management network element finds that it does not store the second MAC corresponding to the home network information, but stores the public key of the mobility management network element corresponding to the PLMN ID, the mobility management network element can obtain the home network information
  • the public key of the corresponding mobility management network element obtains the second MAC through interaction with the public key authorized network element.
  • the process can refer to the description in the above example, and will not be repeated.
  • the mobility management network element finds that it stores the second MAC corresponding to the home network information, or the second MAC and the public key of the mobility management network element, if the discovery process is relatively long For example, if the set threshold is exceeded, the mobility management network element still needs to use the method described in the first scenario of the method shown in FIG. 9 below to obtain the second MAC through interaction with the public key authorization network element.
  • the terminal identifier may include the terminal's (subscription concealed identifier, SUCI) user concealed identifier, and the 5G global unique temporary identity (GUTI).
  • the identification of the terminal may include the home network information of the terminal.
  • the second MAC may correspond to the valid time.
  • the mobility management network element also stores the valid time corresponding to the second MAC.
  • the mobility management network element obtains the second MAC, but the remaining time of the valid time of the second MAC is less than the preset duration, the mobility management network element adopts the method described in the first scenario of the method shown in FIG. 9 below, The second MAC is obtained through interaction with the public key authorized network element. Conversely, if the mobility management network element obtains the second MAC, and the valid time of the second MAC is greater than or equal to the preset duration, the mobility management network element directly obtains the second MAC, and step 902 is executed.
  • the valid time of the second MAC may refer to the time point when the second MAC expires, or may be a valid time period.
  • the effective time and preset duration can be set according to needs, and are not limited. Taking the effective time of the second MAC as an example, if the remaining time of the effective time of the second MAC is less than the preset time, it means that the second MAC on the mobility management network element is about to expire and is unavailable and needs to be updated in time . If the remaining time of the valid time of the second MAC is greater than or equal to the preset duration, it means that the second MAC on the mobility management network element is available within the valid period.
  • the valid time of the second MAC is 10 minutes, and the preset time length is 2 minutes. If at time T2, the first The remaining time of the effective time of the second MAC is 1 minute, which is less than 2 minutes, which means that the second MAC is not available, and the mobility management network element needs to reacquire the second MAC from the public key authorized network element.
  • step 901 is executed. Specifically, the process may include:
  • the terminal sends an initial NAS message to the mobility management network element, where the initial NAS message may include capability information of the terminal, and the capability information of the terminal may be used to indicate that the terminal has the ability to perform integrity protection on the NAS message;
  • the mobility management network element receives the initial NAS message, and determines, according to the capability information of the terminal included in the initial NAS message, that the terminal has the ability to protect the integrity of the NAS message.
  • the initial NAS message may be the first NAS message sent by the terminal from the idle state to the connected state, and the initial NAS message may be a registration request message, a service request message, a de-registration request message, etc.
  • the capability information of the terminal can be implemented in the following two ways:
  • An implementation mode, display mode the capability information of the terminal is a bit used to indicate that the terminal has the ability to protect the integrity of the NAS message.
  • the initial NAS message carries this bit, it means that the terminal is capable of protecting the integrity of the NAS message.
  • the initial NAS message does not carry this bit, it means that the terminal does not have the ability to protect the integrity of the NAS message.
  • binary bit 1 is used to represent that the terminal has the ability to perform integrity protection on NAS messages
  • binary bit 0 is used to represent that the terminal does not have the ability to perform integrity protection on NAS messages.
  • the capability information of the terminal may be the first random value described in step 901, which is randomly generated by the terminal, and is used for the mobility management network element to generate the first MAC.
  • the first random value needs to be sent to the mobility management network element so that the mobility management network element can generate the first MAC based on the first random value. For example, if the terminal sends the first random value to the mobility management network element.
  • a random value can indicate that the mobility management network element terminal has the ability to protect the integrity of the NAS message. On the contrary, if it is not sent, it indicates that the mobility management network element terminal does not have the ability to protect the integrity of the NAS message.
  • the terminal can indicate to the mobility management network element whether it has the ability to protect the integrity of the downlink NAS message according to whether it has been pre-configured with the public key to authorize the public key of the network element. For example, the terminal can determine whether it is pre-configured with the public key. The public key of the key authorization network element. If the public key of the public key authorization network element is configured, the initial NAS message including the capability information of the terminal is sent to the mobility management network element. Otherwise, the initial NAS message including the capability information of the terminal is not sent. NAS news.
  • the terminal can indicate to the mobility management network element whether it has the ability to protect the integrity of the downlink NAS message according to the instructions of the SIM card.
  • the public key of the public key authorization network element is pre-configured to the SIM card of the terminal by the operator
  • the SIM card can indicate that the terminal has the ability to protect the integrity of downlink NAS messages.
  • the initial NAS message may also include the terminal's identity.
  • the terminal's identity can be SUCI or 5G-GUTI, both of which include the home PLMN ID, so that the mobility management network element includes the home PLMN according to the terminal’s identity. ID found the public key authorized network element.
  • the terminal needs to determine whether to perform the integrity check on the NAS message. If it is determined to perform the integrity check on the NAS message, perform step 903, otherwise, perform the check. Failed to verify the integrity of the NAS message, and the failed procedure was executed. Specifically, the terminal can use the following two methods to determine whether to perform an integrity check on the NAS message:
  • Method 1 The terminal determines whether to perform integrity verification on the NAS message according to whether the NAS message carries key information elements. If the NAS message carries key information elements, for example, it includes an instruction to instruct the terminal to return to the 4G network from the 5G network, and the terminal has the ability to perform integrity protection on the NAS message, the terminal determines to perform integrity verification on the NAS message. At this time, if one or more of the second MAC, the first MAC, and the public key of the mobility management network element are not included, the terminal considers that the integrity check of the NAS message is not performed, and the integrity of the NAS message is checked If it fails, execute the failed process. Similarly, if the mobility management network element prepares to carry key information elements in the NAS message, the mobility management network element performs integrity protection on the NAS message; otherwise, it does not perform integrity protection on the NAS message.
  • Manner 2 The terminal determines whether to perform integrity verification on the NAS message according to the protection instruction. For example, if the protection instruction is included and the terminal has the ability to perform integrity protection on the NAS message, the terminal determines to perform integrity verification on the NAS message. At this time, if one or more of the second MAC, the first MAC, and the public key of the mobility management network element are not included, the terminal considers that the integrity check of the NAS message is not performed, and the integrity of the NAS message is checked If it fails, execute the failed process.
  • the terminal has the ability to protect the integrity of the NAS message, but the NAS message does not have integrity protection, it is also considered that the integrity check of the NAS message is not performed, and the integrity check of the NAS message fails, and the execution fails Process.
  • some cells in the NAS message may not necessarily have an attack effect on the terminal after being tampered with or forged. Only specific cells (as in the above method 1) The key cell) is tampered with or forged may cause an attack on the terminal.
  • the fallback instruction is used to instruct the terminal to fall back from the 5G network to the 4G network. If the fallback instruction will cause the attacker to forge the post-information, the terminal will fall back to the 4G network according to the fallback instruction after successfully verifying the NAS message. This will cause a degradation attack on the terminal.
  • the 5G network falls back to the 4G network with lower security. Therefore, the terminal can use the above method to determine whether to verify the integrity of the NAS message according to whether there is a specific cell (or key cell) in the NAS message. , Can reduce the number of checks and improve communication efficiency.
  • FIG. 10 is another security protection method provided by an embodiment of this application. As shown in FIG. 10, the method includes:
  • Step 1001 The terminal sends an initial NAS message to the mobility management network element.
  • the initial NAS message may include the capability information of the terminal, and the capability information of the terminal may be used to indicate that the terminal has the ability to protect the integrity of the NAS message.
  • Step 1002 The mobility management network element receives the initial NAS message, and according to the capability information of the terminal included in the initial NAS message, determines that the terminal has the ability to perform integrity protection on the NAS message.
  • Step 1003 The mobility management network element generates a public key of the mobility management network element and a private key of the mobility management network element.
  • Step 1004 The mobility management network element sends a request message to the public key authorization network element.
  • the request message is used to request the public key authorization network element to sign the private key of the mobility management network element.
  • the request message includes the mobility management network element. Private key.
  • Step 1005 The public key authorized network element receives the public key of the mobility management network element, and uses its private key to sign the public key of the mobility management network element to generate a second MAC.
  • Step 1006 The public key authorization network element sends a response to the request message to the mobility management network element, where the response to the request message includes the second MAC.
  • Step 1007 The mobility management network element receives a response to the request message, and performs integrity protection on the NAS message to generate a first MAC.
  • step 1007 can be referred to as described in step 901, and will not be repeated.
  • Step 1008 The mobility management network element sends the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message to the terminal.
  • step 1008 can refer to the description of step 902, and will not be repeated.
  • Step 1009 The terminal receives the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message, and authorizes the public key of the network element, the first MAC, the second MAC, and the public key of the mobility management network element according to the public key. Key to verify the integrity of the NAS message.
  • step 1009 can refer to the description of step 903, and will not be repeated.
  • the mobility management network element obtains the second MAC from the public key authorized network element, and performs the second MAC on the NAS message.
  • the first MAC generated by the integrity check and the public key of the mobility management network element are sent to the terminal.
  • the terminal is configured with a public key authorized by the public key of the network element, and the terminal authorizes the public key of the network element and the mobility management network element according to the public key.
  • the second MAC is verified by the public key of the second MAC, and if the second MAC verification is successful, the first MAC is verified according to the received public key of the mobility management network element, thereby verifying the integrity of the NAS message check.
  • the complexity of the public key of the mobility management network element configured on the terminal is greatly reduced, and at the same time, the NAS message is prevented from being tampered with.
  • the foregoing mainly introduces the solution provided by the embodiment of the present application from the perspective of interaction between various network elements.
  • the above-mentioned terminal, access network equipment, mobility management network element, and public key authorization network element include hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiments of the present application can divide functional modules into terminals, access network equipment, mobility management network elements, and public key authorization network elements according to the foregoing method examples.
  • each functional module can be divided corresponding to each function, or two Or two or more functions are integrated in one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 11 shows a structural diagram of a communication device 110.
  • the communication device 110 may be a mobility management network element or a chip or a system on a chip in a mobility management network element.
  • the communication device 110 may be used to implement the above-mentioned embodiments.
  • the communication device 110 shown in FIG. 11 includes: a generating unit 1101 and a sending unit 1102;
  • the generating unit 1101 performs integrity protection on the NAS message to generate the first MAC; for example, the generating unit 1101 is configured to support the communication device 110 to perform steps 901 and 1007.
  • the sending unit 1102 is configured to send the first MAC, the second MAC, the public key of the mobility management network element, and the NAS message to the terminal, where the second MAC is a public key that authorizes the network element to perform processing according to the public key of the mobility management network element.
  • MAC generated after signing For example, the sending unit 1102 is configured to support the communication device 110 to perform step 902 and step 1008.
  • the communication device 110 provided by the embodiment of the present application is used to perform the functions of the mobility management network element in the security protection methods shown in FIG. 9 and FIG. 10, and therefore, can achieve the same effect as the foregoing security protection method.
  • the communication device 110 shown in FIG. 11 may include: a processing module and a communication module.
  • the processing module integrates the function of the generating unit 1101; the communication module integrates the function of the sending unit 1102.
  • the processing module is used to control and manage the actions of the communication device 110.
  • the processing module is used to support the communication device 110 to perform step 901, step 1007, and other processes for performing the technology described herein.
  • the communication module is used to support the communication device 110 to perform step 902 and step 1008 and to communicate with other network entities, such as communication with the functional module or network entities shown in FIG. 1.
  • the communication device 110 may further include a storage module for storing program codes and data of the communication device 110.
  • the processing module may be a processor or a controller. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the communication module can be a transceiver circuit or a communication interface.
  • the storage module may be a memory. When the processing module is a processor, the communication module is a communication interface, and the storage module is a memory, the communication device 110 shown in FIG. 11 may be the communication device 400 shown in FIG. 4.
  • FIG. 12 shows a structural diagram of a communication device 120.
  • the communication device 120 may be a terminal or a chip or a system on a chip in the terminal.
  • the communication device 120 may be used to perform the functions of the terminal involved in the foregoing embodiments.
  • the communication device 120 shown in FIG. 12 includes: a receiving unit 1201 and an integrity checking unit 1202.
  • the receiving unit 1201 is configured to receive the first MAC, the second MAC, the public key of the mobility management network element, and the non-access stratum NAS message sent by the mobility management network element; the first MAC is after integrity protection of the NAS message The generated MAC, and the second MAC is the MAC generated after the public key authorization network element signs the public key of the mobility management network element according to the private key of the public key authorization network element.
  • the receiving unit 1201 is used to support the communication device 120 to perform the receiving actions in step 903 and step 1009.
  • the integrity check unit 1202 is configured to perform integrity check on the NAS message according to the public key of the public key authorized network element, the public key of the mobility management network element, the second MAC and the first MAC.
  • the integrity check unit 1202 is used to support the communication device 120 to perform the actions of performing integrity check on the NAS message in steps 903 and 1009.
  • the communication device 120 provided in the embodiment of the present application is used to perform the functions of the communication device 120 in the above-mentioned security protection method, and therefore can achieve the same effect as the above-mentioned security protection method.
  • the communication device 120 shown in FIG. 12 may include: a processing module and a communication module.
  • the processing module integrates the function of the integrity check unit 1202; the communication module integrates the function of the receiving unit 1201.
  • the processing module is used to control and manage the actions of the communication device 120.
  • the processing module is used to support the communication device 120 to perform the actions of performing the integrity check of the NAS message in step 903 and step 1009, and to perform the technology described herein.
  • the communication module is used to support the communication device 120 to perform the actions of receiving the public key of the mobility management network element, the second MAC, the first MAC, and the NAS message in step 903 and step 1009, and to communicate with other network entities, such as shown in FIG. Out the communication between functional modules or network entities.
  • the communication device 120 may further include a storage module for storing program codes and data of the communication device 120.
  • the processing module may be a processor or a controller. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the communication module can be a transceiver circuit or a communication interface.
  • the storage module may be a memory. When the processing module is a processor, the communication module is a communication interface, and the storage module is a memory, the communication device 120 shown in FIG. 12 may be the communication device 400 shown in FIG. 4.
  • FIG. 13 shows a structural diagram of a communication device 130.
  • the communication device 130 may be a public key authorized network element or a chip or a system on a chip in a public key authorized network element.
  • the communication device 130 may be used to implement the above-mentioned embodiments.
  • the public key involved in the authorization network element function.
  • the communication device 130 shown in FIG. 13 includes: a receiving unit 1301, a signing unit 1302, and a sending unit 1303;
  • the receiving unit 1301 is configured to receive the public key of the mobility management network element sent by the mobility management network element.
  • the receiving unit 1301 is used to support the communication device 130 to perform step 1005.
  • the signature unit 1302 is configured to sign the public key of the mobility management network element according to the private key of the public key to authorize the network element to obtain the second MAC; for example, the signature unit 1302 is configured to support the communication device 130 to perform step 1005.
  • the sending unit 1303 is configured to send the second MAC to the mobility management network element.
  • the sending unit 1303 is used to support the communication device 130 to perform step 1006.
  • the communication device 130 provided by the embodiment of the present application is used to perform the function of the communication device 130 in the above-mentioned security protection method, and therefore can achieve the same effect as the above-mentioned security protection method.
  • the communication device 130 shown in FIG. 13 may include: a processing module and a communication module.
  • the processing module integrates the functions of the signature unit 1302; the communication module integrates the functions of the receiving unit 1301 and the sending unit 1303.
  • the processing module is used to control and manage the actions of the communication device 130.
  • the processing module is used to support the communication device 130 to perform step 1005 and perform other processes of the technology described herein.
  • the communication module is used to support the communication device 130 to perform step 1005 and step 1006 and to communicate with other network entities, such as communication with the functional module or network entity shown in FIG. 1.
  • the communication device 130 may further include a storage module for storing program codes and data of the communication device 130.
  • the processing module may be a processor or a controller. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the communication module can be a transceiver circuit or a communication interface.
  • the storage module may be a memory. When the processing module is a processor, the communication module is a communication interface, and the storage module is a memory, the communication device 130 shown in FIG. 13 may be the communication device 400 shown in FIG. 4.
  • FIG. 14 shows a schematic diagram of the composition of a security protection system.
  • the security protection system may include a mobility management network element 141 and a terminal 142. Further, a public key authorization network element 143 may also be included. It should be noted that FIG. 14 is only an exemplary drawing, and the embodiment of the present application does not limit the network elements included in the system shown in FIG. 14 and the number of network elements.
  • the mobility management network element 141 has the function of the communication device 110 shown in FIG. 11, and can be used to protect the integrity of the NAS message to generate a first MAC, and send the first MAC, the second MAC, and the terminal 142 to the terminal 142.
  • the terminal 140 has the function of the communication device 120 shown in FIG. 12, and can be used to receive the first MAC, the second MAC, the public key of the mobility management network element 141, and the non-access stratum NAS message sent by the mobility management network element 141 According to the public key of the public key authorization network element 143, the public key of the mobility management network element 141, the second MAC and the first MAC, the integrity check of the NAS message is performed.
  • the mobility management network element 141 may be used to send the public key of the mobility management network element 141 to the public key authorization network element, and receive the second MAC sent by the public key authorization network element 143.
  • the public key authorization network element 143 has the function of the communication device 130 shown in FIG. 13, and can be used to receive the public key of the mobility management network element 141 sent by the mobility management network element 141, and authorize the private key of the network element 143 according to the public key Sign the public key of the mobility management network element 141 to obtain the second MAC, and send the second MAC to the mobility management network element.
  • the mobility management network element 141 determines that the terminal 142 has integrity protection for NAS information
  • the mobility management network element 141 obtains the second MAC from the public key authorization network element 143
  • the second MAC, the first MAC generated by the integrity check of the NAS message, and the public key of the mobility management network element are sent to the terminal 142.
  • the terminal 142 configures a public key to authorize the public key of the network element, and the terminal 142 according to the public key
  • the public key of the key authorization network element 143 and the public key of the mobility management network element 141 verify the second MAC, and if the second MAC verification succeeds, according to the received public key of the mobility management network element 141
  • the key verifies the first MAC, thereby verifying the integrity of the NAS message.
  • the complexity of the public key of the mobility management network element 141 configured on the terminal 142 is greatly reduced, and at the same time, the NAS message is prevented from being tampered with.
  • the computer may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • a software program it may be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or may include one or more data storage devices such as servers and data centers that can be integrated with the medium.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

Landscapes

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

Abstract

本申请实施例提供一种安全保护方法及装置,以提高NAS消息传输的安全性。所述方法包括:移动性管理网元对NAS消息进行完整性保护生成第一MAC,向终端发送生成的第一MAC、NAS消息,以及还向终端发送根据移动性管理网元的公钥进行签名后生成的第二MAC、移动性管理网元的公钥;终端接收移动性管理网元发送的第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,终端根据公钥授权网元的公钥、移动性管理网元的公钥校验第二MAC,在第二MAC校验成功后,根据接收到的移动性管理的公钥以及第一MAC对NAS消息进行完整性校验。

Description

一种安全保护方法及装置
本申请要求于2019年4月26日提交国家知识产权局、申请号为201910346581.7、申请名称为“一种安全保护方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种安全保护方法及装置。
背景技术
移动通信网络中,在网络侧与终端之间的非接入层(non-access stratum,NAS)安全保护未被激活之前,攻击者可以诱导终端驻留到伪基站上,通过伪基站对网络侧向终端发送的NAS消息进行攻击,并发送篡改的NAS消息给终端,导致终端根据篡改后的NAS消息执行相应的动作。例如,原本网络侧发送给终端的NAS消息为通知终端停留在第五代(5th generation,5G)网络,而经过攻击者篡改,可以将NAS消息篡改为:通知终端从5G网络退回到第四(4th generation,4G)网络。5G网络相对于4G网络做了安全提升,如永久身份加密、初始消息保护等,从5G网络退回到4G网络会对终端造成降级攻击,将降低终端的安全性使终端进入到安全等级相对较低的低制式网络。
为了避免伪基站对NAS消息的篡改,现有技术提出了如下方法:网络侧使用网络侧的私钥对NAS消息进行完整性保护,并将完整性保护的NAS消息发送给终端,终端接收到完整性保护的NAS消息后,可以使用网络侧的公钥对NAS消息进行完整性校验,得到NAS消息。但是,这种方法需要改动现有NAS协议,将NAS协议更改为采用公私钥机制对NAS消息进行完整性保护,同时,需要终端上配置多个网络侧的公钥,公钥管理相对复杂。
发明内容
本申请实施例提供一种安全保护方法及装置,以提高NAS消息传输的安全性。
为达到上述目的,本申请实施例提供如下技术方案:
第一方面,本申请实施例提供一种安全保护方法,包括:移动性管理网元对NAS消息进行完整性保护,以生成第一MAC,并向终端发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,其中,第二MAC为公钥授权网元根据移动性管理网元的公钥进行签名后生成的MAC。
基于第一方面,移动性管理网元可以将公钥授权网元为自己生成的公钥进行签名生成的第二MAC、对NAS消息进行完整性校验生成的第一MAC、移动性管理网元的公钥以及NAS消息发送给终端,终端根据公钥授权网元的公钥以及移动性管理网元的公钥对第二MAC进行校验,并在第二MAC校验成功的情况下,终端获知接收到的移动性管理网元是真实的,可以放心地根据接收到的移动性管理网元的公钥对第一MAC进行校验,从而对NAS消息进行完整性校验。这样,终端仅需要移动性管理网元为其配置一个公钥授权网元的公钥,而不需要配置多个移动性管理网元的公钥,可以大大减少了终端上配置的移动性管理网元的公钥的复杂度,同时,避免NAS消息被篡改。
一种可能的设计中,结合第一方面,所述方法还包括:移动性管理网元从终端接收初始NAS消息,响应于初始NAS消息,向公钥授权网元发送移动性管理网元的公钥,移动性管理网元接收公钥授权网元发送的第二MAC。
基于该可能的设计,移动性管理网元可以从公钥授权网元获取第二MAC。
一种可能的设计中,结合第一方面的任一可能的设计,初始NAS消息包括终端的归属网络信息,移动性管理网元响应于初始NAS消息,向公钥授权网元发送移动性管理网元的公钥包括:
当移动性管理网元根据终端的归属网络信息,确定移动性管理网元中未存储归属网络信息或者未存储归属网络信息对应的第二MAC时,移动性管理网元向公钥授权网元发送移动性管理网元的公钥。
基于该可能的设计,可以依据终端的归属网络信息判断是否向公钥授权网元发送移动性管理网元的公钥,保证终端与移动性管理网元在同一归属网络,简单易行。
又一种可能的设计中,结合第一方面或第一方面的任一可能的设计,移动性管理网元响应于初始NAS消息,向公钥授权网元发送移动性管理网元的公钥,包括:
移动性管理网元根据终端的归属网络信息,向公钥授权网元发送移动性管理网元的公钥。
基于该可能的设计,可以向与终端处于同于同一归属网络的公钥授权网元发送,以保证发送的准确性。
又一种可能的设计中,结合第一方面或者第一方面的任一可能的设计,第二MAC为公钥授权网元根据移动性管理网元的公钥以及第二MAC的有效时间进行签名后生成的MAC;所述方法还包括:移动性管理网元接收公钥授权网元发送的第二MAC的有效时间,第二MAC的有效时间为第二MAC的可用时长。
基于该可能的设计,对移动性管理网元的公钥进行签名时,还加入了第二MAC的有效时间,如此,设置第二MAC的有效时间,使第二MAC在有效时间内是可用的,避免长期采用同一第二MAC时,第二MAC被窃取或者失效导致完整性保护失败的问题。
又一种可能的设计中,结合第一方面或者第一方面的任一可能的设计,初始NAS消息还包括第一随机数值,移动性管理网元对非接入层NAS消息进行完整性保护,生成第一MAC,包括:移动性管理网元根据移动性管理网元的私钥以及第一随机数值,以生成第一MAC。
基于该可能的设计,可以在生成第一MAC时引入第一随机数值,对相邻两次NAS消息进行完整性保护后所生成的MAC是不同的,这样可以防止攻击者重放一条具有相同MAC的NAS消息,避免重放攻击。
又一种可能的设计中,结合第一方面或者第一方面的任一可能的设计,初始NAS消息还包括第一随机数值,移动性管理网元对非接入层NAS消息进行完整性保护,以生成第一MAC,包括:移动性管理网元生成第二随机数值;移动性管理网元根据第一随机数值、第二随机数值以及移动性管理网元的私钥生成第一MAC。
基于该可能的设计,可以在生成第一MAC时引入第一随机数值、第二随机数值,对相邻两次NAS消息进行完整性保护后所生成的MAC是不同的,这样可以防止攻击者重放一条具有相同MAC的NAS消息,避免重放攻击。
又一种可能的设计中,结合第一方面或者第一方面的任一可能的设计,所述方法还包括:移动性管理网元向终端发送还包括第一随机数值,或者,第一随机数值和第二随机数值。
基于该可能的设计,可以由移动性管理网元将其生成第一MAC用到的随机数值发送给终端,保证终端顺利完成对NAS消息的完整性校验。
又一种可能的设计中,结合第一方面或者第一方面的任一可能的设计,所述方法还包括:移动性管理网元接收终端的能力信息,终端的能力信息用于指示终端具备对NAS消息进行完整性保护的能力;移动性管理网元根据终端的能力信息,确定终端具备对NAS消息进行完整性保护的能力。
基于该可能的设计,由终端将自身的能力告知给移动性管理网元,以便移动性管理网元在确定终端具有对NAS消息进行完整性保护的能力的情况下,对NAS消息进行完整性保护。
又一种可能的设计中,结合第一方面或者第一方面的任一可能的设计,移动性管理网元对非接入层NAS消息进行完整性保护,以生成第一MAC,包括:当移动性管理网元确定移动性管理网元与终端间的NAS安全保护未被激活时,移动性管理网元对NAS消息进行完整性保护,以生成第一MAC。
基于该可能的设计,可以在移动性管理网元与终端间的NAS安全保护未被激活时,对NAS消息进行完整性保护,保证NAS安全保护未激活前发出的NAS消息的安全性。
第二方面,本申请提供一种通信装置,该通信装置可以为移动性管理网元或者移动性管理网元中的芯片或者片上系统,该通信装置可以实现上述各方面或者各可能的设计中移动性管理网元所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个上述功能相应的模块。如:该通信装置可以包括:生成单元,发送单元;
生成单元,对NAS消息进行完整性保护,以生成第一MAC;
发送单元,用于向终端发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,其中,第二MAC为公钥授权网元根据移动性管理网元的公钥进行签名后生成的MAC。
其中,该通信装置的具体实现方式可以参考第一方面或第一方面的任一种可能的设计提供的安全保护方法中移动性管理网元的行为功能,在此不再重复赘述。因此,该提供的通信装置可以达到与第一方面或者第一方面的任一种可能的设计相同的有益效果。
第三方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第一方面或者第一方面的任一种可能的设计所述的安全保护方法。
第四方面,提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性可读存储介质。该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面或者上述方面的任一种可能的设计所述的安全保护方法。
第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面或者上述方面的任一种可能的设计所述的安全保护方法。
第六方面,提供了一种芯片系统,该芯片系统包括处理器、通信接口,用于支持该芯片系统实现上述方面中所涉及的功能,例如处理器对NAS消息进行完整性保护以生成第 一MAC,并通过通信接口向终端发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,其中,第二MAC为公钥授权网元根据移动性管理网元的公钥进行签名后生成的MAC。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存通信装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第三方面至第六方面中任一种设计方式所带来的技术效果可参见上述第一方面或者第一方面的任一种可能的设计所带来的技术效果,不再赘述。
第七方面,又提供一种安全保护方法,所述方法还包括:终端接收移动性管理网元发送的第一MAC、第二MAC、移动性管理网元的公钥以及非接入层NAS消息;第一MAC是对NAS消息进行完整性保护后生成的MAC,第二MAC是公钥授权网元根据公钥授权网元的私钥对移动性管理网元的公钥进行签名后生成的MAC;
终端根据公钥授权网元的公钥、移动性管理网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。
基于该可能的设计,终端可以接收移动性管理网元发送的公钥授权网元为移动性管理网元生成的公钥进行签名生成的第二MAC、对NAS消息进行完整性校验生成的第一MAC、移动性管理网元的公钥以及NAS消息,根据公钥授权网元的公钥、移动性管理网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。这样,终端仅需要移动性管理网元为其配置一个公钥授权网元的公钥,而不需要配置多个移动性管理网元的公钥,可以大大减少了终端上配置的移动性管理网元的公钥的复杂度,同时,避免NAS消息被篡改。
一种可能的设计中,结合七方面,终端根据公钥授权网元的公钥、移动性管理网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验,包括:终端根据公钥授权网元的公钥、移动性管理网元的公钥对第二MAC进行校验;当第二MAC校验成功时,根据移动性管理网元的公钥以及第一MAC对NAS消息进行完整性校验。
基于该可能的设计,终端根据公钥授权网元的公钥以及移动性管理网元的公钥对第二MAC进行校验,并在第二MAC校验成功的情况下,终端获知接收到的移动性管理网元是真实的,可以放心地根据接收到的移动性管理网元的公钥对第一MAC进行校验,从而对NAS消息进行完整性校验。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,移动性管理网元还向终端发送第一MAC的有效时间和/第二MAC的有效时间。
基于该可能的设计,可以设置第一MAC的有效时间和/第二MAC的有效时间,并将第一MAC的有效时间和/第二MAC的有效时间发送给终端,以便终端在第一MAC的有效时间和/第二MAC的有效时间内对NAS消息进行完整性校验,以防止因长期采用同一MAC时,攻击者重放一条具有相同MAC的NAS消息,避免重放攻击。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,终端根据公钥授权网元的公钥以及第一MAC对NAS消息进行完整性校验,包括:
当第二MAC位于第二MAC的有效时间内和/或者第一MAC位于第一MAC的有效时间内时,终端根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。
基于该可能的设计,终端可以在第一MAC的有效时间和/第二MAC的有效时间内对NAS消息进行完整性校验,保证了对NAS消息进行完整性校验的准确性。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,终端根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验,包括:
在NAS消息包括关键信元的情况下,终端根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。
基于该可能的设计中,在NAS消息中包括易受攻击或者被篡改的重要信元(如:关键信元)时,才根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验,避免终端对一些不重要的消息(如:不易受攻击或者篡改的消息)进行完整性校验,降低了终端校验的复杂度。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,所述方法还包括:终端接收移动性管理网元发送的保护指示;其中,保护指示用于指示终端对NAS消息进行完整性校验,终端根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验,包括:终端按照保护指示的指示,根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。
基于该可能的设计中,终端在移动性管理网元的指示下根据公钥授权网元的公钥、第二MAC以及第一MAC对NAS消息进行完整性校验,降低了终端判断是否对NAS消息进行完整性校验的复杂度,简单易行。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,终端根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验,包括:终端根据公钥授权网元的公钥、第二MAC、第一MAC和第一随机数值,对NAS消息进行完整性校验。
基于该可能的设计,可以在对NAS消息进行完整性校验时引入第一随机数值,这样可以防止攻击者重放一条具有相同MAC的NAS消息,避免重放攻击。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,终端根据公钥授权网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验,包括:终端根据公钥授权网元的公钥、第二MAC、第一MAC、第一随机数值和第二随机数值,对NAS消息进行完整性校验。
基于该可能的设计,可以在对NAS消息进行完整性校验时引入第一随机数值和第二随机数值,这样可以防止攻击者重放一条具有相同MAC的NAS消息,避免重放攻击。
又一种可能的设计中,结合第七方面或第七方面的任一可能的设计,所述方法还包括:终端向移动性管理网元发送终端的能力信息,终端的能力信息用于指示终端具备对NAS消息进行完整性保护的能力。
基于该可能的设计,终端可以将自身的能力告知给移动性管理网元,以便移动性管理网元在确定终端具有对NAS消息进行完整性保护的能力的情况下,对NAS消息进行完整性保护。
第八方面,本申请提供一种通信装置,该通信装置可以为终端或者终端中的芯片或者片上系统,该通信装置可以实现上述各方面或者各可能的设计中终端所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个 或多个上述功能相应的模块。如:该通信装置可以包括:接收单元,完整性校验单元;
接收单元,用于接收移动性管理网元发送的第一MAC、第二MAC、移动性管理网元的公钥以及非接入层NAS消息;第一MAC是对NAS消息进行完整性保护后生成的MAC,第二MAC是公钥授权网元根据公钥授权网元的私钥对移动性管理网元的公钥进行签名后生成的MAC;
完整性校验单元,用于根据公钥授权网元的公钥、移动性管理网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。
其中,该通信装置的具体实现方式可以参考第七方面或第七方面的任一种可能的设计提供的安全保护方法中终端的行为功能,在此不再重复赘述。因此,该提供的通信装置可以达到与第七方面或者第七方面的任一种可能的设计相同的有益效果。
第九方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第七方面或者第七方面的任一种可能的设计所述的安全保护方法。
第十方面,提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性可读存储介质。该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第七方面或者上述方面的任一种可能的设计所述的安全保护方法。
第十一方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第七方面或者上述方面的任一种可能的设计所述的安全保护方法。
第十二方面,提供了一种芯片系统,该芯片系统包括处理器、通信接口,用于支持该芯片系统实现上述方面中所涉及的功能,例如处理器通过通信接口接收接收移动性管理网元发送的第一MAC、第二MAC、移动性管理网元的公钥以及非接入层NAS消息;第一MAC是对NAS消息进行完整性保护后生成的MAC,第二MAC是公钥授权网元根据公钥授权网元的私钥对移动性管理网元的公钥进行签名后生成的MAC,根据公钥授权网元的公钥、移动性管理网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存通信装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第九方面至第十二方面中任一种设计方式所带来的技术效果可参见上述第七方面或者第七方面的任一种可能的设计所带来的技术效果,不再赘述。
第十三方面,又提供一种安全保护方法,所述方法还包括:公钥授权网元接收移动性管理网元发送的移动性管理网元的公钥;公钥授权网元根据公钥授权网元的私钥对移动性管理网元的公钥进行签名,得到第二MAC;公钥授权网元向移动性管理网元发送第二MAC。
基于第十三方面所述的方法,可以由公钥授权网元对移动性管理网元的公钥进行签名,并将签名后的第二MAC发送给移动性管理网元,如此,通过公钥授权网元对移动性管理网元的公钥进行签名,并将移动性管理网元的公钥配置给终端,减少终端上配置的移动性管理网元的公钥个数,降低了终端管理移动性管理网元的公钥的复杂度。
一种可能的设计中,结合第十三方面,公钥授权网元根据公钥授权网元的私钥对移动性管理网元的公钥进行签名,得到第二MAC,包括:公钥授权网元根据公钥授权网元的私钥、第二MAC的有效时间对移动性管理网元的公钥进行签名,得到第二MAC。
基于该可能的设计,可以对移动性管理网元的公钥进行签名的中,引入第二MAC的 有效时间,使第二MAC在有效时间内是可用的,避免长期采用同一第二MAC时,第二MAC被窃取或者失效导致完整性保护失败的问题。
一种可能的设计中,结合第十三方面或第十三方面的可能的设计,所述方法还包括:公钥授权网元向移动性管理网元发送第二MAC的有效时间。
基于该可能的设计,可以对移动性管理网元的公钥进行签名的中,引入第二MAC的有效时间的情况下,将第二MAC的有效时间发送给移动性管理网元,以便通过移动性管理网元将第二MAC的有效时间发送给终端,以保证终端根据第二MAC的有效时间顺利检验第二MAC。
第十四方面,本申请提供一种通信装置,该通信装置可以为公钥授权网元或者公钥授权网元中的芯片或者片上系统,该通信装置可以实现上述各方面或者各可能的设计中公钥授权网元所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个上述功能相应的模块。如:该通信装置可以包括:接收单元、签名单元、发送单元;
接收单元,用于接收移动性管理网元发送的移动性管理网元的公钥;
签名单元,用于根据公钥授权网元的私钥对移动性管理网元的公钥进行签名,得到第二MAC;
发送单元,用于向移动性管理网元发送第二MAC。
其中,该通信装置的具体实现方式可以参考第十三方面或第十三方面的任一种可能的设计提供的安全保护方法中公钥授权网元的行为功能,在此不再重复赘述。因此,该提供的通信装置可以达到与第十三方面或者第十三方面的任一种可能的设计相同的有益效果。
第十五方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第十三方面或者第十三方面的任一种可能的设计所述的安全保护方法。
第十六方面,提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性可读存储介质。该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第十三方面或者上述方面的任一种可能的设计所述的安全保护方法。
第十七方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第十三方面或者上述方面的任一种可能的设计所述的安全保护方法。
第十八方面,提供了一种芯片系统,该芯片系统包括处理器、通信接口,用于支持该芯片系统实现上述方面中所涉及的功能,例如处理器通过通信接口接收移动性管理网元发送的移动性管理网元的公钥,并根据公钥授权网元的私钥对移动性管理网元的公钥进行签名,以得到第二MAC,通过通信接口向移动性管理网元发送第二MAC。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存通信装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第十五方面至第十八方面中任一种设计方式所带来的技术效果可参见上述第十三方面或者第十三方面的任一种可能的设计所带来的技术效果,不再赘述。
第十九方面,又提供一种安全保护方法,所述方法包括:移动性管理网元向接入网设备发送非接入层NAS消息;移动性管理网元向接入网设备发送第一指示信息;第一指示 信息用于指示接入网设备对NAS消息进行完整性保护。
基于第十九方面所述的方法,在移动性管理网元向终端发送NAS消息时,移动性管理网元可以通知接入网设备对NAS消息进行完整性保护,保证NAS消息的安全性,避免NAS消息被篡改。同时,由于完整性保护是由移动性管理网元通知接入网设备执行的,无需要求移动性管理网元执行安全保护,可以不改动NAS协议。并且,也无需为移动性管理网元配置公私钥对,简化了移动性管理网元的网络配置。
一种可能的设计中,结合第十九方面,在移动性管理网元向接入网设备发送NAS消息之前,所述方法还包括:移动性管理网元根据第一条件和/或者第二条件,确定对NAS消息进行完整性保护;第一条件包括:移动性管理网元与终端间的NAS安全保护未激活;第二条件包括:终端已注册到网络;或者,终端上存储有接入网设备的公钥;其中,接入网设备的公钥用于对根据接入网设备的私钥生成消息验证码MAC进行完整性校验;或者,终端具备对NAS消息进行完整性保护的能力。
基于该可能的设计,可以在符合第一条件和/或者第二条件,确定对NAS消息进行完整性保护,可以保证NAS安全保护未激活前的NAS消息被保护。
一种可能的设计中,结合第十九方面或第十九方面的任一可能的设计,当第二条件包括终端具备对NAS消息进行完整性保护的能力时,所述方法还包括:移动性管理网元接收终端的能力信息,根据能力信息确定终端具备对NAS消息进行完整性保护的能力;终端的能力信息用于指示终端支持对NAS消息进行完整性保护的能力。
基于该可能的设计,终端将自身的能力告知给移动性管理网元,以便移动性管理网元在确定终端具有对NAS消息进行完整性保护的能力的情况下,对NAS消息进行完整性保护。
第二十方面,本申请提供一种通信装置,该通信装置可以为移动性管理网元或者移动性管理网元中的芯片或者片上系统,该通信装置可以实现上述各方面或者各可能的设计中移动性管理网元所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个上述功能相应的模块。如:该通信装置可以包括:发送单元;
发送单元,用于向接入网设备发送非接入层NAS消息,以及向接入网设备发送第一指示信息;第一指示信息用于指示接入网设备对NAS消息进行完整性保护。
其中,该通信装置的具体实现方式可以参考第一方面或第一方面的任一种可能的设计提供的安全保护方法中移动性管理网元的行为功能,在此不再重复赘述。因此,该提供的通信装置可以达到与第一方面或者第一方面的任一种可能的设计相同的有益效果。
第二十一方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第一方面或者第一方面的任一种可能的设计所述的安全保护方法。
第二十二方面,提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性可读存储介质。该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面或者上述方面的任一种可能的设计所述的安全保护方法。
第二十三方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使 得计算机可以执行上述第一方面或者上述方面的任一种可能的设计所述的安全保护方法。
第二十四方面,提供了一种芯片系统,该芯片系统包括处理器、通信接口,用于支持该芯片系统实现上述方面中所涉及的功能,例如处理器通过通信接口向接入网设备发送非接入层NAS消息,以及向接入网设备发送第一指示信息;第一指示信息用于指示接入网设备对NAS消息进行完整性保护。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存通信装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第二十一方面至第二十四方面中任一种设计方式所带来的技术效果可参见上述第一方面或者第一方面的任一种可能的设计所带来的技术效果,不再赘述。
第二十五方面,又提供一种安全保护方法,所述方法包括:接入网设备接收移动性管理网元发送的NAS消息以及第一指示信息;其中,第一指示信息用于指示接入网设备对NAS消息进行完整性保护;接入网设备根据第一指示信息,对NAS消息进行完整性保护得到消息验证码MAC,并向终端发送第一消息;所以第一消息包括MAC以及NAS消息。
基于第二十五方面所述的方法,由接入网设备对NAS消息进行完整性保护,保证NAS消息的安全性,避免NAS消息被篡改。同时,由于完整性保护是由移动性管理网元通知接入网设备执行的,无需要求移动性管理网元执行安全保护,可以不改动NAS协议。并且,也无需为移动性管理网元配置公私钥对,简化了移动性管理网元的网络配置。
一种可能的设计中,结合第二十五方面,所述方法还包括:接入网设备向终端发送第二指示信息;其中,第二指示信息用于指示终端对第一消息包括的NAS消息进行完整性校验。
基于该可能的设计,可以由接入网设备指示终端对第一消息包括的NAS消息进行完整性校验,减低了终端判断是否对第一消息包括的NAS消息进行完整性校验的复杂度。
一种可能的设计中,结合第二十五方面或第二十五方面的可能的设计,接入网设备根据第一指示信息,对NAS消息进行完整性保护得到消息验证码MAC,包括:接入网设备的RRC层或者接入网设备的PDCP层根据第一指示信息,对NAS消息进行完整性保护得到MAC。
基于该可能的设计,可以由接入网设备的RRC层或者PDCP层对NAS消息进行完整性保护得到MAC,提高了对NAS消息进行完整性保护的灵活性。
第二十六方面,本申请提供一种通信装置,该通信装置可以为接入网设备或者接入网设备中的芯片或者片上系统,该通信装置可以实现上述各方面或者各可能的设计中接入网设备所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个上述功能相应的模块。如:该通信装置可以包括:接收单元,完整性保护单元、发送单元;
接收单元,用于接收移动性管理网元发送的NAS消息以及第一指示信息;其中,第一指示信息用于指示接入网设备对NAS消息进行完整性保护;
完整性保护单元,用于根据第一指示信息,对NAS消息进行完整性保护得到MAC;
发送单元,用于向终端发送第一消息;所以第一消息包括MAC以及NAS消息。
其中,该通信装置的具体实现方式可以参考第二十五方面或第二十五方面的任一种可能的设计提供的安全保护方法中接入网设备的行为功能,在此不再重复赘述。因此,该提 供的通信装置可以达到与第二十五方面或者第二十五方面的任一种可能的设计相同的有益效果。
第二十七方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第二十五方面或者第二十五方面的任一种可能的设计所述的安全保护方法。
第二十八方面,提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性可读存储介质。该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第二十五方面或者上述方面的任一种可能的设计所述的安全保护方法。
第二十九方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第二十五方面或者上述方面的任一种可能的设计所述的安全保护方法。
第三十方面,提供了一种芯片系统,该芯片系统包括处理器、通信接口,用于支持该芯片系统实现上述方面中所涉及的功能,例如处理器通过通信接口接收移动性管理网元发送的NAS消息以及第一指示信息;其中,第一指示信息用于指示接入网设备对NAS消息进行完整性保护;并根据第一指示信息,对NAS消息进行完整性保护得到MAC,向终端发送第一消息;所以第一消息包括MAC以及NAS消息。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存通信装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第二十七方面至第三十方面中任一种设计方式所带来的技术效果可参见上述第二十五方面或者第二十五方面的任一种可能的设计所带来的技术效果,不再赘述。
第三十一方面,又提供一种安全保护方法,所述方法包括:终端接收接入网设备发送的第一消息;其中,所以第一消息包括MAC以及NAS消息;该MAC是对NAS消息进行完整性保护后生成的MAC;终端根据接入网设备的公钥以及MAC,对NAS消息进行完整性校验。
基于第三十方面所述的方法,由接入网设备对NAS消息进行完整性保护,并将完整性保护后的NAS消息发送给终端,保证NAS消息的安全性,避免NAS消息被篡改。同时,由于完整性保护是由移动性管理网元通知接入网设备执行的,无需要求移动性管理网元执行安全保护,可以不改动NAS协议。并且,也无需为移动性管理网元配置公私钥对,简化了移动性管理网元的网络配置。
一种可能的设计中,结合三十一方面,终端根据接入网设备的公钥以及MAC,对NAS消息进行完整性校验,包括:终端的无线接入控制RRC层或终端的PDCP层根据MAC以及接入网设备的公钥,对NAS消息进行完整性校验。
基于该可能的设计,可以由终端的RRC层或者PDCP层根据MAC以及接入网设备的公钥,对NAS消息进行完整性校验,提高了对NAS消息进行完整性校验的灵活性。
一种可能的设计中,结合三十一方面或第三十一方面的可能的设计,所述方法还包括:终端向移动性管理网元发送终端的能力信息;终端的能力信息用于指示终端支持对NAS消息进行完整性保护;终端接收移动性管理网元发送的响应消息;响应消息包括区域信息与接入网设备的公钥的对应关系。
基于该可能的设计,终端可以将自身的能力告知给移动性管理网元,以便移动性管理网元在确定终端具有对NAS消息进行完整性保护的能力的情况下,对NAS消息进行完整性保护。
一种可能的设计中,结合三十一方面或第三十一方面的可能的设计,所述方法还包括:终端根据区域信息与接入网设备的公钥的对应关系,以及终端当前所处区域的区域信息,确定接入网设备的公钥。
基于该可能的设计,可以将接入网设备的公钥与区域信息对应配置,以保证终端采用自身所处区域对应的公钥对NAS校验进行完整性校验。
第三十二方面,本申请提供一种通信装置,该通信装置可以为终端或者终端中的芯片或者片上系统,该通信装置可以实现上述各方面或者各可能的设计中终端所执行的功能,所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个上述功能相应的模块。如:该通信装置可以包括:接收单元,完整性校验单元;
接收单元,用于接收接入网设备发送的第一消息;其中,所以第一消息包括MAC以及NAS消息;该MAC是对NAS消息进行完整性保护后生成的MAC;
完整性校验单元,用于根据接入网设备的公钥以及MAC,对NAS消息进行完整性校验。
其中,该通信装置的具体实现方式可以参考第三十一方面或第三十一方面的任一种可能的设计提供的安全保护方法中终端的行为功能,在此不再重复赘述。因此,该提供的通信装置可以达到与第三十一方面或者第三十一方面的任一种可能的设计相同的有益效果。
第三十三方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该通信装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该通信装置执行如上述第三十一方面或者第三十一方面的任一种可能的设计所述的安全保护方法。
第三十四方面,提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性可读存储介质。该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第三十一方面或者上述方面的任一种可能的设计所述的安全保护方法。
第三十五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第三十一方面或者上述方面的任一种可能的设计所述的安全保护方法。
第三十六方面,提供了一种芯片系统,该芯片系统包括处理器、通信接口,用于支持该芯片系统实现上述方面中所涉及的功能,例如处理器通过通信接口接收接入网设备发送的第一消息;其中,所以第一消息包括MAC以及NAS消息;该MAC是对NAS消息进行完整性保护后生成的MAC;并根据接入网设备的公钥以及MAC,对NAS消息进行完整性校验。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存通信装置必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第三十三方面至第三十六方面中任一种设计方式所带来的技术效果可参见上述第三十一方面或者第三十一方面的任一种可能的设计所带来的技术效果,不再赘述。
第三十七方面,还提供一种安全保护系统,该安全保护系统可以包括如第二方面至第 六方面任一方面所述的移动性管理网元、第八方面至第十二方面任一方面所述的终端以及第十四方面至第十八方面任一项所述的公钥授权网元;或者,
包括如第二十方面至第二十四方面任一方面所述的移动性管理网元、如第二十六方面至第三十方面任一方面所述的接入网设备以及如第三十二方面至三十六方面任一方面的终端。
附图说明
图1为本申请实施例提供的系统框架示意图;
图2a为5G网络示意图;
图2b为4G网络示意图;
图3a为加密保护的示意图;
图3b为完整性保护的示意图;
图4为本申请实施例提供的一种通信装置的组成示意图;
图5为本申请实施例提供的又一种安全保护方法流程图;
图6为本申请实施例提供的又一种安全保护方法流程图;
图7为本申请实施例提供的又一种安全保护方法流程图;
图8为本申请实施例提供的再一种安全保护方法流程图;
图9为本申请实施例提供的再一种安全保护方法流程图;
图10为本申请实施例提供的再一种安全保护方法流程图;
图11为本申请实施例提供的一种通信装置110的组成示意图;
图12为本申请实施例提供的一种通信装置120的组成示意图;
图13为本申请实施例提供的一种通信装置130的组成示意图;
图14为本申请实施例提供的一种安全保护系统的组成示意图。
具体实施方式
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
图1示出了本申请实施例提供的一种通信网络的架构示例图,本申请实施例提供的安全保护方法可以基于该通信网络执行。如图1所示,该网络可以包括终端、接入网设备、移动性管理网元,还可以包括其他网络功能(如:会话管理网元、用户面网元等)以及数据网络(data network,DN)。其中,终端可以与接入网设备连接,也可以与移动性管理网元连接,接入网设备可以与移动性管理网元连接。
终端,可以称为终端设备(terminal equipment)或者用户设备(user equipment,UE)或者移动台(mobile station,MS)或者移动终端(mobile terminal,MT)等。具体的,图1中的终端可以是手机(mobile phone)、平板电脑或带无线收发功能的电脑,还可以是虚拟现实(virtual reality,VR)终端、增强现实(augmented reality,AR)终端、工业控制中的无线终端、无人驾驶中的无线终端、远程医疗中的无线终端、智能电网中的无线终端、智慧城市(smart city)中的无线终端、智能家居、车载终端等等。本申请实施例中,用于实现终端的功能的装置可以是终端,也可以是能够支持终端实现该功能的装置,例如芯片系统。下面以用于实现终端的功能的装置是终端为例,描述本申请实施例提供的安全保护方法。
接入网设备,主要用于实现物理层功能、资源调度和管理、终端的接入控制以及移动 性管理等功能。接入网设备可以为支持有线接入的设备,也可以为支持无线接入的设备。示例性,接入网设备可以为接入网(access network,AN)/无线接入网(radio access network,RAN),由多个5G-AN/5G-RAN节点组成,5G-AN/5G-RAN节点可以为:接入节点(access point,AP)、基站(nodeB,NB)、增强型基站(enhance nodeB,eNB)、下一代基站(NR nodeB,gNB)、收发点(transmission receive point,TRP)、传输点(transmission point,TP)或某种其它接入节点等。本申请实施例中,用于实现接入网设备的功能的装置可以是接入网设备,也可以是能够支持接入网设备实现该功能的装置或者功能模块,例如芯片系统。下面以用于实现接入网设备的功能的装置是接入网设备为例,描述本申请实施例提供的安全保护方法。
移动性管理网元,主要负责终端的接入认证、移动性管理、各个功能网元间的信令交互等工作。本申请实施例中,用于实现移动性管理网元的功能的装置可以是移动性管理网元,也可以是能够支持移动性管理网元实现该功能的装置,例如芯片系统。下面以用于实现移动性管理网元的功能的装置是移动性管理网元为例,描述本申请实施例提供的安全保护方法。
需要说明的是,图1仅为示例性架构图,除图1中所示功能单元之外,该网络还可以包括其他功能网元,如:策略控制网元、统一数据管理(unified data management,UDM))、操作和管理(operation and management,O&M)网元等,本申请实施例对此不进行限定。此外,图1中各个设备的名称不受限制,除图1所示名称之外,各个设备还可以命名为其他名称,例如替换成具备相同或相似功能的网元名称,不予限制。
具体的,图1所示通信网络可以为图2a所示的第五代(5th generation,5G)网络,还可以为图2b所示的第四代(4th generation,4G)(如:演进型分组系统(evolved packet system,EPS)网络以及其他网络,如:长期演进(long term envolution,LTE)网络、新无线(new radio,NR)网络或者其他下一代的通信网络等,不予限制。
当图1所示网络为图2a所示的5G网络时,如图2a所示,图1中的移动性管理网元为图2a中的接入和移动性管理功能(access and mobility management function,AMF),图1中的会话管理网元为图2a中的会话管理功能(session management function,SMF),图1中的用户面网元为图2a中的用户面功能(user plane function,UPF)。在5G网络中,终端通过空口(如Uu口)与接入网设备连接,以及,通过下一代网络(next generation,NG)接口1(简称N1接口)与AMF连接,接入网设备可以通过NG接口2(简称N2接口)与AMF连接。
当图1所示网络为图2b所示的4G网络时,如图2b所示,图1中的移动性管理网元为图2b中的移动管理实体(mobile management entity,MME),图1中的会话管理网元为图2b中的控制面服务网关(serving gateWay-control,SGW-C)/控制面公用数据网网关(public data networks gateway-control,PGW-C),图1中的用户面网元可以为图2b中的用户面服务网关(serving gateWay-user,SGW-U)/用户面公用数据网网关(public data networks gateway-user,PGW-U)。在4G网络中,终端可以通过空口与接入网设备连接,以及,通过非接入层(non-access stratum,NAS)接口与MME连接,接入网设备可以S1接口与MME连接。
在图1所示网络中,为了保证移动性管理网元向终端发送的消息(如:NAS消息)的 安全性,移动性管理网元可以向接入网设备发送NAS消息,并指示接入网设备对NAS消息进行安全保护,接入网设备接收到NAS消息后,对NAS消息进行安全保护,并将安全保护后的NAS消息发送给终端。终端接收到安全保护后的NAS消息后,可以对安全保护后的NAS消息的进行相应处理(如:解密和/或完整性验证)得到NAS消息。具体的,该实现过程可参照下述图5~图8对应的实施例中所述。
其中,本申请实施例中的安全保护可以包括下述三种保护方式:1)加密保护;2)完整性保护;3)加密保护和完整性保护。本申请实施例中,可以采用公私钥机制实现机密保护和完整性保护,具体如图3a所示和图3b所示。
加密保护的基本原理如图3a所示,其过程可以包括:发送端将接收端的公钥、明文以及其他一些参数(如:计数(count)、方向(direction)、长度参数(密钥流长度length)等)(如3a中未示出)输入至加密安全算法(如:(rivest-shamir-adleman,RSA)加密算法)中,得到密文(ciphertext)发送出去;接收端接收到密文后,将接收端的私钥、密文以及发送端用到的其他一些参数(如:count、direction、length等)(图3a中未示出)输入至安全算法(如:RSA安全算法)中,得到明文。
完整性保护的基本原理如图3b所示,其过程可以包括:发送端将发送端的私钥、明文以及其他一些参数(count、direction等)输入至完整性保护安全算法(如:RSA签名算法),得到消息验证码(message authentication code,MAC),并将MAC以及明文发送出去;接收端接收到MAC以及明文之后,根据发送端的公钥、接收到的明文以及发送端用到的其他参数再次计算得到MAC,对比接收到的MAC与自己计算的MAC是否相同。若相同,则完整性校验成功,明文未被篡改;反之,完整性校验失败,明文被篡改。
需要说明的是,公钥和私钥为相对概念,公钥可以指公开被多个设备知道的密钥,私钥为只有自身知道的密钥。发送端和发送端为相对概念,本申请实施例中,发送端可以为发送NAS消息的设备,接收端可以为接收NAS消息的设备。
在具体实现时,图1所示各设备(如:移动性管理网元、接入网设备、终端等)均可以采用图4所示的组成结构,或者包括图4所示的部件。
图4为本申请实施例提供的一种通信装置400的组成示意图,该通信装置400可以为集中控制器或者集中控制器中的芯片或者片上系统,还可以为功能实体或者功能实体中的芯片或片上系统。该通信装置400包括处理器401,通信线路402以及通信接口403。
进一步的,该通信装置400还可以包括存储器404。其中,处理器401,存储器404以及通信接口403之间可以通过通信线路402连接。
其中,处理器401可以是中央处理器(central processing unit,CPU)、通用处理器网络处理器(network processor,NP)、数字信号处理器(digital signal processing,DSP)、微处理器、微控制器、可编程逻辑器件(programmable logic device,PLD)或它们的任意组合。处理器401还可以是其它任意具有处理功能的装置,例如电路、器件或软件模块,不做限制。
通信线路402,用于在通信装置400所包括的各部件之间传送信息。
通信接口403,用于与其他设备或其它通信网络进行通信。该其它通信网络可以为以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。通信接口403可以是模块、电路、收发器或者任何能够实现通信的装置。
存储器404,用于存储指令。其中,指令可以是计算机程序。
其中,存储器404可以是只读存储器(read-only memory,ROM)或可存储静态信息和/或指令的其他类型的静态存储设备,也可以是随机存取存储器(random access memory,RAM)或者可存储信息和/或指令的其他类型的动态存储设备,还可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备等,不予限制。
需要说明的是,存储器404可以独立于处理器401存在,也可以和处理器401集成在一起。存储器404可以用于存储指令或者程序代码或者一些数据等。存储器404可以位于通信装置400内,也可以位于通信装置400外,不做限制。
处理器401,用于执行存储器404中存储的指令,以实现本申请下述实施例提供的安全保护方法。
例如,当通信装置400为集中控制器或者集中控制器中的芯片或者片上系统时,处理器401可以执行存储器404中存储的指令,以实现本申请下述实施例中集中控制器所执行的步骤。再例如,当通信装置400为功能实体或者功能实体中的芯片或者片上系统时,处理器401可以执行存储器404中存储的指令,以实现本申请下述实施例中功能实体所执行的步骤。
在一种示例中,处理器401可以包括一个或多个CPU,例如图4中的CPU0和CPU1。
作为一种可选的实现方式,通信装置400包括多个处理器,例如,除图4中的处理器401之外,还可以包括处理器407。
作为一种可选的实现方式,通信装置400还包括输出设备405和输入设备406。示例性地,输入设备406是键盘、鼠标、麦克风或操作杆等设备,输出设备405是显示屏、扬声器(speaker)等设备。
需要说明的是,通信装置400可以是台式机、便携式电脑、网络服务器、移动手机、平板电脑、无线终端、嵌入式设备、芯片系统或有图4中类似结构的设备。此外,图4中示出的组成结构并不构成对该通信装置的限定,除图4所示部件之外,该通信装置可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请实施例中,芯片系统可以由芯片构成,也可以包括芯片和其他分立器件。
此外,本申请的各实施例之间涉及的动作,术语等均可以相互参考,不予限制。本申请的实施例中各个设备之间交互的消息名称或消息中的参数名称等只是一个示例,具体实现中也可以采用其他的名称,不予限制。例如,下述实施例中的通用消息还可以替换为处理消息等,不予限制。
下面以图1所示的架构为例,对本申请实施例提供的安全保护方法进行描述。其中,下述实施例中的网元可以具备图4所示部件。
图5为本申请实施例提供的一种安全保护方法,如图5所示,该方法可以包括:
步骤501:移动性管理网元向接入网设备发送NAS消息以及第一指示信息。
其中,NAS消息可以指移动性管理网元通过接入网设备发往终端的NAS消息,该NAS消息还可以描述为下行NAS消息。移动性管理网元可以为图2a中的AMF,接入网设备可 以为与AMF以及终端连接的任一接入网设备,或者,移动性管理网元可以为图2b中的MME,接入网设备可以为图2b中与MME以及终端连接的任一接入网设备。
当移动性管理网元为AMF时,移动性管理网元可以通过N2接口向接入网设备发送NAS消息以及第一指示信息。当移动性管理网元为MME时,移动性管理网元可以通过S1接口向接入网设备发送NAS消息以及第一指示信息。
其中,第一指示信息可以用于指示接入网设备对NAS消息进行完整性保护,或者,第一指示信息还可以描述为用于指示接入网设备采用公私钥机制对NAS消息进行完整性保护。第一指示信息可以与NAS消息携带在同一消息(如N2消息)中发送给接入网设备,也可以携带在不同消息中发送给接入网设备,不予限制。
示例性的,第一指示信息可以为二进制比特或者其他采用字母或者数字组合而成的指示符。以第一指示信息为二进制比特为例,当第一指示信息为二进制比特1时,表示对NAS消息进行完整性保护。
需要说明的是,除通过第一指示信息指示接入网设备对NAS消息进行完整性保护之外,还可以通过隐式指示方式指示接入网设备对NAS消息进行完整性保护,如:
移动性管理网元可以将NAS消息包括在某条消息(如新的N2消息)中向接入网设备发送,该条消息的消息类型对应指示接入网设备对NAS消息进行完整性保护,接入网设备接收到该消息后,可以根据该消息的类型,确定对NAS消息进行完整性保护。
如此,可以不需要将第一指示信息发送给接入网设备,而是通过携带NAS消息的某条消息的消息类型指示接入网设备对NAS消息进行完整性保护,简单易行。
步骤502:接入网设备接收移动性管理网元发送的NAS消息以及第一指示信息,根据第一指示信息,对NAS消息进行完整性保护得到MAC。
其中,第一指示信息可以作为接入网设备对NAS消息进行完整性保护的触发条件,例如,接入网设备接收到第一指示信息就对NAS消息进行完整性保护。
其中,接入网设备可以采用图3b所示原理对NAS消息进行完整性保护。
具体的,可以由接入网设备的无线资源控制(redio resource control,RRC)层或者分组数据汇聚层协议(packet data convergence protocol,PDCP)层对NAS消息进行完整性保护。
以接入网设备的RRC层对NAS消息进行完整性保护为例,接入网设备的RRC层接收到移动性管理网元发送的NAS消息后,接入网设备的RRC层可以参照上述图3b所示方法对NAS消息进行完整性保护,如:接入网设备的RRC层可以根据接入网设备的私钥、NAS消息以及其他参数(如:count、direction等)得到MAC。进一步的,接入网设备的RRC层还可以将得到的MAC以及NAS消息包括的RRC消息中。该RRC消息可以为新型的RRC消息(如:信令无线承载(signaling radio bear,SRB)),通过该新型的RRC消息的消息类型可以隐式指示终端(采用公私钥机制)对NAS消息进行完整性保护,或者,该RRC消息还可以包括第二指示信息,该第二指示信息可以用于指示终端(采用公私钥机制)对NAS消息进行完整性校验。
以接入网设备的PDCP层对NAS消息进行完整性保护为例,接入网设备的RRC层接收到NAS消息后,可以对NAS消息进行处理得到包括NAS消息的RRC消息,并将包括NAS消息的RRC消息下发给接入网设备的PDCP层,接入网设备的PDCP层接收到包括 NAS消息的RRC消息后,可以参照上述图3b所示方法对NAS消息进行完整性保护,如:接入网设备的PDCP层可以根据接入网设备的私钥、NAS消息以及其他参数(如:count、direction等)得到MAC。进一步的,接入网设备的PDCP层还可以将得到的MAC以及包括NAS消息的RRC消息包括在PDCP数据包中。该PDCP数据包可以为新型的PDCP数据包,通过该新型的PDCP数据包的格式可以隐式指示终端(采用公私钥机制)对NAS消息进行完整性保护,或者,该PDCP数据包还可以包括第二指示信息,该第二指示信息可以用于指示终端(采用公私钥机制)对NAS消息进行完整性校验,第二指示信息可以位于PDCP数据包的包头的某一个保留比特位。
示例性的,第二指示信息可以为二进制比特或者其他采用字母或者数字组合而成的指示符。以第二指示信息为二进制比特为例,当第二指示信息为二进制比特1时,表示对NAS消息进行完整性保护。
其中,接入网设备的公钥相关描述以及接入网设备的私钥的获取方式可参照下述描述。
步骤503:接入网设备向终端发送第一消息。
其中,当接入网设备的RRC层对NAS消息进行完整性保护时,第一消息可以包括上述步骤502中所述的RRC消息,接入网设备向终端发送第一消息可以包括:接入网设备的RRC层依次通过接入网设备的PDCP层、接入网设备的无线链路控制(raido link control,RLC)、接入网设备的媒体接入控制(media access control,MAC)层以及接入网设备的物理层(physical,PHY)向终端发送第一消息。
当接入网设备的PDCP层对NAS消息进行完整性保护时,第一消息可以包括上述步骤502中所述的PDCP数据包,接入网设备向终端发送第一消息可以包括:接入网设备的PDCP层依次通过接入网设备的RLC、接入网设备的MAC层以及接入网设备的PHY向终端发送第一消息。
步骤504:终端接收接入网设备发送的第一消息,根据接入网设备的公钥以及第一消息包括的MAC,对NAS消息进行完整性校验。
一种示例中,当第一消息为RRC消息时,终端可以根据RRC消息的消息类型,确定根据接入网设备的公钥以及第一消息包括的MAC,对NAS消息进行完整性校验;或者,在RRC消息包括第二指示信息的情况下,根据第二指示信息的指示,确定根据接入网设备的公钥以及第一消息包括的MAC对NAS消息进行完整性校验。
具体的,在该示例中,可以由终端的RRC层根据接入网设备的公钥以及第一消息包括的MAC对NAS消息进行完整性校验,如:终端的RRC层接收到第一消息后,可以参照图3b所示方式,根据接入网设备的公钥、第一消息包括的NAS消息以及其他参数计算得到MAC,将自身计算的MAC与第一消息包括的MAC进行比较,若二者相同,则确定第一消息包括的NAS消息未被篡改,根据第一消息包括的NAS消息进行后续流程,反之,则确定第一消息包括的NAS消息被篡改,校验失败,不根据NAS消息的规定进行后续流程,如可以丢弃该NAS消息。
又一种示例中,当第一消息为PDCP数据包时,终端可以根据PDCP数据包的类型,确定根据接入网设备的公钥以及第一消息包括的MAC,对NAS消息进行完整性校验;或者,在PDCP数据包包括第二指示信息的情况下,根据第二指示信息的指示,确定根据接入网设备的公钥以及第一消息包括的MAC对NAS消息进行完整性校验。
具体的,在又一种示例中,可以由终端的PDCP层根据接入网设备的公钥以及第一消息包括的MAC对NAS消息进行完整性校验,如:终端的PDCP层接收到第一消息后,可以参照图3b所示方式,根据接入网设备的公钥、第一消息包括的NAS消息以及其他参数计算得到MAC,将自身计算的MAC与第一消息包括的MAC进行比较,若二者相同,则确定第一消息包括的NAS消息未被篡改,根据第一消息包括的NAS消息进行后续流程,反之,则确定第一消息包括的NAS消息被篡改,校验失败,不根据NAS消息的规定进行后续流程,如可以丢弃该NAS消息。
基于图5所示方法,在移动性管理网元向终端发送NAS消息时,移动性管理网元可以通知接入网设备对NAS消息进行完整性保护,保证NAS消息的安全性,避免NAS消息被篡改。同时,由于完整性保护是由移动性管理网元通知接入网设备执行的,无需要求移动性管理网元执行安全保护,可以不改动NAS协议。并且,也无需为移动性管理网元配置公私钥对,简化了移动性管理网元的网络配置。
在图5所示方法中,接入网设备的私钥以及接入网设备的公钥的相关描述如下所示:
接入网设备的私钥,是只有接入网设备知道的密钥,接入网设备的私钥与接入网设备的公钥成对出现,接入网设备的公钥为公开的接入网设备密钥,如:本申请实施例中,接入网设备的RRC层或者PDCP层根据接入网设备的私钥对NAS消息进行完整性保护生成MAC后,终端的RRC层或者PDCP层可以根据接入网设备的公钥进行完整性校验。
接入网设备的私钥可以预先配置在接入网设备上,如:网络组建时,可以由网管系统将接入网设备的私钥预先配置在接入网设备上。
接入网设备的公钥,可以预先配置在终端上,如:写入终端的SIM卡中;或者,移动性管理网元通过终端与移动性管理网元间的信令交互(如:注册流程),将接入网设备的公钥配置给终端,不予限制。
需要说明的是,本申请实施例中,接入网设备的公钥与终端所处区域相关,接入网设备的公钥与终端所处区域间存在对应关系,不同区域对应的接入网设备的公钥是不同的。终端所处区域可以指终端的路由区(RA,routing area),终端的位置区(LA,location area),终端的跟踪区(tracking area,TA)等任一粒度的区域。
其中,接入网设备的公钥与终端所处区域间的对应关系可以由网络侧配置给终端,如:移动性管理网元可以通过下述图5所示方法的第二个场景所述的流程,将接入网设备的公钥与终端所处区域间的对应关系配置终端。
步骤504中,终端采用接入网设备的公钥对第一消息进行完整性校验之前,终端终端可以根据其当前所处区域的区域信息,从接入网设备的公钥与终端所处区域间的对应关系中,选择出与终端当前所处区域的区域信息对应的接入网设备的公钥,采用选择出的接入网设备的公钥对第一消息进行完整性校验。
例如,以终端所处区域为TA,TA由TA标识(tracking area identity,TAI)唯一标识为例,下表一示出了接入网设备的公钥与TAI间的对应关系,如表一所示,TAI1对应PubKey1,TAI2对应PubKey2,TAI3对应PubKey3,若终端当前所处区域为TAI1所标识的TA,则终端采用PubKey1对NAS消息进行完整性校验。
表一
终端所处区域 接入网设备的公钥
TAI1 PubKey1
TAI2 PubKey2
TAI3 PubKey3
在图5所示方法的第一个场景中,执行步骤501之前,移动性管理网元确定是否对NAS消息进行完整性保护,若确定对NAS消息进行完整性保护,则执行步骤501,否则,不执行图5所示方法。
其中,移动性管理网元可以通过下述方式一~方式四中的任一方式,或者,通过下述方式一与方式二~方式四中任一方式的结合,确定是否对NAS消息进行完整性保护:
方式一、移动性管理网元确定移动性管理网元与终端之间的NAS安全保护否被激活,若未被激活,则确定对NAS消息进行完整性保护,反之,若移动性管理网元与终端之间的NAS安全保护被激活,则确定不通过图5所示方法对NAS消息进行完整性保护。
移动性管理网元确定移动性管理网元与终端之间的NAS安全保护是否被激活可以包括:移动性管理网元确定自身是否已向终端发送NAS安全模式命令(security mode command,SMC)消息,若移动性管理网元已向终端发送NAS SMC消息,则确定移动性管理网元与终端之间的NAS安全保护被激活,反之,若确定移动性管理网元与终端之间的NAS安全保护未被激活。
其中,NAS SMC消息可以指示终端采用对称密钥对终端与移动性管理网元之间的NAS消息进行完整性保护。NAS SMC消息可以包括对称密钥。
方式二、移动性管理网元确定终端是否已注册到网络,若终端已注册到网络,则确定对NAS消息进行完整性保护,反之,若终端未注册到网络,则确定不通过图5所示方法对NAS消息进行完整性保护。
其中,移动性管理网元确定终端是否已注册到网络可以包括:若移动性管理网元接收到终端的初始注册请求,且移动性管理网元已向终端返回初始注册请求的响应,则确定终端已注册到网络,反之,若移动性管理网元未接收到终端的初始注册请求,或者,接收到终端的初始注册请求,但未返回终端的初始注册请求的响应,则确定终端未注册到网络。
其中,初始注册请求可以用于请求注册到网络,初始注册请求的响应可以用于指示终端成功注册到网络。初始注册请求的响应中可以包括对NAS消息进行完整性保护所需的密钥,如:终端的私钥、接入网设备的公钥等。
方式三、移动性管理网元确定终端上是否存储有对NAS消息进行完整性保护所需的密钥,如:接入网设备的公钥。若确定终端上存储有接入网设备的公钥,则确定对NAS消息进行完整性保护,反之,则确定不通过图5所示方法对NAS消息进行完整性保护。
其中,移动性管理网元可以确定终端是否已注册到网络,若确定终端已注册到网络,则确定终端上存储有对NAS消息进行完整性保护所需的密钥,反之,则确定终端未存储有对NAS消息进行完整性保护所需的密钥。移动性管理网元确定终端是否已注册到网络的方式可参照方式二中,不再赘述。
方式四、移动性管理网元判断终端是否具备对NAS消息进行完整性保护的能力,若确定终端具备对NAS消息进行完整性保护的能力,则确定对NAS消息进行完整性保护, 反之,若确定终端不具备对NAS消息进行完整性保护的能力,则确定不通过图5所示方法对NAS消息进行完整性保护。
如此,基于上述方式,移动性管理网元通过确定移动性管理网元与终端之间的NAS安全保护没有被激活,从而触发使用图5所示方法所述的公私钥机制保护NAS消息。进一步可选的,为了减少算法开销,在NAS安全保护已经激活时,就不再使用图5所示公私钥机制保护NAS消息,此时,终端和移动性管理网元可以通过对称密钥机制保护NAS消息。由于,公私钥保护算法的开销大于对称密钥保护算法的开销,因此引入该判断逻辑,可以仅使用公私钥机制保护NAS安全保护未激活前的NAS消息,采用对称密钥机制保护NAS安全保护激活后的NAS消息,从而减少算法开销。
在图5所示方法的第二个场景中,移动性管理网元可以通过终端的注册流程确定终端是否具备对NAS消息进行完整性保护的能力,如:
终端向移动性管理网元发送注册请求,该注册请求用于请求注册到网络,注册请求包括终端的能力信息,终端的能力信息用于指示终端支持(采用公私钥机制)对NAS消息进行完整性保护;
移动性管理网元接收终端发送的注册请求,根据注册请求包括的终端的能力信息,确定终端具备对NAS消息进行完整性保护的能力。
需要说明的是,除通过终端的能力信息指示终端支持(采用公私钥机制)对NAS消息进行完整性保护之外,还可以通过隐式指示方式指示终端支持(采用公私钥机制)对NAS消息进行完整性保护,如:
该注册请求还可以用于请求接入网设备的公钥,终端请求接入网设备的公钥意味着终端需要根据接入网设备的公钥对NAS消息进行完整性保护,此时,注册请求可以不用携带中终端的能力信息,移动性管理网元可以根据注册请求的内容确定终端具备对NAS消息进行完整性保护的能力。
进一步的,移动性管理网元接收到终端的注册请求后,还可以向终端发送注册请求的响应,该注册请求的响应可以用于指示终端成功注册到网络,同时,若网络侧支持对NAS消息进行完整性保护,该注册请求的响应还可以用于指示网络侧也具备对NAS消息进行完整性保护的能力。
一种示例中,注册请求的响应可以包括区域信息以及接入网设备的公钥间的对应关系,区域信息可以用于指示某个区域,通过该对应关系可以隐式指示网络侧也具备对NAS消息进行完整性保护的能力。
又一种示例中,注册请求的响应除包括区域信息以及接入网设备的公钥间的对应关系之外,还可以包括能力标签,能力标签可以用于指示该区域下的网络侧具备对NAS消息进行完整性保护的能力。通过对应关系包括的能力标签可以显式指示某个区域内的网络侧也具备对NAS消息进行完整性保护的能力。
如此,终端可以与网络侧协商是否采用本申请实施例所示的方式对NAS信息进行完整性保护,避免终端、接入网设备中任一方不支持对NAS信息进行完整性保护的情况下,通信失败的问题。
在图5所示方法的第三个场景中,在执行步骤504中,除计算出的MAC与第一消息包括的MAC不同,校验失败的情况下,若存在下述任一情况,也表示校验失败:
情况一:终端未获取到接入网设备的公钥。
如:在接入网设备的公钥由网络侧配置给终端的情况下,若接入网设备的公钥与终端所处区域间的对应关系中未包括与终端当前区域所对应的接入网设备的公钥,则终端无法获取接入网设备的公钥,进而无法根据接入网设备的公钥对NAS消息进行完整性校验,完整性校验失败,流程结束。
情况二:终端发现其接收到的第一消息中不包括的MAC。
例如,若接入网设备向终端发送第一消息的过程中,MAC被遗失,则终端无法获取到接入网设备确定的MAC,进而无法对NAS消息进行完整性校验,完整性校验失败,流程结束。
下面结合图6所示过程,对图5所示的完整性保护方法进行描述。
图6为本申请实施例提供的又一种安全保护方法,如图6所示,所述方法包括:
步骤601:终端向移动性管理网元发送注册请求。
其中,移动性管理网元可以为图2a中的AMF,终端可以为图2a中与AMF连接的任一终端;或者,移动性管理网元可以图2b中的MME,终端为图2b中与MME连接的任一终端。
其中,注册请求可以如上所述,如:注册请求可以用于请求注册到网络,注册请求可以包括终端的能力信息,终端的能力信息可以用于指示终端具备对NAS消息进行完整性保护的能力,或者,注册请求用于请求接入网设备的公钥。
示例性的,当终端初次接入网络或者终端的注册区域发生变更,从其他注册区域移动到移动性管理网元所在区域时,终端可以向移动性管理网元发送注册请求。
步骤602:移动性管理网元接收注册请求,向终端发送注册请求的响应。
其中,注册请求的响应可以如上所述,如:注册请求的响应不仅可以用于指示终端成功注册到网络,还可以在网络侧也支持对NAS消息进行完整性保护的情况下,用于指示网络侧支持对NAS消息进行完整性保护,如:
一种示例中,注册请求可以包括区域信息、能力标签以及接入网设备的公钥,区域信息可以用于指示某个区域,区域可以是RA或者LA或者TA。能力标签可以用于指示该区域具备对NAS消息进行安全保护的能力式。
例如,当区域为TA时,注册请求可以包括{TAI1,能力标签1,PubKey1},{TAI2,能力标签2,PubKey1},{TAI3,能力标签3,PubKey1}。
又一种示例中,注册请求可以包括区域信息以及接入网设备的公钥。此时,接入网设备的公钥与区域信息绑定,当终端收到接入网设备的公钥时,代表与该接入网设备的公钥绑定的区域支持对NAS消息进行完整性保护。例如,若终端收到{TAI1,PubKey1}时,代表TAI1的区域下网络侧支持采用公钥机制保护NAS消息。
步骤603:移动性管理网元确定对NAS消息进行完整性保护。
其中,NAS消息为终端完成网络注册之后的任一NAS消息。
具体的,移动性管理网元可参照图5所示方法的第一个场景所述的方法确定对NAS消息进行完整性保护,不再赘述。
步骤604:移动性管理网元向接入网设备发送NAS消息以及指示信息1。
其中,指示信息1可以用于指示接入网设备对NAS进行完整性保护。
具体的,步骤604可参照步骤501所述,不再赘述。
步骤605:接入网设备接收NAS消息以及指示信息1,根据指示信息1对NAS消息进行完整性保护以得到MAC。
其中,步骤605可参照步骤502所述,如:接入网设备可以根据接入网设备的私钥对NAS消息进行完整性保护。
步骤606:接入网设备向终端发送第一消息。
其中,第一消息可以包括NAS消息以及根据接入网设备的私钥对NAS消息进行完整性保护后生成的MAC。第一消息还可以包括指示信息2,指示信息2可以用于指示终端第一消息包括对NAS消息进行完整性保护后生成的信息。
具体的,步骤606可参照步骤503所述,不再赘述。
具体的,步骤606可参照步骤503所述,不再详述。
步骤607:终端接收第一消息,根据第一消息包括的MAC以及接入网设备的公钥对NAS消息进行完整性校验。
其中,步骤607可参照步骤504所述,不再赘述。
基于图6所示方法,在终端与网络侧协商对NAS信息进行完整性保护的情况下,移动性管理网元可以通知接入网设备对NAS消息进行完整性保护,将完整性保护的信息发送给终端,以此保证NAS消息不被篡改。
上述图5和图6对NAS进行完整性保护的过程进行了介绍,除防止NAS消息篡改之外,还需要防止NAS消息泄露,为了避免NAS泄露,需要对NAS消息进行加密保护。具体如图7所示:
图7为本申请实施例提供的一种安全保护方法,用于对NAS消息进行加密保护,如图7所示,该方法可以包括:
步骤701:移动性管理网元向接入网设备发送NAS消息以及第三指示信息。
其中,NAS消息可以指移动性管理网元通过接入网设备发往终端的NAS消息,该NAS消息还可以描述为下行NAS消息。移动性管理网元可以为图2a中的AMF,接入网设备可以为与AMF以及终端连接的任一接入网设备,或者,移动性管理网元可以为图2b中的MME,接入网设备可以为图2b中与MME以及终端连接的任一接入网设备。
当移动性管理网元为AMF时,移动性管理网元可以通过N2接口向接入网设备发送NAS消息以及第三指示信息。当移动性管理网元为MME时,移动性管理网元可以通过S1接口向接入网设备发送NAS消息以及第三指示信息。
其中,第三指示信息可以用于指示接入网设备对NAS消息进行加密保护,或者,第三指示信息还可以描述为用于指示接入网设备采用公私钥机制对NAS消息进行加密保护。第三指示信息可以与NAS消息携带在同一消息(如N2消息)中发送给接入网设备,也可以携带在不同消息中发送给接入网设备,不予限制。
示例性的,第三指示信息可以为二进制比特或者其他采用字母或者数字组合而成的指示符。以第三指示信息为二进制比特为例,当第三指示信息为二进制比特1时,表示对NAS消息进行加密保护。
需要说明的是,除通过第三指示信息指示接入网设备对NAS消息进行加密保护之外,还可以通过隐式指示方式指示接入网设备对NAS消息进行加密保护,如:
移动性管理网元可以将NAS消息包括在某条消息(如新的N2消息)中向接入网设备发送,该条消息的消息类型对应指示接入网设备对NAS消息进行加密保护,接入网设备接收到该消息后,可以根据该消息的类型,确定对NAS消息进行加密保护。
如此,可以不需要将第三指示信息发送给接入网设备,而是通过携带NAS消息的某条消息的消息类型指示接入网设备对NAS消息进行加密保护,简单易行。
步骤702:接入网设备接收移动性管理网元发送的NAS消息以及第三指示信息,根据第三指示信息,对NAS消息进行加密保护生成加密后的NAS消息。
其中,第三指示信息可以作为接入网设备对NAS消息进行加密保护的触发条件,例如,接入网设备接收到第三指示信息就对NAS消息进行加密保护。
其中,接入网设备可以采用图3a所示原理对NAS消息进行加密保护。
具体的,可以由接入网设备的RRC层或者PDCP层对NAS消息进行加密保护。
以接入网设备的RRC层对NAS消息进行加密保护为例,接入网设备的RRC层接收到移动性管理网元发送的NAS消息后,接入网设备的RRC层可以参照上述图3a所示方法对NAS消息进行加密保护,如:接入网设备的RRC层可以根据终端的公钥以及其他参数(如:count,direction以及length)对NAS消息进行加密得到加密后的NAS消息。进一步的,接入网设备的RRC层还可以将加密后的NAS消息包括的RRC消息中。该RRC消息可以为新型的RRC消息(如:SRB),通过该新型的RRC消息的消息类型可以隐式指示终端(采用公私钥机制)对NAS消息进行加密保护,或者,该RRC消息还可以包括第四指示信息,该第四指示信息可以用于指示终端(采用公私钥机制)对NAS消息进行完整性校验。
以接入网设备的PDCP层对NAS消息进行加密保护为例,接入网设备的RRC层接收到NAS消息后,可以对NAS消息进行处理得到包括NAS消息的RRC消息,并将包括NAS消息的RRC消息下发给接入网设备的PDCP层,接入网设备的PDCP层可以根据终端的公钥以及其他参数(如:count,direction以及length)对NAS消息进行加密得到加密后的NAS消息。进一步的,接入网设备的PDCP层还可以将加密后的NAS消息包括在PDCP数据包中。该PDCP数据包可以为新型的PDCP数据包,通过该新型的PDCP数据包的格式可以隐式指示终端(采用公私钥机制)对NAS消息进行加密保护,或者,该PDCP数据包还可以包括第四指示信息,该第四指示信息可以用于指示终端(采用公私钥机制)对NAS消息进行完整性校验,第四指示信息可以位于PDCP数据包的包头的某一个保留比特位。
示例性的,第四指示信息可以为二进制比特或者其他采用字母或者数字组合而成的指示符。以第四指示信息为二进制比特为例,当第四指示信息为二进制比特1时,表示对NAS消息进行加密保护。
其中,终端的私钥相关描述以及终端的私钥的获取方式可参照下述。
步骤703:接入网设备向终端发送加密后的NAS消息。
其中,当接入网设备的RRC层对NAS消息进行加密保护时,加密后的NAS消息可以包括在上述步骤702中所述的RRC消息,接入网设备向终端发送加密后的NAS消息可以包括:接入网设备的RRC层依次通过接入网设备的PDCP层、接入网设备的无线链路控制(raido link control,RLC)、接入网设备的媒体接入控制(media access control,MAC) 层以及接入网设备的物理层(physical,PHY)向终端发送包括加密后的NAS消息的RRC消息。
当接入网设备的PDCP层对NAS消息进行加密保护时,加密后的NAS消息可以在包括上述步骤702中所述的PDCP数据包,接入网设备向终端发送第一消息可以包括:接入网设备的PDCP层依次通过接入网设备的RLC、接入网设备的MAC层以及接入网设备的PHY向终端发送包括加密后的NAS消息的PDCP数据包。
步骤704:终端接收接入网设备发送的加密后的NAS消息,根据终端的私钥对加密后的NAS消息进行解密。
一种示例中,当加密后的NAS消息包括在RRC消息时,终端可以根据RRC消息的消息类型,确定根据终端的私钥对加密后的NAS消息进行解密;或者,在RRC消息包括第四指示信息的情况下,根据第四指示信息的指示,确定根据终端的私钥对加密后的NAS消息进行解密。
具体的,在该示例中,可以由终端的RRC层根据终端的私钥对加密后的NAS消息进行解密,如:终端的RRC层接收到包括加密后的NAS消息的RRC消息后,可以参照图3a所示方式,根据终端的私钥以及其他参数对加密后的NAS消息进行解密。
又一种示例中,当加密后的NAS消息包括在PDCP数据包时,终端可以根据PDCP数据包的消息类型,确定根据终端的私钥对加密后的NAS消息进行解密;或者,在PDCP数据包包括第四指示信息的情况下,根据第四指示信息的指示,确定根据终端的私钥对加密后的NAS消息进行解密。
具体的,在该示例中,可以由终端的PDCP层根据终端的私钥对加密后的NAS消息进行解密,如:终端的PDCP层接收到包括加密后的NAS消息的PDCP数据包后,可以参照图3a所示方式,根据终端的私钥以及其他参数对加密后的NAS消息进行解密。
在图7所示方法中,终端的公钥、终端的私钥的相关描述如下所示:
终端的公钥可以指公开的终端密钥,终端的公钥和终端的私钥成对出现,终端的私钥为只有终端知道的密钥,采用终端的公钥加密后的密文只有用终端的私钥才能解开。如:接入网设备的RRC层或者PDCP层根据终端的公钥对下行NAS消息进行加密保护生成密文后,终端的RRC层或者PDCP层可以根据终端的私钥对密文进行解密。
终端的公钥可以预先配置在接入网设备上,如:网络组建时,可以由网管系统将终端的公钥预先配置在接入网设备上;或者,由移动性管理网元将终端的公钥发送给接入网设备,如:移动性管理网元可以向接入网设备发送N2消息,N2消息中包括终端的公钥;或者,由终端将终端的公钥发送给接入网设备,如:终端可以向接入网设备发送RRC消息,该RRC消息中包括终端的公钥。
终端的私钥可以在终端入网前预先存储在终端上,如:写入终端的客户识别模块(subscriber identification module,SIM)卡中;或者,移动性管理网元通过终端与移动性管理网元间的信令交互(如:注册流程),将终端的私钥配置给终端,不予限制。
基于图7所示方法,在移动性管理网元向终端发送NAS消息时,移动性管理网元可以通知接入网设备对NAS消息进行加密保护,以保证NAS消息的安全性,避免NAS消息被泄密。
在图7所示方法的第一个场景中,执行步骤701之前,移动性管理网元可以参照上述 图5所示方法的第一个场景中所述的方法,确定是否对NAS消息进行加密保护,不再赘述。
在图7所示方法的第二个场景中,移动性管理网元也可以通过终端的注册流程确定终端是否具备对NAS消息进行加密保护的能力,具体的,该过程可参照上述图5所示方法的第二个场景中,移动性管理网元确定终端是否具备对NAS消息进行完整性保护的能力的过程,不再赘述。
在图7所示方法的第三个场景中,在执行步骤704时,若存在下述任一情况,解密失败,流程结束:情况一:终端未获取到终端的私钥。情况二:终端发现其接收到的接入网设备发送的消息中未包括加密后的NAS消息。
下面以对NAS消息进行加密保护为例,描述本申请实施例提供的方法。
图8为本申请实施例提供的又一种安全保护方法,如图8所示,所述方法包括:
步骤801:终端向移动性管理网元发送注册请求。
其中,移动性管理网元可以为图2a中的AMF,终端可以为图2a中与AMF连接的任一终端;或者,移动性管理网元可以图2b中的MME,终端为图2b中与MME连接的任一终端。
其中,注册请求可以用于请求注册到网络,注册请求可以包括终端的能力信息,终端的能力信息可以用于指示终端具备对NAS消息进行加密保护的能力。
示例性的,当终端初次接入网络或者终端的注册区域发生变更,从其他注册区域移动到移动性管理网元所在区域时,终端向移动性管理网元发送注册请求。
步骤802:移动性管理网元接收注册请求,向终端发送注册请求的响应。
其中,注册请求的响应不仅可以用于指示终端成功注册到网络,还可以在网络侧也支持对NAS消息进行加密保护的情况下,用于指示网络侧支持对NAS消息进行加密保护。
其中,注册请求可以包括终端的私钥。
步骤803:移动性管理网元确定对NAS消息进行加密保护。
其中,NAS消息为终端完成网络注册之后的任一NAS消息。
其中,步骤803可参照图7所示方法的第一个场景所述。不再赘述。
步骤804:移动性管理网元向接入网设备发送NAS消息以及指示信息3。
其中,指示信息3可以用于指示接入网设备对NAS进行加密保护。
具体的,步骤804可参照步骤701所述,不再赘述。
步骤805:接入网设备接收NAS消息以及指示信息3,根据指示信息3对NAS消息进行加密保护。
其中,步骤805可参照步骤702所述,如:接入网设备可以根据终端的公钥对NAS消息进行加密保护。
步骤806:接入网设备向终端发送加密后的NAS消息。
其中,步骤806可参照步骤703所述,不再赘述。
步骤807:终端接收加密后的NAS消息,根据终端的私钥对加密后的NAS消息进行解密。
其中,步骤807可参照步骤704所述,不再赘述。
基于图8所示方法,在终端与网络侧协商对NAS信息进行加密保护的情况下,移动 性管理网元可以通知接入网设备对NAS消息进行加密保护,将加密保护的信息发送给终端,以此保证NAS消息不被泄露。
需要说明的是,上述图5和图6对NAS进行完整性保护的过程进行了介绍,上述图7和图8对NAS进行加密保护进行了介绍,实际应用中,可以结合上述完整性保护方法和加密保护保护方法,同时对NAS消息进行加密保护和完整性保护。具体的,对NAS消息进行加密保护和完整性保护的详细过程可参照上述方法,不再赘述。
除上述图5和图6对NAS进行完整性保护的过程进行了介绍,本申请实施例还提供又一种对NAS消息进行完整性保护的方法。
图9为本申请实施例提供的又一种安全保护方法,以实现对NAS消息进行完整性保护,如图9所示,该方法可以包括:
步骤901:移动性管理网元对NAS消息进行完整性保护,生成第一MAC。
其中,移动性管理网元为图2a中的AMF,也可以为图2b中的MME。
其中,NAS消息可以为移动性管理网元与终端间的NAS安全保护被激活之前,移动性管理网元向终端发送的消息。如:在终端的永久身份找不到的情况下,该NAS消息为移动性管理网元向终端发送的NAS拒绝消息,或者,在终端的临时身份找不到的情况下,该NAS消息为移动性管理网元向终端发送的身份请求消息,或者,在初始认证终端时,该NAS消息为移动性管理网元向终端发送认证请求消息等。
其中,移动性管理网元可参照图5所示方法的第一个场景中所述的方式,确定移动性管理网元与终端间的NAS安全保护是否被激活,不再赘述。
示例性的,移动性管理网元可以采用图3b所示方法,对NAS消息进行完整性保护生成第一MAC。如:移动性管理网元可以根据移动性管理网元的私钥以及其他参数,对NAS消息进行完整性保护生成第一MAC。具体的,该过程可参照步骤502中接入网设备对NAS消息进行完整性保护的过程,不再赘述。
其中,其他参数可以描述为生成第一MAC的新鲜性参数,其他参数可以包括但不限于计数值、方向、长度,还可以包括第一随机数值,或者,第一随机数值和第二随机数据值等,不予限制。
以其他参数包括第一随机数值为例,可选的,移动性管理网元可以接收终端发送的初始NAS消息,初始NAS消息可以包含第一随机数值,移动性管理网元可以参照图3b所示方式,根据第一随机数值和NAS消息生成第一MAC。如:移动性管理网元可以根据移动性管理网元的私钥,第一随机数值以及计数值、方向、长度等,对NAS消息进行完整性保护生成第一MAC。
以其他参数包括第一随机数值和第二随机数值为例,可选的,移动性管理网元可以接收终端发送的初始NAS消息,初始NAS消息可以包含第一随机数值,同时,移动性管理网元还可以随机生成第二随机数值,并参照图3b所示方式,根据第一随机数值、第二随机数值和NAS消息生成第一MAC。如:移动性管理网元可以根据移动性管理网元的私钥,第一随机数值、第二随机数值以及计数值、方向、长度等,对NAS消息进行完整性保护生成第一MAC。
其中,第一随机数值可以由终端生成,第二随机数值可以由移动性管理网元生成。
如此,可以在生成第一MAC时引入随机数值,保障对相邻两次NAS消息进行完整性 保护后所生成的MAC是不同的,这样可以防止攻击者重放一条具有相同MAC的NAS消息,避免重放攻击。
步骤902:移动性管理网元向终端发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息。
其中,第二MAC为公钥授权网元根据移动性管理网元的公钥以及其他参数,对移动性管理网元的公钥进行签名得到的MAC。具体的,移动性管理网元获取第二MAC的方式可参照下述图9所示方法的第一个场景中所述。
其中,第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息可以包括在一条消息中,如包括在第二消息中,第二消息可以称为完整性保护后的NAS消息,或者,还可以描述成承载在NAS消息中的信元等,不予限制。
进一步可选的,移动性管理网元还可以向终端保护指示,该保护指示可以用于指示终端是使用公钥机制进行完整性保护后的NAS消息。保护指示可以是第一消息的消息头中一个新增的指示,可以命名为integrity protected with private key。
除此之外,若生成第二MAC时用到了第二MAC的有效时间,则移动性管理网元还需要向终端发送第二MAC的有效时间。
若生成第一MAC用到了第一随机数值,则移动性管理网元还可以向终端第一随机数值;
若生成第一MAC用到了第一随机数值和第二随机数值,则移动性管理网元还可以向终端第一随机数值和第二随机数值。
步骤903:终端接收第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,根据第一MAC、第二MAC、移动性管理网元的公钥以及公钥授权网元的公钥对NAS消息进行完整性校验。
其中,公钥授权网元的公钥由运营商预先配置到终端的SIM卡上,在将SIM卡插入终端后,终端可以将SIM卡上的公钥授权网元的公钥配置到终端上。
具体的,终端根据公钥授权网元的公钥以及对NAS消息进行完整性校验可以包括下述(a)和(b)两个过程:
(a)终端根据公钥授权网元的公钥、移动性管理网元的公钥对第二MAC进行校验,若第二MAC校验成功,则执行下述过程(b);
反之,若第二MAC校验失败,则流程结束,执行如下失败流程:终端将不执行NAS消息要求的动作。例如,若NAS消息用于请求终端从5G网络回退到4G网络,则终端不执行从5G网络回退到4G网络的动作。进一步可选地,终端释放与当前接入网设备的连接,并重选小区。
示例性的,在上述过程(a)中,终端可以参照上述图3b所示方式对第二MAC进行校验,如:终端可以将接收到的公钥授权网元的公钥、移动性管理网元的公钥以及其他参数输入到完整性保护安全算法,计算得到MAC,将计算得到的MAC与接收到的第二MAC进行比较,若二者相同,则第二MAC校验成功,若二者不同,则第二MAC校验失败。
(b)终端根据移动性管理网元的公钥、第一MAC对接收到的NAS消息进行完整性校验。
如:终端可以将接收到的移动性管理网元的公钥以及其他参数输入到完整性保护安全 算法,计算得到MAC,将计算得到的MAC与接收到的第一MAC进行比较,若二者相同,则第一MAC校验成功,表示NAS消息未被篡改,可以执行NAS消息要求的动作。若二者不同,则第一MAC校验失败,流程结束,执行上述失败流程。
需要说明的是,当生成第二MAC用到了第二MAC的有效时间,且移动性管理网元向终端发送有第二MAC的有效时间时,上述过程(a)可替换为终端根据公钥授权网元的公钥、移动性管理网元的公钥以及第二MAC的有效时间对第二MAC进行校验。
其中,在终端根据公钥授权网元的公钥、移动性管理网元的公钥以及第二MAC的有效时间对第二MAC进行校验,终端判断当前时刻是否在第二MAC的有效时间内(或者描述为第二MAC是否在有效时间内),若不在,如:第二MAC超期,则校验失败,执行失败流程,反之,则终端根据公钥授权网元的公钥、移动性管理网元的公钥以及第二MAC的有效时间对第二MAC进行校验。
具体的,终端根据公钥授权网元的公钥、移动性管理网元的公钥以及第二MAC的有效时间对第二MAC进行校验的过程可参照图3b所示方法,不再赘述。
在图9所示方法中,公钥授权网元的私钥以及公钥授权网元的公钥的相关描述如下所示:
公钥授权网元的私钥,是只有公钥授权网元知道的密钥,公钥授权网元的私钥与公钥授权网元的公钥成对出现,公钥授权网元的公钥为公开的公钥授权网元密钥,如:图9中,公钥授权网元可以根据公钥授权网元的私钥对移动性管理网元的公钥进行签名生成第二MAC,终端可以根据公钥授权网元的公钥对第二MAC进行校验。
公钥授权网元的公钥,可以预先配置在终端上,如:写入终端的SIM卡中;或者,公钥授权网元通过终端与移动性管理网元间的信令交互,将公钥授权网元的公钥配置给终端。
在图9所示方法中,移动性管理网元的私钥以及移动性管理网元的公钥可以为移动性管理网元根据非对称密钥生成算法生成的一对公私钥,移动性管理网元的私钥、移动性管理网元的公钥的相关描述如下所示:
移动性管理网元的私钥,是只有移动性管理网元知道的密钥,移动性管理网元的私钥与移动性管理网元的公钥成对出现,移动性管理网元的公钥为公开的移动性管理网元密钥,如:图9中,移动性管理网元可以根据移动性管理网元的私钥对NAS进行完整性保护生成第一MAC,终端可以根据移动性管理网元的公钥对第一MAC进行校验,进而对NAS消息进行完整性校验。
基于图9所示方法,移动性管理网元获取公钥授权网元为自己生成的公钥进行签名生成的第二MAC,并将第二MAC、对NAS消息进行完整性校验生成的第一MAC以及移动性管理网元的公钥发送给终端,终端配置一个公钥授权网元的公钥,终端根据公钥授权网元的公钥以及移动性管理网元的公钥对第二MAC进行校验,并在第二MAC校验成功的情况下,终端获知接收到的移动性管理网元是真实的,可以放心地根据接收到的移动性管理网元的公钥对第一MAC进行校验,从而对NAS消息进行完整性校验。这样,终端仅需要移动性管理网元为其配置一个公钥授权网元的公钥,而不需要配置多个移动性管理网元的公钥,可以大大减少了终端上配置的移动性管理网元的公钥的复杂度,同时,避免NAS消息被篡改。
在图9所示方法中,第二MAC可以是公钥授权网元根据公钥授权网元的私钥对移动 性管理网元的公钥进行签名后生成的MAC,如:公钥授权网元可以参照图3b所示方法,将公钥授权网元的私钥、移动性管理网元的公钥或者其他参数输入到完整性保护安全算法,得到第二MAC;或者,第二MAC可以是公钥授权网元根据公钥授权网元的私钥、第二MAC的有效时间以及其他参数对移动性管理网元的公钥进行签名后生成的MAC;如:公钥授权网元可以参照图3b所示方法,将公钥授权网元的私钥、移动性管理网元的公钥、第二MAC的有效时间或者其他参数输入到完整性保护安全算法,得到第二MAC。其他参数可以包括计数值、方向、长度等。
其中,第二MAC可以存储在移动性管理网元中,并可以与终端的归属网络信息对应存储起来,或者,与终端的归属网络信息,移动性管理网元的公钥对应存储起来。其中,终端的归属网络信息可以为公共陆地移动网标识(public land mobile network identifier,PLMN ID),路由标识(Routing Identity),公钥标识(Public Key Identity)的任意一个或其组合。
其中,公钥授权网元可以称为公钥授权(public key authorization,PKA),公钥授权网元具有为核心网网元的公钥(如移动性管理网元)进行签名的功能。公钥授权功能可以集成在统一数据管理(unified data manager,UDM)中,为UDM中能够实现公钥授权网元所执行的动作的功能模块。
在图9所示方法的第一个场景中,在执行步骤901之前,移动性管理网元可以通过下述方式获取第二MAC:
一种示例中,以第二MAC与归属网络信息对应存储为例,移动性管理网元可以接收终端发送的初始NAS消息,初始NAS消息可以包括终端的标识;移动性管理网元根据终端的标识确定终端的归属网络信息;移动性管理网元查看自身是否存储有确定的归属网络信息,或与确定的归属网络信息对应的第二MAC,若存储有与归属网络信息对应的第二MAC,则直接获取第二MAC,执行步骤901。
若移动性管理网元发现其未存储有对应的归属网络信息,或者与归属网络信息对应的第二MAC,则移动性管理网元可以从公钥授权网元获取第二MAC,具体的,该过程包括:
移动性管理网元生成移动性管理网元的公钥和移动性管理网元的私钥;
移动性管理网元向公钥授权网元发送移动向性管理网元的私钥;
公钥授权网元接收移动性管理网元的私钥,使用自己的私钥对移动性管理网元的公钥进行签名生成第二MAC,并向移动性管理网元发送第二MAC;
移动性管理网元接收公钥授权网元发送的第二MAC。
其中,移动性管理网元可以根据公私钥密钥生成方法生成一对公私钥,其中,公私钥密钥生成方法可以为RSA密钥生成算法,生成方法可参见现有技术,本方案不予限制。
除使用自己的私钥对移动性管理网元的公钥进行签名生成第二MAC之外,公钥授权网元还可以使用自己的私钥、第二MAC的有效时间对移动性管理网元的公钥进行签名生成第二MAC。当使用自己的私钥、第二MAC的有效时间对移动性管理网元的公钥进行签名生成第二MAC时,请求消息的响应还可以包括第二MAC的有效时间。有效时间可以是公钥授权网元预先配置的。
示例性的,移动性管理网元向公钥授权网元发送移动性管理网元的私钥可以包括:移动性管理网元根据终端的标识信息找到公钥授权网元,并向公钥授权网元发送请求消息, 其中,移动性管理网元可以根据终端的标识中的Home PLMN ID找到公钥授权网元。
由此可见,移动性管理网元生成的公私钥对是以归属网络信息为粒度的,移动性管理网元可以在面向同一归属网络信息下的终端时使用相同的公私钥对消息进行保护。
需要说明的是,该示例中,移动性管理网元即使发现其存储有与归属网络信息对应的第二MAC但若发现过程比较长,如:超过设定的阈值,则移动性管理网元仍需要采用下述图9所示方法的第一场景所述的方式,通过与公钥授权网元的交互获取第二MAC。
又一种示例中,以第二MAC与归属网络信息以及移动性管理网元的公钥对应存储为例,移动性管理网元可以接收终端发送的初始NAS消息,初始NAS消息可以包括终端的标识;移动性管理网元根据终端的标识确定终端的归属网络信息;移动性管理网元查看自身是否存储有与确定的归属网络信息对应的第二MAC和移动性管理网元的公钥,若存储有与归属网络信息对应的第二MAC,或者,存储有与归属网络信息对应的第二MAC和移动性管理网元的公钥,则直接获取第二MAC,执行步骤901。
若移动性管理网元发现其未存储有与归属网络信息对应的第二MAC,而存储有与PLMN ID对应的移动性管理网元的公钥,则移动性管理网元可以获取与归属网络信息对应的移动性管理网元的公钥,通过与公钥授权网元的交互获取第二MAC。具体的,该过程可参照上述示例中所述,不再赘述。
需要说明的是,该示例中,移动性管理网元即使发现其存储有与归属网络信息对应的第二MAC,或者,第二MAC和移动性管理网元的公钥,但若发现过程比较长,如:超过设定的阈值,则移动性管理网元仍需要采用下述图9所示方法的第一场景所述的方式,通过与公钥授权网元的交互获取第二MAC。
其中,上述示例中,终端的标识可以包括终端的(subscription concealed identifier,SUCI)用户隐藏标识,5G全球唯一临时身份(globally unique temporary identity,GUTI)。终端的标识可以包括终端的归属网络信息。
其中,本申请实施例中,第二MAC可以对应有效时间。可选的,移动性管理网元还存储第二MAC对应的有效时间。
若移动性管理网元获取到第二MAC,但第二MAC的有效时间的剩余时间小于预设时长,则移动性管理网元采用下述图9所示方法的第一场景所述的方式,通过与公钥授权网元的交互获取第二MAC。反之,若移动性管理网元获取到第二MAC,且第二MAC的有效时间大于或等于预设时长,则移动性管理网元直接获取第二MAC,执行步骤902。
其中,第二MAC的有效时间可以指第二MAC过期的时间点,也可以是有效时间段。有效时间、预设时长可以根据需要进行设置,不予限制。以第二MAC的有效时间是有效时间段为例,若第二MAC的有效时间的剩余时间小于预设时长,则表示移动性管理网元上的第二MAC即将失效,不可用,需要及时更新。若第二MAC的有效时间的剩余时间大于或等于预设时长,则表示移动性管理网元上的第二MAC在有效期内,是可用的。
例如,假设移动性管理网元上存储有第二MAC,且第二MAC的有效时间从T1时刻启动,第二MAC的有效时间为10分钟,预设时长为2分钟,若在T2时刻,第二MAC的有效时间的剩余时间为1分钟,小于2分钟,则表示第二MAC不可用,移动性管理网元需要从公钥授权网元重新获取第二MAC。
在图9所示方法的第二个场景中,执行步骤901之前,终端需要将自身的能力信息上 报给移动性管理网元,待移动性管理网元确定终端具备对NAS消息进行完整性保护的能力,才执行步骤901。具体的,该过程可以包括:
终端向移动性管理网元发送初始NAS消息,该初始NAS消息可以包括终端的能力信息,终端的能力信息可以用于指示终端具备对NAS消息进行完整性保护的能力;
移动性管理网元接收初始NAS消息,根据初始NAS消息包括的终端的能力信息确定终端具备对NAS消息进行完整性保护的能力。
其中,初始NAS消息可以为终端从空闲(idle)态到连接(connected)态发送的第一条NAS消息,该初始NAS消息可以是注册请求消息、服务请求消息、去注册请求消息等。
其中,终端的能力信息可以有以下两种实现方式:
一种实现方式,显示方式:终端的能力信息为用于指示终端具备对NAS消息进行完整性保护的能力的一个比特位,初始NAS消息携带该比特位时代表终端具备对NAS消息进行完整性保护的能力,反之,初始NAS消息不携带该比特位时代表终端不具备对NAS消息进行完整性保护的能力。或者,采用二进制比特1代表终端具备对NAS消息进行完整性保护的能力,采用二进制比特0代表终端不具备对NAS消息进行完整性保护的能力。
又一种实现方式,隐式方式:终端的能力信息可以是上述步骤901中所述的第一随机数值,由终端随机生成,用于移动性管理网元生成第一MAC,当终端支持对NAS消息进行完整性保护时,需要向移动性管理网元发送第一随机数值以便于移动性管理网元根据该第一随机数值生成第一MAC,如:若终端向移动性管理网元发送第一随机数值,则可以指示移动性管理网元终端具备对NAS消息进行完整性保护的能力,反之,若不发送,则指示移动性管理网元终端不具备对NAS消息进行完整性保护的能力。
终端可以根据自身是否被预配置公钥授权网元的公钥,而向移动性管理网元指示自己是否具备对下行NAS消息进行完整性保护的能力,如:终端可以判断自身是否被预配置公钥授权网元的公钥,若配置有公钥授权网元的公钥,则向移动性管理网元发送包括终端的能力信息的初始NAS消息,反之,则不发送包括终端的能力信息的初始NAS消息。
或者,终端可以根据SIM卡的指示向移动性管理网元指示自己是否具备对下行NAS消息进行完整性保护的能力,如:公钥授权网元的公钥由运营商预先配置到终端的SIM卡上,在将SIM卡插入终端后,SIM卡可以指示终端具备对下行NAS消息进行完整性保护的能力。
进一步可选的,初始NAS消息还包括终端的标识,终端的标识可以为SUCI或5G-GUTI,两者都包含归属(home)PLMN ID,以便移动性管理网元根据终端的标识包括的Home PLMN ID找到公钥授权网元。
在图9所示方法的第三个场景中,步骤903之前,终端需要确定是否对NAS消息进行完整性校验,若确定对NAS消息进行完整性校验,则执行步骤903,反之,则校验NAS消息完整性失败,执行失败流程。具体的,终端可以采用下述两种方式确定是否对NAS消息进行完整性校验:
方式一、终端根据NAS消息中是否携带关键信元,确定是否对NAS消息进行完整性校验。若NAS消息中携带关键信元,例如包含指示终端从5G网络回到4G网络的指示,且终端具备对NAS消息进行完整性保护的能力,则终端确定对NAS消息进行完整性校验。此时,若中不包含第二MAC、第一MAC以及移动性管理网元的公钥中的一种或者多种信 息,则终端认为不对NAS消息进行完整性校验,校验NAS消息完整性失败,执行失败流程。同理,若移动性管理网元预备在NAS消息中携带关键信元,则移动性管理网元对NAS消息进行完整性保护,否则,则不对NAS消息进行完整性保护。
方式二、终端根据保护指示确定是否对NAS消息进行完整性校验。如:若包括保护指示,且终端具备对NAS消息进行完整性保护的能力,则终端确定对NAS消息进行完整性校验。此时,若中不包含第二MAC、第一MAC以及移动性管理网元的公钥中的一种或者多种信息,则终端认为不对NAS消息进行完整性校验,校验NAS消息完整性失败,执行失败流程。或者,若不包括保护指示,终端具备对NAS消息进行完整性保护的能力,但NAS消息没有完整性保护,则同样认为不对NAS消息进行完整性校验,校验NAS消息完整性失败,执行失败流程。
需要说明的是,NAS消息中的一些信元(如:未被完整性保护的信元)被篡改或伪造后并不一定会对终端产生攻击效果,只有特定的信元(如上述方式一中所述的关键信元)被篡改或者伪造可能造成对终端的攻击,例如,若NAS消息携带具有回退指示功能的特定信元,该回退指示用于指示终端从5G网络回退到4G网络,若该回退指示会攻击者伪造后信息,则终端对NAS消息校验成功后,会将根据该回退指示回退到4G网络,这将对终端造成降级攻击,即从安全性较高的5G网络回退到安全性较低的4G网络,因此,终端可以采用上述方式,根据NAS消息中是否存在特定信元(或关键信元)来判断是否校验该NAS消息的完整性,如此,可以减少校验次数,提升通信效率。
下面结合图10所示过程,对图9所示的完整性保护方法进行描述。
图10为本申请实施例提供的又一种安全保护方法,如图10所示,所述方法包括:
步骤1001:终端向移动性管理网元发送初始NAS消息。
其中,该初始NAS消息可以包括终端的能力信息,终端的能力信息可以用于指示终端具备对NAS消息进行完整性保护的能力。
步骤1002:移动性管理网元接收初始NAS消息,根据初始NAS消息包括的终端的能力信息,确定终端具备对NAS消息进行完整性保护的能力。
步骤1003:移动性管理网元生成移动性管理网元的公钥和移动性管理网元的私钥。
步骤1004:移动性管理网元向公钥授权网元发送请求消息,请求消息用于请求公钥授权网元对移动向性管理网元的私钥进行签名,该请求消息包括移动性管理网元的私钥。
步骤1005:公钥授权网元接收移动性管理网元的公钥,使用自己的私钥对移动性管理网元的公钥进行签名生成第二MAC。
步骤1006:公钥授权网元向移动性管理网元发送请求消息的响应,该请求消息的响应包括第二MAC。
步骤1007:移动性管理网元接收请求消息的响应,对NAS消息进行完整性保护生成第一MAC。
其中,步骤1007可参照步骤901所述,不再赘述。
步骤1008:移动性管理网元向终端发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息。
其中,步骤1008可参照步骤902所述,不再赘述。
步骤1009:终端接收第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息, 根据公钥授权网元的公钥、第一MAC、第二MAC以及移动性管理网元的公钥,对NAS消息进行完整性校验。
其中,步骤1009可参照步骤903所述,不再赘述。
基于图10所示方法,在网络侧确定终端具备对NAS信息进行完整性保护的情况下,移动性管理网元从公钥授权网元获取第二MAC,并将第二MAC、对NAS消息进行完整性校验生成的第一MAC以及移动性管理网元的公钥发送给终端,终端配置一个公钥授权网元的公钥,终端根据公钥授权网元的公钥以及移动性管理网元的公钥对第二MAC进行校验,并在第二MAC校验成功的情况下,根据接收到的移动性管理网元的公钥对第一MAC进行校验,从而对NAS消息进行完整性校验。大大减少了终端上配置的移动性管理网元的公钥的复杂度,同时,避免NAS消息被篡改。
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,上述终端、接入网设备、移动性管理网元和公钥授权网元为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对终端、接入网设备、移动性管理网元和公钥授权网元进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图11示出了的一种通信装置110的结构图,该通信装置110可以为移动性管理网元或者移动性管理网元中的芯片或者片上系统,该通信装置110可以用于执行上述实施例中涉及的移动性管理网元的功能。作为一种可实现方式,图11所示通信装置110包括:生成单元1101,发送单元1102;
生成单元1101,对NAS消息进行完整性保护,以生成第一MAC;例如,生成单元1101用于支持通信装置110执行步骤901、步骤1007。
发送单元1102,用于向终端发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,其中,第二MAC为公钥授权网元根据移动性管理网元的公钥进行签名后生成的MAC。例如,发送单元1102,用于支持通信装置110执行步骤902、步骤1008。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。本申请实施例提供的通信装置110,用于执行上述图9、图10所示安全保护方法中移动性管理网元的功能,因此可达到与上述安全保护方法相同的效果。
作为又一种可实现方式,图11所示通信装置110可以包括:处理模块和通信模块。处理模块集成有生成单元1101的功能;通信模块集成有发送单元1102的功能。处理模块用于对通信装置110的动作进行控制管理,例如,处理模块用于支持该通信装置110执行步骤901、步骤1007以及执行本文所描述的技术的其它过程。通信模块用于支持通信装置 110执行步骤902、步骤1008以及与其他网络实体的通信,例如与图1示出的功能模块或网络实体之间的通信。进一步的,该通信装置110还可以包括存储模块,用于存储通信装置110的程序代码和数据。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块可以是收发电路或通信接口等。存储模块可以是存储器。当处理模块为处理器,通信模块为通信接口,存储模块为存储器时,图11所示通信装置110可以为图4所示通信装置400。
图12示出了的一种通信装置120的结构图,该通信装置120可以为终端或者终端中的芯片或者片上系统,该通信装置120可以用于执行上述实施例中涉及的终端的功能。作为一种可实现方式,图12所示通信装置120包括:接收单元1201,完整性校验单元1202。
接收单元1201,用于接收移动性管理网元发送的第一MAC、第二MAC、移动性管理网元的公钥以及非接入层NAS消息;第一MAC是对NAS消息进行完整性保护后生成的MAC,第二MAC是公钥授权网元根据公钥授权网元的私钥对移动性管理网元的公钥进行签名后生成的MAC。例如,接收单元1201用于支持通信装置120执行步骤903、步骤1009中的接收动作。
完整性校验单元1202,用于根据公钥授权网元的公钥、移动性管理网元的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。例如,完整性校验单元1202用于支持通信装置120执行步骤903、步骤1009中对NAS消息进行完整性校验的动作。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。本申请实施例提供的通信装置120,用于执行上述安全保护方法中通信装置120的功能,因此可以达到与上述安全保护方法相同的效果。
作为又一种可实现方式,图12所示通信装置120可以包括:处理模块和通信模块。处理模块集成有完整性校验单元1202的功能;通信模块集成有接收单元1201的功能。处理模块用于对通信装置120的动作进行控制管理,例如,处理模块用于支持该通信装置120执行步骤903、步骤1009中对NAS消息进行完整性校验的动作以及执行本文所描述的技术的其它过程。通信模块用于支持通信装置120执行步骤903、步骤1009中接收移动性管理网元的公钥、第二MAC、第一MAC以及NAS消息的动作以及与其他网络实体的通信,例如与图1示出的功能模块或网络实体之间的通信。进一步的,该通信装置120还可以包括存储模块,用于存储通信装置120的程序代码和数据。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块可以是收发电路或通信接口等。存储模块可以是存储器。当处理模块为处理器,通信模块为通信接口,存储模块为存储器时,图12所示通信装置120可以为图4所示通信装置400。
图13示出了的一种通信装置130的结构图,该通信装置130可以为公钥授权网元或者公钥授权网元中的芯片或者片上系统,该通信装置130可以用于执行上述实施例中涉及的公钥授权网元的功能。作为一种可实现方式,图13所示通信装置130包括:接收单元1301、签名单元1302、发送单元1303;
接收单元1301,用于接收移动性管理网元发送的移动性管理网元的公钥。例如,接收单元1301用于支持通信装置130执行步骤1005。
签名单元1302,用于根据公钥授权网元的私钥对移动性管理网元的公钥进行签名,得到第二MAC;例如,签名单元1302用于支持通信装置130执行步骤1005。
发送单元1303,用于向移动性管理网元发送第二MAC。例如,发送单元1303用于支持通信装置130执行步骤1006。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。本申请实施例提供的通信装置130,用于执行上述安全保护方法中通信装置130的功能,因此可以达到与上述安全保护方法相同的效果。
作为又一种可实现方式,图13所示通信装置130可以包括:处理模块和通信模块。处理模块集成有签名单元1302的功能;通信模块集成有接收单元1301、发送单元1303的功能。处理模块用于对通信装置130的动作进行控制管理,例如,处理模块用于支持该通信装置130执行步骤1005以及执行本文所描述的技术的其它过程。通信模块用于支持通信装置130执行步骤1005、步骤1006以及与其他网络实体的通信,例如与图1示出的功能模块或网络实体之间的通信。进一步的,该通信装置130还可以包括存储模块,用于存储通信装置130的程序代码和数据。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块可以是收发电路或通信接口等。存储模块可以是存储器。当处理模块为处理器,通信模块为通信接口,存储模块为存储器时,图13所示通信装置130可以为图4所示通信装置400。
图14示出了的一种安全保护系统的组成示意图,如图14所示,该安全保护系统中可以包括移动性管理网元141、终端142。进一步的,还可以包括公钥授权网元143。需要说明的是,图14仅为示例性附图,本申请实施例不限定图14所示系统包括的网元以及网元的个数。
其中,移动性管理网元141具有上述图11所示通信装置110的功能,可以用于对NAS消息进行完整性保护,以生成第一MAC,并向终端142发送第一MAC、第二MAC、移动性管理网元的公钥以及NAS消息,其中,第二MAC为公钥授权网元143根据移动性管理网元的公钥进行签名后生成的MAC。
终端140具有上述图12所示通信装置120的功能,可以用于接收移动性管理网元141发送的第一MAC、第二MAC、移动性管理网元141的公钥以及非接入层NAS消息,根据公钥授权网元143的公钥、移动性管理网元141的公钥、第二MAC以及第一MAC,对NAS消息进行完整性校验。
具体的,移动性管理网元141可以用于向公钥授权网元发送移动性管理网元141的公钥,接收公钥授权网元143发送的第二MAC。
公钥授权网元143具有上述图13所示通信装置130的功能,可以用于接收移动性管理网元141发送的移动性管理网元141的公钥,根据公钥授权网元143的私钥对移动性管理网元141的公钥进行签名,得到第二MAC,向移动性管理网元发送第二MAC。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到该安全保 护系统对应网元的功能描述,在此不再赘述。
基于图14所示的安全保护系统,在移动性管理网元141确定终端142具备对NAS信息进行完整性保护的情况下,移动性管理网元141从公钥授权网元143获取第二MAC,并将第二MAC、对NAS消息进行完整性校验生成的第一MAC以及移动性管理网元的公钥发送给终端142,终端142配置一个公钥授权网元的公钥,终端142根据公钥授权网元143的公钥以及移动性管理网元141的公钥对第二MAC进行校验,并在第二MAC校验成功的情况下,根据接收到的移动性管理网元141的公钥对第一MAC进行校验,从而对NAS消息进行完整性校验。大大减少了终端142上配置的移动性管理网元141的公钥的复杂度,同时,避免NAS消息被篡改。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (20)

  1. 一种安全保护方法,其特征在于,所述方法包括:
    移动性管理网元对非接入层NAS消息进行完整性保护,以生成第一消息验证码MAC;
    所述移动性管理网元向终端发送所述第一MAC、第二MAC、所述移动性管理网元的公钥以及所述NAS消息,其中,所述第二MAC为所述公钥授权网元根据所述移动性管理网元的公钥进行签名后生成的MAC。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述移动性管理网元从所述终端接收初始NAS消息;
    所述移动性管理网元响应于所述初始NAS消息,向所述公钥授权网元发送所述移动性管理网元的公钥;
    所述移动性管理网元接收所述公钥授权网元发送的所述第二MAC。
  3. 根据权利要求2所述的方法,其特征在于,所述初始NAS消息包括所述终端的归属网络信息;所述移动性管理网元响应于所述初始NAS消息,向所述公钥授权网元发送所述移动性管理网元的公钥,包括:
    所述移动性管理网元根据所述终端的归属网络信息,向所述公钥授权网元发送所述移动性管理网元的公钥。
  4. 根据权利要求2或3所述的方法,其特征在于,所述初始NAS消息包括第一随机数值,所述移动性管理网元对非接入层NAS消息进行完整性保护,生成第一MAC,包括:
    所述移动性管理网元生成第二随机数值;
    所述移动性管理网元根据所述第一随机数值、第二随机数值以及移动性管理网元的私钥对NAS消息进行完整性保护,以生成所述第一MAC。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    所述移动性管理网元向所述终端发送所述第二随机数值。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述移动性管理网元对非接入层NAS消息进行完整性保护,以生成第一MAC,包括:
    当所述移动性管理网元确定所述移动性管理网元与所述终端间的NAS安全保护未被激活时,所述移动性管理网元对非接入层NAS消息进行完整性保护,以生成第一MAC。
  7. 一种安全保护方法,其特征在于,所述方法还包括:
    终端接收移动性管理网元发送的第一消息验证码MAC、第二MAC、移动性管理网元的公钥以及非接入层NAS消息;其中,所述第一MAC是所述移动性管理网元对所述NAS消息进行完整性保护后生成的MAC,所述第二MAC是公钥授权网元根据所述公钥授权网元的私钥对所述移动性管理网元的公钥进行签名后生成的MAC;
    所述终端根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验。
  8. 根据权利要求7所述的方法,其特征在于,所述终端根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验,包括:
    所述终端根据所述公钥授权网元的公钥、所述移动性管理网元的公钥对所述第二MAC进行校验;
    当所述第二MAC校验成功时,所述终端根据所述移动性管理网元的公钥以及所述第一MAC对所述NAS消息进行完整性校验。
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    所述终端接收所述移动性管理网元发送的第二随机数值;其中,所述第二随机数值由所述移动性管理网元生成;
    所述终端根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验,包括:所述终端根据所述公钥授权网元的公钥、所述第二MAC、所述第一MAC、第一随机数值和所述第二随机数值,对所述NAS消息进行完整性校验;其中,所述第一随机数值由所述终端生成。
  10. 根据权利要求7-9任一项所述的方法,其特征在于,所述终端根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验,包括:
    当所述NAS消息包括关键信元时,所述终端根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验。
  11. 一种移动性管理网元,其特征在于,所述移动性管理网元包括:
    生成单元,对非接入层NAS消息进行完整性保护,以生成第一消息验证码MAC;
    发送单元,用于向终端发送所述第一MAC、第二MAC、所述移动性管理网元的公钥以及所述NAS消息,其中,所述第二MAC为所述公钥授权网元根据所述移动性管理网元的公钥进行签名后生成的MAC。
  12. 根据权利要求11所述的移动性管理网元,其特征在于,所述移动性管理网元还包括:
    接收单元,用于从所述终端接收初始NAS消息;
    发送单元,具体用于响应于所述初始NAS消息,向所述公钥授权网元发送所述移动性管理网元的公钥;
    所述接收单元,还用于接收所述公钥授权网元发送的所述第二MAC。
  13. 根据权利要求12所述的移动性管理网元,其特征在于,所述初始NAS消息包括所述终端的归属网络信息;所述发送单元,具体用于:
    根据所述终端的归属网络信息,向所述公钥授权网元发送所述移动性管理网元的公钥。
  14. 根据权利要求12或13所述的移动性管理网元,其特征在于,所述初始NAS消息包括第一随机数值,所述生成单元,具体用于:
    所述移动性管理网元生成第二随机数值;
    所述移动性管理网元根据所述第一随机数值、第二随机数值以及移动性管理网元的私钥对NAS消息进行完整性保护,以生成第一消息验证码MAC。
  15. 根据权利要求14所述的移动性管理网元,其特征在于,
    所述发送单元,还用于向所述终端发送所述第二随机数值。
  16. 根据权利要求11-15任一项所述的移动性管理网元,其特征在于,
    所述生成单元,具体用于当所述移动性管理网元与所述终端间的NAS安全保护未被激活时,对非接入层NAS消息进行完整性保护,以生成第一MAC。
  17. 一种终端,其特征在于,所述终端还包括:
    接收单元,用于接收移动性管理网元发送的第一消息验证码MAC、第二MAC、移动性管理网元的公钥以及非接入层NAS消息;其中,所述第一MAC是所述移动性管理网元对所述NAS消息进行完整性保护后生成的MAC,所述第二MAC是公钥授权网元根据所述公钥授权网元的私钥对所述移动性管理网元的公钥进行签名后生成的MAC;
    完整性校验单元,用于根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验。
  18. 根据权利要求17所述的终端,其特征在于,所述完整性校验单元,具体用于:
    根据所述公钥授权网元的公钥、所述移动性管理网元的公钥对所述第二MAC进行校验;
    当所述第二MAC校验成功时,根据所述移动性管理网元的公钥以及所述第一MAC对所述NAS消息进行完整性校验。
  19. 根据权利要求17所述的终端,其特征在于,
    所述接收单元,还用于接收所述移动性管理网元发送的第二随机数值;其中,所述第二随机数值由所述移动性管理网元生成;
    所述完整性校验单元,具体用于根据所述公钥授权网元的公钥、所述第二MAC、所述第一MAC、第一随机数值和所述第二随机数值,对所述NAS消息进行完整性校验;其中,所述第一随机数值由所述终端生成。
  20. 根据权利要求17-19任一项所述的终端,其特征在于,
    所述完整性校验单元,具体用于当所述NAS消息包括关键信元时,根据所述公钥授权网元的公钥、所述移动性管理网元的公钥、所述第一MAC以及所述第二MAC,对所述NAS消息进行完整性校验。
PCT/CN2020/084843 2019-04-26 2020-04-15 一种安全保护方法及装置 WO2020216109A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910346581.7A CN111866884B (zh) 2019-04-26 2019-04-26 一种安全保护方法及装置
CN201910346581.7 2019-04-26

Publications (1)

Publication Number Publication Date
WO2020216109A1 true WO2020216109A1 (zh) 2020-10-29

Family

ID=72941530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084843 WO2020216109A1 (zh) 2019-04-26 2020-04-15 一种安全保护方法及装置

Country Status (2)

Country Link
CN (1) CN111866884B (zh)
WO (1) WO2020216109A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101405987A (zh) * 2006-03-22 2009-04-08 Lg电子株式会社 无线系统的非对称加密
US20100115275A1 (en) * 2008-11-03 2010-05-06 Samsung Electronics Co. Ltd. Security system and method for wireless communication system
CN101730095A (zh) * 2008-10-28 2010-06-09 华为技术有限公司 一种实现消息完整性保护的方法、装置及系统
CN108781366A (zh) * 2016-03-10 2018-11-09 华为技术有限公司 用于5g技术的认证机制

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI425801B (zh) * 2006-06-19 2014-02-01 Interdigital Tech Corp 初始傳信訊息中原始用戶識別碼安全保護的方法及裝置
CN101500229B (zh) * 2008-01-30 2012-05-23 华为技术有限公司 建立安全关联的方法和通信网络系统
CN105191479A (zh) * 2014-03-06 2015-12-23 华为技术有限公司 一种信息保护方法、基站、用户设备和移动管理实体
CN109729096B (zh) * 2016-01-05 2020-06-16 华为技术有限公司 移动通信方法、装置及设备
CN109391937B (zh) * 2017-08-04 2021-10-19 华为技术有限公司 公钥的获取方法、设备及系统
CN109560919B (zh) * 2017-09-27 2021-02-09 华为技术有限公司 一种密钥衍生算法的协商方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101405987A (zh) * 2006-03-22 2009-04-08 Lg电子株式会社 无线系统的非对称加密
CN101730095A (zh) * 2008-10-28 2010-06-09 华为技术有限公司 一种实现消息完整性保护的方法、装置及系统
US20100115275A1 (en) * 2008-11-03 2010-05-06 Samsung Electronics Co. Ltd. Security system and method for wireless communication system
CN108781366A (zh) * 2016-03-10 2018-11-09 华为技术有限公司 用于5g技术的认证机制

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
INTEL: "Key Issue for Fake Base Station", 3GPP TSG SA WG3 (SECURITY) MEETING #94-ADHOC S3-190676, 15 March 2019 (2019-03-15), XP051697611, DOI: 20200703160726A *

Also Published As

Publication number Publication date
CN111866884B (zh) 2022-05-24
CN111866884A (zh) 2020-10-30

Similar Documents

Publication Publication Date Title
US11825303B2 (en) Method for performing verification by using shared key, method for performing verification by using public key and private key, and apparatus
WO2020177768A1 (zh) 一种网络验证方法、装置及系统
US11496320B2 (en) Registration method and apparatus based on service-based architecture
US10091175B2 (en) Authenticating a device in a network
US11582602B2 (en) Key obtaining method and device, and communications system
US20200228977A1 (en) Parameter Protection Method And Device, And System
CN108012266B (zh) 一种数据传输方法及相关设备
JP2012110009A (ja) エンティティの認証と暗号化キー生成の機密保護されたリンクのための方法と構成
US20110135095A1 (en) Method and system for generating key identity identifier when user equipment transfers
WO2020216338A1 (zh) 一种参数发送方法及装置
WO2020221218A1 (zh) 信息获取方法及装置
CN112514436A (zh) 发起器和响应器之间的安全的、被认证的通信
JP2014508436A (ja) 無線通信システムにおける短文データの暗号化方法及び装置
WO2018205148A1 (zh) 一种数据包校验方法及设备
US20230308875A1 (en) Wi-fi security authentication method and communication apparatus
US20230327857A1 (en) Communication Method and Apparatus
TW202142010A (zh) 用戶資料更新方法、裝置、節點和儲存媒體
WO2021103772A1 (zh) 数据传输方法和装置
WO2020087286A1 (zh) 一种密钥生成方法、设备及系统
CN113364584A (zh) 一种物联网设备与雾节点认证系统和方法
CN109819439B (zh) 密钥更新的方法及相关实体
WO2010028603A1 (zh) 更新跟踪区时的密钥生成方法及系统
WO2022027522A1 (zh) 一种安全通信方法以及装置
Ma et al. A group-based multicast service authentication and data transmission scheme for 5G-V2X
JP2022548137A (ja) エアインターフェース情報セキュリティ保護方法および装置

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20795991

Country of ref document: EP

Kind code of ref document: A1