A method and apparatus for security protection

By maintaining a corresponding NAS serial number for each access technology and using a first parameter to distinguish the access technology, the replay attack problem of multiple NAS connection links in the 5G system is solved, and data security is improved.

CN120499662BActive Publication Date: 2026-02-03HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510439013.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-11-17
Publication Date
2026-02-03
Estimated Expiration
2037-11-17

AI Technical Summary

Technical Problem

In 5G systems, when a terminal accesses an AMF node through multiple NAS connection links, there is a risk of replay attacks, resulting in poor data security.

Method used

The terminal and core network equipment maintain corresponding NAS serial numbers for each access technology and use the first parameter to distinguish different access technologies, ensuring that NAS messages are protected by the same NAS key and serial number under different access technologies.

Benefits of technology

It reduces the possibility of replay attacks and provides security protection for multiple NAS connection links.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499662B_ABST
    Figure CN120499662B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of wireless communication. Embodiments of the present application provide a method and device for security protection, which are used to implement security protection on multiple NAS connection links. The method of the present application comprises: a terminal determines a first parameter, the first parameter being used to represent an access technology used for transmitting a non-access layer (NAS) message, wherein the terminal can support at least two access technologies, and can maintain a corresponding NAS sequence number for each of the at least two access technologies, and then the terminal performs security protection on the NAS message according to the first parameter, a NAS key, and a NAS sequence number corresponding to an access technology used for transmitting the NAS message. The present application is suitable for a process of performing security protection on the NAS message.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application with the application number 201711148926.5 and the original filing date of November 17, 2017, and the entire contents of the original application are incorporated herein by reference. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of wireless communication, and in particular to a security protection method and device. BACKGROUND

[0003] In the fifth generation (5th generation, 5G) system, a terminal can access an access and mobility management function (AMF) node only through a 3rd generation partnership project (3GPP) access technology, or only through a non-3GPP (non-3GPP) access technology, or the terminal can also access the AMF node through both the 3GPP access technology and the non-3GPP access technology. In the case where the terminal accesses the AMF node through both the 3GPP access technology and the non-3GPP access technology, there are two non-access stratum (NAS) connection links between the terminal and the AMF node. If the terminal uses a set of NAS keys and a set of non-access stratum counts (NAS counts) to protect the two connection links respectively, the AMF node may first receive a smaller NAS count transmitted through one of the links and then receive a larger NAS count transmitted through the other link, thereby causing a replay attack and resulting in poor data security of the NAS connection links between the terminal and the AMF node. Therefore, in the case where there are multiple NAS connection links between the terminal and the AMF, how to protect the multiple NAS connection links is a problem to be solved. SUMMARY

[0004] Embodiments of the present application provide a security protection method and device, which can achieve security protection of multiple NAS connection links.

[0005] In order to achieve the above-mentioned purpose, embodiments of the present application provide the following technical solutions:

[0006] Embodiments of the present application provide a method for security protection, which comprises: determining a first parameter by a terminal, and then performing security protection on a NAS message according to the first parameter, a NAS key and a NAS sequence number corresponding to an access technology used for transmitting the NAS message. The first parameter is an input parameter of the terminal when performing security protection on the NAS message, and is used to indicate an access technology used for transmitting a non-access stratum (NAS) message. The terminal can support at least two access technologies, and can maintain a corresponding NAS sequence number for each of the at least two access technologies.

[0007] For example, the at least two access technologies supported by the terminal can comprise a 3GPP access technology, a non-3GPP access technology, a fixed network access technology and other access technologies which can use a 3GPP network core network device together with the 3GPP access technology.

[0008] Optionally, the first parameter can also be used to indicate a transmission path used by the terminal for transmitting the NAS message, and the terminal can maintain a corresponding NAS sequence number for each transmission path used for transmitting the NAS message.

[0009] The first parameter can be a newly added input parameter in an encryption and decryption or integrity protection process, for example, an ACCESS parameter. Different values of bit positions of the ACCESS parameter can be used to indicate different access technologies. For example, if the first parameter is 00, it means that the 3GPP access technology is used, and if the first parameter is 01, it means that the non-3GPP access technology is used. Alternatively, the first parameter can also be all or part of bit positions of COUNT in the input parameter. Alternatively, the first parameter can also be all or part of bit positions of BEARER in the input parameter.

[0010] The NAS key is a NAS key shared by the at least two access technologies supported by the terminal.

[0011] By using the method, the terminal can maintain a corresponding NAS sequence number for each of the at least two access technologies, and when the terminal transmits the NAS message by using different access technologies, the NAS message is not protected by using a set of NAS sequence numbers, but is protected by using the NAS sequence number maintained for the corresponding access technology, so that the problem of replay attack can be avoided when the core network device first receives a smaller NAS sequence number transmitted through one link and then receives a larger NAS sequence number transmitted through another link, and in the method, the first parameter for distinguishing different access technologies is used when the NAS message is protected, so that even if the NAS key and the NAS sequence number used when the NAS message transmitted by using different access technologies is protected are the same, the result of protecting the NAS message is different, the possibility of replay attack is reduced, and the security of the multiple NAS connection links is realized.

[0012] In a possible design, the at least two access technologies include a first access technology, if the access technology used for transmitting the NAS message is the first access technology, the terminal can determine a first uplink NAS sequence number corresponding to the first access technology before the terminal determines the first parameter, and then the terminal sends a first message to the core network device, the first message is protected by using the first uplink NAS sequence number and the NAS key, and the first message carries part or all of the first uplink NAS sequence number.

[0013] Exemplarily, the first access technology can be a non-3GPP access technology.

[0014] In a possible implementation, the first uplink NAS sequence number is 0, where part or all of the first uplink NAS sequence number is 0. Alternatively, the first uplink NAS sequence number is a random number, specifically, part or all of the first uplink NAS sequence number is a random number, for example, a sequence number part or a NAS overflow part of the first uplink NAS sequence number is a random number. At this time, the rest is 0. Alternatively, the at least two access technologies further include a second access technology, and the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the second access technology and stored by the terminal. If the terminal stores at least two uplink NAS sequence numbers corresponding to the second access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the second access technology and stored by the terminal. Alternatively, the at least two access technologies further include a second access technology, and the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the second access technology and stored by the terminal plus 1. If the terminal stores at least two uplink NAS sequence numbers corresponding to the second access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the second access technology and stored by the terminal plus 1. Alternatively, the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the first access technology and stored by the terminal. If the terminal stores at least two uplink NAS sequence numbers corresponding to the first access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the first access technology and stored by the terminal. Alternatively, the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the first access technology and stored by the terminal plus 1. If the terminal stores at least two uplink NAS sequence numbers corresponding to the first access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the first access technology and stored by the terminal plus 1.

[0015] In another possible design, the at least two access technologies include a first access technology and a second access technology. If the access technology used for transmitting the NAS message is the first access technology, before determining the first parameter, the terminal can send a first message to the core network device, where the first message is secured by the NAS key and an uplink NAS sequence number corresponding to the second access technology, and the first message carries part or all of the uplink NAS sequence number corresponding to the second access technology.

[0016] Optionally, the design is implemented on the premise that the terminal has accessed the core network device through the 3GPP access technology.

[0017] In a possible design, the first message can carry first indication information, which is used to indicate the access technology corresponding to part or all of the uplink NAS sequence number carried in the first message. Optionally, the first indication information can also be used to indicate the transmission path corresponding to part or all of the uplink NAS sequence number carried in the first message.

[0018] In a possible design, the terminal receives a second message from the core network device, and the second message includes one or both of a second uplink NAS sequence number and a first downlink NAS sequence number corresponding to the first access technology.

[0019] Optionally, the second message can include the first downlink NAS sequence number corresponding to the first access technology. Alternatively, the second message includes the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the first access technology.

[0020] Optionally, the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the first access technology are the same.

[0021] In a possible implementation, the second uplink NAS sequence number is 0, where all or part of the bits of the second uplink NAS sequence number are 0. Alternatively, the second uplink NAS sequence number is a random number, specifically, part or all of the bits of the second uplink NAS sequence number are a random number. For example, the sequence number part or the NAS overflow part of the second uplink NAS sequence number is a random number, and the remaining part is 0. Alternatively, the second uplink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology saved by the core network device, if the core network device saves at least two downlink NAS sequence numbers corresponding to the second access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology saved by the core network device. Alternatively, the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the second access technology saved by the core network device plus 1, if the core network device saves at least two downlink NAS sequence numbers corresponding to the second access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology saved by the core network device plus 1. Alternatively, the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the first access technology saved by the core network device plus 1, if the core network device saves at least two downlink NAS sequence numbers corresponding to the first access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the first access technology saved by the core network device plus 1. Alternatively, the second uplink NAS sequence number is the first uplink NAS sequence number. Alternatively, the second uplink NAS sequence number is the first uplink NAS sequence number plus 1.

[0022] In a possible design, the first downlink NAS sequence number is 0, where all or part of bits of the first downlink NAS sequence number are 0. Alternatively, the first downlink NAS sequence number is a random number, specifically, part or all of bits of the first downlink NAS sequence number are a random number. For example, a sequence number part or a NAS overflow part of the first downlink NAS sequence number is a random number. At this time, the remaining part is 0. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the first downlink NAS sequence number is a largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the first downlink NAS sequence number is a largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the first access technology, the first downlink NAS sequence number is a largest downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1.

[0023] In a possible design, the second message carries second indication information, where the second indication information is used to indicate an access technology corresponding to the first downlink NAS sequence number carried in the second message. Optionally, the second message can further carry indication information used to indicate the second uplink NAS sequence number carried in the second message.

[0024] Optionally, the second indication information is used to indicate a transmission path corresponding to the first downlink NAS sequence number carried in the second message. Optionally, the second message can further carry indication information used to indicate a transmission path corresponding to the second uplink NAS sequence number carried in the second message.

[0025] In a second aspect, an embodiment of the present application provides a security protection method, which includes:

[0026] The core network device determines a first parameter, and then performs security protection on the NAS message according to the first parameter, a NAS key, and a NAS sequence number corresponding to an access technology used to transmit the NAS message. The first parameter is used to indicate the access technology used to transmit the non-access stratum NAS message, and the core network device can maintain a corresponding NAS sequence number for each of at least two access technologies supported by the terminal.

[0027] Exemplarily, the at least two access technologies supported by the terminal can include a 3GPP access technology, a non-3GPP access technology, a fixed network access technology, and other access technologies that can use the 3GPP network core network device together with the 3GPP access technology

[0028] Optionally, the first parameter can also be used to represent a transmission path used by the core network device to transmit the NAS message, and the core network device can maintain a corresponding NAS sequence number for each transmission path used to transmit the NAS message respectively.

[0029] The first parameter can be an input parameter newly added in the encryption and decryption or integrity protection process, for example, an ACCESS parameter, and different access technologies can be represented by setting different values to bits of the ACCESS parameter. Exemplarily, if the first parameter is 00, it represents that the 3GPP access technology is used, and if the first parameter is 01, it represents that the non-3GPP access technology is used. Alternatively, the first parameter can also be all or part of bits of the COUNT in the input parameter. Alternatively, the first parameter can also be all or part of bits of the BEARER in the input parameter.

[0030] The NAS key is a NAS key shared by the at least two access technologies supported by the terminal.

[0031] By using the method, the core network device can maintain a corresponding NAS sequence number for each of the at least two access technologies, and the core network device uses the NAS sequence number maintained for the corresponding access technology to perform security protection on the NAS message when transmitting the NAS message using different access technologies, which can avoid the problem of replay attack caused by the fact that the terminal receives a smaller NAS sequence number transmitted through one link first and then receives a larger NAS sequence number transmitted through another link, and the first parameter used to distinguish different access technologies is also used when the NAS message is protected, so even if the NAS key and the NAS sequence number used when the NAS message transmitted through different access technologies is protected are the same, the result of protecting the NAS message is different, which reduces the possibility of replay attack and realizes security protection of multiple NAS connection links.

[0032] In a possible design, the at least two access technologies include a first access technology, and if the access technology used to transmit the NAS message is the first access technology, before the core network device determines the first parameter, the core network device can receive a first message, the first message is protected by the NAS key and a first uplink NAS sequence number corresponding to the first access technology, and the first message carries the first uplink NAS sequence number.

[0033] Exemplarily, the first access technology can be a non-3GPP access technology.

[0034] In a possible implementation, the first uplink NAS sequence number is 0, where part or all of the first uplink NAS sequence number is 0. Alternatively, the first uplink NAS sequence number is a random number, specifically, part or all of the bits in the first uplink NAS sequence number is a random number. For example, the sequence number part or the NAS overflow part in the first uplink NAS sequence number is a random number. At this time, the remaining part is 0. Alternatively, the at least two access technologies further include a second access technology, and the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the second access technology and saved by the terminal. If the terminal has saved at least two uplink NAS sequence numbers corresponding to the second access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the second access technology and saved by the terminal. Alternatively, the at least two access technologies further include a second access technology, and the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the second access technology and saved by the terminal plus 1. If the terminal has saved at least two uplink NAS sequence numbers corresponding to the second access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the second access technology and saved by the terminal plus 1. Alternatively, the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the first access technology and saved by the terminal. If the terminal has saved at least two uplink NAS sequence numbers corresponding to the first access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the first access technology and saved by the terminal. Alternatively, the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the first access technology and saved by the terminal plus 1. If the terminal has saved at least two uplink NAS sequence numbers corresponding to the first access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the first access technology and saved by the terminal plus 1.

[0035] In another possible design, the at least two access technologies include a first access technology and a second access technology. If the access technology used for transmitting the NAS message is the first access technology, before determining the first parameter, the core network device can receive a first message, the first message being securely protected by a NAS key and part or all of an uplink NAS sequence number corresponding to the second access technology, and the first message carrying the part or all of the uplink NAS sequence number corresponding to the second access technology.

[0036] Optionally, this design is implemented on the premise that the terminal has accessed the core network device through the 3GPP access technology.

[0037] In a possible design, the first message carries first indication information, and the first indication information is used to indicate an access technology corresponding to part or all of the uplink NAS sequence number carried by the first message. Optionally, the first indication information can also be used to indicate a transmission path corresponding to part or all of the uplink NAS sequence number carried by the first message.

[0038] In a possible design, after receiving the first message from the terminal, the core network device verifies part or all of the NAS sequence number carried by the first message according to the uplink NAS sequence number corresponding to the access technology indicated by the first indication information.

[0039] By using the embodiments of the present application, the core network device can independently maintain the NAS sequence number of the 3GPP access technology and the NAS sequence number of the non-3GPP access technology, and then verify the received uplink NAS sequence number according to the uplink NAS sequence number maintained by itself, thereby reducing the possibility of replay attacks.

[0040] In a possible design, the core network device determines one or both of the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the first access technology, and then sends, to the terminal, a second message including one or both of the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the first access technology.

[0041] Optionally, the second message can include the first downlink NAS sequence number corresponding to the first access technology. Alternatively, the second message includes the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the first access technology.

[0042] Optionally, the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the first access technology are the same.

[0043] In a possible implementation, the second uplink NAS sequence number is 0, where all or part of the bits of the second uplink NAS sequence number is 0. Alternatively, the second uplink NAS sequence number is a random number, specifically, part or all of the bits of the second uplink NAS sequence number is a random number. For example, the sequence number part or the NAS overflow part of the second uplink NAS sequence number is a random number. At this time, the rest is 0. Alternatively, the second uplink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device. Alternatively, the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. Alternatively, the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the first access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1. Alternatively, the second uplink NAS sequence number is the first uplink NAS sequence number. Alternatively, the second uplink NAS sequence number is the first uplink NAS sequence number plus 1.

[0044] In a possible implementation, the first downlink NAS sequence number is 0, where all or part of bits of the first downlink NAS sequence number is 0. Alternatively, the first downlink NAS sequence number is a random number, specifically, part or all of bits of the first downlink NAS sequence number is a random number. For example, a sequence number part or a NAS overflow part of the first downlink NAS sequence number is a random number. At this time, the rest is 0. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the first downlink NAS sequence number is a largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the first downlink NAS sequence number is a largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the first access technology, the first downlink NAS sequence number is a largest downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1.

[0045] In a possible design, the second message carries second indication information, where the second indication information is used to indicate an access technology corresponding to the first downlink NAS sequence number carried in the second message. Optionally, the second message can further carry indication information used to indicate the second uplink NAS sequence number carried in the second message.

[0046] Optionally, the second indication information is used to indicate a transmission path corresponding to the first downlink NAS sequence number carried in the second message. Optionally, the second message can further carry indication information used to indicate a transmission path corresponding to the second uplink NAS sequence number carried in the second message.

[0047] In a third aspect, an apparatus is provided, which has the function of implementing the terminal behavior in the method design. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the apparatus can be a terminal, or a chip in a terminal.

[0048] In one possible design, the apparatus is a terminal, which includes a processor configured to support the terminal to perform the corresponding functions in the above method. Further, the terminal can also include a transmitter and a receiver for supporting the communication between the terminal and a core network device. Further, the terminal can also include a memory coupled to the processor, which stores the necessary program instructions and data for the terminal.

[0049] In a fourth aspect, embodiments of the present application provide an apparatus. The apparatus has the functions of the core network device in the above method design. The functions can be implemented by hardware, or by corresponding software executed by hardware. The hardware or software includes one or more modules corresponding to the functions described above. For example, the apparatus can be a core network device, or can be a chip in a core network device.

[0050] In one possible design, the apparatus is a core network device, which includes a processor configured to support the core network device to perform the corresponding functions in the above method. Further, the core network device can also include a transmitter and a receiver for supporting the communication between the core network device and a terminal. Further, the core network device can also include a memory coupled to the processor, which stores the necessary program instructions and data for the terminal.

[0051] In a fifth aspect, embodiments of the present application provide a communication system, which includes the terminal and the core network device in the above aspects. Optionally, the system can also include a base station, an N3IWF node, and the terminal and the core network device in the above aspects.

[0052] In a sixth aspect, embodiments of the present application provide a computer storage medium, which stores computer software instructions for the terminal, and includes the program designed in the first aspect above.

[0053] In a seventh aspect, embodiments of the present application provide a computer storage medium, which stores computer software instructions for the core network device, and includes the program designed in the second aspect above.

[0054] In an eighth aspect, embodiments of the present application provide a computer program product including instructions which, when executed on a computer, cause the computer to carry out the method in the first aspect above.

[0055] In a ninth aspect, embodiments of the present application provide a computer program product including instructions which, when executed on a computer, cause the computer to carry out the method in the second aspect above.

[0056] In a tenth aspect, an embodiment of the present application provides a chip system applied to a terminal, the chip system comprising at least one processor, a memory and a transceiver circuit, the memory, the transceiver circuit and the at least one processor being interconnected through a line, and the at least one memory storing instructions; the instructions are executed by the processor to perform the operation of the terminal in the method of the first aspect.

[0057] In an eleventh aspect, an embodiment of the present application provides a chip system applied to a core network device, the chip system comprising at least one processor, a memory and a transceiver circuit, the memory, the transceiver circuit and the at least one processor being interconnected through a line, and the at least one memory storing instructions; the instructions are executed by the processor to perform the operation of the core network device in the method of the second aspect.

[0058] The method for security protection provided by the embodiment of the present application can maintain a corresponding NAS sequence number for each access technology in at least two access technologies respectively, and when the terminal transmits the NAS message using different access technologies, the terminal uses the NAS sequence number maintained for the corresponding access technology to perform security protection on the NAS message, which can avoid the problem of replay attack caused by the fact that the core network device first receives a smaller NAS sequence number transmitted through one link and then receives a larger NAS sequence number transmitted through another link, and the first parameter used to distinguish different access technologies is used when the NAS message is protected, so even if the NAS key and the NAS sequence number used when the NAS message transmitted through different access technologies is protected are the same, the result of security protection on the NAS message is different, which reduces the possibility of replay attack and realizes security protection on multiple NAS connection links. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 A possible network architecture schematic diagram is provided for the embodiment of the present application;

[0060] Figure 2 Another possible network architecture schematic diagram is provided for the embodiment of the present application;

[0061] Figure 3 An exemplary schematic diagram of the encryption and decryption method provided for the embodiment of the present application;

[0062] Figure 4 An exemplary schematic diagram of the integrity protection method provided for the embodiment of the present application;

[0063] Figure 5A flow chart of a security protection method provided for an embodiment of the present application;

[0064] Figure 6 An exemplary schematic diagram of another encryption and decryption method provided for an embodiment of the present application;

[0065] Figure 7 An exemplary schematic diagram of yet another encryption and decryption method provided for an embodiment of the present application;

[0066] Figure 8 An exemplary schematic diagram of still another encryption and decryption method provided for an embodiment of the present application;

[0067] Figure 9 A flow chart of another security protection method provided for an embodiment of the present application;

[0068] Figure 10 A flow chart of yet another security protection method provided for an embodiment of the present application;

[0069] Figure 11 A flow chart of still another security protection method provided for an embodiment of the present application;

[0070] Figure 12 A structural schematic diagram of an apparatus provided for an embodiment of the present application;

[0071] Figure 13 A structural schematic diagram of a terminal provided for an embodiment of the present application;

[0072] Figure 14 A structural schematic diagram of another apparatus provided for an embodiment of the present application;

[0073] Figure 15 A structural schematic diagram of a core network device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0074] The present application will be further described in conjunction with the accompanying drawings. The specific operation method in the method embodiment can also be applied to the apparatus embodiment or the system embodiment. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more than two.

[0075] The system architecture and business scenarios described in the present application are for more clearly illustrating the technical solutions of the present application, and do not constitute a limitation on the technical solutions provided by the present application. Those skilled in the art can know that, with the evolution of system architecture and the appearance of new business scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.

[0076] It should be noted that the terms "exemplary" or "for example" are used herein to mean "an example of" or "one example among others." Any embodiment or design solution described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or design solutions. Rather, the use of terms "exemplary" or "for example" is merely intended to present concepts in a concrete manner.

[0077] Embodiments of the present application can be applied in next generation wireless communication systems, such as 5G communication systems, as shown in Figure 1 Figure 1 A possible network architecture of the present application is shown, which includes the following nodes:

[0078] AMF node: a network element responsible for mobility management, which can be used to implement functions other than session management in the mobility management entity (MME) function, such as access authorization and other functions.

[0079] Session management function (SMF) node: used to allocate session resources for the user plane.

[0080] Authentication server function (AUSF) node: when the AUSF authenticates the terminal, it is responsible for verifying the delivery of authentication parameters and the authenticity of the terminal. Main functions include: receiving authentication requests sent by the security anchor function (SEAF) node; selecting an authentication method. When using the extensible authentication protocol authentication and key agreement (EAP-AKA') authentication method, the AUSF node can complete the authentication of the terminal on the network side.

[0081] SEAF node: the SEAF node can be part of the AMF node or an independent network element, mainly responsible for initiating authentication requests to the AUSF, and completing the authentication of the terminal on the network side in the evolved packet system authentication and key agreement (EPS-AKA') authentication process.

[0082] User plane function (UPF) node: the outlet for user plane data, used to connect external networks. ​

[0083] Data Network (DN): a network used to provide external data, such as the Internet, etc.

[0084] (R)AN node: (R)AN can adopt different access technologies. There are currently two types of wireless access technologies: 3GPP access technology (such as the wireless access technology adopted in 3G, 4G or 5G systems) and non-3GPP access technology. 3GPP access technology refers to access technology that conforms to 3GPP standard specifications, and the access network that adopts 3GPP access technology is called a radio access network (RAN), wherein the access network device in the 5G system is called a next generation node base station (gNB). Non-3GPP access technology refers to access technology that does not conform to 3GPP standard specifications, such as air interface technologies represented by wifi access points (APs).

[0085] Terminal: The terminal referred to in the present application is a device with wireless transceiver function, which can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted; it can also be deployed on the water surface (such as ships, etc.); it can also be deployed in the air (such as airplanes, balloons and satellites, etc.). The terminal can include various types of user equipment (UE), mobile phones, pads, computers with wireless transceiver function, wireless data cards, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, machine type communication (MTC) terminal devices, terminal devices in industrial control, terminal devices in self driving, terminal devices in remote medical, terminal devices in smart grid, terminal devices in transportation safety, terminal devices in smart city, and wearable devices (such as smart watches, smart bracelets, pedometers, etc.) and the like. In systems that adopt different wireless access technologies, the names of terminals with similar wireless communication functions may be different, and only for the convenience of description, the above-mentioned devices with wireless transceiver communication function are collectively referred to as terminals in the embodiments of the present application.

[0086] Specifically, the terminal in the present application stores a long-term key and a related function. When the terminal performs bidirectional authentication with a core network node (such as an AMF node, an AUSF node, an SEAF node, etc.), the terminal can use the long-term key and the related function to verify the authenticity of the network.

[0087] Access network device: the access network device involved in the embodiments of the present application is a device that provides wireless communication function for a terminal. For example, the access network device can be a base station (Base Station, BS), which can include various forms of macro base stations, micro base stations, relay stations, access points, etc. In systems using different wireless access technologies, the names of devices with base station functions may be different, for example, in a 5G system, it is called a next-generation base station node, which can be represented as gNB, in a long-term evolution (Long Term Evolution, LTE) system, it is called an evolved node B (evolved NodeB, eNB or eNodeB), in a third generation (3rd Generation, 3G) communication system, it is called a node B (Node B), etc. For the convenience of description, in the embodiments of the present application, the above-mentioned device that provides wireless communication function for the terminal is collectively referred to as an access network device.

[0088] Network capability exposure function (network exposure function, NEF) node: mainly used for interaction with third parties, so that the third parties can indirectly interact with some network elements inside the 3GPP network.

[0089] Network function repository function (network function repository function, NRF) node: used for network element discovery and maintenance of network functions (network function, NF).

[0090] Policy control function (policy control function, PCF) node: the PCF node stores the latest quality of service (quality of service, QoS) rules, and the base station can allocate appropriate resources for the user plane transmission channel according to the QoS rules provided by the SMF node.

[0091] Unified data management (unified data management, UDM) node: used for storing the subscription information of users.

[0092] Application function (AF) node: The AF node can be located inside the DN and belongs to a function network element deployed in a third party. The main function of the network element is to inform the PCF node of the latest business requirements of the third party enterprise for a certain application. The PCF node can generate corresponding QoS rules according to the business requirements to ensure that the services provided by the network meet the requirements proposed by the third party.

[0093] In the embodiments of the present application, the terminal can access the AMF node through at least two access technologies, for example, including 3GPP access technology and non-3GPP access technology. The present application embodiment also provides a possible network architecture diagram as shown in Figure 2 , which includes an AMF node, an AUSF node, an SMF node, a UPF node, a UDM node (or an authentication credential repository and processing function (APRF) node), a terminal, and a non-3GPP interworking function (N3IWF) node.

[0094] Among them, the AMF node, the AUSF node, the SMF node, the UPF node, the UDM node, and the terminal can refer to the description in Figure 1 , which will not be repeated here.

[0095] Among them, the N3IWF node is used to support the terminal to access the AMF node through the non-3GPP access technology.

[0096] In combination with the network architecture shown in Figure 2 , the terminal can access the AMF node through 3GPP access technology and non-3GPP access technology at the same time. Among them, the 3GPP access technology can be simply represented as 3GPP, and the non-3GPP access technology can be simply represented as non-3GPP or non-3GPP. Figure 2Path 1 in the figure is a path through which the terminal accesses the AMF node through 3GPP, and path 2 is a path through which the terminal accesses the AMF node through non-3GPP, that is, the terminal can access the AMF node through N3IWF. In the case where the terminal accesses the AMF node through 3GPP and non-3GPP at the same time, if the terminal needs to send a NAS message to the AMF node, in one possible implementation, the NAS message can be split into at least two message blocks, one part of the message blocks is transmitted through 3GPP, and the other part of the message blocks is transmitted through non-3GPP. For example, the NAS message can be divided into five message blocks 1, 2, 3, 4 and 5, wherein the message blocks 2 and 4 are transmitted through 3GPP, and the message blocks 1, 3 and 5 are transmitted through non-3GPP. In another possible implementation, the terminal can transmit a whole NAS message through 3GPP, and transmit another whole NAS message through non-3GPP.

[0097] First, the related terms involved in the embodiments of the present application are explained and described.

[0098] (1) NAS count

[0099] The NAS count is composed of 24 bits, including 16-bit overflow counter and 8-bit sequence number.

[0100] The initial value of the NAS count is 0, the uplink NAS count is increased by 1 each time the terminal sends a NAS message to the core network device, and the downlink NAS count is increased by 1 each time the core network device sends a NAS message to the terminal. After completing the authentication process of the terminal to the core network device, the uplink NAS count and the downlink NAS count are both set to 0.

[0101] Optionally, there are two methods of maintaining the NAS count as follows:

[0102] Method one is to increase the stored NAS count by 1 after sending a NAS message and store it, and use the stored NAS count to protect the NAS message when sending the NAS message again.

[0103] Method two is to increase the stored NAS count by 1 to determine a new NAS count when sending a NAS message next time, and use the new NAS count to protect the NAS message.

[0104] After receiving the NAS message, the terminal and the core network device can verify whether the received NAS count is reused, i.e., whether the NAS count carried in the NAS message is greater than the last received NAS count. For example, if the AMF node receives the uplink NAS count from the terminal, it can compare whether the received uplink NAS count is greater than the last received uplink NAS count. If it is greater, the security verification of the NAS message is passed.

[0105] When the NAS count is used for encryption and decryption and integrity protection, the NAS count is filled as 32 bits, i.e., 8 bits are filled before the original 24-bit NAS count. The filled 8 bits can all be 0.

[0106] (2) Encryption and decryption

[0107] As shown in Figure 3 , the flow of encrypting and decrypting the NAS message is shown. Figure 3

[0108] Among them, the KEY can be a NAS key.

[0109] The sequence number (COUNT) used for encryption and decryption consists of 32 bits, of which the first 8 bits are 0, the middle 16 bits are flip bits, and the last 8 bits are the sequence number.

[0110] The bearer information (BEARER) consists of 5 bits, all of which are 0.

[0111] The data transmission direction (DIRECTON) is used to indicate uplink and downlink. When encrypting and decrypting the uplink NAS message, DIRECTON indicates uplink. When encrypting and decrypting the downlink NAS message, DIRECTON indicates downlink.

[0112] The length (LENGTH) is used to indicate the data length of the NAS message that needs to be encrypted or decrypted.

[0113] The evolved packet system encryption algorithm (EEA) can also be referred to as EPS encryption algorithm, which is an algorithm for encrypting and decrypting the NAS message.

[0114] ​The encryption process is that the input parameters (KEY, COUNT, BEARER, DIRECTION and LENGTH) are processed by EEA to obtain a key stream (KEYSTREAM), and the key stream and the plaintext (NAS message) are added modulo two to obtain the ciphertext (CIPHERTEXT). The decryption process is that the input parameters are processed by EEA to obtain the key stream, and then the key stream and the ciphertext are added modulo two to recover the plaintext.

[0115] (3) Integrity protection

[0116] As shown in Figure 4 , the method for integrity protection and verification of the NAS message is shown in Figure 4 .

[0117] The message (MESSAGE) refers to the message that needs to be integrity protected, and can be specifically a NAS message.

[0118] Evolved packet system integrity algorithm (EPS integrity algorithm)

[0119] The method for integrity protection is that the sending end processes the input parameters (KEY, COUNT, MESSAGE, BEARER, DIRECTION) by EIA to obtain the integrity protected expected message authentication code (MAC-I) or NAS-MAC. The method for integrity verification is that the input parameters (KEY, COUNT, MESSAGE, BEARER, DIRECTION) are processed by EIA to obtain the expected message authentication code (XMAC-I) or XNAS-MAC, and then the XMAC-I is compared with the MAC-I. If the XMAC-I is consistent with the MAC-I, the integrity verification is passed.

[0120] The technical solutions proposed in the present application are described in detail below.

[0121] Based on the network architecture of Figure 1 and Figure 2 , the embodiments of the present application provide a method for security protection. In the method, the processes of encryption and decryption, and integrity protection can refer to the descriptions of Figure 3 and Figure 4 . As shown in Figure 5 , the method comprises steps 501 and 502.

[0122] Step 501, the terminal determines a first parameter.

[0123] The first parameter is an input parameter of the terminal when performing security protection for the NAS message, and is used to indicate an access technology used for transmitting the NAS message. The terminal can support at least two access technologies, and can maintain a corresponding NAS sequence number for each of the at least two access technologies. For example, the at least two access technologies can be at least two of a 3GPP access technology, a non-3GPP access technology, and a fixed network access technology and other access technologies that can use a 3GPP network core network device together with the 3GPP access technology. Alternatively, the first parameter indicating the access technology used for transmitting the NAS message can also be understood as the first parameter being used to indicate a transmission path used by the terminal for transmitting the NAS message. For example, the terminal and the AMF node can not distinguish between access technologies, and maintain a corresponding NAS sequence number for each transmission path. If the transmission path used for transmitting the NAS message is path 1, the NAS sequence number corresponding to path 1 is used; if the transmission path used for transmitting the NAS message is path 2, the NAS sequence number corresponding to path 2 is used. It can be understood that the transmission path corresponds to the access technology. For example, referring to Figure 2 , the access technology used for transmitting data by path 1 is a 3GPP access technology, and the access technology used for transmitting data by path 2 is a non-3GPP access technology.

[0124] The first parameter can be a new input parameter newly added in the encryption and decryption or integrity protection process, and the parameter includes a preset number of bit positions. Alternatively, different values of the bit positions can be used to indicate different access technologies.

[0125] In the first possible implementation manner, as shown in Figure 6 , the first parameter can be an access (ACCESS) parameter. For example, if the first parameter is 00, it means that the 3GPP access technology is used, and if the first parameter is 01, it means that the non-3GPP access technology is used. Alternatively, 001 represents the 3GPP access technology, 010 represents the wireless-fidelity (WiFi) technology, and 011 represents the fixed network technology.

[0126] Alternatively, 001 can represent the first access technology used, 010 the second access technology used, and 011 the third access technology used. Each time the access technology is switched, the first parameter is incremented by 1 until all bits of the first parameter are 1. Then, the first parameter can be reset to count from 000. For example, if the terminal has switched access technologies multiple times and all bits of the first parameter are 1, and the terminal needs to switch from the first access technology to the second access technology, the first parameter generated for the second access technology would be 001. Optionally, in this method, the first, second, and third access technologies can be the same technology. That is, when reconnecting to a certain access technology, the first parameter is incremented by 1 until all bits of the first parameter are 1. Then, the first parameter can be reset to count from 000.

[0127] Optionally, the first parameter can be incremented by 1 each time COUNT in the input parameters is reset to 0, or the NAS serial number is reset to 0.

[0128] Optionally, when all bits of the first parameter are 1, the NAS key used in the next NAS message transmission needs to be updated.

[0129] In the second possible implementation, such as Figure 7 As shown, the access technology used to transmit NAS messages can be represented by all or part of the COUNT parameter in the input parameters. For example, if COUNT consists of 8 bits filled with all zeros and the NAS sequence number, the first parameter can be part or all of these 8 bits. For instance, the first 3 bits can be selected to represent the access technology used to transmit NAS messages. For details on how to distinguish different access technologies by bit values, please refer to the relevant description in the first implementation method.

[0130] In the third possible implementation, such as Figure 8 As shown, the BEARER parameter in the input can be used to represent the access technology used to transmit NAS messages, or the access path used to transmit NAS messages. The first parameter can be part or all of BEARER. For example, the first 3 bits can be selected to represent the access technology used to transmit NAS messages. For details on how to distinguish different access technologies using bit values, please refer to the relevant description in the first implementation method.

[0131] In a fourth possible implementation, bits of the NAS sequence number can be added, and the first parameter is a part of bits of the NAS sequence number. For example, the NAS sequence number is extended from 32 bits to 64 bits (64-bit NAS sequence number is suitable for a key with a length of 256 bits). A part of the extended NAS sequence number is used to represent the access technology, for example, 3 bits are reserved, 000 represents 3GPP access technology, 001 represents wifi access technology, and 010 represents fixed network access technology.

[0132] In a fifth possible implementation, the first parameter can be the NAS sequence number, and the number of removed bits of the NAS sequence number is used to represent the access technology.

[0133] Optionally, a preset number of bits of the overflow counter in the existing NAS sequence number are removed, and the number of removed bits is used to represent the access technology. For example, if 1 bit is removed, it indicates that the access technology is 3GPP access technology; if 2 bits are removed, it indicates that the access technology is wifi access technology; and if 3 bits are removed, it indicates that the access technology is fixed network access technology.

[0134] Alternatively, a preset number of bits of the sequence number part of the existing NAS sequence number are removed, and the number of removed bits is used to represent the access technology. For example, if 1 bit is removed, it indicates that the access technology is 3GPP access technology; if 2 bits are removed, it indicates that the access technology is wifi access technology; and if 3 bits are removed, it indicates that the access technology is fixed network access technology.

[0135] Optionally, the terminal can be preconfigured with the first parameter corresponding to each access technology, and after the terminal determines the access technology used for transmitting the NAS message, the corresponding first parameter can be found according to the access technology used for transmitting the NAS message; or, after the terminal determines the access technology used for transmitting the NAS message, the first parameter is generated according to the access technology used for transmitting the NAS message.

[0136] It should be noted that, in the case where the first parameter is the NAS sequence number or the first parameter is a part of bits of the NAS sequence number, the terminal maintains different NAS sequence numbers for each supported access technology, and in other cases, the NAS sequence numbers maintained by the terminal for each supported access technology can be the same or different.

[0137] The first parameter can be determined by the terminal itself and notified to the AMF node, or determined by the AMF node and then notified to the terminal. The first parameter can also be configured in advance in the terminal and the AMF node. Exemplarily, if the first parameter is determined by the AMF node, the terminal can receive the first parameter from the AMF node, and if the first parameter is part of bits in the NAS sequence number, the terminal can replace the specified bits in the NAS sequence number saved by itself with the first parameter after receiving the first parameter; or if the first parameter is part of bits in the BEARER, the terminal can replace the specified bits in the BEARER with the first parameter.

[0138] In step 502, the terminal performs security protection on the NAS message according to the first parameter, the NAS key, and the NAS sequence number corresponding to the access technology used for transmitting the NAS message.

[0139] The NAS sequence number can be a NAS count or a parameter having the function of preventing a NAS message replay attack. The NAS key is a NAS key shared by at least two access technologies that can be supported by the terminal.

[0140] The security protection performed by the terminal on the NAS message refers to encryption of a NAS message to be transmitted to the core network device, decryption of a received NAS message, integrity protection of a NAS message to be transmitted to the core network device, or integrity protection verification of a received NAS message. Correspondingly, the key used for the security protection performed on the NAS message can be an encryption key and an integrity protection key. In the embodiments of the present application, the encryption key and the integrity protection key are collectively referred to as the NAS key. The embodiments of the present application do not limit the execution order of encryption, decryption, integrity protection generation, and integrity protection verification.

[0141] It can be understood that the terminal can maintain a corresponding NAS sequence number for each of the at least two access technologies, and if the terminal transmits a NAS message using a 3GPP access technology, the first parameter corresponding to the 3GPP access technology, the uplink NAS sequence number maintained by the terminal for the 3GPP access technology, and the NAS key are used to perform security protection on the NAS message.

[0142] Corresponding to the three implementation manners of the first parameter, the method of encrypting the NAS message is shown in Figure 6 , Figure 7 and Figure 8 .

[0143] Corresponding to the first implementation manner, the input parameter used when performing security protection on the NAS message can also be ACCESS, as shown in Figure 4 .

[0144] Corresponding to the second implementation manner, the input parameter used when performing security protection on the NAS message can also be BEARER, as shown inFigure 4 The COUNT in the input parameter used when the NAS message is securely protected includes the first parameter.

[0145] Corresponding to the third implementation manner described above, in combination with Figure 4 The BEARER in the input parameter used when the NAS message is securely protected includes the first parameter.

[0146] Optionally, if the terminal receives the NAS message, the first parameter corresponding to the access technology used to transmit the NAS message can be determined, and then the NAS message can be decrypted and / or integrity protection verification can be performed on the NAS message using the downlink NAS sequence number carried in the NAS message, the first parameter corresponding to the access technology used to transmit the NAS message, and the NAS key.

[0147] The method for securely protecting provided by the embodiments of the present application enables the terminal to maintain a corresponding NAS sequence number for each of at least two access technologies, and when the terminal transmits a NAS message using different access technologies, instead of sharing a set of NAS sequence numbers, the terminal uses the NAS sequence number maintained for the corresponding access technology to securely protect the NAS message, which can avoid the problem of replay attacks in the case where the core network device first receives a smaller NAS sequence number transmitted through one link and then receives a larger NAS sequence number transmitted through another link, and in addition, the first parameter used to distinguish different access technologies is used when the NAS message is securely protected, so even if the NAS key and the NAS sequence number used when the NAS message transmitted through different access technologies is securely protected are the same, the result of securely protecting the NAS message is different, which reduces the possibility of replay attacks and achieves secure protection of multiple NAS connection links.

[0148] Corresponding to Figure 5 the embodiments, in another implementation manner of the embodiments of the present application, a method for securely protecting a NAS message by a core network device is further provided, the core network device can be an AMF node, an SEAF node, an MME node, or other nodes participating in a terminal authentication process, or other nodes involving key generation and key storage, in the embodiments of the present application, the core network device is taken as an AMF node for example, as shown in Figure 9 , the method includes:

[0149] Step 901, the AMF node determines a first parameter.

[0150] The first parameter is used to indicate an access technology used to transmit a NAS message, and the AMF node can maintain a corresponding NAS sequence number for each of at least two access technologies supported by a terminal.

[0151] The method for the AMF node to determine the first parameter is similar to the method for the terminal to determine the first parameter in step 501, and reference can be made to the related description in step 501. Figure 5

[0152] Step 902, the AMF node performs security protection on the NAS message according to the first parameter, a NAS key, and a NAS sequence number corresponding to the access technology used for transmitting the NAS message.

[0153] The NAS sequence number can be a NAS count or a parameter that has the function of preventing replay attacks on the NAS message.

[0154] The security protection performed by the AMF node on the NAS message can be encryption on the NAS message to be transmitted to the terminal, decryption on the received NAS message, integrity protection on the NAS message to be transmitted to the terminal, and integrity protection verification on the received NAS message.

[0155] The method for the AMF node to perform security protection on the NAS message is similar to the method for the terminal to perform security protection on the NAS message in step 502, and reference can be made to the related description in step 502.

[0156] The method for security protection provided by the embodiments of the present application can enable the core network device to maintain a corresponding NAS sequence number for each of at least two access technologies, and when the terminal transmits a NAS message using different access technologies, the terminal does not share a set of NAS sequence numbers, but uses the NAS sequence number maintained for the corresponding access technology to perform security protection on the NAS message, which can avoid the problem of replay attacks in the case where the core network device first receives a smaller NAS sequence number transmitted through one link and then receives a larger NAS sequence number transmitted through another link. In addition, the first parameter for distinguishing different access technologies is used when the present application performs security protection on the NAS message, so even if the NAS key and the NAS sequence number used when performing security protection on the NAS message transmitted through different access technologies are the same, the result of performing security protection on the NAS message is different, which reduces the possibility of replay attacks and achieves security protection on multiple NAS connection links.

[0157] Optionally, if the access technology used for transmitting the NAS message is the first access technology, before the flow of steps 901 to 903, the method can further include steps 1001 to 1007 as shown in FIG. 10. Figure 5 Figure 9 Figure 10

[0158] Step 1001, the terminal determines a first uplink NAS sequence number corresponding to the first access technology.​​​​

[0159] The first uplink NAS sequence number is 0, specifically, all or part of the bits of the first uplink NAS sequence number is 0; or

[0160] The first uplink NAS sequence number is a random number. Specifically, part or all of the bits of the first uplink NAS sequence number is a random number. For example, the sequence number part or the NAS overflow part of the first uplink NAS sequence number is a random number. At this time, the remaining part is 0; or

[0161] The at least two access technologies further include a second access technology, and the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the second access technology and saved by the terminal. If the terminal saves at least two uplink NAS sequence numbers corresponding to the second access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the second access technology and saved by the terminal; or

[0162] The at least two access technologies further include a second access technology, and the first uplink NAS sequence number is an uplink NAS sequence number corresponding to the second access technology and saved by the terminal plus 1. If the terminal saves at least two uplink NAS sequence numbers corresponding to the second access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the second access technology and saved by the terminal plus 1; or

[0163] The first uplink NAS sequence number is an uplink NAS sequence number corresponding to the first access technology and saved by the terminal. If the terminal saves at least two uplink NAS sequence numbers corresponding to the first access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the first access technology and saved by the terminal; or

[0164] The first uplink NAS sequence number is an uplink NAS sequence number corresponding to the first access technology and saved by the terminal plus 1. If the terminal saves at least two uplink NAS sequence numbers corresponding to the first access technology, the first uplink NAS sequence number is a maximum uplink NAS sequence number corresponding to the first access technology and saved by the terminal plus 1.

[0165] Optionally, the first access technology and the second access technology can be 3GPP access technology, non-3GPP access technology, fixed network access technology, or other technologies that can access the core network device, or any one of the technologies used together with the 3GPP network core network device of the 3GPP access technology. In the embodiment of the application, the first access technology is taken as the non-3GPP access technology, and the second access technology is taken as the 3GPP access technology as an example for description.

[0166] It can be understood that before the terminal sends a NAS message to the AMF node using a non-3GPP access technology, it is necessary to determine the first uplink NAS sequence number carried when the NAS message is transmitted using the non-3GPP access technology.

[0167] If the terminal accesses the AMF node through the non-3GPP access technology for the first time, the first uplink NAS sequence number corresponding to the non-3GPP access technology can be set to 0 or a random number. Alternatively, in the case where the terminal has accessed the AMF node through a 3GPP access technology, if the NAS sequence number maintenance method is method one described above (after sending a NAS message, the NAS count used in the NAS message is incremented by 1 and stored, and when the NAS message needs to be sent again, the NAS message is secured using the stored NAS count), it can be determined that the first uplink NAS sequence number is the uplink NAS sequence number corresponding to the 3GPP access technology saved in the terminal. If the terminal saves at least two uplink NAS sequence numbers corresponding to the 3GPP access technology, and the terminal cannot determine the uplink NAS sequence number used by the last NAS message, the largest uplink NAS sequence number corresponding to the 3GPP access technology saved in the terminal is selected to secure the NAS message. If the NAS sequence number maintenance method is method two described above (after sending a NAS message, the stored NAS count is incremented by 1 when the NAS message needs to be sent again to determine a new NAS count, and the NAS message is secured using the new NAS count), it can be determined that the first uplink NAS sequence number is the uplink NAS sequence number corresponding to the 3GPP access technology saved in the terminal plus 1. If the terminal saves at least two uplink NAS sequence numbers corresponding to the 3GPP access technology, and the terminal cannot determine the uplink NAS sequence number used by the last NAS message, the largest uplink NAS sequence number corresponding to the 3GPP access technology saved in the terminal is selected and incremented by 1, and the incremented uplink NAS sequence number is used to secure the NAS message.

[0168] In the case where the terminal has accessed the AMF node through a non-3GPP access technology, if the NAS sequence number maintenance method is method one described above, the first uplink NAS sequence number can be determined to be the uplink NAS sequence number corresponding to the non-3GPP access technology saved in the terminal; if the NAS sequence number maintenance method is method two described above, the first uplink NAS sequence number can be determined to be the uplink NAS sequence number corresponding to the non-3GPP access technology saved in the terminal plus 1.

[0169] Step 1002, the terminal sends a first message to the AMF node, the first message carrying part or all of the first uplink NAS sequence number.

[0170] The first message is secured by the first uplink NAS sequence number and the NAS key. Optionally, the first message can carry a 24-bit first uplink sequence number, or can only carry part of the first uplink sequence number, for example, only the last 4 bits or the last 8 bits of the first uplink NAS sequence number.

[0171] In another possible implementation, if the terminal accesses the AMF node through the non-3GPP access technology for the first time and has accessed the AMF node through the 3GPP access technology, the terminal can directly temporarily determine the first uplink NAS sequence number and first use the NAS sequence number corresponding to the non-3GPP access technology to secure the first message, that is, the steps 1001 to 1002 can be replaced by step 1003.

[0172] Step 1003: The terminal sends the first message to the AMF node, and the first message carries part or all of the uplink NAS sequence number corresponding to the second access technology.

[0173] The first message is secured by the NAS key and the uplink NAS sequence number corresponding to the second access technology.

[0174] The uplink NAS sequence number corresponding to the second access technology carried in the first message is part or all of the uplink NAS sequence number corresponding to the second access technology saved by the terminal, or is part or all of a new uplink NAS sequence number obtained by adding 1 to the uplink NAS sequence number corresponding to the second access technology saved by the terminal. If the terminal has saved at least two uplink NAS sequence numbers corresponding to the second access technology, the uplink NAS sequence number corresponding to the second access technology in this step is the largest uplink NAS sequence number corresponding to the second access technology saved by the terminal.

[0175] It should be noted that, optionally, the first message in step 1002 and step 1003 includes first indication information, and the first indication information is used to indicate the access technology corresponding to part or all of the uplink NAS sequence number carried in the first message, or the first indication information is used to indicate the transmission path corresponding to all or part of the NAS sequence number carried in the first message. For example, the first indication information carried in the first message in step 1002 indicates the non-3GPP access technology, and the first indication information carried in the first message in step 1003 indicates the 3GPP access technology. For another example, the first indication information carried in the first message in step 1002 indicates that the AMF is accessed through path 1, and the first indication information carried in the first message in step 1003 indicates that the AMF is accessed through path 2.

[0176] After the above step 1002 or step 1003, the following steps can also be performed.

[0177] Step 1004, the AMF node receives the first message.

[0178] Step 1005, the AMF node verifies the NAS sequence number carried by the first message according to the uplink NAS sequence number corresponding to the access technology indicated by the first indication information.

[0179] The indication information can be explicit indication or implicit indication. For example, the access type information can be explicit access type indication information (such as radio access technology (RAT) type access type) in the N2 message, or access type indication information put in the NAS message. In the case where there is no access type indication information, the AMF can determine the access type according to the source of the first message. For example, if the message source address is a base station, it is a 3GPP access; if it is an N3IWF node, it is a non-3GPP access; and if it is a device connected to a fixed network, it is a fixed network access.

[0180] In the case where the first indication information indicates a non-3GPP access technology, if the first message carries a complete first NAS sequence number, and the AMF node determines that the terminal has accessed the AMF node before, the AMF node determines whether the first NAS sequence number is greater than the last received uplink NAS sequence number corresponding to the non-3GPP access technology saved in the AMF node. If it is greater, the verification is successful, and if it is less, the verification fails, the terminal access is rejected, and the terminal is informed of the access failure reason. Alternatively, if the AMF node determines that the terminal has not accessed the AMF node through the non-3GPP access technology before, the AMF node saves the first NAS sequence number as the uplink NAS sequence number corresponding to the non-3GPP access technology, or the AMF node determines that the uplink NAS sequence number corresponding to the non-3GPP access technology is 0. If the first message carries a part of the first NAS sequence number, the AMF node restores the complete first NAS sequence number first, and then verifies or saves the first NAS sequence number according to the above method of processing the first NAS sequence number.

[0181] In the case where the first indication information indicates a 3GPP access technology, if the first message carries a complete NAS sequence number corresponding to the 3GPP access technology, the AMF node determines whether the first NAS sequence number is greater than the last received uplink NAS sequence number corresponding to the 3GPP access technology saved in the AMF node. If it is greater, the verification is successful, and if it is less, the verification fails. If the first message carries a part of the NAS sequence number corresponding to the 3GPP access technology, the AMF node restores the complete NAS sequence number first, and then verifies the restored complete sequence number according to the above method of verifying the NAS sequence number.

[0182] Step 1006, the AMF node determines one or both of a second uplink NAS sequence number and a first downlink NAS sequence number corresponding to the first access technology.

[0183] The second uplink NAS sequence number is 0, specifically, all or part of the bit positions of the second uplink NAS sequence number are 0. Alternatively, the second uplink NAS sequence number is a random number. Specifically, part or all of the bit positions of the second uplink NAS sequence number are random numbers. For example, the sequence number part or the NAS overflow part of the second uplink NAS sequence number is a random number. At this time, the remaining part is 0. Alternatively, the second uplink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology saved by the core network device. If the core network device saves at least two downlink NAS sequence numbers corresponding to the second access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology saved by the core network device. Alternatively, the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the second access technology saved by the core network device plus 1. If the core network device saves at least two downlink NAS sequence numbers corresponding to the second access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology saved by the core network device plus 1. Alternatively, the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the first access technology saved by the core network device plus 1. If the core network device saves at least two downlink NAS sequence numbers corresponding to the first access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the first access technology saved by the core network device plus 1. Alternatively, the second uplink NAS sequence number is the first uplink NAS sequence number. Alternatively, the second uplink NAS sequence number is the first uplink NAS sequence number plus 1.

[0184] Alternatively, if the AMF node receives the first message carrying the first uplink NAS sequence number, the AMF node can determine that the second uplink NAS sequence number is the first NAS sequence number, or the second uplink NAS sequence number is the first uplink NAS sequence number plus 1.

[0185] Alternatively, if the AMF node receives the first message carrying the first uplink NAS sequence number, it means that the terminal has determined the NAS sequence number corresponding to the non-3GPP access technology, and the AMF node can not determine the second NAS sequence number.

[0186] The first downlink NAS sequence number is 0, specifically, all or part of the bit positions of the first downlink NAS sequence number are 0. Alternatively,

[0187] The first downlink NAS sequence number is a random number. Specifically, part or all of the bits in the first downlink NAS sequence number are random numbers. For example, the sequence number part or the NAS overflow part in the first downlink NAS sequence number is a random number. At this time, the remaining part is 0. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the first downlink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the second access technology, the first downlink NAS sequence number is the largest downlink NAS sequence number corresponding to the second access technology and stored by the core network device plus 1. Alternatively, the first downlink NAS sequence number is a downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1. If the core network device stores at least two downlink NAS sequence numbers corresponding to the first access technology, the first downlink NAS sequence number is the largest downlink NAS sequence number corresponding to the first access technology and stored by the core network device plus 1.

[0188] Alternatively, if the first message received by the AMF node carries a NAS sequence number corresponding to the second access technology, the second uplink NAS sequence number determined by the AMF node can be the same as the first downlink NAS sequence number.

[0189] Step 1007, the AMF node sends a second message to the terminal, and the second message includes one or all of the first uplink NAS sequence number corresponding to the first access technology and the first downlink NAS sequence number.

[0190] Correspondingly, the terminal receives the second message.

[0191] Optionally, the second message carries second indication information, the second indication information being used for indicating an access technology corresponding to the first downlink NAS sequence number carried in the second message. Optionally, the second message can further carry indication information used for indicating the second uplink NAS sequence number carried in the second message. Optionally, the second indication information is used for indicating a transmission path corresponding to the first downlink NAS sequence number carried in the second message. Optionally, the second message can further carry indication information used for indicating a transmission path corresponding to the second uplink NAS sequence number carried in the second message. It can be understood that, since the second message carries the first downlink NAS sequence number corresponding to the first access technology, the second indication information is used for indicating the first access technology. For example, if the first access technology is a 3GPP access technology, the second indication information is used for indicating the 3GPP access technology. If the first access technology is a non-3GPP access technology, the second indication information is used for indicating the non-3GPP access technology.

[0192] It can be understood that, after receiving the second message, the terminal can save one or both of the second uplink NAS sequence number and the first downlink NAS sequence number carried in the second message. Next time when an uplink NAS message needs to be sent through the non-3GPP, the NAS message can be securely protected according to the second uplink NAS sequence number. Or after receiving a downlink NAS message, the downlink NAS sequence number in the received downlink NAS message can also be verified according to the first downlink NAS sequence number.

[0193] The method of security protection described in the above embodiments in combination with specific scenarios is introduced as follows. The embodiments of the present application can be applied to a scenario in which a terminal has accessed an AMF node through a 3GPP access technology, and then accesses the same AMF node through a non-3GPP access technology, such as Figure 11 , as shown in Figure 11 , the method includes the following steps.

[0194] Step 1101: The terminal accesses a non-trusted non-3GPP network.

[0195] For example, the terminal accesses a WiFi that cannot be directly trusted.

[0196] In this step, the terminal accesses the untrusted non-3GPP network, and the terminal has passed the authentication of the 3GPP network and has a NAS security context. The NAS security context includes a NAS key, a key identifier, and a NAS sequence number corresponding to the 3GPP access technology. Optionally, the NAS context also includes a NAS sequence number corresponding to the non-3GPP access technology. If the terminal has accessed the AMF node through the non-3GPP access technology before, the NAS sequence number corresponding to the non-3GPP access technology is not 0, and if the terminal has accessed the AMF node through the non-3GPP access technology before, the NAS sequence number corresponding to the non-3GPP access technology is 0.

[0197] The NAS key can be one or all of the encryption key and the integrity protection key.

[0198] Step 1102, the terminal and the N3IWF node interact with the internet key exchange protocol security association initial (IKE_SA_INIT) message.

[0199] The IKE_SA_INIT message carries key material, which is information used to securely protect the messages transmitted between the terminal and the N3IWF node. After the terminal and the N3IWF node interact with the IKE_SA_INIT message, the terminal and the N3IWF node can generate the same key, which is used to securely protect the messages transmitted subsequently between the terminal and the N3IWF node.

[0200] Step 1103, the terminal sends an internet key exchange protocol authentication request (IKE_AUTH_Req) message to the N3IWF node.

[0201] Correspondingly, the N3IWF node receives the IKE_AUTH_Req message.

[0202] Step 1104, the N3IWF node sends an internet key exchange protocol authentication response (IKE_AUTH_Res) message to the terminal.

[0203] Correspondingly, the terminal receives the IKE_AUTH_Res message.

[0204] The 5G start (5Gstart) message in the IKE_AUTH_Res message carries an extensible authentication protocol 5th generation request (EAP_5G_Req) message, and the EAP_5G_Req message is used to request the terminal to start an extensible authentication protocol (EAP) process of the 5th generation

[0205] Step 1105: The terminal determines a first uplink NAS sequence number.

[0206] The first uplink NAS sequence number is a sequence number used for security protection of a NAS message sent by the terminal to the AMF node.

[0207] This step has two implementation manners:

[0208] The first manner is that the terminal determines the first uplink NAS sequence number according to an uplink NAS sequence number corresponding to the 3GPP access technology.

[0209] Since the terminal has accessed the AMF node through the 3GPP access technology, the terminal has stored the NAS sequence number corresponding to the 3GPP access technology. If the maintenance method of the NAS sequence number is the above method one, the first uplink NAS sequence number can be determined as the uplink NAS sequence number corresponding to the 3GPP access technology stored by the terminal (if the terminal stores at least two uplink NAS sequence numbers corresponding to the 3GPP access technology, the first uplink NAS sequence number is the maximum uplink NAS sequence number corresponding to the 3GPP access technology stored by the terminal). If the maintenance method of the NAS sequence number is the above method two, the first uplink NAS sequence number can be determined as the uplink NAS sequence number corresponding to the non-3GPP access technology stored by the terminal plus 1 (if the terminal stores at least two uplink NAS sequence numbers corresponding to the non-3GPP access technology, the first uplink NAS sequence number is the maximum uplink NAS sequence number corresponding to the non-3GPP access technology stored by the terminal plus 1).

[0210] The second manner is that the terminal generates the NAS sequence number corresponding to the non-3GPP access technology, and takes the NAS sequence number corresponding to the non-3GPP access technology as the first uplink NAS sequence number.

[0211] Specifically, the first uplink NAS sequence number can be 0, or can be a random number.

[0212] If the first uplink NAS sequence number is 0, all or part of the bit positions of the first uplink NAS sequence number are 0. If the first uplink NAS sequence number is a random number, part or all of the bit positions in the first uplink NAS sequence number are random numbers. For example, the last 8 bits (sequence number part) of the first uplink NAS sequence number are random numbers, or the NAS overflow part is a random number, and the remaining part is 0.

[0213] Optionally, if the terminal has accessed the AMF node through a non-3GPP access technology, the terminal can determine the first uplink NAS sequence number to be the uplink NAS sequence number corresponding to the non-3GPP access technology saved in the terminal (if at least two uplink NAS sequence numbers corresponding to the non-3GPP access technology are saved in the terminal, the first uplink NAS sequence number is the largest uplink NAS sequence number corresponding to the non-3GPP access technology saved in the terminal), or the terminal can determine the first uplink NAS sequence number to be the NAS sequence number corresponding to the non-3GPP access technology saved in the terminal plus 1 (if at least two uplink NAS sequence numbers corresponding to the non-3GPP access technology are saved in the terminal, the first uplink NAS sequence number is the largest uplink NAS sequence number corresponding to the non-3GPP access technology saved in the terminal plus 1).

[0214] Optionally, if the first uplink NAS sequence number is determined by the second implementation manner, in the registration process of the terminal accessing the AMF node through the non-3GPP access technology, the terminal will not send a NAS message through the 3GPP access technology.

[0215] Optionally, the terminal can also set an indicator, which is equivalent to Figure 10 the first indication information in the corresponding embodiment, for indicating whether the first uplink NAS sequence number corresponds to the 3GPP access technology or the non-3GPP access technology. It can be understood that if the terminal determines the first uplink NAS sequence number by the above first implementation manner, the indicator indicates the 3GPP access technology, and if the terminal determines the first uplink NAS sequence number by the above second implementation manner, the indicator indicates the non-3GPP access technology.

[0216] Step 1106, the terminal sends an IKE_AUTH_Req message to the N3IWF node.

[0217] Correspondingly, the N3IWF node receives the IKE_AUTH_Req message.

[0218] The IKE_AUTH Req message includes a NAS protocol data unit (PDU) and a 5G non-access stratum message corresponding to the EAP-5G-ReS message or the 5G-NAS message of the extensible authentication protocol 5G access. The NAS PDU includes a registration request message, and the registration request message is used for the terminal to register with the AMF node through a 3GPP access technology. Optionally, the first message in the above embodiment can be the registration request message.

[0219] Optionally, the registration request message can be integrity protected by a first uplink NAS sequence number, and the registration request message includes first indication information and the first uplink NAS sequence number. Optionally, the registration request message further includes a key identifier and a temporary identity of the terminal.

[0220] Step 1107, the N3IWF node selects an AMF node.

[0221] The method in which the N3IWF node selects the AMF node can refer to the prior art.

[0222] Step 1108, the N3IWF node forwards the registration request message to the AMF node.

[0223] Correspondingly, the AMF node receives the registration request message.

[0224] Step 1109, the AMF node verifies the registration request message.

[0225] The verification of the registration request message by the AMF node includes integrity protection verification of the registration request message and verification of the first uplink NAS sequence number carried in the registration request message. The verification of the first uplink NAS sequence number carried in the registration request message by the AMF node corresponds to step 1005.

[0226] The AMF node can generate an integrity protection key according to the temporary identity and the key identifier in the registration request message, and perform integrity protection verification on the registration request message according to the integrity protection key.

[0227] If the first indication information indicates that the access technology corresponding to the first uplink NAS message is a 3GPP access technology, the AMF node verifies whether the first uplink NAS sequence number is greater than the last received NAS sequence number corresponding to the 3GPP access technology, and if yes, the verification is successful, otherwise the verification fails.

[0228] If the first indication information indicates that the access technology corresponding to the first uplink NAS message is a non-3GPP access technology, and the terminal has not accessed the AMF node through the non-3GPP access technology, the AMF node saves the first NAS sequence number as the uplink NAS sequence number corresponding to the non-3GPP access technology, or the AMF node determines that the uplink NAS sequence number corresponding to the non-3GPP access technology is 0. If the terminal has accessed the AMF node through the non-3GPP access technology, the AMF node verifies whether the first uplink NAS sequence number is greater than the last received NAS sequence number corresponding to the non-3GPP access technology. If yes, the verification is successful, otherwise the verification fails.

[0229] In step 1110, the AMF node generates a key Kn3iwf for the N3IWF node.

[0230] The key Kn3iwf is used for mutual authentication between the AMF node and the terminal.

[0231] In step 1111, the AMF node determines one or all of the second uplink NAS sequence number corresponding to the non-3GPP access technology and the first downlink NAS sequence number.

[0232] Optionally, if the access technology indicated by the first indication information is a 3GPP access technology, it means that the terminal has not determined the NAS sequence number for the non-3GPP access technology, and the AMF node can determine the second uplink NAS sequence number corresponding to the non-3GPP access technology and the first downlink NAS sequence number. If the access technology indicated by the first indication information is a non-3GPP access technology, it means that the terminal has determined the uplink NAS sequence number for the non-3GPP access technology, and the AMF node only needs to determine the first downlink NAS sequence number corresponding to the non-3DPP technology, or the AMF node determines the first downlink NAS sequence number and re-determines the uplink NAS sequence number for the non-3GPP access technology.

[0233] Specifically, the second uplink NAS sequence number is 0, or the second uplink NAS sequence number is a random number.

[0234] If the second uplink NAS sequence number is 0, all or part of the bits of the second uplink NAS sequence number are 0. If the second uplink NAS sequence number is a random number, part or all of the bits of the second uplink NAS sequence number are random numbers. For example, the last 8 bits (sequence number part) of the second uplink NAS sequence number are random numbers, or the NAS overflow part is a random number, and the remaining part is 0. Alternatively, if the second uplink NAS sequence number is a random number, the second uplink NAS sequence number needs to be greater than the downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node (if the AMF node saves at least two downlink NAS sequence numbers corresponding to the 3GPP access technology, the second uplink NAS sequence number needs to be greater than the largest downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node).

[0235] The second uplink NAS sequence number can also be the downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node (if the AMF node saves at least two downlink NAS sequence numbers corresponding to the 3GPP access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the 3GPP access technology saved by the terminal); or the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node plus 1 (if the AMF node saves at least two downlink NAS sequence numbers corresponding to the 3GPP access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the 3GPP access technology saved by the terminal plus 1); or the second uplink NAS sequence number is the downlink NAS sequence number corresponding to the non-3GPP access technology saved by the AMF node plus 1 (if the AMF node saves at least two downlink NAS sequence numbers corresponding to the non-3GPP access technology, the second uplink NAS sequence number is the largest downlink NAS sequence number corresponding to the non-3GPP access technology saved by the terminal plus 1); or the second uplink NAS sequence number is the first uplink NAS sequence number; or the second uplink NAS sequence number is the first uplink NAS sequence number plus 1.

[0236] Alternatively, the first downlink NAS sequence number can be the same as the second uplink NAS sequence number.

[0237] Specifically, the first downlink NAS sequence number can be 0, or can be a random number.

[0238] If the first downlink NAS sequence number is 0, all bits or part of bits of the first downlink NAS sequence number are 0. If the first downlink NAS sequence number is a random number, part or all of the bits of the first downlink NAS sequence number are random numbers. For example, the last 8 bits (sequence number part) of the first downlink NAS sequence number are random numbers, or the NAS overflow part is a random number, and the remaining part is 0. Alternatively, if the first downlink NAS sequence number is a random number, the first downlink NAS sequence number needs to be greater than the maximum downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node.

[0239] The first downlink NAS sequence number can also be a downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node (if the AMF node saves at least two downlink NAS sequence numbers corresponding to the 3GPP access technology, the first downlink NAS sequence number can also be the maximum downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node); or the first downlink NAS sequence number is the downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node plus 1 (if the AMF node saves at least two downlink NAS sequence numbers corresponding to the 3GPP access technology, the first downlink NAS sequence number is the maximum downlink NAS sequence number corresponding to the 3GPP access technology saved by the AMF node plus 1); or the first downlink NAS sequence number is the downlink NAS sequence number corresponding to the non-3GPP access technology saved by the AMF node plus 1 (if the AMF node saves the downlink NAS sequence number corresponding to the non-3GPP access technology, the first downlink NAS sequence number is the maximum downlink NAS sequence number corresponding to the non-3GPP access technology saved by the AMF node plus 1).

[0240] It should be noted that the AMF node can save one or all of the generated second uplink NAS sequence number and the first downlink NAS sequence number. The AMF node can maintain the uplink NAS sequence number and the downlink NAS sequence number corresponding to the 3GPP access technology, and can additionally maintain the uplink NAS sequence number and the downlink NAS sequence number corresponding to the non-3GPP access technology. If the AMF node generates the second uplink NAS sequence number and the first downlink NAS sequence number, the second uplink NAS sequence number and the first downlink NAS sequence number are saved, and if the AMF node only generates the first downlink NAS sequence number, the first downlink NAS sequence number is saved, and at this time the uplink NAS sequence number corresponding to the non-3GPP access technology maintained by the terminal is the first uplink NAS sequence number.

[0241] It can be understood that the AMF node independently maintains a set of NAS sequence numbers for 3GPP access technology and non-3GPP access technology respectively, that is, the size of the NAS sequence number maintained by the AMF node for the 3GPP access technology and the NAS sequence number maintained by the AMF node for the non-3GPP access technology does not affect each other. When the AMF node receives the uplink NAS message, the AMF node can determine the access technology or transmission path used by the terminal to transmit the uplink NAS message according to the bit information in the uplink NAS message or according to the information in the N2 message. If the access technology used is the 3GPP access technology, it can be compared whether the uplink NAS sequence number carried in the uplink NAS message is greater than the maximum uplink NAS sequence number maintained for the 3GPP access technology; if the access technology used is the non-3GPP access technology, it can be compared whether the uplink NAS sequence number carried in the uplink NAS message is greater than the maximum uplink NAS sequence number maintained for the non-3GPP access technology, so as to prevent replay attacks.

[0242] Step 1112, the AMF node sends a NAS security mode command (SMC) message to the terminal through the N3IWF node.

[0243] Correspondingly, the terminal receives the NAS SMC message.

[0244] In the above embodiment, the second message can be the NAS SMC message.

[0245] The NAS SMC message carries one or all of the second uplink NAS sequence number and the first downlink NAS sequence number. It can be understood that if the AMF node only determines the first downlink NAS sequence number, the NAS SMC message carries the first downlink NAS sequence number, and if the AMF node determines the second uplink NAS sequence number and the first downlink NAS sequence number, the NAS SMC message carries the second uplink NAS sequence number and the first downlink NAS sequence number.

[0246] Optionally, if the NAS message only carries the first downlink NAS sequence number, the NAS message can also carry an indication information for indicating the terminal to continue to use the uplink NAS sequence number determined by the terminal itself.

[0247] Optionally, the NAS SMC message further includes second indication information, and the second indication information is used to indicate the access technology or transmission path corresponding to the NAS sequence number carried in the NAS SMC message. In the scenario of the present embodiment, the access technology indicated by the second indication information is the non-3GPP access technology.

[0248] Step 1113. The terminal determines the uplink NAS sequence number and the downlink NAS sequence number corresponding to the non-3GPP access technology according to the NAS SMC message.

[0249] In this embodiment, the terminal has stored the uplink NAS sequence number and the downlink NAS sequence number corresponding to the 3GPP access technology, and can determine the uplink NAS sequence number and the downlink NAS sequence number maintained for the non-3GPP access technology according to the NAS SMC message received in this step.

[0250] Optionally, if the NAS SMC message only includes the first downlink NAS sequence number, the terminal determines that the uplink NAS sequence number corresponding to the non-3GPP access technology is still the first uplink NAS sequence number, and the downlink NAS sequence number corresponding to the non-3GPP access technology is the first downlink NAS sequence number; if the NAS SMC message includes the second uplink NAS sequence number and the first downlink NAS sequence number, the terminal can determine that the uplink NAS sequence number corresponding to the non-3GPP access technology is the second uplink NAS sequence number, and the downlink NAS sequence number corresponding to the non-3GPP access technology is the first downlink NAS sequence number.

[0251] It can be understood that when the terminal receives a downlink NAS message, the terminal can determine the access technology or transmission path used by the terminal to transmit the downlink NAS message according to the bit information in the downlink NAS message. If the access technology used is the 3GPP access technology, the terminal can compare whether the downlink NAS sequence number carried in the downlink NAS message is greater than the maximum downlink NAS sequence number maintained for the 3GPP access technology; if the access technology used is the non-3GPP access technology, the terminal can compare whether the downlink NAS sequence number carried in the downlink NAS message is greater than the maximum downlink NAS sequence number maintained for the non-3GPP access technology, so as to prevent replay attacks.

[0252] Step 1114. The terminal sends a NAS security mode complete (SMP) message to the AMF node through the N3IWF node.

[0253] Correspondingly, the AMF node receives the NAS SMP message.

[0254] Optionally, the NAS message in step 502 can be the NAS SMP message in this step.

[0255] The terminal can perform integrity protection on the NAS SMP message by using the first parameter, the uplink NAS sequence number, and the NAS key. The first parameter is used to indicate that the access technology used to transmit the NAS SMP message is a non-3GPP access technology or to indicate that the transmission path used to transmit the NAS SMP message is path 2 in Figure 2 The uplink NAS sequence number is the uplink NAS sequence number corresponding to the non-3GPP access technology determined by the terminal in step 1113 or the uplink NAS sequence number corresponding to path 2. The uplink NAS sequence number is carried in the NAS SMP message.

[0256] It can be understood that after receiving the NAS SMP message, the AMF node can verify whether the uplink NAS sequence number carried in the NAS SMP message is greater than the uplink NAS sequence number corresponding to the non-3GPP access technology stored by the AMF node or whether the uplink NAS sequence number is greater than the uplink NAS sequence number corresponding to path 2. If so, it can be determined according to the bit information in the NAS message that the access technology used to transmit the NAS SMP message is a non-3GPP access technology, and then a first parameter corresponding to the non-3GPP access technology is determined. Then, the NAS SMP message is integrity checked according to the first parameter, the NAS key, and the uplink NAS sequence number carried in the NAS SMP message. If the checking is successful, step 1115 is performed. Optionally, if the AMF stores multiple uplink NAS sequence numbers, it can be verified whether the uplink NAS sequence number carried in the NAS SMP message is greater than the maximum uplink NAS sequence number corresponding to the non-3GPP access technology stored by the AMF node.

[0257] In step 1115, the AMF node sends an N2 message to the N3IWF node. The N2 message carries the key Kn3iwf and a registration completion message.

[0258] Correspondingly, the N3IWF node receives the N2 message.

[0259] In step 1116, the N3IWF node sends an EAP-5G-Success message to the terminal.

[0260] Correspondingly, the terminal receives the EAP-5G-Success message.

[0261] In step 1117, the terminal and the N3IWF node complete the calculation of the authentication parameter by using the Kn3iwf.

[0262] In step 1118, an internet protocol security (IPsec) connection is established between the terminal and the N3IWF node.

[0263] Step 1119, the N3IWF node sends a registration completion message to the terminal.

[0264] By the method provided by the embodiments of the present application, the terminal can access the network through the non-3GPP access technology, and the terminal can independently maintain the NAS sequence number of the 3GPP access technology and the NAS sequence number of the non-3GPP access technology, thereby reducing the possibility of replay attacks.

[0265] In a possible implementation manner of the embodiments of the present application, the security context of the terminal can be bound with the operator information. For example, the operator information can be the PLMN ID. When the terminal accesses the network through the 3GPP access technology provided by the operator A, the terminal can execute the corresponding process, and determine whether the N3IWF node corresponding to the non-3GPP access technology is still the operator A. If yes, the terminal can continue the corresponding process. Figure 11 Figure 11

[0266] In another possible implementation manner, the security context of the terminal on the side of the non-3GPP access technology can be bound with other information, for example, subscription information, location area information, and the like. For example, if the terminal moves from the coverage of the base station A to the coverage of the base station B, if the non-3GPP access technology C is supported in the coverage of the terminal A, and the non-3GPP access technology D is supported by the base station B, if the terminal accesses the network through the non-3GPP access technology C, when the terminal moves from the coverage of the base station A to the coverage of the base station B, if the subscription information of the terminal indicates that the terminal has no right to use the non-3GPP access technology D, the terminal cannot access the network through the non-3GPP access technology D.

[0267] Optionally, in the above embodiments, the AMF node can determine the access technology used for transmitting the NAS message according to the first indication information. The embodiments of the present application further provide three methods for the AMF node to determine the access technology used for the N2 message or the NAS message after receiving the N2 message.

[0268] ​​The first mode is that the AMF node can determine the access technology used for transmitting the N2 message according to the source of the N2 message. For example, the source of the message is determined according to the source address information (such as an IP address), and then the access technology used for transmitting the message is determined according to the source of the message. If the N2 message comes from a device using a 3GPP access technology, such as a base station, it is determined that the NAS sequence number corresponding to the 3GPP access technology can be used, that is, the AMF node can use the uplink NAS sequence number corresponding to the 3GPP access technology saved by itself to verify the uplink NAS sequence number carried in the N2 message. If the N2 message comes from a device using a non-3GPP access technology, such as an N3IWF node, it is determined that the NAS sequence number corresponding to the non-3GPP access technology can be used, that is, the AMF node can use the uplink NAS sequence number corresponding to the non-3GPP access technology saved by itself to verify the uplink NAS sequence number carried in the N2 message.

[0269] The second mode is that the terminal can inform the AMF node of the source of the N2 message in a display manner. For example, the N2 message can carry a bit representing the access technology, for example, 0 represents a 3GPP access technology, and 1 represents a 3GPP access technology. Alternatively, the N2 message can carry a string, for example, "NR" represents a 3GPP access technology, and "wifi" represents a non-3GPP access technology.

[0270] The third mode is that the AMF node determines the access technology used for transmitting the N2 message according to the access type information in the N2 message. For example, the access type information is rat type (access type) information. If the N2 message comes from a device using a 3GPP access technology, such as a base station, the access type indication in the N2 message is 3GPP access, and it is determined that the NAS sequence number corresponding to the 3GPP access technology can be used, that is, the AMF node can use the uplink NAS sequence number corresponding to the 3GPP access technology saved by itself to verify the uplink NAS sequence number carried in the N2 message.

[0271] Compared with the prior art AMF node which does not distinguish the access technology used for the received message, the embodiments of the present application can make the AMF node determine the access technology used for the received message, so as to select the NAS sequence number corresponding to the access technology used for the received message.

[0272] Optionally, in another implementation manner provided by the embodiments of the present application, in combination with Figure 11 Corresponding method flow, if the AMF node determines the second uplink NAS sequence number and the first downlink NAS sequence number corresponding to the non-3GPP access technology in step 1111, the AMF node can also update the NAS key. The embodiments of the present application provide the following four methods for updating the NAS key.

[0273] Method one, generating new Kamf (nKamf) from old Kamf (oKamf), and generating new NAS key according to nKamf after generating nKamf in AMF node.

[0274] Wherein, Kamf is root key of AMF node.

[0275] nKamf = KDF (oKamf, freshness parameter), and the freshness parameter can be uplink NAS sequence number received by AMF node last time, or COUNT, or parameter sent by terminal to AMF node, or parameter negotiated by terminal and AMF node.

[0276] Method two, generating nKamf from Kseaf, and generating new NAS key according to nKamf after generating nKamf in AMF node.

[0277] Wherein, Kseaf is root key of AMF node.

[0278] nKamf = KDF (Kamf, freshness parameter), and the freshness parameter can be uplink NAS sequence number received by AMF node last time, or counter value. Exemplarily, the initial value of counter value is 0, and the counter value is added by 1 every time AMF node generates NAS key, which is used to indicate that AMF node generates new key.

[0279] Method three, AMF node can generate new NAS key according to old Kamf (oKamf) and algorithm.

[0280] Wherein, nKamf = KDF (oKamf, algorithm ID, selected algorithm, other parameter), wherein, algorithm ID is identifier of algorithm selected by AMF, and selected algorithm is algorithm used for terminal and AMF to protect NAS message.

[0281] Other parameter is parameter used for indicating access technology. Specifically, other parameter can be in form of bit or ID, for example, it can be specified that other parameter corresponding to 3GPP access technology is 0x01, other parameter corresponding to non-3GPP access technology is 0x10, and other parameter corresponding to fixed network access technology is 0x11.

[0282] Other parameter can also be counter value. Exemplarily, the initial value of counter value is 0, and the counter value is added by 1 every time AMF node generates NAS key, which is used to indicate that AMF node generates new key.

[0283] Method four, generating new NAS key according to old NAS key.

[0284] Wherein the new NAS key = (old NAS key, counter value). Exemplarily, the initial value of the counter value is 0, and the AMF node adds 1 to the counter value each time the NAS key is generated, indicating that the AMF node generates a new key.

[0285] It should be noted that if the AMF node generates a new NAS key, the AMF node can indicate the terminal to update the key by Figure 11 The NAS SMC message in the corresponding embodiment indicates the terminal to update the key in a displayed manner. After receiving the indication to update the key, the terminal can update the key by one of the four methods described above. The method for the terminal to update the key is the same as the method for the AMF node to update the NAS key, and the method for the AMF node and the terminal to update the NAS key is pre-configured.

[0286] Optionally, the NAS key can be updated when the access technology used by the AMF node and the terminal is switched, or when the use of multiple access technologies is switched to the use of only one access technology, or when the number of simultaneously used access technologies is reduced.

[0287] By updating the key, even if the attacker obtains the NAS key when the AMF node and the terminal communicate using multiple access technologies at the same time, the attacker cannot obtain the plaintext when the terminal and the AMF node subsequently communicate using a single access technology, improving security.

[0288] It should be noted that the embodiments of the present application take the first access technology as a non-3GPP access technology and the second access technology as a 3GPP access technology as an example for description. In actual application, the first access technology can be a 3GPP access technology and the second access technology can be a non-3GPP access technology. In the case where the first access technology and the second access technology are two different access technologies supported by the terminal, the method provided by the above embodiments can be used, or in the case where the terminal accesses the core network device through multiple access technologies, the method provided by the above embodiments can also be used.

[0289] Exemplarily, if the first access technology is a fixed network access technology and the second access technology is a non-3GPP access technology, the implementation method is similar to the method described in the above embodiments, Figure 11 The corresponding embodiments can be applied to a scenario where the terminal has accessed the AMF node through a 3GPP access technology and then accesses the same AMF node through a fixed network access technology, Figure 11 The flow of the above embodiment can be replaced by a registration flow of the terminal accessing the AMF node through a fixed network access technology, and the method for security protection in the registration flow is similar to the method for security protection of the terminal accessing the AMF node through a non-3GPP access technology described in the above embodiment. Figure 11 The embodiment of the above embodiment describes a security protection method for the terminal accessing the AMF node through a non-3GPP access technology.

[0290] The above mainly describes the solutions provided in the embodiments of this application from the perspective of interaction between different network elements. It is understood that, in order to achieve the above functions, the terminal and core network equipment include hardware structures and / or software modules corresponding to the execution of each function. Based on the units and algorithm steps of the various examples described in the embodiments disclosed in this application, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions in the embodiments of this application.

[0291] This application embodiment can divide terminals and core network equipment into functional units according to the above method examples. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0292] When using integrated units, Figure 12 A schematic block diagram of another device provided in an embodiment of this application is shown. This device 1200 can exist in the form of software, a terminal, or a chip within a terminal. The device 1200 includes a processing unit 1202 and a communication unit 1203. The processing unit 1202 is used to control and manage the operation of the device 1200; for example, the processing unit 1202 is used to support the device 1200 in performing... Figure 5 Steps 501 to 502 in the process, Figure 10 Step 1001 in the middle, Figure 11 Steps 1101, 1105, 1113, 1117, and 1118, and / or other processes used in the technology described herein. Communication unit 1203 is used to support communication between device 1200 and other network elements (e.g., core network equipment, N3IWF nodes). For example, communication unit 1203 is used to support device 1200 in performing... Figure 10 Steps 1002, 1003, and 1007, and Figure 11 Steps 1102, 1103, 1104, 1106, 1112, 1114, 1116, and 1119 are included. The device 1200 may also include a storage unit 1201 for storing program code and data of the device 1200.

[0293] The processing unit 1202 can be a processor or a controller, for example, a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It can implement or execute the various exemplary logical blocks, modules and circuits described in connection with the disclosure. The processor can also be a combination of implementing computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit 1203 can be a transceiver, a transceiver circuit, a communication interface, or the like. The storage unit 1201 can be a memory.

[0294] When the processing unit 1202 is a processor, the communication unit 1203 is a transceiver, and the storage unit 1201 is a memory, the apparatus 1200 related to the embodiments of the present application can be a terminal as shown in the figure. Figure 13

[0295] Figure 13 A simplified schematic diagram of a possible design structure of a terminal related to the embodiments of the present application is shown. The terminal 1300 includes a transmitter 1301, a receiver 1302, and a processor 1303. The processor 1303 can also be a controller, denoted as "controller / processor 1303" in the figure. Figure 13 Optionally, the terminal 1300 can also include a modem processor 1305, which can include an encoder 1306, a modulator 1307, a decoder 1308, and a demodulator 1309.

[0296] ​In one example, the transmitter 1301 conditions (e.g., analog converts, filters, amplifies, and upconverts, etc.) the output samples and generates an uplink signal, which is transmitted via an antenna to a base station as described in the above embodiments. On the downlink, the antenna receives the downlink signal transmitted by a base station as described in the above embodiments. The receiver 1302 conditions (e.g., filters, amplifies, downconverts, and digitizes, etc.) the signal received from the antenna and provides input samples. In the modem processor 1305, the encoder 1306 receives traffic data and signaling messages to be sent on the uplink and processes (e.g., formats, encodes, and interleaves, etc.) the traffic data and signaling messages. The modulator 1307 further processes (e.g., symbol maps and modulates) the encoded traffic data and signaling messages and provides output samples. The demodulator 1309 processes (e.g., demodulates) the input samples and provides symbol estimates. The decoder 1308 processes (e.g., deinterleaves and decodes) the symbol estimates and provides decoded data and signaling messages sent to the terminal 1300. The encoder 1306, the modulator 1307, the demodulator 1309, and the decoder 1308 can be implemented by a synthetic modem processor 1305. These units process according to the radio access technology employed by the wireless access network (e.g., the access technology of LTE and other evolved systems). It is noted that when the terminal 1300 does not include the modem processor 1305, the above functions of the modem processor 1305 can also be completed by the processor 1303.

[0297] The processor 1303 controls and manages the actions of the terminal 1300, for performing the processing procedures performed by the terminal 1300 in the above embodiments of the present application. For example, the processor 1303 is further configured to perform the processing procedures of the terminal involved in the methods shown in Figure 5 , and Figure 10 to Figure 11 , and / or other procedures of the technical solutions described in the present application.

[0298] Further, the terminal 1300 can further include a memory 1304, which is configured to store program codes and data for the terminal 1300.

[0299] In the case of employing integrated units, Figure 14 A schematic block diagram of another apparatus provided in the embodiments of the present application is shown. The apparatus can exist in the form of software, and can be a core network device, and can also be a chip in the core network device. The apparatus 1400 includes a processing unit 1402 and a communication unit 1403. The processing unit 1402 is configured to control and manage the actions of the apparatus 1400, for example, the processing unit 1402 is configured to support the apparatus 1400 to perform the steps 901 and 902 in Figure 9 , the steps 1004 to 1006 in Figure 10 , and the steps 1201 to 1203 inFigure 11 steps 1109 to 1111 in FIG. 11, and / or other procedures for the technologies described herein. The communication unit 1403 is configured to support communication between the apparatus 1400 and other network elements (e.g., terminals, N3IWF nodes). For example, the communication unit 1403 is configured to support the apparatus 1400 to perform Figure 10 steps 1002 to 1002 and step 1007 in FIG. 10, Figure 11 steps 1108, 1112, 1114 and 1115 in FIG. 11. The apparatus 1400 can further include a storage unit 1401 configured to store program codes and data of the apparatus 1400.

[0300] The processing unit 1402 can be a processor or a controller, e.g., a CPU, a general purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logical blocks, modules, and circuits described in connection with the disclosure. The processor can also be a combination of implementing computing functions, e.g., a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit 1403 can be a communication interface, which is a collective term, and in specific implementations, it can include multiple interfaces, e.g., an interface between the core network device and the terminal, an interface between the core network device and the N3IWF node, and / or other interfaces. The storage unit 1401 can be a memory.

[0301] When the processing unit 1402 is a processor, the communication unit 1403 is a communication interface, and the storage unit 1401 is a memory, the structure of the apparatus 1400 involved in the embodiments of the present application can be as shown in Figure 15 the structure of the core network device.

[0302] Figure 15 A possible structure schematic diagram of the core network device provided by the embodiments of the present application is shown.

[0303] As shown in Figure 15 , the core network device 1500 includes a processor 1502, a communication interface 1503, and a memory 1501. Optionally, the core network device 1500 can further include a bus 1504. The communication interface 1503, the processor 1502, and the memory 1501 can be connected to each other through the bus 1504; the bus 1504 can be a PCI bus or an EISA bus, etc. The bus 1504 can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 15 only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0304] The steps of a method or algorithm described in connection with the present disclosure can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. Alternatively, the processor and the storage medium can reside as discrete components in a user terminal. Clearly, the embodiments need not be implemented in connection with a processor.

[0305] In several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0306] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or also can be distributed on a plurality of network devices. In actual implementation, some or all of the units can be selected according to the actual needs to achieve the purposes of the embodiments.

[0307] In addition, each function unit in the various embodiments of the present disclosure can be integrated in a processing unit, or each function unit can exist alone, or two or more function units can be integrated in a unit. The above integrated unit can be realized in the form of hardware, or in the form of hardware plus software function units.

[0308] Those skilled in the art can clearly understand the application by the description of the above embodiments, and the application can be realized by means of software and necessary universal hardware, of course, can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, hard disk or optical disk, etc., including a number of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the methods described in various embodiments of the application.

[0309] The above is only a specific implementation of the application, but the protection scope of the application is not limited to this, changes or replacements within the technical scope disclosed by the application should be covered in the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.

Claims

1. A method for security protection, characterized in that, include: Determine the value of the first parameter, which represents the access technology used to transmit Non-Access Stratum (NAS) messages; The NAS message is protected by using the first parameter, the key KEY, and the serial number COUNT as input parameters; wherein, the first parameter is a determined value, the KEY is the NAS key, and the value of COUNT is determined by the NAS serial number corresponding to the access technology.

2. The method according to claim 1, characterized in that, The first parameter is the bearer information (BEARER).

3. The method according to claim 1, characterized in that, The method further includes: Determine the access technology used to transmit the NAS message; The value of the first parameter is determined according to the access technology.

4. The method according to claim 3, characterized in that, Determining the value of the first parameter according to the access technology includes: When the access technology is 3GPP access technology, the value of the first parameter is determined to be a first value.

5. The method according to claim 4, characterized in that, The method further includes: When the access technology is a non-3GPP access technology, the value of the first parameter is determined to be the second value.

6. The method according to claim 1, characterized in that, The access technology is 3GPP access technology, and the value of the first parameter represents 3GPP access technology.

7. The method according to claim 1, characterized in that, The access technology is a non-3GPP access technology, and the value of the first parameter indicates a non-3GPP access technology.

8. The method according to any one of claims 1-7, characterized in that, The COUNT consists of 32 bits, of which the first 8 bits are 0, and the remaining 24 bits are determined by the NAS serial number corresponding to the access technology.

9. The method according to any one of claims 1-8, characterized in that, The NAS message is a NAS message to be transmitted to the core network device. Therefore, security protection for the NAS message includes: The NAS messages are encrypted, and / or the integrity of the NAS messages is protected.

10. The method according to any one of claims 1-8, characterized in that, If the NAS message is a received NAS message, then security protection for the NAS message includes: The NAS message is decrypted and / or its integrity is verified.

11. The method according to any one of claims 1-8, characterized in that, After securing the NAS messages, the method further includes: Send the NAS message after security protection, the NAS message after security protection includes a portion of the bits of the NAS sequence corresponding to the access technology.

12. The method according to any one of claims 1-11, characterized in that, The method is executed by a terminal or a chip within a terminal.

13. The method according to claim 12, characterized in that, The terminal supports 3GPP access technology and non-3GPP access technology, and maintains corresponding NAS serial numbers for the 3GPP access technology and the non-3GPP access technology respectively. The 3GPP access technology and the non-3GPP access technology share the NAS key.

14. The method according to any one of claims 1-11, characterized in that, The method is executed by the core network equipment.

15. The method according to claim 14, characterized in that, The core network equipment is an access mobility management function node.

16. The method according to claim 14, characterized in that, The core network equipment maintains corresponding NAS serial numbers for the 3GPP access technology and non-3GPP access technology supported by the terminal; the 3GPP access technology and the non-3GPP access technology share the NAS key.

17. A communication device, characterized in that, include: The processing unit is configured to determine the value of a first parameter, the value of which represents the access technology used to transmit non-access stratum (NAS) messages; and to perform security protection on the NAS messages using the first parameter, a key (KEY), and a serial number (COUNT) as input parameters; wherein the first parameter is a determined value, the key is a NAS key, and the value of the COUNT is determined by the NAS serial number corresponding to the access technology.

18. The communication device according to claim 17, characterized in that, The first parameter is the bearer information (BEARER).

19. The communication device according to claim 17, characterized in that, The processing unit is further configured to: Determine the access technology used to transmit the NAS message; determine the value of the first parameter based on the access technology.

20. The communication device according to claim 19, characterized in that, The processing unit is specifically used for: When the access technology is 3GPP access technology, the value of the first parameter is determined to be a first value.

21. The communication device according to claim 20, characterized in that, The processing unit is further configured to: When the access technology is a non-3GPP access technology, the value of the first parameter is determined to be the second value.

22. The communication device according to claim 17, characterized in that, The COUNT consists of 32 bits, of which the first 8 bits are 0, and the remaining 24 bits are determined by the NAS serial number corresponding to the access technology.

23. The communication device according to any one of claims 17-22, characterized in that, The NAS message is a NAS message to be transmitted to the core network device, and the processing unit is specifically used for: The NAS messages are encrypted, and / or the integrity of the NAS messages is protected.

24. The communication device according to any one of claims 17-22, characterized in that, If the NAS message is a received NAS message, then the processing unit is specifically used for: The NAS message is decrypted and / or its integrity is verified.

25. The communication device according to any one of claims 17-22, characterized in that, The communication device further includes a sending unit for sending the NAS message after security protection, wherein the NAS message after security protection includes a portion of the bits of the NAS sequence corresponding to the access technology.

26. The communication device according to any one of claims 17-22, characterized in that, The communication device is a terminal or a chip within a terminal.

27. The communication device according to claim 26, characterized in that, The terminal supports 3GPP access technology and non-3GPP access technology, and maintains corresponding NAS serial numbers for the 3GPP access technology and the non-3GPP access technology respectively. The 3GPP access technology and the non-3GPP access technology share the NAS key.

28. The communication device according to any one of claims 17-22, characterized in that, The communication device is a core network device.

29. The communication device according to claim 28, characterized in that, The core network equipment is an access mobility management function node.

30. The communication device according to claim 28, characterized in that, The core network equipment maintains corresponding NAS serial numbers for the 3GPP access technology and non-3GPP access technology supported by the terminal; the 3GPP access technology and the non-3GPP access technology share the NAS key.

31. A communication device, characterized in that, include: Memory, which stores executable program instructions; and A processor, the processor being coupled to the memory, reads and executes instructions in the memory to enable the communication device to implement the method as described in any one of claims 1-16.

32. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-16.

33. A computer program product containing instructions, characterized in that, When it is run on a computer, it causes the computer to perform the method as described in any one of claims 1-16.

Citation Information

Patent Citations

  • A method and device for safety protection

    CN109361655B

  • Safety protection method and device

    CN109803263A

  • A safety protection method and device

    CN111357308B

  • A method and device for safety protection

    CN112738804B