CN110769417B - Key generation method and device - Google Patents

Key generation method and device Download PDF

Info

Publication number
CN110769417B
CN110769417B CN201810828720.5A CN201810828720A CN110769417B CN 110769417 B CN110769417 B CN 110769417B CN 201810828720 A CN201810828720 A CN 201810828720A CN 110769417 B CN110769417 B CN 110769417B
Authority
CN
China
Prior art keywords
management entity
key
network
mobility management
base station
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810828720.5A
Other languages
Chinese (zh)
Other versions
CN110769417A (en
Inventor
衣强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810828720.5A priority Critical patent/CN110769417B/en
Publication of CN110769417A publication Critical patent/CN110769417A/en
Application granted granted Critical
Publication of CN110769417B publication Critical patent/CN110769417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/08Reselecting an access point

Landscapes

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

Abstract

A secret key generation method and a secret key generation device relate to the technical field of communication. The method comprises the steps that a first mobile management entity executes a first switching process and receives a first message sent by a second mobile management entity, the first switching process is a process that a terminal is switched from a source base station to a first target base station, and the first message indicates that the first switching process fails. After receiving the first message, the first mobility management entity sends a first key to the second mobility management entity if determining that the second handover process needs to be executed, so that the second mobility management entity generates a second key according to the first key. The second handover process is a process of handover of the terminal from the source base station to the second target base station, the first key is generated in the first handover process, and the second key is used for security protection of communication between the terminal and a network where the second target base station is located. The technical scheme is helpful for ensuring the communication safety and improving the switching efficiency after the second switching process is successful to a certain extent.

Description

Key generation method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for generating a secret key.
Background
In the early days of deployment of the fifth generation communication (5G) network, the 5G network may not be able to fully cover all areas. Therefore, in order to ensure the continuity of the voice session of the terminal, if the terminal moves from an area covered by the 5G network to an area not covered by the 5G network, the terminal may switch from the 5G network to a fourth generation communication (4th generation, 4G) network or a third generation communication (3rd generation, 3G) network to perform the voice session.
However, since there is no interface for direct communication between an access and mobility management function (AMF) in the 5G network and a Mobile Switching Center (MSC) in the 3G network, when a terminal is handed over from the 5G network to the 3G network, a Mobile Management Entity (MME) in the 4G network needs to be used for bridging. Specifically, the AMF in the 5G network sends the handover related signaling to the MME in the 4G network, and then the MME executes the handover procedure from the 4G network to the 3G network.
At present, in order to improve the security of a voice session after switching to a 3G network based on an existing manner of switching a terminal from a 5G network to the 3G network, a process of key generation is performed twice after a process of switching the terminal from the 5G network to the 3G network is initiated. However, in the prior art, if the terminal fails to be switched from the 5G network to the 3G network, and then the process of switching the terminal from the 5G network to the 3G network is re-initiated, the process of generating the key still needs to be executed twice, which increases the switching delay to a certain extent, and thus results in low switching efficiency.
Disclosure of Invention
The embodiment of the application provides a key generation method and device, which can improve the switching efficiency of switching a terminal from a 5G network to a 3G network.
In a first aspect, a key generation method provided in an embodiment of the present application includes:
the first mobility management entity executes a first switching process and receives a first message sent by the second mobility management entity, the first switching process is a process that the terminal is switched from the source base station to the first target base station, and the first message indicates that the first switching process fails. After receiving the first message, the first mobility management entity sends a first key to the second mobility management entity if determining that the second handover process needs to be executed, so that the second mobility management entity generates a second key according to the first key. The second handover process is a process of handover of the terminal from the source base station to the second target base station, the first key is generated by the first mobility management entity in the first handover process, and the second key is used for performing security protection on communication between the terminal and a network where the second target base station is located.
In this embodiment of the application, after the first handover procedure fails, if it is determined that the second handover procedure needs to be executed, the first mobility management entity sends the first key generated in the first handover procedure to the second mobility management entity, so that the second mobility management entity can generate the second key according to the first key. And the first key is generated during the first handover procedure. Therefore, compared with the prior art, the method reduces the process of one-time key generation, is favorable for ensuring the security of the terminal voice session after the second switching process is successful to a certain extent, reduces the switching time delay of the second switching process and improves the switching efficiency of the second switching process.
In one possible design, the first key is generated by the first mobility management entity according to a first parameter during the first handover procedure; the first parameter is a random number, or the first parameter is a downlink NAS count value of a network where the source base station is located. Thereby helping to reduce the complexity of the first key generation.
In one possible design, after the first mobility management entity determines that the second handover procedure needs to be performed, the second parameter is sent to the second mobility management entity, so that the second mobility management entity generates the second key according to the first key and the second parameter. In this embodiment of the application, since the parameter used by the second mobility management entity when generating the second key includes not only the first key but also the second parameter, by changing a value of the second parameter, the second key generated by the second mobility management entity in the second handover process may be different from the second key generated by the second mobility management entity in the first handover process, thereby further improving the reliability of the key.
In a possible design, to simplify the implementation manner, the second parameter may be a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate the second key. The value of the downlink NAS count value of the network where the second mobility management entity is located is the downlink NAS count value of the network where the source base station for generating the first key is located, or the value of the downlink NAS count value of the network where the second mobility management entity is located is the sum of the current downlink NAS count value of the network where the second mobility management entity is located and the preset step length.
In one possible design, after the first mobility management entity sends the first key to the second mobility management entity, a second message sent by the second mobility management entity is received, where the second message indicates that the second handover procedure is successful. And after the first mobility management entity receives the second message, under the condition that the value of the second parameter is the same as the value of the first parameter, sending the first parameter used for generating the first key to the terminal to the first mobility management entity, or under the condition that the value of the second parameter is different from the value of the first parameter, sending the first parameter and the second parameter used for generating the first key to the terminal. Thereby facilitating the terminal to generate a symmetric key for the second key.
In one possible design, the first key is a root key Kasme of a network where the second mobility management entity is located. Thereby helping to simplify the way the first key is generated.
In one possible design, the second key includes an encryption key and an integrity protection key. By the technical scheme, the safety protection of the voice conversation of the terminal after the switching is successful is facilitated.
In a possible design, after receiving a handover request sent by a source base station, a first mobility management entity determines to allow a terminal to be handed over to a network where a first target base station is located according to a session handover policy; and based on the determination, the first mobility management entity performs a first handover procedure; the switching request is used for indicating that the terminal is switched from the source base station to the first target base station. In the embodiment of the present application, before the first handover procedure is performed, it is determined whether handover to a network where the first target base station is located is allowed, so that it is helpful to improve the probability of success of the first handover procedure.
In one possible design, after receiving a handover request sent by a source base station, a first mobility management entity sends a policy acquisition request to a policy control entity, where the policy acquisition request includes an identifier of a network where a first target base station is located; and receiving a strategy acquisition response sent by the strategy control entity according to the identifier of the network where the first target base station is located, wherein the strategy acquisition response comprises a session switching strategy. By the technical scheme, the first mobile management entity can acquire the session switching strategy without pre-configuring the session management strategy on the first mobile management entity.
In a possible design, after receiving a handover request sent by a source base station, a first mobility management entity sends a session management context request message to a session management entity; and receiving a session management context response of the session management entity, wherein the session management context response comprises a session switching indication. The session handover indication is used for indicating that the terminal is allowed to be handed over to the network where the first target base station is located. The handover request is used for instructing to handover the terminal from the source base station to the first target base station, the session management context request message includes an identifier of a network where the first target base station is located, and then based on the session handover instruction, the first mobility management entity executes a first handover process. Through the technical scheme, the steps required to be executed on the first mobility management entity are facilitated to be simplified, and therefore the requirement on the first mobility management entity is facilitated to be reduced.
In a possible design, the network where the source base station and the first mobility management entity are located is a 5G network, the network where the second mobility management entity is located is a 4G network, and the network where the first target base station and the second target base station are located is a 3G network.
In a second aspect, an embodiment of the present application further provides a key generation method, including:
the first mobility management entity performs a first handover procedure and receives a first message sent by the second mobility management entity. The first switching process is a process of switching the terminal from the source base station to the first target base station, and the first message indicates that the first switching process fails. The first mobility management entity generates a first key after receiving the first message. Then, if the first mobility management entity determines that the second handover process needs to be executed, the first mobility management entity sends the generated first key to the second mobility management entity, so that the second mobility management entity generates a second key according to the first key. The second handover process is a process in which the terminal is handed over from the source base station to the second target base station, and the second key is used for performing security protection on communication between the terminal and a network in which the second target base station is located.
In the embodiment of the application, after the first handover process fails and before the second handover process is determined to be initiated, the first mobility management entity generates a first key; after the first mobility management entity determines to initiate the second handover process, the first key can be sent to the second mobility management entity, so that the second mobility management entity can generate the second key according to the first key. Compared with the prior art, the time for generating the first key is advanced, so that the method is beneficial to ensuring the security of the terminal voice conversation after the second switching process is successful to a certain extent, the switching time delay of the second switching process is reduced, and the switching efficiency of the second switching process is improved.
In one possible design, the first mobility management entity generates the first key according to the first parameter. The first parameter is a random number newly generated by the first mobility management entity, or the first parameter is a count value obtained by adding a preset step length to a downlink NAS count value of a network where the source base station is located. Thereby helping to reduce the complexity of the first key generation.
It should be noted that, taking the random number as an example, if the first mobility management entity generates the first key according to the random number NOUNCE1 in the first handover procedure, after the first handover procedure fails, the first mobility management entity regenerates a new random number NOUNCE2, and then generates the first key according to the random number NOUNCE 2. In this way, the first key generated in the first handover procedure can be made different from the first key generated after the first handover procedure has failed.
In one possible design, after the first mobility management entity determines that the second handover procedure needs to be performed, the second parameter is sent to the second mobility management entity, so that the second mobility management entity generates the second key according to the first key and the second parameter. In this embodiment of the present application, since the parameter used by the second mobility management entity when generating the second key includes not only the first key but also the second parameter, by changing a value of the second parameter, the second key generated by the second mobility management entity in the second handover process may be different from the second key generated by the second mobility management entity in the first handover process, so as to further improve the reliability of the key.
In a possible design, to simplify the implementation manner, the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate the second key. The value of the downlink NAS count value of the network where the second mobility management entity is located is a downlink NAS count value of a network where a source base station for generating the first key is located, or the value of the downlink NAS count value of the network where the second mobility management entity is located is the sum of the current downlink NAS count value of the network where the second mobility management entity is located and a preset step length, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value.
In one possible design, after the first mobility management entity sends the first key to the second mobility management entity, a second message sent by the second mobility management entity is received, where the second message indicates that the second handover procedure is successful. And after receiving the second message, the first mobility management entity sends the first parameter used for generating the first key to the terminal under the condition that the value of the second parameter is the same as the value of the first parameter, or the first mobility management entity sends the first parameter and the second parameter used for generating the first key to the terminal under the condition that the value of the second parameter is different from the value of the first parameter. Thereby facilitating the terminal to generate a symmetric key for the second key.
In addition, it should be noted that, when the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and a value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value, it may be agreed in advance among the terminal, the first mobility management entity, and the second mobility management entity that the value of the downlink NAS count value of the network where the second mobility management entity is located is the default initial value, and in this case, the second parameter does not need to be sent to the terminal, and only the terminal needs to be notified that the handover process is successful.
In one possible design, the first key is a root key Kasme of a network where the second mobility management entity is located. Thereby helping to simplify the way the first key is generated.
In one possible design, the second key includes an encryption key and an integrity protection key. By the technical scheme, the safety protection of the voice conversation of the terminal after the switching is successful is facilitated.
In a possible design, after receiving a handover request sent by a source base station, a first mobility management entity determines to allow a terminal to be handed over to a network where a first target base station is located according to a session handover policy; and based on the determination, the first mobility management entity performs a first handover procedure; the switching request is used for indicating that the terminal is switched from the source base station to the first target base station. In the embodiment of the present application, before the first handover procedure is performed, it is determined whether handover to a network where the first target base station is located is allowed, so that it is helpful to improve the probability of success of the first handover procedure.
In one possible design, after receiving a handover request sent by a source base station, a first mobility management entity sends a policy acquisition request to a policy control entity, where the policy acquisition request includes an identifier of a network where a first target base station is located; and receiving a strategy acquisition response sent by the strategy control entity according to the identifier of the network where the first target base station is located, wherein the strategy acquisition response comprises a session switching strategy. By the technical scheme, the first mobile management entity can acquire the session switching strategy without pre-configuring the session management strategy on the first mobile management entity.
In a possible design, after receiving a handover request sent by a source base station, a first mobility management entity sends a session management context request message to a session management entity; and receiving a session management context response of the session management entity, wherein the session management context response comprises a session switching indication. The session handover indication is used for indicating that the terminal is allowed to be handed over to the network where the first target base station is located. The handover request is used for instructing to handover the terminal from the source base station to the first target base station, the session management context request message includes an identifier of a network where the first target base station is located, and then based on the session handover instruction, the first mobility management entity executes a first handover process. Through the technical scheme, the steps required to be executed on the first mobility management entity are facilitated to be simplified, and therefore the requirement on the first mobility management entity is facilitated to be reduced.
In a possible design, the network where the source base station and the first mobility management entity are located is a 5G network, the network where the second mobility management entity is located is a 4G network, and the network where the first target base station and the second target base station are located is a 3G network.
In a third aspect, an embodiment of the present application provides an apparatus, including: processing unit, receiving unit and transmitting unit. The processing unit is configured to perform a first handover procedure, where the first handover procedure is a procedure in which the terminal is handed over from the source base station to the first target base station. The receiving unit is configured to receive a first message sent by the second mobility management entity, where the first message indicates that the first handover procedure fails. The sending unit is used for sending the first key to the second mobility management entity if the processing unit determines that the second handover process needs to be executed, so that the second mobility management entity generates a second key according to the first key; the second switching process is a process that the terminal is switched from the source base station to the second target base station; the first key is generated by the processing unit in a first handover procedure; the second key is used for security protection of communication between the terminal and a network where the second target base station is located.
In one possible design, the first key is generated by the processing unit in accordance with a first parameter during the first handover; the first parameter is a random number, or the first parameter is a downlink NAS count value of a network where the source base station is located.
In one possible design, the sending unit is further configured to send the second parameter to the second mobility management entity after the processing unit determines that the second handover procedure needs to be performed, so that the second mobility management entity generates the second key according to the first key and the second parameter.
In a possible design, the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate a second key; the value of the downlink NAS count value of the network where the second mobility management entity is located is the downlink NAS count value of the network where the source base station for generating the first key is located, or the value of the downlink NAS count value of the network where the second mobility management entity is located is the sum of the current downlink NAS count value of the network where the second mobility management entity is located and the preset step length.
In a possible design, the receiving unit is further configured to receive a second message sent by the second mobility management entity after the sending unit sends the first key to the second mobility management entity, where the second message indicates that the second handover procedure is successful. The sending unit is further configured to send a first parameter used for generating the first key to the terminal, or send the first parameter and a second parameter used for generating the first key to the terminal.
In one possible design, the first key is a root key Kasme of a network where the second mobility management entity is located.
In one possible design, the second key includes an encryption key and an integrity protection key.
In one possible design, the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; the switching request is used for indicating that the terminal is switched from the source base station to the first target base station. The processing unit is further configured to determine, after the receiving unit receives the handover request, to allow the terminal to be handed over to a network where the first target base station is located according to the session handover policy; and based on the determination, the first mobility management entity performs a first handover procedure.
In a possible design, the sending unit is further configured to send a policy acquisition request to the policy control entity after the receiving unit receives the handover request sent by the source base station, where the policy acquisition request includes an identifier of a network where the first target base station is located. The receiving unit is further configured to receive a policy acquisition response sent by the policy control entity according to the identifier of the network where the first target base station is located, where the policy acquisition response includes a session switching policy.
In one possible design, the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; the switching request is used for indicating that the terminal is switched from the source base station to the first target base station. The sending unit is also used for sending a session management context request message to the session management entity after the receiving unit receives the switching request; the session management context request message includes an identifier of a network where the first target base station is located. The receiving unit is further configured to receive a session management context response of the session management entity, where the session management context response includes a session handover indication, and the session handover indication is used to indicate that the terminal is allowed to be handed over to a network where the first target base station is located. The processing unit is further configured to perform a first handover procedure by the first mobility management entity based on the session handover indication after the session management context response is received by the receiving unit.
In a possible design, the network where the source base station and the first mobility management entity are located is a 5G network, the network where the second mobility management entity is located is a 4G network, and the network where the first target base station and the second target base station are located is a 3G network.
In one possible design, the device is a chip, or the device is an apparatus.
In a fourth aspect, another apparatus provided in this embodiment of the present application includes a processor, a memory, and a transceiver. Wherein the memory is used for storing computer execution instructions. The processor is coupled to the memory and the transceiver. When the apparatus is run, the processor executes the computer-executable instructions stored by the memory to cause the apparatus to perform the method of any of the possible designs to which the first aspect of the embodiments of the present application relates.
In a fifth aspect, a computer storage medium of an embodiment of the present application stores a program, which, when executed on an apparatus, causes the apparatus to perform the method of the first aspect and any one of the possible designs of the first aspect.
In a sixth aspect, a computer program product according to embodiments of the present application, when run on an apparatus, causes the apparatus to perform the first aspect and any one of the possible design methods of the first aspect.
In addition, the technical effects brought by any one of the possible design manners in the second aspect to the sixth aspect can be referred to the technical effects brought by the different design manners in the first aspect, and are not described herein again.
In a seventh aspect, an embodiment of the present application further provides an apparatus, including: processing unit, receiving unit and transmitting unit. The processing unit is configured to perform a first handover procedure, where the first handover procedure is a procedure in which the terminal is handed over from the source base station to the first target base station. The receiving unit is configured to receive a first message sent by the second mobility management entity, where the first message indicates that the first handover procedure fails. The processing unit is further configured to generate a first key after the receiving unit receives the first message. The sending unit is configured to send the generated first key to the second mobility management entity if the processing unit determines that the second handover process needs to be executed, so that the second mobility management entity generates a second key according to the first key; the second handover process is a process in which the terminal is handed over from the source base station to the second target base station, and the second key is used for performing security protection on communication between the terminal and a network in which the second target base station is located.
In one possible design, the processing unit is specifically configured to generate the first key in accordance with the first parameter. The first parameter is a random number newly generated by the first mobility management entity, or the first parameter is a count value obtained by adding a preset step length to a downlink NAS count value of a network where the source base station is located.
In one possible design, the sending unit is further configured to send the second parameter to the second mobility management entity after the processing unit determines that the second handover procedure needs to be performed, so that the second mobility management entity generates the second key according to the first key and the second parameter.
In a possible design, the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity to generate the second key. The value of the downlink NAS count value of the network where the second mobility management entity is located is a downlink NAS count value of a network where a source base station for generating the first key is located, or the value of the downlink NAS count value of the network where the second mobility management entity is located is the sum of the current downlink NAS count value of the network where the second mobility management entity is located and a preset step length, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value.
In a possible design, the receiving unit is further configured to receive a second message sent by the second mobility management entity after the sending unit sends the first key to the second mobility management entity, where the second message indicates that the second handover procedure is successful. The sending unit is further configured to send a first parameter used for generating the first key to the terminal, or send the first parameter and the second parameter used for generating the first key to the terminal.
In one possible design, the first key is a root key Kasme of a network where the second mobility management entity is located.
In one possible design, the second key includes an encryption key and an integrity protection key.
In one possible design, the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; the switching request is used for indicating that the terminal is switched from the source base station to the first target base station. The processing unit is further configured to determine, after the receiving unit receives the handover request, to allow the terminal to be handed over to a network where the first target base station is located according to the session handover policy; and based on the determination, the first mobility management entity performs a first handover procedure.
In a possible design, the sending unit is further configured to send a policy acquisition request to the policy control entity after the receiving unit receives the handover request sent by the source base station, where the policy acquisition request includes an identifier of a network where the first target base station is located. The receiving unit is further configured to receive a policy acquisition response sent by the policy control entity according to the identifier of the network where the first target base station is located, where the policy acquisition response includes a session switching policy.
In one possible design, the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; the switching request is used for indicating that the terminal is switched from the source base station to the first target base station. The sending unit is also used for sending a session management context request message to the session management entity after the receiving unit receives the switching request; the session management context request message includes an identifier of a network where the first target base station is located. The receiving unit is further configured to receive a session management context response of the session management entity, where the session management context response includes a session handover indication, and the session handover indication is used to indicate that the terminal is allowed to be handed over to a network where the first target base station is located. The processing unit is further configured to perform a first handover procedure by the first mobility management entity based on the session handover indication after the session management context response is received by the receiving unit.
In a possible design, the network where the source base station and the first mobility management entity are located is a 5G network, the network where the second mobility management entity is located is a 4G network, and the network where the first target base station and the second target base station are located is a 3G network.
In one possible design, the device is a chip, or the device is an apparatus.
In an eighth aspect, an apparatus provided in an embodiment of the present application includes a processor, a memory, and a transceiver. Wherein the memory is used for storing computer execution instructions. The processor is coupled to the memory and the transceiver. When the apparatus is run, the processor executes the computer-executable instructions stored by the memory to cause the apparatus to perform the method of any of the possible designs to which the second aspect of the embodiments of the present application relates.
In a ninth aspect, a computer storage medium of an embodiment of the present application stores a program, which, when executed on an apparatus, causes the apparatus to execute the method of any one of the possible designs of the second aspect and the second aspect.
In a tenth aspect, a computer program product according to embodiments of the present application, when run on an apparatus, causes the apparatus to perform the method according to the second aspect and any one of the possible designs of the second aspect.
In addition, the technical effects brought by any one of the possible design manners in the seventh aspect to the tenth aspect can be referred to the technical effects brought by the different design manners in the second aspect, and are not described herein again.
It should be noted that coupling referred to in the various embodiments in this application means that two components are directly or indirectly connected with each other. Such a connection may allow communication between the two components.
Drawings
Fig. 1 is a schematic diagram of a network architecture suitable for use in the embodiment of the present application;
FIG. 2 is a schematic diagram of another network architecture suitable for use in embodiments of the present application;
fig. 3 is a schematic flowchart of a key generation method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another key generation method provided in an embodiment of the present application;
fig. 5 is a schematic flowchart of another key generation method provided in an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for acquiring a session handover policy according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a method for sending a session handoff indication according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of another apparatus provided in the embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings. The particular methods of operation in the method embodiments may also be applied to apparatus embodiments or system embodiments. In the description of the present application, the term "plurality" means two or more unless otherwise specified.
The network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person of ordinary skill in the art knows that along with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
Fig. 1 is a schematic diagram of a network architecture applicable to the embodiment of the present application. The network architecture comprises a terminal, a first mobile management entity, a second mobile management entity, a source base station, a first target base station and a second target base station. The source base station is a base station currently serving the terminal. The first target base station is a base station which provides service for the terminal after the first switching process is successfully executed. The second target base station is a base station which executes the second switching process after the first switching process is failed to execute and provides service for the terminal after the second switching process is successfully executed. The first switching process is a process of switching the terminal from the source base station to the first target base station. The second handover process is a process in which the terminal is handed over from the source base station to the second target base station. It should be noted that the first target base station and the second target base station may be the same base station or different base stations, and the present invention is not limited thereto.
The terminal is a device with a wireless transceiving function, can be deployed on land, and comprises an indoor or outdoor terminal, a handheld terminal or a vehicle-mounted terminal; can also be deployed on the water surface (such as a ship and the like); and may also be deployed in the air (e.g., airplanes, balloons, satellites, etc.). For example, the terminal may be a mobile phone (mobile phone), a tablet (pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal, an Augmented Reality (AR) terminal, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving (self driving), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in home (smart home), and the like.
In some embodiments, the first mobility management entity is a device in the first network that is responsible for access management and mobility management for the terminal. Illustratively, the first network is a 5G network and the first mobility management entity is an AMF. Further illustratively, the first network is a 4G network and the first mobility management entity is an MME. As another example, the first network is a 3G network and the first mobility management entity is an MSC. The source base station is a Radio Access Network (RAN) device in the first network. Among them, the RAN device has a main function of controlling the terminal to access the mobile communication network by radio. The RAN equipment is part of a mobile communication system. It implements a wireless access technology. RAN equipment includes, but is not limited to: (G node B, gNB) in 5G, evolved node B (eNB), Radio Network Controller (RNC), node B (node B, NB), Base Station Controller (BSC), Base Transceiver Station (BTS), home base station (e.g., home evolved node B, or home node B, HNB), Base Band Unit (BBU), transmission point (TRP), Transmission Point (TP), mobile switching center, etc., and may further include wireless fidelity (wifi) access point (access point, AP), etc.
In some embodiments, the primary functions of the second mobility management entity are to support non-access stratum (NAS) messages and their security in the second network, management of Tracking Area (TA) lists, Serving Gateway (SGW) and packet data network gateway (P-GW) selection in the second network, selection of a management entity when switching across mobility management entities in the second network, authentication of terminals, roaming control and bearer management, mobility management between core network nodes of different access networks in the third generation partnership project (3 GPP), etc. Illustratively, the second network is a 4G network and the second mobility management entity is an MME. For example, the 4G network may be a time division long term evolution (TD-LTE) network, a frequency division duplex long term evolution (FDD-LTE) network, or the like.
In some embodiments, the first target base station and the second target base station may both be RAN devices in the third network. It should be noted that, for the RAN device in the third network, reference may be made to the related description of the RAN device in the first network, and details are not described herein again. The third network may be, for example, a 3G network. As another example, the third network may be a 5G network or a 4G network. In other embodiments, the first target base station may be a RAN device in a third network and the second target base station is a RAN device in a fourth network. Wherein the third network and the fourth network are different networks. For example, the third network is a 3G network, and the fourth network is a 2nd generation (2G) network.
Additionally, in some embodiments, the network architecture may further include a policy control entity, or the network architecture may further include a policy control entity and a session management entity.
A policy control entity, which may comprise at least one of the following functions: a user subscription data management function, a policy control function, a charging policy control function, a quality of service (QoS) control function, and the like. For example, in a 4G network, the policy control entity may be a Policy and Charging Rules Function (PCRF). In a 5G network, the policy control entity may be a Policy Control Function (PCF). In future communication networks, the policy control entity may still be a PCF, or have another name, and the present application is not limited thereto.
The session management entity is mainly used for session management in the mobile network, such as session establishment, modification, release and the like. For example, in a 4G network, the session management entity may be a packet data network gateway (PDN gateway, PGW). In a 5G network, the session management entity may be a Session Management Function (SMF). In future communication networks, the session management network element may still be an SMF, or have another name, and the present application is not limited thereto.
It should be noted that the above functions may be network elements in a hardware device, may be software functions running on dedicated hardware, or may be virtualized functions instantiated on a platform (e.g., a cloud platform).
After the first handover process fails to be executed, the second handover process can be initiated again. According to the scheme provided by the embodiment of the application, the session security of the terminal after the second switching process is successful can be ensured, the switching efficiency of the second switching process is improved, and the switching time delay of the second switching process is reduced. In the embodiment of the application, the key of the network where the source base station is located in the first handover process can be saved, or the key of the network where the source base station is located can be regenerated before the second handover process is initiated, so that when the second handover process is executed after the first handover process fails, the key for ensuring the session safety can be quickly generated, and the execution efficiency of the second handover process is improved.
For convenience of description, the following description will be given in detail by taking a scenario in which the terminal initiates handover from the base station in the 5G network to the base station in the 3G network again after handover from the base station in the 5G network to the base station in the 3G network fails. In this scenario, the network structure shown in fig. 2 is used to describe the embodiment of the present application in detail.
Fig. 2 shows a network architecture suitable for the embodiment of the present application. The network structure comprises AMF, gNB, MME, MSC, BSC, PCF + PCRF, SMF + packet data network gateway control plane (PGW-C), User Plane Function (UPF) + packet data network gateway user plane (PGW-U) and SGW. Wherein, N26 is an interface between the MME in the 4G network and the AMF in the 5G network, and is used to implement the interworking between the core networks in the 4G network and the 5G network. The PCF, the PGW-C, PGW-U, SGW and the MME are devices included in a core network in the 4G network. The PCRF, the SMF, the UPF, and the AMF are devices included in a core network in the 5G network. It should be noted that the PCF and the PCRF may be two different devices, or may be the same device with the PCF function and the PCRF function integrated respectively, which is not limited in this application. The SMF + PGW-C may be two different devices, or may be the same device that integrates the SMF function and the PGW-C function, which is not limited in the present application. The UPF + PGW-U may be two different devices, or may be the same device that integrates the UPF function and the PGW-U function, respectively, and the application is not limited. Sv is an interface between an MSC in a 3G network and an MME in a 4G network, which enables interworking between core networks in the 3G network and the 4G network.
In the network architecture shown in fig. 2, the AMF corresponds to a first mobility management entity in the network architecture shown in fig. 1, the MME corresponds to a second mobility management entity in the network architecture shown in fig. 1, the gNB corresponds to a source base station in the network architecture shown in fig. 1, and the BSC corresponds to a first target base station and a second target base station in the network architecture shown in fig. 1.
Based on the network architecture shown in fig. 2, as shown in fig. 3, a key generation method provided in the embodiment of the present application includes the following steps.
In step 301, the gNB sends a handover request (handover request) to the AMF, where the handover request is used to instruct the terminal to be handed over from the gNB to the BSC.
Step 302, after receiving the handover request sent by the gNB, the AMF generates a first key. For example, the first key may be a root key Kasme in a 4G network. In some embodiments, the AMF may generate the first key according to the first parameter. For example, the first parameter may be a random number, or may be a downlink non-access stratum count value (downlink NAS count) of a network (5G network) in which the gNB is located. The downlink non-access stratum count value of the 5G network is hereinafter referred to as a 5G downlink NAS count. Taking the first parameter as the random number as an example, the AMF may generate the random number according to a preset algorithm, and then generate the first key according to the obtained random number.
In step 303, the AMF sends the first key to the MME. In some embodiments, the AMF may send the first key to the MME, carried in the redirection request. The redirection request is, for example, a forward redirection request (forward redirection request).
In step 304, after receiving the first key sent by the AMF, the MME generates a second key according to the first key. And the second key is used for carrying out safety protection on the communication between the terminal and the network where the BSC is located after the switching is successful. For example, the second key may include an encryption key and an integrity protection key. In addition, in some embodiments, if the MME uses a second parameter in addition to the first key in generating the second key; the AMF may also send the second parameter to the MME in step 303. Alternatively, the AMF may not send the second parameter to the MME, and the MME determines the second parameter according to a preset rule. For example, the AMF may send the second parameter to the MME, carried in a forward location request. For example, the second parameter may be a downlink non-access stratum count value of the network (4G network) where the BSC is located, for example, a value of the downlink non-access stratum count value of the network (4G network) where the BSC is located may be a default initial value (e.g., a positive integer such as 0). Hereinafter, the count value of the downlink non-access stratum of the 4G network is referred to as 4G downlink NAS count.
Step 305, the MME sends a Packet Switching (PS) domain to Circuit Switching (CS) domain handover request to the MSC. Wherein the PS domain to CS domain handover request includes the second key generated in step 304.
Step 306, after receiving the PS domain to CS domain handover request, the MSC and the BSC execute the process of creating CS domain resources for the terminal. It should be noted that, the process of creating the CS domain resource for the terminal by the MSC and the BSC may refer to a process of creating the CS domain resource for the terminal in the prior art, and is not described herein again.
Step 307, if the MSC and the BSC fail to create the CS domain resources for the terminal, the MSC sends a handover failure response to the MME, where the handover failure response is used to indicate that the PS domain fails to handover to the CS domain.
Step 308, after receiving the handover failure response, the MME sends a first message to the AMF, where the first message is used to indicate that the terminal failed to handover from the gNB to the BSC.
For example, the first message may be a forward relocation response (forward relocation response), or may be a custom new message, and the application is not limited in this application.
It should be understood that steps 302-308 are the first switching process.
In step 309, after receiving the first message sent by the MME, if it is determined that the handover procedure of the terminal from the gNB to the BSC needs to be executed again, the AMF sends the first key generated by the AMF in step 302 to the MME again.
Hereinafter, to simplify the description, a process of performing handover of the terminal from the gNB to the BSC again may be referred to as a second handover process.
Specifically, in some embodiments, after receiving the first message, the AMF stores the first key generated in step 302, and after determining that the second handover procedure needs to be performed, sends the first key to the MME. Therefore, the time for regenerating the first key in the switching process is saved, and the switching efficiency is improved.
For example, the AMF may determine that the second handover procedure needs to be performed by: the AMF initiates the second handover procedure, or the gNB initiates the second handover procedure. In some embodiments, initiating the second handover procedure by the gNB may include the steps of: the gNB receives a handover response (handover response) sent by the AMF, where the handover response is used for responding to the handover request in step 301, and indicates that the first handover procedure fails. Then the gNB sends a switching request to the AMF again; and after receiving the switching request sent again, the AMF determines that a second switching process needs to be executed. It should be noted that the BSC to which the terminal is handed over in the second handover procedure and the BSC to which the terminal is handed over in the first handover procedure may be the same base station or different base stations.
In addition, in step 309, the AMF sends the first key to the MME, and may send the first key to the MME by carrying the first key in a forward location request, or may send the first key to the MME by a newly defined message.
In step 310, after receiving the first key sent by the AMF, the MME generates a new second key according to the first key. The second key is used for carrying out security protection on the communication between the terminal and the network where the BSC is located.
In order to make the second key in step 310 different from the second key in step 304, in step 310 of some embodiments, the MME may include a second parameter in addition to the first key in the parameters used in generating the second key. Specifically, in this case, in step 310, the MME generates a new second key according to the first key and the second parameter. For example, the second parameter may be a 4G downlink NAS count. Taking the 4G downlink NAS count as an example, in some embodiments, the 4G downlink NAS count used in the step 304 for generating the second key may take a value as a predetermined default initial value. The value of the 4G downlink NAS count used to generate the second key in step 310 may be the sum of the initial value and the preset step value. For example, the preset step value is 1, and the value of the 4G downlink NAS count used for generating the second key in step 304 is 0, then the value of the 4G downlink NAS count used for generating the second key in step 310 is 1. The preset step value may be set as needed, and is not limited to a value of 1, and may also be a positive integer such as 2 or 3. In other embodiments, in step 302, when the AMF generates the first key according to the 5G downlink NAS count, the 4G downlink NAS count used to generate the second key in step 304 may take a value of a predetermined default initial value, and the 4G downlink NAS count used to generate the second key in step 310 may take a value of the 5G downlink NAS count used to generate the first key in step 302. For example, if the value of the 5G downlink NAS count used by the AMF to generate the first key is 3 in step 302, the value of the 4G downlink NAS count used by the AMF to generate the second key is 3 in step 310.
In addition, it should be further noted that, in the embodiment of the present application, it may be defined in advance between the AMF and the MME that: the value of the 4G downlink NAS count used to generate the second key in step 304 is a default initial value. In this case the AMF does not need to send a 4G downlink NAS count to the MME. In some embodiments, in the second handover process, when the AMF determines the value of the 4G downlink NAS count used for generating the second key, the AMF sends the determined value of the 4G downlink NAS count to the MME, so that the MME can generate the second key in the second handover process. For example, the AMF may send the second parameter to the MME by carrying the second parameter in a forward location request, or may send the second parameter to the MME by other manners. In other embodiments, the 4G downlink NAS count used to generate the second key may also be determined by the MME. In this case, in the second handover procedure, the AMF may send the first key to the MME.
It should be noted that the second parameter may be a random number or the like, and the above description is given only by taking the example where the second parameter is 4G downlink MAS, and does not limit the embodiments of the present application. When the second parameter is other parameters, the implementation manner may refer to the implementation manner when the second parameter is a 4G downlink NAS count, and details are not described herein.
In step 311, the MME sends a PS domain to CS domain handover request to the MSC, where the PS domain to CS domain handover request includes the second key generated in step 310.
In step 312, after receiving the handover request from the PS domain to the CS domain, the MSC and the BSC perform a process of creating CS domain resources for the terminal.
Step 313, if the MSC succeeds in creating the CS domain resources for the terminal, sending a PS domain to CS domain handover response to the MME, where the PS domain to CS domain handover response is used to indicate that the handover is successful.
In step 314, after receiving the response for indicating that the handover is successful from the PS domain to the CS domain, the MME sends a second message to the AMF, where the second message is used to indicate that the second handover procedure is successful.
It should be understood that the second message may be a forward relocation response, or may be a predefined new message, such as a handover result notification, which is not limited in this embodiment of the present application.
For example, if the AMF sends the first key to the MME in step 309 via forward location request, the second message may be a forward location response in response to the forward location request in step 309, for simplicity of implementation.
In step 315, the AMF receives the second message sent by the MME, and sends the parameter used for generating the second key in step 310 to the terminal, so that the terminal can generate the symmetric key of the second key according to the parameter used for generating the second key.
To improve the security of the communication, the parameters used for generating the second key in step 310 do not include the first key, and may include the first parameter and/or the second parameter.
For example, the first parameter used by the AMF to generate the first key in step 302 is a 5G downlink NAS count, for example, a value of the 5G downlink NAS count may be a value of the current 5G downlink NAS count of the AMF. In step 310, if the second parameter used by the MME to generate the second key is the 4G downlink NAS count, and the value of the 4G downlink NAS count is the value of the 5G downlink NAS count used to generate the first key in step 302, the AMF may send the 5G downlink NAS count to the terminal, and the AMF may send the 4G downlink NAS count to the terminal. In this case, the parameter used for generating the second key in step 310 is the first parameter or the second parameter.
As another example, the first parameter used by the AMF to generate the first key in step 302 is a random number, for example, the first parameter may be generated by the AMF according to a preset algorithm. In step 310, the second parameter used by the MME to generate the second key is the 4G downlink NAS count, and the value of the 4G downlink NAS count is the sum of the value of the 4G downlink NAS count used by the MME to generate the second key in the first handover process and a preset step size, so that the AMF sends to the terminal the random number used by the AMF to generate the first key in step 302 and the 4G downlink NAS count used by the MME to generate the second key in step 310. For example, in the first handover process, the value of the 4G downlink NAS count used by the MME to generate the second key is a default initial value, the preset step is 1, if the value of the 4G downlink NAS count in step 310 is an initial value +1, the parameter used by the AMF to generate the second key and sent to the terminal is a random number sum (initial value + 1). In this case, the parameters used for generating the second key in step 310 are the first parameter and the second parameter.
For another example, the first parameter used by the AMF to generate the first key in step 302 is 5G downlink NAS count. In step 310, the second parameter used by the MME to generate the second key is 4G downlink NAS count, and the value of the 4G downlink NAS count is the sum of the value of the 4G downlink NAS count used by the MME to generate the second key in the first handover process and a preset step size, and then the AMF sends the 5G downlink NAS count used by the AMF to generate the first key in step 302 and the 4G downlink NAS count used by the MME to generate the second key in step 310 to the terminal. For example, in the first handover process, the value of the 4G downlink NAS count used by the MME to generate the second key is a first value, and the preset step size is 2, if the value of the 4G downlink NAS count is +2, in step 310, the AMF sends the 5G downlink NAS count and (the first value +2) to the terminal. In this case, the parameters used for generating the second key in step 310 are the first parameter and the second parameter.
For another example, if the first parameter used to generate the first key in step 302 is a random number, the second parameter used to generate the second key in step 310 is a 4G downlink NAS count, and the value of the 4G downlink NAS count is the value of the current 5G downlink NAS count, the AMF sends the random number used to generate the first key in step 302 and the 4G downlink NAS count used to generate the second key in step 310 to the terminal. In this case, the parameters used for generating the second key in step 310 are the first parameter and the second parameter.
In some embodiments, the AMF may send the parameters used for generating the second key in step 310 to the terminal through the gNB. For example, the AMF sends a handover response (handover response) to the gNB, where the handover response indicates that the second handover procedure is successful, and the handover response includes parameters used for generating the second key in step 310. After receiving the handover response, the gNB sends parameters used for generating the second key in step 310 to the terminal.
In other embodiments, the AMF may also directly notify the gNB that the second handover procedure is successful, and directly send the parameter used for generating the second key in step 310 to the terminal.
In addition, in order to facilitate the AMF to transmit the parameter used for generating the second key in step 310 to the terminal after receiving the second message transmitted by the MME, the AMF stores the first parameter used for generating the first key by the AMF in step 302 after receiving the first message transmitted by the MME. And after the AMF determines that the second switching process needs to be executed, if the AMF can determine the second parameter, the second parameter is saved. In addition, under the condition that the value of the second parameter is different from the value of the first parameter, if the second parameter is determined by the MME, the MME stores the second parameter, and after the MME receives a response for indicating that the second handover procedure is successful for handover from the PS domain to the CS domain, the MME carries the second parameter in a second message (e.g., forward relocation response) and sends the second parameter to the AMF, so that the AMF can send the first parameter and the second parameter to the terminal. In the case that the value of the second parameter is the same as the value of the first parameter, the AMF may store the first parameter used for generating the first key in step 302.
As shown in fig. 4, an embodiment of the present application further provides a method for key generation. The key generation method shown in fig. 4 is different from the key generation method shown in fig. 3 in that: the first key sent by the AMF to the MME in step 309 of fig. 3 is generated by the AMF in step 302. The first key sent by the AMF to the MME in step 409 in fig. 4 is generated by the AMF again after the AMF receives the first message sent by the MME and before it determines that the second handover procedure needs to be performed. Specifically, the method comprises the following steps.
In step 401, the gNB sends a handover request to the AMF, where the handover request is used to instruct handover of the terminal from the gNB to the BSC.
In step 402, the AMF generates a first key after receiving the handover request sent by the gNB.
In step 403, the AMF sends the first key to the MME.
In step 404, after receiving the first key sent by the AMF, the MME generates a second key according to the first key. And the second key is used for carrying out safety protection on the communication between the terminal and the network where the BSC is located after the switching is successful.
Step 405, the MME sends a PS domain to CS domain handover request to the MSC. Wherein the PS domain to CS domain handover request includes the first key generated in step 404.
Step 406, the MSC receives the PS domain to CS domain handover request, and performs a process of creating CS domain resources for the terminal with the BSC.
Step 407, if the MSC and the BSC fail to create the CS domain resources for the terminal, the MSC sends a handover failure response to the MME, where the handover failure response is used to indicate that the PS domain fails to handover to the CS domain.
In step 408, after receiving the handover failure response, the MME sends a first message to the AMF, where the first message is used to indicate that the terminal failed to handover from the gNB to the BSC.
It should be understood that step 402 to step 408 are the first switching process, and specific implementation manners may refer to implementation manners of step 302 to step 308, which are not described herein again.
Step 409, after receiving the first message sent by the MME, the AMF regenerates the first key, and sends the regenerated first key to the MME if it is determined that the handover of the terminal from the gNB to the BSC needs to be executed again. Wherein a procedure of performing handover of the terminal from the gNB to the BSC again is hereinafter referred to as a second handover procedure.
In order to facilitate sending the regenerated first key to the MME in the case where the AMF determines that the handover procedure of the terminal from the gNB to the BSC needs to be performed again, the AMF saves the regenerated first key after regenerating the first key. The manner in which the AMF determines that the second handover procedure needs to be executed again may refer to a specific implementation manner in which the AMF determines that the second handover procedure needs to be executed again in step 309, and is not described herein again.
It should be noted that, in a specific implementation, in this embodiment of the application, the AMF may generate the first key according to the first parameter. The first parameter may be a random number or may be a 5G downlink NAS count. Taking the 5G downlink NAS count as an example, if the value of the 5G downlink NAS count used for generating the first key in step 402 is N, where N is a non-negative positive integer. The value of the 5G downlink NAS count used by the AMF to regenerate the first key in step 409 is (N + i), where i is a preset step size, and the preset step size may be a positive integer such as 1, 2, and the like. Specifically, in step 409, the AMF may automatically increase the value of the 5G downlink NAS count by a preset step length i after receiving the first message, and then generate the first key according to the 5G downlink NAS count after automatically increasing the preset step length i. So that the first key generated in step 402 and the first key generated in step 409 may be made different.
Taking a random number as an example, the random number used to generate the first key in step 402 is K1. The AMF may regenerate a new random number K2 after receiving the first message and then generate the first key according to the regenerated random number K2 in step 409. So that the first key generated in step 402 and the first key generated in step 409 may be made different.
It should be further noted that, in step 409, the implementation manner of sending, by the AMF, the regenerated first key to the MME may refer to the implementation manner of sending, by the AMF, the first key generated in step 302 to the MME in step 309, and is not described herein again.
In step 410, after receiving the first key sent by the AMF, the MME generates a new second key according to the first key. The second key is used for carrying out security protection on the communication between the terminal and the network where the BSC is located.
For example, in particular implementations, the MME may generate the second key according to the first key and the second parameter. To simplify implementation, the second parameter may be a 4G downlink NAS count. However, the second parameter is not limited in the embodiment of the present application. The second parameter is a 4G downlink NAS count.
In order to make the second key generated in step 410 different from the second key generated in step 404, for example, if the first key generated in step 402 is different from the first key generated in step 409, the value of the 4G downlink NAS count used for generating the second key in step 410 may be a default initial value, for example, a positive integer such as 0 or 1. In addition, whether the first key generated in step 402 is the same as the first key generated in step 409 or not, the value of the 4G downlink NAS count used for generating the second key in step 410 may also be (M + a), or K, where M is the value of the 4G downlink NAS count used for generating the second key in step 404, a is a preset step size, and the preset step size may be a positive integer such as 1, 2, etc.; in step 409, when the AMF regenerates the first key according to the 5G downlink NAS count, K is a value of the 5G downlink NAS count used to generate the first key in step 409, and when the AMF regenerates the first key according to the random number in step 409, K is a value of the current 5G downlink NAS count. It should be noted that, when the first key generated in step 402 is the same as the first key generated in step 409, if the value of the 4G downlink NAS count used for generating the second key in step 410 is (M + a), the value of the preset step a may also be 0.
Step 411, the MME sends a PS domain to CS domain handover request to the MSC, where the PS domain to CS domain handover request includes the second key generated in step 410.
In step 412, after receiving the handover request from the PS domain to the CS domain, the MSC and the BSC perform a process of creating CS domain resources for the terminal.
Step 413, if the MSC succeeds in creating the CS domain resource for the terminal, send a PS domain to CS domain handover response to the MME. The PS domain to CS domain handover response is used to indicate that the handover was successful.
In step 414, after receiving the response for indicating that the handover is successful from the PS domain to the CS domain, the MME sends a second message to the AMF, where the second message is used to indicate that the second handover procedure is successful.
In step 415, the AMF receives the second message sent by the MME, and sends the parameter used for generating the second key in step 410 to the terminal, so that the terminal can generate the symmetric key of the second key according to the parameter used for generating the second key.
To improve the security of the communication, the parameters used for generating the second key in step 310 do not include the first key, and may include the first parameter and/or the second parameter.
It should be noted that specific implementation manners of steps 411 to 415 may refer to specific implementation manners of steps 311 to 315 in this embodiment, and are not described herein again.
The key generation method shown in fig. 4 is described by taking the network architecture shown in fig. 2 as an example, but the key generation method shown in fig. 4 may be applied to other network architectures, and is not limited thereto.
As shown in fig. 5, an embodiment of the present application further provides a key generation method, which is different from the key generation method shown in fig. 3 in that an MME in the key generation method shown in fig. 5 stores a first key generated by an AMF in a first handover procedure. Specifically, the method comprises the following steps.
In step 501, the gNB sends a handover request to the AMF, where the handover request is used to instruct handover of the terminal from the gNB to the BSC.
Step 502, after receiving the handover request sent by the gNB, the AMF generates a first key. It should be noted that, in the embodiment of the present application, a manner of generating the first key may refer to a manner of generating the first key in the key generation method shown in fig. 3, and details are not described here again.
In step 503, the AMF sends the first key to the MME. For example, the first key may be a root key Kasme of the 5G network. It should be noted that, the specific implementation of sending the first key to the MME by the AMF may also refer to the specific implementation of sending the first key in the key generation method shown in fig. 3, which is not described herein again.
In step 504, after receiving the first key, the MME generates a second key according to the first key. And the second key is used for carrying out safety protection on the communication between the terminal and the network where the BSC is located after the switching is successful. It should be noted that, in the embodiment of the present application, a specific implementation manner of generating the second key according to the first key may refer to a manner of generating the second key according to the first key in the key generation method shown in fig. 3, and details are not described here again. For example, the second key may include an encryption key and an integrity protection key.
Step 505, the MME sends a PS domain to CS domain handover request to the MSC, wherein the PS domain to CS domain handover request includes the second key generated in step 504.
Step 506, the MSC receives the PS domain to CS domain handover request, and performs a process of creating CS domain resources for the terminal with the BSC.
Step 507, if the MSC and the BSC fail to create the CS domain resource for the terminal, the MSC sends a switching failure response to the MME. Wherein the handover failure response is used for indicating that the PS domain fails to handover to the CS domain.
Step 508, after receiving the handover failure response, the MME saves the first key received by the MME in step 504, and sends a first message to the AMF, where the first message is used to indicate that the terminal fails to handover from the gNB to the BSC. It should be noted that, for a specific implementation of the first message, reference may be made to the specific implementation of the first message in the key generation method shown in fig. 3, which is not described herein again.
It should be understood that steps 502-508 are the first switching process.
In step 509, after receiving the first message sent by the MME, the AMF saves the first parameter used for generating the first key in step 502, and sends a request for performing handover of the terminal from the gNB to the BSC again to the MME if it is determined that the handover of the terminal from the gNB to the BSC needs to be performed again. The procedure of handing over the terminal from the gNB to the BSC, which is performed again, will be referred to as a second handover procedure hereinafter.
It should be noted that, since the MME stores the first key in step 508, after the AMF determines to perform the procedure of switching the terminal from the gNB to the BSC again, the AMF only needs to notify the MME to switch the terminal from the gNB to the BSC, and does not need to send the first key to the MME again, which is beneficial to reducing signaling overhead.
It should be further noted that, in this embodiment of the present application, a specific implementation manner of determining that a process of switching the terminal from the gNB to the BSC needs to be executed again may be referred to as a specific implementation manner of determining that a process of switching the terminal from the gNB to the BSC needs to be executed again by the AMF in the key generation method in fig. 3, and details are not described here again.
In step 510, after receiving the request for re-performing the handover of the terminal from the gNB to the BSC, the MME generates a second key according to the first key stored in step 508. The second key is used for carrying out security protection on the communication between the terminal and the network where the BSC is located.
In step 511, the MME sends a PS domain to CS domain handover request to the MSC, where the PS domain to CS domain handover request includes the second key generated in step 510.
Step 512, after receiving the PS domain to CS domain handover request, the MSC and the BSC execute the process of creating CS domain resources for the terminal.
Step 513, if the MSC succeeds in creating the CS domain resources for the terminal, sending a PS domain to CS domain handover response to the MME, where the PS domain to CS domain handover response is used to indicate that the handover is successful.
In step 514, after receiving the response for indicating the successful handover from the PS domain to the CS domain, the MME sends a second message to the AMF, where the second message is used to indicate that the second handover procedure is successful.
In step 515, the AMF receives the second message sent by the MME, and sends the parameter used for generating the second key in step 510 to the terminal, so that the terminal can generate the symmetric key of the second key according to the parameter used for generating the second key.
For specific implementation manners of steps 510 to 515, reference may be made to specific implementation manners of steps 310 to 315 in this embodiment, which are not described herein again.
In addition, when the terminal is handed over from the gNB to the BSC, whether to execute the key generation method provided in the embodiments of the present application may be selected to meet different requirements. For example, if the session security requirement for the terminal is high, the method for generating the key according to the embodiment of the present application may be executed; if the requirement on the session latency of the terminal is high, the key generation process may not be executed.
In some embodiments, the session switching policy may be preset in the AMF. In the first switching process, after receiving the switching request, the AMF determines whether to allow the terminal to be switched to the network where the BSC is located according to the session switching strategy.
For example, the AMF determines a session handover policy corresponding to the identifier of the network where the BSC is located from the preset session handover policies. The identification of the network where the BSC is located is the identification of the wireless access network where the BSC is located. For example, the identity of the radio access Network where the BSC is located includes a PLMN (Public Land Mobile Network) Identity (ID). The AMF may determine a session handover policy corresponding to the PLMN ID from the preset session handover policies and then determine whether to allow the terminal to handover to the network corresponding to the PLMN ID. After determining that the terminal is allowed to be switched to the network corresponding to the PLMN ID according to the session switching policy, the AMF may further determine whether to switch to a communication without security protection according to the session switching policy for the existing security protected communication.
For example, when the terminal performs communication with the gNB before the terminal is handed over from the gNB to the BSC, the session of the terminal is secured, and the AMF may determine whether to continue securing the session of the terminal after the terminal is handed over from the gNB to the BSC according to the session handover policy. For example, the session handoff policy includes the following policies: firstly, if safety protection is carried out before switching the non-emergency session, the safety protection is continued after switching; secondly, for the authenticated emergency session, if security protection is performed before the handover, security protection may not be performed after the handover. In this case, if the session of the terminal is a non-emergency session, the AMF determines that security protection needs to be performed on the session of the terminal, and may execute the key generation method according to the embodiment of the present application. If the session of the terminal is the authenticated emergency session, the AMF determines that security protection is not required to be performed on the session of the terminal, and may skip the process of executing key generation to switch the terminal from the gNB to the BSC.
The above description is only an example of the session handover policy, and does not limit the embodiments of the present application. For example, the session handover policy may also include a non-authenticated emergency session, and if security protection is not performed before the handover, security protection may not be performed after the handover. Or, the session switching policy may further include an authenticated emergency session, and if security protection is performed before switching, security protection is also performed after switching.
In some embodiments, the AMF may further obtain a session handover policy from a policy control entity (e.g., PCF), and then determine whether to allow the terminal to be handed over to the network where the BSC is located according to the obtained session handover policy. In this case, the specific implementation manner may refer to the above-mentioned manner in which the AMF determines whether to allow the terminal to be handed over to the network where the BSC is located, and details are not described here.
Taking the policy control entity as the PCF as an example, the method for the AMF to obtain the session handoff policy from the PCF may be as shown in fig. 6, and includes the following steps.
In step 601, the gNB sends a handover request to the AMF. The handover request is used for indicating a first handover process, and the first handover process is a process for handover of the terminal from the gNB to the BSC. In order to facilitate the AMF to obtain the identity of the network where the BSC is located, in some embodiments, the handover request includes the identity of the network where the BSC is located.
Step 602, after receiving the handover request, the AMF sends a policy acquisition request to the PCF, where the policy acquisition request includes an identifier of a network where the BSC is located.
Step 603, after receiving the policy obtaining request, the PCF obtains the session switching policy according to the identity of the network where the BSC is located.
In step 604, the PCF returns a policy acquisition response to the AMF, where the policy acquisition response includes the acquired session handover policy.
Then, after receiving the policy acquisition response sent by the PCF, the AMF may determine whether to execute the handover procedure and the key generation procedure according to the session handover policy included in the policy acquisition response.
In addition, the PCF can decide whether to execute the switching process and the key generation process according to the session switching strategy and then return the decision result to the AMF.
As another example, the AMF may further determine whether to perform the handover procedure and the key generation procedure according to a session management entity (e.g., SMF) sending a session handover indication, which may specifically be as shown in fig. 7, and include the following steps.
In step 701, the gNB sends a handover request to the AMF, where the handover request is used to indicate a first handover procedure, and the first handover procedure is a procedure for a terminal to handover from the gNB to the BSC. In order to facilitate the AMF to obtain the identity of the network where the BSC is located, in some embodiments, the handover request includes the identity of the network where the BSC is located.
In step 702, after receiving the handover request, the AMF sends a session management context to the SMF, where the session management context includes an identifier of a network where the BSC is located. Illustratively, the identity of the network in which the BSC is located may also include a PLMN ID.
Step 703, after receiving the session management context, the SMF sends a policy acquisition request to the PCF, where the policy acquisition request includes an identifier of the network where the BSC is located.
Step 704, after receiving the policy obtaining request sent by SMF, PCF obtains the session switching policy according to the identity of the network where BSC is located.
Step 705, the PCF returns a policy acquisition response to the SMF, the policy acquisition response including the session handoff policy.
Step 706, after receiving the policy obtaining response, the SMF generates a session switching instruction according to the session switching policy, where the session switching instruction is used to instruct whether to allow the terminal to be switched to the network where the BSC is located. Further, the session handover indication may indicate whether security protection needs to be performed on the session of the terminal after handover to the network where the BSC is located, in a case where the indication allows handover of the terminal to the network where the BSC is located.
For example, if the SMF determines, according to the session handover policy, that the terminal is allowed to be handed over to the network where the BSC is located and the session of the terminal needs to be secured after the handover, the generated session handover indication is used to indicate that the terminal is allowed to be handed over to the network where the BSC is located and the session of the terminal needs to be secured after the handover. In this case, after receiving the session handover instruction, the AMF performs the key generation method according to the embodiment of the present application. For another example, if the SMF determines, according to the session handover policy, that the terminal is allowed to be handed over to the network where the BSC is located, and the session of the terminal does not need to be securely protected after the handover, the generated session handover instruction is used to instruct the terminal to be allowed to be handed over to the network where the BSC is located, and the session of the terminal does not need to be securely protected after the handover. For another example, if the SMF determines that the terminal is not allowed to be handed over to the network where the BSC is located according to the session handover policy, the generated session handover instruction is used to instruct that the terminal is not allowed to be handed over to the network where the BSC is located.
In step 707, the SMF sends a session handoff indication to the AMF.
And the AMF receives the session switching instruction sent by the SMF and judges whether to execute a key generation process and a switching process according to the session switching instruction.
The embodiments in the present application may be used in combination with each other or alone, and are not limited thereto.
In the embodiments provided in the present application, the method provided in the embodiments of the present application is described from the perspective of the first mobility manager as an execution subject. In order to implement the functions in the method provided by the embodiment of the present application, the terminal device may include a hardware structure and/or a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure and a software module. Whether any of the above-described functions is implemented as a hardware structure, a software module, or a hardware structure plus a software module depends upon the particular application and design constraints imposed on the technical solution.
Based on the same concept, fig. 8 shows an apparatus 800 according to the present application, where the apparatus 800 may be a device or a chip. Illustratively, the apparatus 800 includes at least one processor 810, a memory 820, and a transceiver 830. The processor 810 is coupled with the memory 820 and the transceiver 830, and the coupling in this embodiment is an indirect coupling or a communication connection between devices, units or modules, and may be an electrical, mechanical or other form for information interaction between the devices, units or modules.
In particular, memory 820 is used to store program instructions.
The transceiver 830 may be a circuit, a bus, a communication interface, or any other module that can be used to exchange information and can be used to receive or transmit data.
Processor 810 is configured to invoke program instructions stored in memory 820 to cause device 800 to perform the steps performed by the AMF in the key generation method shown in fig. 3 to generate a key.
Additionally, when the memory 820 stores program instructions for the AMF to perform the key generation method shown in fig. 4, the processor 830 may also call the program instructions in the memory 820, so that the device 800 performs the steps performed by the AMF in the key generation method shown in fig. 4, thereby generating the key.
When the memory 830 stores program instructions for the MME to perform the key generation method shown in fig. 5, the processor 830 may also call the program instructions in the memory 820, so that the apparatus 800 performs the steps performed by the MME in the key generation method shown in fig. 5, thereby generating the key.
It should be noted that the memory 830 may also include program instructions for executing steps performed by the AMF in the method shown in fig. 6 or fig. 7, so that the processor 830 may call the program instructions in the memory to execute the steps performed by the AMF in the method shown in fig. 6 or fig. 7.
As shown in fig. 9, the device provided in the present application may be a terminal, or a chip or a system of chips in the terminal. Specifically, the apparatus 900 includes a processing unit 901, a receiving unit 902, and a transmitting unit 903. The receiving unit 902 is configured to receive data sent by an external device, and the sending unit 903 is configured to send data to the external device.
The processing unit 901, in cooperation with the receiving unit 902 and the sending unit 903, may be configured to perform the steps performed by the AMF in the methods shown in fig. 3 and 4 to generate the key.
It should be understood that the apparatus 800 and the apparatus 900 may be used to implement the key generation method shown in fig. 3 and/or 4 according to the embodiment of the present application, and related features may refer to the above description and are not described herein again.
It is clear to those skilled in the art that the embodiments of the present application can be implemented in hardware, or firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Taking this as an example but not limiting: the computer-readable medium may include RAM, ROM, an Electrically Erasable Programmable Read Only Memory (EEPROM), a compact disc read-Only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, the method is simple. Any connection is properly termed a computer-readable medium. For example, if software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, the fiber optic cable, the twisted pair, the DSL, or the wireless technologies such as infrared, radio, and microwave are included in the fixation of the medium. Disk and disc, as used in accordance with embodiments of the present application, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
In short, the above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present application are intended to be included within the scope of the present application.

Claims (47)

1. A method of key generation, the method comprising:
a first mobility management entity executes a first switching process, wherein the first switching process is a process of switching a terminal from a source base station to a first target base station;
the first mobility management entity receives a first message sent by a second mobility management entity, wherein the first message indicates that the first handover process fails;
if the first mobility management entity determines that a second handover process needs to be executed, sending a first key to the second mobility management entity so that the second mobility management entity generates a second key according to the first key; the second switching process is a process of switching the terminal from the source base station to a second target base station; the first key is generated by the first mobility management entity during the first handover procedure; the second key is used for performing security protection on communication between the terminal and a network where the second target base station is located.
2. The method of claim 1, wherein the first key is generated by the first mobility management entity during the first handover procedure, comprising:
the first key is generated by the first mobility management entity according to a first parameter during the first handover procedure;
the first parameter is a random number, or the first parameter is a downlink NAS count value of a network where the source base station is located.
3. The method of claim 2, wherein after the first mobility management entity determines that a second handover procedure needs to be performed, the method further comprises:
the first mobility management entity sends a second parameter to the second mobility management entity, so that the second mobility management entity generates the second key according to the first key and the second parameter.
4. The method of claim 3, wherein:
the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate the second key;
the value of the downlink NAS count value of the network where the second mobility management entity is located is a downlink NAS count value of the network where the source base station is located for generating the first key, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a sum of a current downlink NAS count value of the network where the second mobility management entity is located and a preset step length, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value.
5. The method of claim 3 or 4, wherein after the first mobility management entity sends the first key to the second mobility management entity, the method further comprises:
the first mobility management entity receives a second message sent by the second mobility management entity, wherein the second message indicates that the second handover process is successful;
the first mobility management entity sends the first parameter used for generating the first key to the terminal, or the first mobility management entity sends the first parameter and the second parameter used for generating the first key to the terminal.
6. The method according to claim 1 or 2, wherein the first key is a root key Kasme of a network where the second mobility management entity is located.
7. The method of claim 1 or 2, wherein the second key comprises an encryption key and an integrity protection key.
8. The method of claim 1 or 2, wherein prior to the first mobility management entity performing the first handover procedure, the method further comprises:
after receiving the switching request sent by the source base station, the first mobile management entity determines to allow the terminal to be switched to the network where the first target base station is located according to a session switching strategy;
based on the determination, the first mobility management entity performs the first handover procedure;
wherein the handover request is used for instructing handover of the terminal from the source base station to the first target base station.
9. The method of claim 8, wherein the method further comprises:
after receiving a handover request sent by the source base station, the first mobility management entity sends a policy acquisition request to a policy control entity, wherein the policy acquisition request includes an identifier of a network where the first target base station is located;
and the first mobile management entity receives a strategy acquisition response sent by the strategy control entity according to the identifier of the network where the first target base station is located, wherein the strategy acquisition response comprises the session switching strategy.
10. The method of claim 1 or 2, wherein prior to the first mobility management entity performing the first handover procedure, the method further comprises:
after receiving the switching request sent by the source base station, the first mobility management entity sends a session management context request message to a session management entity; wherein the handover request is used to instruct handover of the terminal from the source base station to the first target base station, and the session management context request message includes an identifier of a network where the first target base station is located;
the first mobility management entity receives a session management context response of the session management entity, wherein the session management context response comprises a session switching indication, and the session switching indication is used for indicating that the terminal is allowed to be switched to a network where the first target base station is located;
based on the session handover indication, the first mobility management entity performs the first handover procedure.
11. The method according to claim 1 or 2, wherein the network where the source base station and the first mobility management entity are located is a fifth generation communication 5G network, the network where the second mobility management entity is located is a fourth generation communication 4G network, and the network where the first target base station and the second target base station are located is a third generation communication 3G network.
12. A method of key generation, the method comprising:
a first mobility management entity executes a first switching process, wherein the first switching process is a process of switching a terminal from a source base station to a first target base station;
the first mobility management entity receives a first message sent by a second mobility management entity, wherein the first message indicates that the first handover process fails;
after receiving the first message, the first mobility management entity generates a first key;
if the first mobility management entity determines that a second handover process needs to be executed, the first mobility management entity sends the generated first key to the second mobility management entity, so that the second mobility management entity generates a second key according to the first key; the second handover process is a process of handover of the terminal from the source base station to a second target base station, and the second key is used for performing security protection on communication between the terminal and a network where the second target base station is located.
13. The method of claim 12, wherein the first mobility management entity generating the first key comprises:
the first mobile management entity generates the first key according to a first parameter;
the first parameter is a random number newly generated by the first mobility management entity, or the first parameter is a count value obtained by adding a preset step length to a downlink NAS count value of a network where the source base station is located.
14. The method of claim 13, wherein after the first mobility management entity determines that a second handover procedure needs to be performed, the method further comprises:
the first mobility management entity sends a second parameter to the second mobility management entity, so that the second mobility management entity generates the second key according to the first key and the second parameter.
15. The method of claim 14, wherein:
the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate the second key;
the value of the downlink NAS count value of the network where the second mobility management entity is located is a downlink NAS count value of the network where the source base station is located for generating the first key, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a sum of a current downlink NAS count value of the network where the second mobility management entity is located and a preset step length, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value.
16. The method of claim 14 or 15, wherein after the first mobility management entity sends the first key to the second mobility management entity, the method further comprises:
the first mobility management entity receives a second message sent by the second mobility management entity, wherein the second message indicates that the second handover process is successful;
the first mobility management entity sends the first parameter used for generating the first key to the terminal, or the first mobility management entity sends the first parameter and the second parameter used for generating the first key to the terminal.
17. The method according to claim 12 or 13, wherein the first key is a root key Kasme of a network where the second mobility management entity is located.
18. The method of claim 12 or 13, wherein the second key comprises an encryption key and an integrity protection key.
19. The method of claim 12 or 13, wherein prior to the first mobility management entity performing the first handover procedure, the method further comprises:
after receiving the switching request sent by the source base station, the first mobile management entity determines to allow the terminal to be switched to the network where the first target base station is located according to a session switching strategy;
based on the determination, the first mobility management entity performs the first handover procedure;
wherein the handover request is used for instructing handover of the terminal from the source base station to the first target base station.
20. The method of claim 19, wherein the method further comprises:
after receiving a handover request sent by the source base station, the first mobility management entity sends a policy acquisition request to a policy control entity, wherein the policy acquisition request includes an identifier of a network where the first target base station is located;
and the first mobile management entity receives a strategy acquisition response sent by the strategy control entity according to the identifier of the network where the first target base station is located, wherein the strategy acquisition response comprises the session switching strategy.
21. The method of claim 12 or 13, wherein prior to the first mobility management entity performing the first handover procedure, the method further comprises:
after receiving the switching request sent by the source base station, the first mobility management entity sends a session management context request message to a session management entity; wherein the handover request is used to instruct handover of the terminal from the source base station to the first target base station, and the session management context request message includes an identifier of a network where the first target base station is located;
the first mobility management entity receives a session management context response of the session management entity, wherein the session management context response comprises a session switching indication, and the session switching indication is used for indicating that the terminal is allowed to be switched to a network where the first target base station is located;
based on the session handover indication, the first mobility management entity performs the first handover procedure.
22. The method according to claim 12 or 13, wherein the network where the source base station and the first mobility management entity are located is a fifth generation communication 5G network, the network where the second mobility management entity is located is a fourth generation communication 4G network, and the network where the first target base station and the second target base station are located is a third generation communication 3G network.
23. An apparatus, characterized in that the apparatus comprises: a processing unit, a receiving unit and a transmitting unit;
the processing unit is configured to execute a first handover process, where the first handover process is a process in which a terminal is handed over from a source base station to a first target base station;
the receiving unit is configured to receive a first message sent by a second mobility management entity, where the first message indicates that the first handover procedure fails;
the sending unit is configured to send a first key to the second mobility management entity if the processing unit determines that a second handover procedure needs to be performed, so that the second mobility management entity generates a second key according to the first key; the second switching process is a process of switching the terminal from the source base station to a second target base station; the first key is generated by the processing unit during the first handover procedure; the second key is used for performing security protection on communication between the terminal and a network where the second target base station is located.
24. The apparatus of claim 23, wherein the first key is generated by the processing unit during the first handover procedure, comprising:
the first key is generated by the processing unit according to a first parameter during the first handover;
the first parameter is a random number, or the first parameter is a downlink NAS count value of a network where the source base station is located.
25. The apparatus of claim 24, wherein the sending unit is further configured to:
after the processing unit determines that a second handover procedure needs to be performed, sending a second parameter to the second mobility management entity, so that the second mobility management entity generates the second key according to the first key and the second parameter.
26. The apparatus of claim 25, wherein:
the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate the second key;
the value of the downlink NAS count value of the network where the second mobility management entity is located is a downlink NAS count value of the network where the source base station is located for generating the first key, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a sum of a current downlink NAS count value of the network where the second mobility management entity is located and a preset step length, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value.
27. The apparatus of claim 25 or 26, wherein the receiving unit is further configured to receive a second message sent by the second mobility management entity after the sending unit sends the first key to the second mobility management entity, and the second message indicates that the second handover procedure is successful;
the sending unit is further configured to send the first parameter used for generating the first key to the terminal, or send the first parameter and the second parameter used for generating the first key to the terminal.
28. The apparatus of claim 23 or 24, wherein the first key is a root key Kasme of a network in which the second mobility management entity is located.
29. The apparatus of claim 23 or 24, wherein the second key comprises an encryption key and an integrity protection key.
30. The apparatus of claim 23 or 24, wherein the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; wherein the handover request is used for indicating that the terminal is handed over from the source base station to the first target base station;
the processing unit is further configured to determine, after the receiving unit receives the handover request, to allow the terminal to be handed over to a network where the first target base station is located according to a session handover policy; and based on the determination, performing the first handover procedure.
31. The apparatus of claim 30, wherein the sending unit is further configured to send a policy obtaining request to a policy control entity after the receiving unit receives the handover request sent by the source base station, where the policy obtaining request includes an identifier of a network where the first target base station is located;
the receiving unit is further configured to receive a policy acquisition response sent by the policy control entity according to the identifier of the network where the first target base station is located, where the policy acquisition response includes the session handover policy.
32. The apparatus of claim 23 or 24, wherein the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; wherein the handover request is used for indicating that the terminal is handed over from the source base station to the first target base station;
the sending unit is further configured to send a session management context request message to a session management entity after the receiving unit receives the handover request; the session management context request message comprises an identifier of a network where the first target base station is located;
the receiving unit is further configured to receive a session management context response of the session management entity, where the session management context response includes a session handover indication, and the session handover indication is used to indicate that the terminal is allowed to be handed over to a network where the first target base station is located;
the processing unit is further configured to execute the first handover procedure based on the session handover indication after the receiving unit receives the session management context response.
33. The apparatus according to claim 23 or 24, wherein the network where the source base station and the apparatus are located is a fifth generation communication 5G network, the network where the second mobility management entity is located is a fourth generation communication 4G network, and the network where the first target base station and the second target base station are located is a third generation communication 3G network.
34. The apparatus of claim 23 or 24, wherein the apparatus is a chip.
35. An apparatus, characterized in that the apparatus comprises: a processing unit, a receiving unit and a transmitting unit;
the processing unit is configured to execute a first handover process, where the first handover process is a process in which a terminal is handed over from a source base station to a first target base station;
the receiving unit is configured to receive a first message sent by a second mobility management entity, where the first message indicates that the first handover procedure fails;
the processing unit is further configured to generate a first key after the receiving unit receives the first message;
the sending unit is configured to send the generated first key to the second mobility management entity if the processing unit determines that a second handover procedure needs to be performed, so that the second mobility management entity generates a second key according to the first key; the second handover process is a process of handover of the terminal from the source base station to a second target base station, and the second key is used for performing security protection on communication between the terminal and a network where the second target base station is located.
36. The apparatus as claimed in claim 35, wherein said processing unit is configured to generate said first key, and specifically comprises:
the processing unit is specifically configured to generate the first key according to a first parameter;
the first parameter is a random number newly generated by the apparatus, or the first parameter is a count value obtained by adding a preset step length to a downlink NAS count value of a network in which the source base station is located.
37. The apparatus of claim 36, wherein the transmitting unit is further configured to:
after the processing unit determines that a second handover procedure needs to be performed, sending a second parameter to the second mobility management entity, so that the second mobility management entity generates the second key according to the first key and the second parameter.
38. The apparatus of claim 37, wherein:
the second parameter is a downlink NAS count value of the network where the second mobility management entity is located, and in the second handover process, the downlink NAS count value of the network where the second mobility management entity is located and the first key are used by the second mobility management entity and generate the second key;
the value of the downlink NAS count value of the network where the second mobility management entity is located is a downlink NAS count value of the network where the source base station is located for generating the first key, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a sum of a current downlink NAS count value of the network where the second mobility management entity is located and a preset step length, or the value of the downlink NAS count value of the network where the second mobility management entity is located is a default initial value.
39. The apparatus of claim 37 or 38, wherein the receiving unit is further configured to receive a second message sent by the second mobility management entity after the sending unit sends the first key to the second mobility management entity, and the second message indicates that the second handover procedure is successful;
the sending unit is further configured to send the first parameter used for generating the first key to the terminal, or send the first parameter and the second parameter used for generating the first key to the terminal.
40. The apparatus of claim 35 or 36, wherein the first key is a root key Kasme of a network in which the second mobility management entity is located.
41. The apparatus of claim 35 or 36, wherein the second key comprises an encryption key and an integrity protection key.
42. The apparatus of claim 35 or 36, wherein the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; wherein the handover request is used for indicating that the terminal is handed over from the source base station to the first target base station;
the processing unit is further configured to determine, after the receiving unit receives the handover request, to allow the terminal to be handed over to a network where the first target base station is located according to a session handover policy; and based on the determination, performing the first handover procedure.
43. The apparatus of claim 42, wherein the sending unit is further configured to send a policy obtaining request to a policy control entity after the receiving unit receives the handover request sent by the source base station, where the policy obtaining request includes an identifier of a network where the first target base station is located;
the receiving unit is further configured to receive a policy acquisition response sent by the policy control entity according to the identifier of the network where the first target base station is located, where the policy acquisition response includes the session handover policy.
44. The apparatus of claim 35 or 36, wherein the receiving unit is further configured to receive a handover request sent by the source base station before the processing unit performs the first handover procedure; wherein the handover request is used for indicating that the terminal is handed over from the source base station to the first target base station;
the sending unit is further configured to send a session management context request message to a session management entity after the receiving unit receives the handover request; the session management context request message comprises an identifier of a network where the first target base station is located;
the receiving unit is further configured to receive a session management context response of the session management entity, where the session management context response includes a session handover indication, and the session handover indication is used to indicate that the terminal is allowed to be handed over to a network where the first target base station is located;
the processing unit is further configured to execute the first handover procedure based on the session handover indication after the receiving unit receives the session management context response.
45. The apparatus according to claim 35 or 36, wherein the network where the source base station and the apparatus are located is a fifth generation communication 5G network, the network where the second mobility management entity is located is a fourth generation communication 4G network, and the network where the first target base station and the second target base station are located is a third generation communication 3G network.
46. The apparatus of claim 35 or 36, wherein the apparatus is a chip.
47. An apparatus, comprising: a processor, a memory, and a transceiver;
the memory is used for storing computer execution instructions;
the processor is coupled with the memory and the transceiver;
the processor executes the computer executable instructions stored by the memory when the apparatus is running to cause the apparatus to perform the method of any of claims 1 to 11 or to perform the method of any of claims 12 to 22.
CN201810828720.5A 2018-07-25 2018-07-25 Key generation method and device Active CN110769417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810828720.5A CN110769417B (en) 2018-07-25 2018-07-25 Key generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810828720.5A CN110769417B (en) 2018-07-25 2018-07-25 Key generation method and device

Publications (2)

Publication Number Publication Date
CN110769417A CN110769417A (en) 2020-02-07
CN110769417B true CN110769417B (en) 2021-03-23

Family

ID=69328185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810828720.5A Active CN110769417B (en) 2018-07-25 2018-07-25 Key generation method and device

Country Status (1)

Country Link
CN (1) CN110769417B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873584A (en) * 2009-04-22 2010-10-27 大唐移动通信设备有限公司 Method and system for regenerating key in cell during failed switching
CN101931951A (en) * 2009-06-26 2010-12-29 华为技术有限公司 Method, device and system for secret key deduction
CN102833741A (en) * 2011-06-13 2012-12-19 中兴通讯股份有限公司 Safety parameter modification method and base station
CN103155669A (en) * 2010-08-16 2013-06-12 高通股份有限公司 Method and apparatus for use of licensed spectrum for control channels in cognitive radio communications

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9344924B2 (en) * 2008-11-27 2016-05-17 Htc Corporation Method of handling handover security configuration and related communication device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873584A (en) * 2009-04-22 2010-10-27 大唐移动通信设备有限公司 Method and system for regenerating key in cell during failed switching
CN101931951A (en) * 2009-06-26 2010-12-29 华为技术有限公司 Method, device and system for secret key deduction
CN103155669A (en) * 2010-08-16 2013-06-12 高通股份有限公司 Method and apparatus for use of licensed spectrum for control channels in cognitive radio communications
CN102833741A (en) * 2011-06-13 2012-12-19 中兴通讯股份有限公司 Safety parameter modification method and base station

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Corrections and clarification to handover from 5GS to EPS over N26;Ericsson;《3GPP TSG-SA WG3 Meeting #91Bis,S3-181843》;20180514;全文 *

Also Published As

Publication number Publication date
CN110769417A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
CN108541032B (en) Communication method under wireless base station separation architecture, functional entity and wireless base station
US11805567B2 (en) Method and apparatus for initiating user plane path re-establishment and communications system
CN108605224B (en) Multi-RAT access layer security
KR101924548B1 (en) Security key change method, base station, and user equipment
US20200008109A1 (en) Base station handover method, system, and computer storage medium
US20190230726A1 (en) Session connection establishment method and system, and related device
CN113382404B (en) Method and equipment for acquiring UE security capability
CN109788544B (en) Layer 2 processing method, CU and DU
CN111866967B (en) Handover processing method and device
US20220030496A1 (en) Data processing method and data processing apparatus
KR102034225B1 (en) Method to use existing nas signaling connection for pending uplink signaling/data after tau accept
WO2014101042A1 (en) Communication method and device based on redirected circuit switched fallback
KR20230017891A (en) Connection mode configuration method, base station and communication system
CN107251611A (en) A kind of method for processing business, relevant apparatus and system
CN116671085A (en) Apparatus and method for deleting new radio cell not supporting new radio voice from measurement report
CN104380794B (en) A kind of method of network switching, equipment and system
CN114205883A (en) Network slice remapping method, device and storage medium
CN104380798B (en) A kind of method of network switching, equipment and system
US11576097B2 (en) Method and terminal for redirecting network
US11343738B2 (en) Handover-based connection resume technique
US20230370944A1 (en) Communication method and apparatus
CN110769417B (en) Key generation method and device
CN114642014B (en) Communication method, device and equipment
CN112469077B (en) Method and device for forwarding service data packet
CN110830996B (en) Key updating method, network equipment and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant