Key issuing method and device, mobile terminal, communication equipment and storage medium
Through the key issuance method between the mobile terminal and the mobile network, the problem that the mobile terminal cannot obtain the authentication key is solved, and the authenticity identification of the base station and the communication security are improved, ensuring that the mobile terminal is connected to the mobile network. security and real-time update of keys.
Patent Information
- Application Number
- CN201811583792.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-24
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2038-12-24
AI Technical Summary
Mobile terminals cannot obtain authentication keys when accessing mobile networks, resulting in low communication security. The existing technology cannot realize the authenticity of base stations, and there is a risk of pseudo-base station attacks.
Through the key issuance method between the mobile terminal and the mobile network, the third key information is received, and the verification key is generated and exchanged, ensuring the encryption and decryption process of the key, realizing the effective issuance and update of the key, and ensuring that the mobile terminal is in Security when accessing a mobile network.
It improves the security of mobile terminals when accessing mobile networks, reduces the risk of key tampering, enhances the security performance of the system, and realizes real-time update and effective identification of keys.
Smart Images

Figure CN110536289B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to, but are not limited to, the field of communication technology, and specifically, relate to, but are not limited to, a key issuance method and apparatus thereof, a mobile terminal, a communication device, and a storage medium. Background Art
[0002] The 3rd Generation Partnership Project (3GPP) has developed specifications for various mobile networks. Mobile networks deployed according to these specifications are also being attacked by various fake base stations. One of the main reasons why the attacks can be carried out is that mobile terminals are unable to authenticate the authenticity of base stations, and thus accept various instructions sent by fake base stations.
[0003] In order to authenticate the base station, key information must be issued on the base station and the mobile terminal, so that the base station can protect the sent messages or part of the content of the messages based on the key information, so that the mobile terminal can authenticate the messages sent by the base station based on the key information, and then authenticate the authenticity of the base station, so that fake base stations cannot access the mobile network to obtain the key information.
[0004] 3GPP has developed the Authentication and Key Agreement (AKA) specification between mobile networks and mobile terminals. However, this specification can only enable the mobile network to issue key information associated with the contracted user to the mobile terminal to protect the user's various communications, but cannot issue key information associated with the base station. It is impossible for the mobile terminal to authenticate the authenticity of the base station. In other words, the current authenticity authentication can only be achieved after mutual communication is established, and it cannot be achieved before that. This method will cause security problems. Summary of the invention
[0005] The embodiments of the present invention provide a key issuance method and device, a mobile terminal, a communication device and a storage medium to solve the technical problem in the prior art that when a mobile terminal accesses a mobile network, it is unable to obtain an authentication key, resulting in low communication security.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a key issuance method, which is applied to a mobile terminal side. The method includes:
[0007] Receive the third key information sent by the mobile network side; the third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the third verification key is obtained by the mobile terminal based on the result of encrypting the second verification key, and sent to the mobile network side;
[0008] Generate the first key information based on a result of decrypting the third key information using the first verification key or the second verification key, where the first verification key is generated by the mobile terminal based on a terminal user key;
[0009] The network user key is a backup of the user key on the mobile network side, and the terminal user key is a backup of the user key on the mobile terminal side.
[0010] In order to solve the above technical problems, an embodiment of the present invention further provides a key issuance method, which is applied to the security function on the mobile terminal side. The method includes:
[0011] A first call is received from the terminal device on the mobile terminal side, and the result of the first call is returned; the result of the first call does not include a first verification key, or the result of the first call includes second derived information, or the result of the first call includes a third verification key; wherein, the first verification key is generated based on a terminal user key, and the second derived information is used to generate a first verification key together with the terminal user key, and the third verification key is obtained based on the result of encrypting the second verification key, and the terminal user key is a backup of the user key on the security function of the mobile terminal side; a second call is received from the terminal device on the mobile terminal side, and the result of the second call is returned; the second call includes third key information, and the result of the second call does not include the first key information; wherein, the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key.
[0012] To solve the above technical problems, an embodiment of the present invention further provides a key issuance method, which is applied to a terminal device on a mobile terminal side, and the method includes:
[0013] receiving third key information from the mobile network side, and initiating a second call to the security function on the mobile terminal side, wherein the second call includes the third key information;
[0014] The third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key, the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side by decrypting the third verification key, the third verification key is sent by the mobile terminal to the mobile network side, and the network user key is a backup of the user key on the mobile network side.
[0015] In order to solve the above technical problems, an embodiment of the present invention further provides a key issuance method, which is applied to a first core network function on a mobile network side, and the method includes:
[0016] Sending third key information to the mobile terminal; or,
[0017] Sending first key information to the second core network function, receiving third key information sent by the second core network function, and sending the third key information to the mobile terminal;
[0018] Among them, the third key information is generated based on the second verification key and the first key information; the second verification key is generated by decrypting the third verification key, or is generated by the second core network function based on the network user key; the third verification key is received from the mobile terminal, and the network user key is a backup of the user key on the second core network function side.
[0019] In order to solve the above technical problems, an embodiment of the present invention further provides a key issuance method, which is applied to the second core network function, and the method includes:
[0020] receiving first key information from a first core network function, and sending third key information to the first core network function, wherein the third key information is generated based on the first key information and a second verification key, wherein the second verification key is generated based on a network user key or based on a decrypted third verification key, and the third verification key is received from the first core network function; or,
[0021] receiving second derived information from a first core network function, and sending a second verification key to the first core network function, wherein the second verification key is generated based on the second derived information and a network user key; or,
[0022] Sending first derived information to a first core network function, and sending a second verification key to the first core network function, the second verification key being generated based on the first derived information and a network user key;
[0023] The network user key is a backup of the user key on the second core network function side.
[0024] In order to solve the above technical problems, an embodiment of the present invention further provides a mobile terminal, including:
[0025] A first receiving module is used to receive the third key information sent by the mobile network side; the third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the third verification key is obtained by the mobile terminal based on the result of encrypting the second verification key, and sent to the mobile network side;
[0026] The first key generation module is used to generate the first key information based on the result of decrypting the third key information using the first verification key or the second verification key, wherein the first verification key is generated by the mobile terminal based on the terminal user key, wherein the network user key is a backup of the user key on the mobile network side, and the terminal user key is a backup of the user key on the mobile terminal.
[0027] To solve the above technical problems, an embodiment of the present invention further provides a key issuing device, including:
[0028] A first calling module, used for receiving a first call from a terminal device on the mobile terminal side, and returning a result of the first call; the result of the first call does not include a first verification key, or the result of the first call includes second derived information, or the result of the first call includes a third verification key; wherein the first verification key is generated based on a terminal user key, the second derived information is used to generate the first verification key together with the terminal user key, the third verification key is obtained based on a result of encrypting the second verification key, and the terminal user key is a backup of the user key on the security function on the mobile terminal side;
[0029] A second calling module is used to receive a second call from the terminal device on the mobile terminal side and return the result of the second call; the second call includes third key information, and the result of the second call does not include the first key information; wherein the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key.
[0030] In order to solve the above technical problems, an embodiment of the present invention further provides a mobile terminal, including:
[0031] A second receiving module, used to receive third key information from the mobile network side, and initiate a second call to the key issuing device, wherein the second call includes the third key information;
[0032] The third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key, the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side by decrypting the third verification key, the third verification key is sent by the mobile terminal to the mobile network side, and the network user key is a backup of the user key on the mobile network side.
[0033] To solve the above technical problems, an embodiment of the present invention further provides a communication device, including:
[0034] A first sending module, configured to send third key information to a mobile terminal; or send first key information to a second core network function;
[0035] A third receiving module, configured to receive third key information sent from the second core network function, and send the third key information to the mobile terminal;
[0036] Among them, the third key information is generated based on the second verification key and the first key information; the second verification key is generated by decrypting the third verification key, or is generated by the second core network function based on the network user key; the third verification key is received from the mobile terminal, and the network user key is a backup of the user key on the second core network function side.
[0037] To solve the above technical problem, an embodiment of the present invention further provides a communication device, including: a fourth receiving module and a second sending module;
[0038] The fourth receiving module is used to receive the first key information from the first core network function, the second sending module is used to send the third key information to the first core network function, the third key information is generated based on the first key information and the second verification key, the second verification key is generated based on the network user key, or based on the decrypted third verification key, the third verification key is received from the first core network function; or,
[0039] The fourth receiving module is used to receive second derived information from the first core network function, and the second sending module is used to send a second verification key to the first core network function, where the second verification key is generated based on the second derived information and a network user key; or,
[0040] The second sending module is used to send first derived information to the first core network function, and the second sending module sends a second verification key to the first core network function, the second verification key is generated based on the first derived information and a network user key, and the network user key is a backup of the user key on the second core network function side.
[0041] To solve the above technical problems, an embodiment of the present invention further provides a communication device, including a processor, a memory, a communication unit and a communication bus;
[0042] The communication bus is used to realize wireless communication connection between the processor, the communication unit and the memory;
[0043] A communication device, characterized in that it comprises: a processor, a memory, a communication unit and a communication bus;
[0044] The communication bus is used to realize wireless communication connection between the processor, the communication unit and the memory;
[0045] The processor is used to execute one or more first programs stored in the memory to implement the steps of the key issuance method as described above;
[0046] The processor is used to execute one or more second programs stored in the memory to implement the steps of the key issuing method as described above;
[0047] The processor is used to execute one or more third programs stored in the memory to implement the steps of the key issuing method as described above.
[0048] The processor is used to execute one or more fourth programs stored in the memory to implement the steps of the key issuing method as described above;
[0049] The processor is used to execute one or more fifth programs stored in the memory to implement the steps of the key issuing method as described above.
[0050] To solve the above technical problem, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more first computer programs, a second computer program, a third computer program, a fourth computer program, and a second computer program, and the one or more first computer programs can be executed by one or more processors to implement the steps of the key issuance method as described above;
[0051] The one or more second computer programs can be executed by one or more processors to implement the steps of the key issuing method as described above;
[0052] The one or more third computer programs can be executed by one or more processors to implement the steps of the key issuing method as described above.
[0053] The one or more fourth computer programs may be executed by one or more processors to implement the steps of the key issuing method as described above;
[0054] The one or more fifth computer programs may be executed by one or more processors to implement the steps of the key issuing method described above.
[0055] The beneficial effects of the present invention are:
[0056] According to the key issuance method and its apparatus, mobile terminal, communication equipment and computer-readable storage medium provided by the embodiments of the present invention, the method extracts authentication information and user keys according to the received authentication schedule, generates a first verification key according to the key generation rule, and returns an authentication response message to the mobile network side. After receiving the authentication response message, the mobile network side also obtains the corresponding authentication information and user key to generate a second verification key, encrypts the first key information, obtains a third key and returns it to the mobile terminal. The mobile terminal decrypts the third key information according to the first verification key to obtain the first key information. Based on this mutual manner, the key issuance is implemented to ensure the security of the mobile terminal when accessing the mobile network. At the same time, the real-time update of the key is guaranteed, the tampering of the key is reduced, the security is further improved, and the security performance of the system is greatly improved.
[0057] Other features and corresponding beneficial effects of the present invention are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects become obvious from the description in the specification of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A flowchart of a key distribution method provided in Embodiment 1 of the present invention;
[0059] Figure 2 Another flow chart of the key distribution method provided in the second embodiment of the present invention;
[0060] Figure 3 A schematic diagram of a first structure of a mobile terminal provided in Embodiment 3 of the present invention;
[0061] Figure 4 A second structural diagram of a mobile terminal provided in Embodiment 3 of the present invention;
[0062] Figure 5 A third structural diagram of a mobile terminal provided in Embodiment 3 of the present invention;
[0063] Figure 6 A schematic diagram of a first structure of a communication device provided in Embodiment 4 of the present invention;
[0064] Figure 7 A second structural diagram of a communication device provided in Embodiment 4 of the present invention;
[0065] Figure 8A third structural diagram of a communication device provided in Embodiment 4 of the present invention;
[0066] Fig. 9 A schematic diagram of the structure of a communication system provided in Embodiment 5 of the present invention;
[0067] Fig.10 A schematic diagram of a mobile terminal key distribution architecture provided by an embodiment of the present invention;
[0068] Fig.11 A schematic diagram of a mobile terminal key issuance process provided in Embodiment 6 of the present invention;
[0069] Fig.12 A schematic diagram of a mobile terminal key issuance process provided in Embodiment 7 of the present invention;
[0070] Fig.13 A schematic diagram of a mobile terminal key issuance process provided in Embodiment 8 of the present invention;
[0071] Fig.14 A schematic diagram of a mobile terminal key issuance process provided in Embodiment 9 of the present invention;
[0072] Fig.15 A schematic diagram of a mobile terminal key issuance process provided in Embodiment 10 of the present invention;
[0073] Fig.16 A schematic diagram of a mobile terminal key issuance process provided in the eleventh embodiment of the present invention;
[0074] Fig.17 A schematic diagram of a mobile terminal key update process provided in the twelfth embodiment of the present invention. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the following is a further detailed description of the embodiments of the present invention through specific implementation methods combined with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0076] Embodiment 1:
[0077] See also Figure 1 , which is a key issuance method provided in this embodiment. The method is mainly applied on a mobile terminal, and the specific implementation steps are as follows:
[0078] S11, extracting authentication information and user key according to the received authentication schedule.
[0079] In practical applications, the authentication information includes at least one of a random string RAND, an authentication parameter AUTN, a challenge response RES and a session key, and can even be a confidential key directly generated by the mobile terminal. The user key is stored in the mobile terminal, the base station and the mobile network at the same time.
[0080] S12: Generate a first verification key according to the authentication information and the user key.
[0081] In this step, it is also necessary to combine a certain algorithm to calculate. The preferred algorithm can be some key calculation algorithms or some encryption algorithms. Specifically, the first verification key is generated according to the key generation rules using the authentication information and the user password as input parameters.
[0082] Furthermore, after the first verification key is generated, in order to facilitate key correspondence between the mobile terminal and the mobile network, an authentication response message needs to be returned to the mobile network.
[0083] In actual applications, the response message may be at least one of an authentication request, a key provision request, and a challenge response, and different messages may carry different information, which may be provided based on actual conditions.
[0084] S13, receiving third key information sent by the mobile network side.
[0085] The third key information is the key information obtained by encrypting the first key information stored in the first core network on the mobile network side with the second verification key generated by the mobile network side according to the authentication response message and the key generation rule.
[0086] In this embodiment, after receiving the authentication response message on the mobile network side, authentication information and user key are obtained as input parameters, and a second verification key is generated in combination with the same key generation rule as the mobile terminal. The corresponding third key information is generated by the second verification key and the first key information. The generation process can be a key generation process or an encryption process, in which the key is the second verification key.
[0087] S14: decrypt the third key information according to the first verification key to obtain the first key information.
[0088] In this embodiment, a verification key is not always valid and may be updated under certain circumstances or special conditions. That is, after decrypting the third key information according to the first verification key to obtain the first key information, the following steps are also included:
[0089] Storing the first key information in the mobile terminal and setting a key update time;
[0090] When it is detected that the key update time arrives, a key update step is performed to obtain new first key information from the mobile network side.
[0091] In this embodiment, the authentication information for generating the first verification key or the second verification key can be obtained in two specific ways. One is generated by the mobile terminal itself and then sent to the device on the mobile network side; the other is generated by the device on the mobile network and then returned to the mobile terminal.
[0092] In this embodiment, if the authentication information is generated by the mobile network side, the method further includes:
[0093] The mobile terminal side sends a key provision request to the mobile network side; the key provision request carries instruction information indicating obtaining a verification key, and the key provision request is used to control the mobile network side to generate authentication information, and the authentication information at least includes a random string RAND, an authentication parameter AUTN, a challenge response, and a session key;
[0094] The extracting authentication information according to the received authentication schedule comprises:
[0095] Receiving an authentication request returned by the mobile network side according to the key provision request;
[0096] Authentication information carried in the authentication request is extracted, where the authentication information includes a random character string RAND, an authentication parameter AUTN, a challenge response RES, and a session key.
[0097] In this embodiment, generating a first verification key according to a key generation rule based on the authentication information and the user key, and returning an authentication response message to the mobile network side includes:
[0098] Taking the random string RAND as an input parameter, generating a first protection key and a challenge response according to the user key and the random string in accordance with the key generation rule;
[0099] The challenge response is carried in an authentication response message and sent to the mobile network side.
[0100] Further, after the mobile network side encrypts the first key information according to the authentication response message and the second verification key generated by the key generation rule, the key information obtained includes:
[0101] The mobile network side obtains first key information from the first core network;
[0102] Generate a second protection key according to the random character string in the authentication information and the user key;
[0103] Third key information is generated based on the second protection key and the first key information.
[0104] The decrypting the third key information according to the first verification key to obtain the first key information includes: decrypting the third key information according to the first protection password to obtain the first key information.
[0105] In this embodiment, if the authentication information is generated by the mobile terminal, extracting the authentication information according to the received authentication schedule includes:
[0106] According to the network access request initiated by the mobile terminal itself;
[0107] Authentication information is generated based on the access network request, and the authentication information includes a random string RAND or a confidential key.
[0108] When the authentication information is generated by the mobile terminal, if the random string RAND is generated based on the access network request, generating the first verification key according to the authentication information and the user key according to the key generation rule, and returning the authentication response message to the mobile network side includes:
[0109] Taking a random string as an input parameter, generating a first protection key according to the user key and the random string in accordance with a key generation rule;
[0110] The mobile terminal sends a key provision request to the mobile network side, where the key provision request carries the random character string;
[0111] If a confidential key is generated based on the access network request, generating a first verification key according to a key generation rule based on the authentication information and the user key, and returning an authentication response message to the mobile network side includes:
[0112] Encrypting the confidential key based on a preset public key to obtain a transmission key;
[0113] The transmission key is carried in a key provision request and sent to the mobile network side, and the key provision request serves as the authentication response message.
[0114] In this embodiment, if the mobile terminal generates the first protection key according to the key generation rule based on the user key and the random character string, the third key information received by the mobile terminal side is: the key information obtained after the mobile network side encrypts the first key information according to the random character string sent by the mobile terminal and the second protection key generated by the key generation rule.
[0115] If the mobile terminal generates a transmission key according to the authentication information and the user key according to the key generation rule, the mobile network side encrypts the first key information according to the authentication response message and the second verification key generated by the key generation rule, and the key information obtained includes:
[0116] The mobile network side decrypts the transmission key by using a private key corresponding to the public key to obtain the confidential key;
[0117] The first key information is encrypted based on the confidential key to obtain the third key information.
[0118] In actual application, the mobile terminal is further divided into modules of security function and terminal device function, wherein the security function refers to a phone card such as a UIM card, a SIM card, etc., and the terminal device can be understood as a current communication mobile phone or the like. The key issuance method for the security function is specifically implemented as follows:
[0119] The security function receives a first call from the terminal device on the mobile terminal side and returns the result of the first call; the result of the first call does not include a first verification key, or the result of the first call includes second derived information, or the result of the first call includes a third verification key; wherein, the first verification key is generated based on a terminal user key, the second derived information is used to generate the first verification key together with the terminal user key, the third verification key is obtained based on the result of encrypting the second verification key, and the terminal user key is a backup of the user key on the security function on the mobile terminal side; receives a second call from the terminal device on the mobile terminal side and returns the result of the second call; the second call includes third key information, and the result of the second call does not include the first key information; wherein, the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key.
[0120] The result of the first call includes first derived information and second derived information, and when the first derived information is included, the first verification key is generated based on the terminal user key and the first derived information. The first derived information here is sent by the terminal device to the USIM, which can be generated by the terminal device or received from the network.
[0121] If the result of the first call includes second derived information, the first verification key is generated based on the end-user key and the second derived information.
[0122] The third verification key is obtained by encrypting the second verification key based on a secret key, and the secret key is a public key of the mobile network side or a symmetric key shared with the mobile network side.
[0123] In this embodiment, the security function is further used to store network information corresponding to the first key information.
[0124] The key issuance method on the security function also includes receiving a third call from the terminal device; the input parameter of the third call includes verification information and part or all of the third key information, or the input parameter of the third call includes verification information and a calculation result generated based on part or all of the third key information;
[0125] The security function returns a result of the third call, wherein the result of the third call includes a result of verifying the verification information based on the input parameters using the first verification key or the second verification key;
[0126] The third key information is used to generate the first key information by using the first verification key or the second verification key to decrypt the third key information.
[0127] When the key distribution method is implemented on the terminal device, the specific implementation steps are as follows:
[0128] The terminal device receives the third key information from the mobile network side, and initiates a second call to the security function, where the second call includes the third key information;
[0129] The third key information is obtained by the mobile network side encrypting the first key information according to the second verification key, the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side decrypting the third verification key, and the third verification key is sent by the mobile terminal to the mobile network side.
[0130] Furthermore, the terminal device is also used to initiate a first call to the security function and receive a result of the first call, wherein the result of the first call includes the third verification key.
[0131] Further, the terminal device is further used to initiate a third call to the security function, the input parameters of the third call include verification information and part or all of the third key information, or the input parameters of the third call include verification information and a calculation result generated based on part or all of the third key information;
[0132] A verification result returned by the security function is received, where the verification result is a result of verifying the verification information based on the input parameters using the first verification key or the second verification key.
[0133] In this embodiment, the terminal device is also used to initiate a first call to the security function and receive the result of the first call, the first call including first derived information, the first derived information being used to generate a first verification key together with the terminal user key and being generated by the terminal device or received from the mobile network side, the first verification key being used to decrypt the third key information.
[0134] In this embodiment, the terminal device is also used to send the first derived information to the mobile network side. The first derived information is used to generate a first verification key together with the terminal user key and is generated by the terminal device. The first verification key is used to decrypt the third key information.
[0135] In this embodiment, the terminal device is also used to initiate a first call to the security function, receive a result of the first call, the result of the first call includes second derived information, the second derived information is used to generate a first verification key together with the terminal user key, the first verification key is used to decrypt the third key information; and send the second derived information to the mobile network side.
[0136] In this embodiment, the key distribution method on the terminal device is specifically implemented as follows:
[0137] receiving third key information from the mobile network side, and initiating a second call to the security function on the mobile terminal side, wherein the second call includes the third key information;
[0138] The third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key, the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side by decrypting the third verification key, the third verification key is sent by the mobile terminal to the mobile network side, and the network user key is a backup of the user key on the mobile network side.
[0139] In this embodiment, the method further includes:
[0140] A first call is initiated to the security function on the mobile terminal side, and a result of the first call is received, where the result of the first call includes the third verification key.
[0141] In this embodiment, the method further includes:
[0142] Initiate a third call to the security function on the mobile terminal side, where the input parameters of the third call include verification information and part or all of the third key information, or the input parameters of the third call include verification information and a calculation result generated based on part or all of the third key information;
[0143] A verification result returned by the security function on the mobile terminal side is received, where the verification result is a result of verifying the verification information based on the input parameters using the first verification key or the second verification key.
[0144] In this embodiment, the method further includes:
[0145] A first call is initiated to the security function on the mobile terminal side, and a result of the first call is received, wherein the first call includes first derived information, and the first derived information is used to generate a first verification key together with a terminal user key, and is generated by a terminal device on the mobile terminal side, or received from the mobile network side, and the first verification key is used to decrypt the third key information, and the terminal user key is a backup of the user key on the mobile terminal side.
[0146] In this embodiment, the method further includes:
[0147] The first derived information is sent to the mobile network side.
[0148] Furthermore, the method further comprises:
[0149] Initiate a first call to the security function on the mobile terminal side, receive a result of the first call, the result of the first call includes second derived information, the second derived information is used to generate a first verification key together with a terminal user key, the first verification key is used to decrypt the third key information, the terminal user key is a backup of the user key on the mobile terminal side;
[0150] The second derived information is sent to the mobile network side.
[0151] In summary, the key issuance method provided in this embodiment extracts authentication information and user keys according to the received authentication schedule, generates a first verification key according to the key generation rule, and returns an authentication response message to the mobile network side. After receiving the authentication response message, the mobile network side also obtains the corresponding authentication information and user key to generate a second verification key, encrypts the first key information, obtains the third key and returns it to the mobile terminal. The mobile terminal decrypts the third key information according to the first verification key to obtain the first key information. Based on this mutual method, the key issuance is realized to ensure the security of the mobile terminal when accessing the mobile network, while also ensuring the real-time update of the key, reducing the tampering of the key, further improving the security, and greatly improving the security performance of the system.
[0152] Embodiment 2:
[0153] See also Figure 2 , is a key issuance method provided in this embodiment, which is mainly applied on one end of a mobile network, wherein the mobile network side includes a first core network and a second core network, and the specific implementation steps are as follows:
[0154] S21, receiving a key provision request from the mobile terminal side.
[0155] S22: Generate a second verification key according to the key provision request and the user key and in accordance with a key generation rule.
[0156] S23: Encrypt the first key information stored in the first core network on the mobile network side based on the second verification key to obtain third key information.
[0157] S24, returning the third key information to the mobile terminal.
[0158] In this embodiment, the authentication information for generating the second verification key can be obtained in two specific ways. One is generated by the mobile terminal and then sent to the device on the mobile network side; the other is generated by the device on the mobile network itself and then returned to the mobile terminal.
[0159] If the second verification key is generated by the mobile network itself, the second verification key generated according to the key provision request and the user key and the key generation rule includes:
[0160] Extracting instruction information carried in the key provision request for instructing to obtain the verification key;
[0161] Generate authentication information according to the indication information, wherein the authentication information includes a random character string RAND;
[0162] A second verification key is generated based on the random character string and the user key according to a key generation rule.
[0163] Further, after generating the authentication information according to the instruction information, the method further includes:
[0164] An authentication request carrying the authentication information is sent to the mobile terminal; and an authentication response message returned from the mobile terminal based on the authentication request is received.
[0165] In practical applications, since the mobile network itself may have two situations, one is that it includes two core networks at the same time, that is, the first core network and the second core network, and the other is that it only includes the first core network. When two core networks are included and the second verification key is a protection key, the first key information stored in the first core network on the mobile network side is encrypted based on the second verification key, and the obtained third key information includes:
[0166] The first core network encrypts the first key information according to a second protection key generated by the second core network based on the random character string and a user key to obtain the third key information;
[0167] or,
[0168] When receiving the authentication response message, the first core network obtains the first key information and sends it to the second core network; the second core network encrypts the first key information according to the second protection key to obtain the third key information.
[0169] In this embodiment, the first key information may exist in two forms, one is directly in the form of the first key information, and the form is stored in the first core network, and the other is in the form of the second key information, and the form is stored in the base station, the second key information is generated based on the first key information, when the first core network cannot obtain the direct first key information, it will choose to generate it through another key information, that is, the key issuance method also includes:
[0170] When the first core network cannot obtain the first password information, obtain the second key information from the base station side, generate a second protection key according to the random character string and the user key, and generate third key information based on the second protection key and the second key information; the second key information is associated with the first key information and is generated by the common parameters of the first key information and the base station.
[0171] In this embodiment, when the authentication information is generated by a mobile terminal, the authentication information is sent in a request sent by the mobile terminal, that is, the second verification key generated according to the key provision request and the user key and the key generation rule includes:
[0172] Extracting authentication information carried in the key provision request; the authentication information is generated by the mobile terminal and includes at least a random character string RAND;
[0173] A second verification key is generated based on the random character string and the user key according to a key generation rule.
[0174] In practical applications, the authentication information sent by the mobile terminal may be a random string or a confidential key. In this case, the authentication information sent by the mobile terminal is a transmission key generated based on the confidential key generated by the mobile terminal.
[0175] After receiving the authentication information at the mobile network side, a second verification key is generated according to the received information. The second verification key may be a protection key or a confidentiality key.
[0176] If the second verification key is a confidential key, the first key information stored in the first core network on the mobile network side is encrypted based on the second verification key, and the obtained third key information includes:
[0177] The first core network receives a confidential key generated by the second core network based on the random character string and a user key, and encrypts the first key information according to the confidential key to obtain the third key information.
[0178] At this time, the second verification key generated according to the key provision request and the user key and the key generation rule includes:
[0179] The first core network extracts the transmission key carried in the key provision request; the transmission key is obtained by encrypting the confidentiality key of the mobile terminal by the mobile terminal based on a preset public key;
[0180] Decrypting the transmission key using a private key corresponding to the public key to obtain a confidential key of the mobile terminal;
[0181] The third key information obtained by encrypting the first key information stored in the first core network on the mobile network side based on the second verification key includes: encrypting the first key information according to the confidentiality key of the mobile terminal to obtain the third key information.
[0182] In this embodiment, from the perspective of security, the second verification key may still be updated and modified, that is, after returning the third key information to the mobile terminal, the method further includes:
[0183] Detecting whether the first key information is updated;
[0184] If so, resending the third key information to the mobile terminal;
[0185] The third key information is generated based on the second verification key and the updated first key information, or the third key information is generated based on the confidentiality key of the mobile terminal and the updated first key information.
[0186] In this embodiment, when the key issuance method is implemented on the first core network function on the mobile network side, it is specifically as follows:
[0187] Sending third key information to the mobile terminal; or,
[0188] Sending first key information to the second core network function, receiving third key information sent by the second core network function, and sending the third key information to the mobile terminal;
[0189] Among them, the third key information is generated based on the second verification key and the first key information; the second verification key is generated by decrypting the third verification key, or is generated by the second core network function based on the network user key; the third verification key is received from the mobile terminal, and the network user key is a backup of the user key on the second core network function side.
[0190] Further, when interacting with the second core network function, it also includes sending a key request to the second core network function;
[0191] Receive the second authentication key from the second core network function.
[0192] In this embodiment, the key request includes third derived information; the third derived information is received from the mobile terminal and is used to generate the second verification key together with the network user key. The third derived information includes the above-mentioned second derived information + part or all of the first derived information (generated by the terminal).
[0193] Furthermore, the key request also includes the third verification key, and the third verification key is received from the mobile terminal.
[0194] Furthermore, when interacting with a mobile terminal, it also includes: sending first derived information to the mobile terminal; the first derived information is received from the second core network function, and is used to generate the second verification key together with the network side user key.
[0195] Furthermore, verification information may be sent to the mobile terminal;
[0196] In which, the verification information is generated based on the second verification key and part or all of the third key information; or is generated based on the second verification key and a first calculation result, and the first calculation result is generated based on part or all of the third key information; or is generated based on the second verification key and part or all of the first key information; or is generated based on the second verification key and a second calculation result, and the second calculation result is generated based on part or all of the first key information.
[0197] When implemented on the second core network function, specifically: receiving first key information from the first core network function, sending third key information to the first core network function, the third key information is generated based on the first key information and a second verification key, the second verification key is generated based on a network user key, or based on a decrypted third verification key, the third verification key is received from the first core network function; or,
[0198] receiving second derived information from a first core network function, and sending a second verification key to the first core network function, wherein the second verification key is generated based on the second derived information and a network user key; or,
[0199] Sending first derived information to a first core network function, and sending a second verification key to the first core network function, the second verification key being generated based on the first derived information and a network user key;
[0200] The network user key is a backup of the user key on the second core network function side.
[0201] Furthermore, the second verification key is generated based on a decrypted third verification key, and the third verification key is received from the first core network function.
[0202] In summary, the key issuance method provided in this embodiment extracts authentication information and user keys according to the received authentication schedule, generates a first verification key according to the key generation rule, and returns an authentication response message to the mobile network side. After receiving the authentication response message, the mobile network side also obtains the corresponding authentication information and user key to generate a second verification key, encrypts the first key information, obtains a third key and returns it to the mobile terminal. The mobile terminal decrypts the third key information according to the first verification key to obtain the first key information. Based on this mutual manner, the key issuance is implemented to ensure the security of the mobile terminal when accessing the mobile network. At the same time, the real-time update of the key is guaranteed, the tampering of the key is reduced, the security is further improved, and the security performance of the system is greatly improved.
[0203] Embodiment three:
[0204] This embodiment provides a mobile terminal. Figure 3 As shown, the mobile terminal includes a calling module 31, a first key generating module 32, a first communication module 33 and a decryption module 34, wherein
[0205] A calling module 31 is used to extract authentication information and user keys according to the received authentication schedule;
[0206] A first key generation module 32, configured to generate a first verification key according to the authentication information and the user key and in accordance with a key generation rule;
[0207] The first communication module 33 is used to return an authentication response message to the mobile network side; and receive third key information sent by the mobile network side, wherein the third key information is the key information obtained by encrypting the first key information stored in the first core network of the mobile network side with the second verification key generated by the mobile network side according to the authentication response message and the key generation rule;
[0208] The decryption module 34 is used to decrypt the third key information according to the first verification key to obtain the first key information.
[0209] In this embodiment, the calling module 31, the first key generation module 32, the first communication module 33 and the decryption module 34 are also used to implement the functions of the various steps of the key issuance method provided in the above-mentioned embodiment 1. The specific implementation process of each step refers to the description of the above-mentioned embodiments and will not be repeated here.
[0210] Furthermore, the embodiment of the present invention also provides another structure of a mobile terminal, such as Figure 4 As shown, the mobile terminal includes a security function module 41 and a terminal device module 42, wherein:
[0211] The terminal device module 42 sends an authentication schedule to the security function module 41;
[0212] The security function module 41 extracts authentication information and a user key according to the received authentication schedule; generates a first verification key according to the authentication information and the user key according to a key generation rule, and returns an authentication response message to the mobile network side;
[0213] The terminal device module 42 receives the third key information sent by the mobile network side, and sends it to the security function module 41, wherein the third key information is the key information obtained by encrypting the first key information stored in the first core network of the mobile network side with the second verification key generated by the mobile network side according to the authentication response message and the key generation rule;
[0214] The security function module 41 decrypts the third key information according to the first verification key to obtain the first key information.
[0215] In this embodiment, the security function module 41 and the terminal device module 42 are also used to implement the functions of each step of the key issuance method provided in the above-mentioned embodiment 1. The specific implementation process of each step refers to the description of the above-mentioned embodiments and will not be repeated here.
[0216] In this practical application, the security function module 41 is specifically used to receive a call from a terminal device, the call at least uses a random string RAND as an input parameter, generates a protection key and a challenge response based on a user key and the random string, and returns the call, and the returned information includes the challenge response but does not include the protection key; or,
[0217] Upon receiving a call from a terminal device, a random string RAND is returned, wherein the RAND is used to generate a protection key together with a user key; or
[0218] Upon receiving a call from a terminal device, a random character string transmission key is returned, where the transmission key is generated based on a confidential key and a public key.
[0219] Furthermore, the security function module 41 is further configured to receive a call from a terminal device, wherein an input parameter of the call includes part or all of the third key information;
[0220] generating a first key according to the protection key and the input parameter; or,
[0221] generating a second key according to the protection key and the input parameter; or,
[0222] A first key is generated according to the protection key and the input parameter, and then a second key is generated based on the first key.
[0223] Furthermore, the security function module 41 is further used to generate a fourth key according to the confidential key and the first key or the second key;
[0224] Return the fourth key to the terminal device.
[0225] Furthermore, the security function module 41 is also used to store the first key, or store the second key, and store network information corresponding to the first key or the second key.
[0226] Furthermore, before returning the RAND, the security function module 41 is also used to generate the RAND, or read the stored RAND;
[0227] A protection key is generated based on the RAND and a user key.
[0228] Furthermore, before returning the transmission key, the security function module 41 is also used to generate the confidentiality key, or read the stored confidentiality key;
[0229] The transmission key is generated based on the confidentiality key and the public key.
[0230] In practical applications, the terminal device module 42 is specifically used to receive a message carrying the third key information from a mobile network;
[0231] storing the third key information, or calling a security function, wherein an input parameter of the call includes part or all of the third key information;
[0232] The third key information is generated based on the protection key and the first key information or the second key information, or the third key information is generated based on the confidentiality key and the first key information or the second key information;
[0233] Among them, the protection key is generated based on the user key, the second key information is generated based on the first key information or matched with the first key information, and the confidentiality key is generated by the security function or stored in the security function.
[0234] Furthermore, the terminal device 42 is also used to receive fourth key information returned by the security function, where the fourth key information is generated based on the confidentiality key and the first key information or the second key information.
[0235] Furthermore, before receiving the message carrying the third key information from the mobile network, the terminal device 42 is also used to send a key provision request to the mobile network, wherein the key provision request carries indication information, and the indication information indicates initialization or update.
[0236] Furthermore, the terminal device 42 is also used to store network information corresponding to the third key.
[0237] Further, the terminal device 42 is further used to send a random string RAND to the mobile network, where the RAND is received from a security function and is used to generate the protection key together with a user key; or,
[0238] A transport key is sent to the mobile network, the transport key being received from a security function.
[0239] Furthermore, the embodiment of the present invention also provides another structure of a mobile terminal, such as Figure 5 As shown, the mobile terminal includes: a first processor 51, a first memory 52, a first communication unit 53 and a first communication bus 54;
[0240] The first communication bus 54 is used to implement wireless communication connection between the first processor 51, the first communication unit 53 and the first memory 52;
[0241] The first processor 51 is used to execute one or more first programs stored in the first memory 52 to implement the steps of the key issuance method provided in the first embodiment above. The specific implementation process of each step refers to the description of the above embodiments and will not be repeated here.
[0242] In this embodiment, the structure of the mobile terminal may also be implemented by a first receiving module and a first key generating module, specifically:
[0243] A first receiving module is used to receive the third key information sent by the mobile network side; the third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the third verification key is obtained by the mobile terminal based on the result of encrypting the second verification key, and sent to the mobile network side;
[0244] The first key generation module is used to generate the first key information based on the result of decrypting the third key information using the first verification key or the second verification key, wherein the first verification key is generated by the mobile terminal based on the terminal user key, wherein the network user key is a backup of the user key on the mobile network side, and the terminal user key is a backup of the user key on the mobile terminal.
[0245] Furthermore, the structure of the mobile terminal may also include a second receiving module, wherein the second receiving module is used to receive the third key information from the mobile network side and initiate a second call to the key issuing device, wherein the second call includes the third key information;
[0246] The third key information is obtained by the mobile network side encrypting the first key information according to the second verification key, the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side decrypting the third verification key, and the third verification key is sent by the mobile terminal to the mobile network side.
[0247] In this embodiment, a key issuing device may be provided in the mobile terminal, and the key issuing device includes:
[0248] A first calling module, used for receiving a first call from a terminal device on the mobile terminal side, and returning a result of the first call; the result of the first call does not include a first verification key, or the result of the first call includes second derived information, or the result of the first call includes a third verification key; wherein the first verification key is generated based on a terminal user key, the second derived information is used to generate the first verification key together with the terminal user key, the third verification key is obtained based on a result of encrypting the second verification key, and the terminal user key is a backup of the user key on the security function on the mobile terminal side;
[0249] A second calling module is used to receive a second call from the terminal device on the mobile terminal side and return the result of the second call; the second call includes third key information, and the result of the second call does not include the first key information; wherein the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key.
[0250] In this embodiment, a mobile terminal may also be provided, including:
[0251] A second receiving module, used to receive third key information from the mobile network side, and initiate a second call to the key issuing device, wherein the second call includes the third key information;
[0252] The third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key, the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side by decrypting the third verification key, the third verification key is sent by the mobile terminal to the mobile network side, and the network user key is a backup of the user key on the mobile network side.
[0253] Embodiment 4:
[0254] This embodiment provides a communication device. Figure 6 As shown, the communication device includes a second communication module 61, a second key generation module 62 and an encryption module 63, wherein
[0255] The second communication module 61 is used to receive a key provision request from the mobile terminal side;
[0256] A second key generation module 62, configured to generate a second verification key according to the key provision request and the user key in accordance with a key generation rule;
[0257] An encryption module 63, configured to encrypt the first key information stored in the first core network on the mobile network side based on the second verification key to obtain third key information;
[0258] The second communication module 61 is further configured to return the third key information to the mobile terminal.
[0259] In this embodiment, the second communication module 61, the second key generation module 62 and the encryption module 63 are also used to implement the functions of the various steps of the key issuance method provided in the above-mentioned embodiment 2. The specific implementation process of each step refers to the description of the above-mentioned embodiments, which will not be repeated here.
[0260] Furthermore, the embodiment of the present invention also provides another structure of a communication device, such as Figure 7 As shown, the communication device includes an authentication function module 71, a base station protection function module 72 and an authentication and contract data management function module 73, wherein:
[0261] The authentication function module 71 receives a key provision request sent by the mobile terminal;
[0262] The base station protection function module 72 forwards the key provision request to the authentication and subscription data management function module 73;
[0263] The authentication and subscription data management function module 73 generates a second verification key according to the key provision request and the user key according to the key generation rule; encrypts the first key information stored in the first core network on the mobile network side based on the second verification key to obtain the third key information;
[0264] The authentication function module 71 returns the third key information to the mobile terminal.
[0265] In this embodiment, the authentication function module 71, the base station protection function module 72 and the authentication and contract data management function module 73 are also used to implement the functions of the various steps of the key issuance method provided in the above-mentioned embodiment 2. The specific implementation process of each step refers to the description of the above-mentioned embodiments and will not be repeated here.
[0266] In this embodiment, the authentication function module 71 and the base station protection function module 72 are combined into one function module.
[0267] In practical applications, when the authentication function module 71, the base station protection function module 72 and the authentication and contract data management function module 73 implement the key issuance method provided in the second embodiment, they can also be implemented in the following steps, specifically:
[0268] The authentication function module 71 receives a key provision request sent by the mobile terminal;
[0269] The base station protection function module 72 forwards the key provision request to the authentication and subscription data management function module;
[0270] The authentication and contract data management function module 73 generates a second verification key according to the key provision request and the user key in accordance with the key generation rule;
[0271] The base station protection function module 72 encrypts the first key information stored in the first core network on the mobile network side based on the second verification key to obtain third key information;
[0272] The authentication function module 71 returns the third key information to the mobile terminal.
[0273] In practical applications, the communication device includes a first core network and a second core network, wherein
[0274] The specific implementation of the authentication function module 71 and the base station protection function module 72 on the first core network may be as follows:
[0275] Sending third key information to the mobile terminal; or,
[0276] Sending the first key information or the second key information to the second core network function, receiving the third key information sent by the second core network function, and sending the third key information to the mobile terminal;
[0277] The third key information is generated based on the protection key and the first key information or the second key information, or the third key information is generated based on the confidentiality key and the first key information or the second key information;
[0278] Among them, the protection key is generated based on the user key of the mobile terminal, the second key information is generated based on the first key information or matched with the first key information, and the confidentiality key is generated by the mobile terminal or stored in the mobile terminal.
[0279] Furthermore, the communication device is further configured to send the third key information to the mobile terminal after receiving the protection key or the confidentiality key;
[0280] The third key information is generated based on the protection key and the first key information or the second key information, or the third key information is generated based on the confidentiality key and the first key information or the second key information.
[0281] The communication device is further used to send the third key information to the mobile terminal after the first key information or the second key information is updated;
[0282] The third key information is generated based on the protection key and the updated first key information or the updated second key information, or the third key information is generated based on the confidentiality key and the updated first key information or the updated second key information.
[0283] The communication device is also used to receive a key provision request from a terminal, and send a second message to a second core network function, wherein the message carries indication information, and the indication information indicates a request for the protection key or the confidentiality key, wherein the key provision request passes through the second core network function, or does not pass through the second core network function.
[0284] The communication device is also used to send a random string RAND to the second core network function, where the RAND is received from the mobile terminal and is used to generate the protection key together with the user key of the mobile terminal.
[0285] The communication device is also used to send a transmission key to the second core network function, where the transmission key is received from the mobile terminal and is used to generate the confidentiality key.
[0286] The authentication and subscription data management function module 73 on the second core network is specifically used to receive a second message carrying indication information, and send a protection key to the first core network function, where the protection key is generated based on the user key.
[0287] In practical applications, the communication device may further include a third core network. In this case, the communication device is further used to receive a third message carrying the first key information or the second key information, and send the third key information to the mobile terminal, wherein the third key information is generated based on the protection key and the first key information or the second key information, or the third key information is generated based on the confidentiality key and the first key information or the second key information;
[0288] Among them, the protection key is generated based on the user key of the mobile terminal, the confidentiality key is generated by the mobile terminal or stored in the mobile terminal, and the second key information is generated based on the first key information or matched with the first key information.
[0289] The communication device is further configured to receive a fourth message requesting an authentication vector, calculate a new random string RAND' based on the random string RAND, generate a session key based on the RAND' and send the message, or receive a fourth message requesting an authentication vector, the message carries the random string RAND, generate a session key based on the RAND and send the message, or receive a fourth message requesting an authentication vector, the message carries a transmission key, generate a confidentiality key based on the transmission key and a private key and send the message;
[0290] The session key is used to generate a protection key, the protection key or the confidentiality key is used to process the first key information or the second key information to generate third key information, and the second key information is generated based on the first key information or matched with the first key information.
[0291] Furthermore, the embodiment of the present invention also provides another structure of a communication device, such as Figure 8 As shown, the mobile terminal includes: a second processor 81, a second memory 82, a second communication unit 83 and a second communication bus 84;
[0292] The second communication bus 84 is used to implement wireless communication connection between the second processor 81, the second communication unit 83 and the second memory 82;
[0293] The second processor 81 is used to execute one or more first programs stored in the second memory 82 to implement the steps of the key issuance method provided in the above embodiment 2. The specific implementation process of each step refers to the description of the above embodiments and will not be repeated here.
[0294] Embodiment five:
[0295] This embodiment provides a communication device. Fig. 9 As shown, the communication device includes a mobile terminal 91 and a communication device 92, and the mobile terminal 91 and the communication device 92 establish communication through a base station;
[0296] The mobile terminal 91 sends a key provision request to the communication device 92;
[0297] The communication device 92 generates authentication information according to the key provision request and returns it to the mobile terminal 91;
[0298] The mobile terminal 91 generates a first verification key according to the authentication information and the user key in accordance with a key generation rule, and returns an authentication response message to the communication device 92;
[0299] After receiving the authentication response message, the communication device 92 encrypts the first key information stored in the communication device according to the authentication information and the user key, and the second verification key generated by the key generation rule to obtain the third key information, and returns the third key information to the mobile terminal 91;
[0300] The mobile terminal 91 decrypts the third key information according to the first verification key to obtain the first key information.
[0301] In practical applications, each device ternary of the communication system can also implement the key issuance method provided in the first and second embodiments in the following order, that is, the mobile terminal 91 first initiates a request to access the network and generates authentication information, generates a first verification key according to the authentication information and the user key, and sends the authentication information to the communication device 92;
[0302] The communication device 92 encrypts the first key information stored in the communication device according to the authentication information and the user key, and the second verification key generated by the key generation rule to obtain the third key information, and returns the third key information to the mobile terminal 91;
[0303] The mobile terminal 91 decrypts the third key information according to the first verification key to obtain the first key information.
[0304] In this embodiment, the mobile terminal 91 and the communication device 92 are also used to implement the functions of each step of the key issuance method provided in the above embodiments 1 and 2. The specific implementation process of each step refers to the description of the above embodiments and will not be repeated here.
[0305] In practical applications, the mobile terminal 91 and the communication device 92 may also be implemented by using the mobile terminal and the communication device provided in the above-mentioned embodiments three to four.
[0306] In this embodiment, another structure of a communication device is also provided, and the communication device includes:
[0307] A first sending module, configured to send third key information to a mobile terminal; or send first key information to a second core network function;
[0308] A third receiving module, configured to receive third key information sent from the second core network function, and send the third key information to the mobile terminal;
[0309] Among them, the third key information is generated based on the second verification key and the first key information; the second verification key is generated by decrypting the third verification key, or is generated by the second core network function based on the network user key; the third verification key is received from the mobile terminal, and the network user key is a backup of the user key on the second core network function side.
[0310] In this embodiment, another structure of a communication device is also provided, and the communication device includes:
[0311] The fourth receiving module is used to receive the first key information from the first core network function, the second sending module is used to send the third key information to the first core network function, the third key information is generated based on the first key information and the second verification key, the second verification key is generated based on the network user key, or based on the decrypted third verification key, the third verification key is received from the first core network function; or,
[0312] The fourth receiving module is used to receive second derived information from the first core network function, and the second sending module is used to send a second verification key to the first core network function, where the second verification key is generated based on the second derived information and a network user key; or,
[0313] The second sending module is used to send first derived information to the first core network function, and the second sending module sends a second verification key to the first core network function, the second verification key is generated based on the first derived information and a network user key, and the network user key is a backup of the user key on the second core network function side.
[0314] Embodiment six:
[0315] The key distribution method provided by the embodiment of the present invention is described in detail below in conjunction with specific application scenarios. Fig.10Taking the system structure in as an example, the structure can be basically divided into the following parts: mobile terminal, base station and mobile network, and the mobile network includes the first core network and the second core network.
[0316] Fig.10 This is a schematic diagram of the architecture of the key distribution system device of the present invention, including the following functions and interfaces:
[0317] Security function F1: located in the mobile terminal F3, used to interact with the terminal device F2 through the internal device interface S10 of the mobile terminal F3 to obtain the protected key information provided by the network and process it. The security function F1 can also prevent the terminal device F2 from obtaining the key information. This function can be a software function running on the terminal device F2, or running in a USIM card (Universal Subscriber Identity Module, global user identification card) or UICC card, etc., which are independent of the terminal device F2 and constitute the security hardware of the mobile terminal F3 together with the terminal device F2;
[0318] Terminal device F2 (equivalent to the processor, communication module and other modules in the mobile terminal): is the hardware device for communication, computing, storage and other functions of the mobile terminal F3.
[0319] The terminal device F2 is used to interact with the base station F4 through the air signaling and data interface S1, and interact with the authentication function F5 through the signaling interface S8 to receive various communication services provided by the mobile network. The messages on the signaling interface S8 are transmitted through the signaling interface S1 and the signaling interface S3.
[0320] The terminal device F2 can also interact directly with the base station protection function F6 through the signaling interface S9 to receive services in terms of key distribution and maintenance. The messages on the signaling interface S9 can be transmitted through the signaling interface S8 and the signaling interface S4.
[0321] Mobile terminal F3: includes security function F1 and terminal device F2;
[0322] Base station F4: is a software function or hardware device of the access network of the mobile network, used to interact with the mobile terminal F3 through control signaling and data interface S1, and provide the mobile terminal F1 with various mobile network services such as communication, such as eNB (4G base station) or gNB (5G base station);
[0323] Authentication function F5: a software function or hardware device of the core network of the mobile network, used to interact with the base station F4 through the signaling interface S3, so that the mobile terminal F3 of the mobile network can achieve mutual authentication, such as MME (Mobility Management Entity, network node), or SEAF (Security Anchor Function), or AMF (Access and Mobility Management Function);
[0324] Base Station Protection Function (BSPF) F5: used to interact with the authentication service function F7 through the signaling interface S5 (direct interaction), or interact with the authentication service function F7 through the signaling interface S4 and S6 (indirect interaction) via the authentication function F5, so as to obtain protection information of the protection key information; and send the protected key information to the mobile terminal F3 through the base station F4 through the signaling interface S2 and the signaling interface S1, or send the protected key information to the mobile terminal F3 through the authentication function F5 and the base station F4 through the signaling interface S4, the signaling interface S3, and the signaling interface S1; the message on the signaling interface S5 can be transmitted via the signaling interface S4 and the signaling interface S6, and the message on the signaling interface S2 can be transmitted via the signaling interface S4 and the signaling interface S3; the base station protection function F6 can be a part of the authentication function F5 (that is, the two functions are combined into one function), in which case there is no signaling interface S4, the signaling interface S2 is equivalent to the signaling interface S3, and the signaling interface S5 is equivalent to the signaling interface S6;
[0325] Authentication service function F7: used to interact with the subscription data management function F8 through the signaling interface S7, obtain key information related to the user, and provide the information to the authentication function F5 through the signaling interface S6, or to the base station protection function F6 through the signaling interface S5, or to the base station protection function F6 through the authentication function F5 through the signaling interface S6 and the signaling interface S4. This function can be AUSF (Authentication Server Function), and this function can also be set up together with the subscription data management function F8;
[0326] Subscription data management function F8: stores and processes user-related data, generates information for authenticating users and user-related key information based on user-related data, and provides it to the authentication service function F7 through the signaling interface S7. If the subscription data management function F8 and the authentication service function F7 are combined, there is no signaling interface S8. This function can be UDM or HSS.
[0327] In this embodiment, based on the above Fig.10The hardware structure provided implements the process of the key distribution method of this application, and the specific process steps are as follows Fig.11 As shown, the process includes:
[0328] S201: The base station protection function F6 stores the first key information, which includes one or more keys and may also include a key validity period to facilitate key update. The key is a private key of the network or a symmetric shared key of the network. The base station F4 stores the second key information, which is associated with the first key information. For example, when the key in the first key information is one or more private keys, the key in the second key information is one or more public keys corresponding to these private keys, or when the key in the first key information is one or more symmetric shared key information of the network, the key in the second key information is the same as the key in the first key information, or is derived from the key in the first key information (for example, the key in the second key information is generated based on the key in the first key information and a constant string, and the common generation method is to use a hash function such as HMAC-SHA-256). The base station protection function F6 may also store all or part of the second key information (only store the key in the second key information, or store all the second key information content). The second key information may also include a key validity period, which is not greater than the key validity period in the first key information (may be the same).
[0329] S202: Optionally, the mobile terminal F3 sends a key provision request to the authentication function F5, such as sending a KeyProvisioning Request message or a Registration Request message, which may carry indication information, and the indication information indicates initialization. More specifically, the request may be sent by the terminal device F2;
[0330] S203: The authentication function F5 receives a key provision request, or is triggered by the base station protection function F6 to provide a key to a designated user. The authentication function F5 sends an authentication request to the authentication service function F7, such as sending an Authentication Request message, which may carry indication information, indicating that a protection key needs to be obtained. The authentication service function F7 requests the user authentication information from the contract data management function F8, including a random string RAND, an authentication parameter AUTN, a challenge response, and a session key. The request message may carry indication information. The contract data management function F8 generates RAND, generates AUTN based on RAND, a session key, and an expected challenge response XRES.
[0331] In this embodiment, the session key and XRES are generated in the following manner:
[0332] Method 1: Generate session key and XRES with user key;
[0333] Method 2: Based on the derived key of the user key as input, the key derivation function KDF or hash function is called to generate the session key and XRES. The session key includes the confidentiality protection key CKp and / or the integrity protection key IKp. The KDF function or hash function can be an HMAC-SHA-256 function or other hash (HASH) function. The input parameters of the function for generating the session key and XRES can also include other parameters such as RAND, AUTN, service network identifier, or service network name. The parameters for generating XRES include RAND, and the parameters or functions for generating XRES are not completely the same as the parameters or functions for generating the session key. If the contract data management function F8 receives the indication information, the generated session key should be different from the session key generated when the indication information is not received, for example, the generated parameters except RAND are not completely the same, or the generation function is different, or the RAND value is increased or decreased by a constant as the RAND input parameter.
[0334] S204: The authentication service function F7 sends an authentication response to the authentication function F5, such as AuthenticationResponse, which carries authentication information, such as RAND and AUTN, and may also carry a user key, or a derived key derived from the user key.
[0335] S205: The authentication function F5 sends an authentication request to the mobile terminal F3, such as sending a User AuthenticationRequest message, the message carrying authentication information, such as RAND and AUTN. More specifically, the terminal device F2 receives the authentication request from the authentication function F5.
[0336] S206: The terminal device F2 calls the authentication operation of the security function F1, and inputs the authentication information as parameters, such as RAND and AUTN, and may also input the network identifier, etc. If the security function F1 is a software function running on the terminal device F2, the calling of this step and the subsequent steps 207 to 208 are internal operations of the terminal device F2.
[0337] S207: The security function F1 generates a session key and a challenge response RES based on the authentication information and the user key stored therein. The session key and RES are generated in the same manner as the session key and XRES generated by the contract data management function F8 described in step 203. The security function F1 generates a protection key based on the session key, such as the protection key being equal to the session key, or the protection key being derived based on parameters such as the session key or the network name, or using a portion of the session key. The protection key can be one or more, such as a confidentiality protection key and an integrity protection key.
[0338] S208: The security function F1 returns a call result to the terminal device F2, and the returned call result is a challenge response RES.
[0339] S209: The terminal device F2 sends an authentication response to the authentication function F5, such as sending a User AuthenticationResponse message, which carries a challenge response RES.
[0340] S210: The authentication function F5 sends an authentication execution to the authentication service function F7, such as sending an AuthenticationConfirmation message carrying a challenge response RES.
[0341] S211: The authentication service function F7 generates a protection key or an intermediate session key based on the session key and other parameters, such as RAND, AUTN, or network identification. If the embodiment adopts the method of generating a protection key, the method of generating the protection key is the same as the method of generating the protection key by the security function F1. If the embodiment adopts the method of generating an intermediate session key, the session key is the result of a certain intermediate state in the step of generating the protection key by the security function F1 (for example, the security function F1 generates a second session key based on the session key, and so on, and finally generates a protection key based on the nth session key. The intermediate session key can be generated by the security function F1 in the way of generating the second session key, or the way of generating the nth session key, and so on). The authentication service function F7 can also request the contract data management function F8 to return a protection key or an intermediate session key. The intermediate session key can contain one or more keys.
[0342] S212: The authentication service function F7 sends an authentication confirmation to the authentication function F5, such as sending an AuthenticationAcknowledge message, where the message carries a protection key or an intermediate session key.
[0343] S213: If the embodiment adopts the method of sending the intermediate session key, the authentication function F5 can generate another intermediate key based on the received intermediate session key (for example, the security function F1 adopts the method of generating the first session key based on the user key, and then generating the second session key based on the first session key, and so on, until the protection key is generated, then the received intermediate key can be the same key as the kth session key, and another intermediate key can be the same key as the nth session key), or generate a protection key. If the embodiment adopts the method of sending the protection key, the authentication function F5 directly uses the protection key. The authentication function F5 sends a protection request to the base station protection function F6, such as sending a Key Request message, and the message carries the intermediate key or the protection key. If the embodiment adopts the method of sending the intermediate key, the base station protection function derives the protection key based on the received intermediate key. If the embodiment adopts the method of sending the protection key, the base station protection function F6 directly uses the received protection key. The base station protection function F6 can store the protection key to facilitate the operation of the subsequent update process. If the base station protection function F6 and the authentication function F5 are set together, this step process and the subsequent steps 214 to 215 are internal operations of the authentication function F5.
[0344] S214: The base station protection function F6 generates the third key information based on the protection key and the first key information, or the base station protection function F6 generates the third key information based on the protection key and the second key information. An overall processing method or a batch processing method is adopted, such as encrypting the first or second key information as a whole with the confidentiality protection key CKp, and / or, using the integrity protection key IKp to perform integrity protection on the first or second key information as a whole or the encrypted first or second key information as a whole, and finally generating the third key information. Alternatively, the base station protection function F6 generates the key in the third key information based on the protection key and the key in the first or second key information, and the other information in the third key information except the key is the same as the corresponding information in the first key information or has been processed - for example, encrypted and / or fully protected using the protection key. Alternatively, the keys in the first or second key information are encrypted one by one with the confidentiality protection key CKp, and the third key information is generated based on the encryption result, and verification information is generated based on the third key information (equivalent to the calculation result generated using equal calculation) and IKp. For example, HASH calculation is performed on the third key information and IKp (for example, using HMAC-SHA-256), or after hash calculation is performed on the third key information (for example, using SHA-256), verification information is generated using the calculation result and IKp (for example, using HMAC-SHA-256).
[0345] S215: The base station protection function F6 sends a protection response to the authentication function F5, such as sending a Key Response message carrying the third key information.
[0346] S216: The authentication function F5 sends a key provisioning response to the mobile terminal F3, such as sending a Key ProvisioningResponse message, the message carrying the third key information. More specifically, the terminal device F2 receives the key provisioning response from the authentication function F5.
[0347] One embodiment is: the terminal device F2 can store the received third key information and store the corresponding network identification or network name information at the same time, so as to provide anti-counterfeit base station functions for multiple networks later.
[0348] Another embodiment is to continue executing S217 to S218.
[0349] S217: The terminal device F2 calls the key storage operation of the security function F1, inputs all or part of the third key information as a parameter, and may also input a network identifier or a network name. The input parameters may be used to obtain the key in the first key information (the embodiment is that the third key information is generated based on the first key information) or the key in the second key information (the embodiment is that the third key information is generated based on the second key information). The security function F1 may also store the corresponding network identifier or network name information, so that it may subsequently provide anti-counterfeit base station functions for multiple networks. If the security function F1 is a software function running on the terminal device F2, the calling of this step and the subsequent step 218 are internal operations of the terminal device F2.
[0350] S218: The security function F1 generates the key in the first key information based on the generated protection key and input parameters, such as decrypting the input parameters with CKp, and / or verifying the decrypted information or verifying the input parameters with IKp. Alternatively, the security function F1 generates the second key information based on the generated protection key and input parameters, such as decrypting the input parameters with CKp, and / or verifying the decrypted information or verifying the input parameters with IKp. Alternatively, after the security function F1 generates the key in the first key information according to the above operation, it generates the key in the second key information according to the key in the first key information. The security function F1 can store the key in the first key information, or store the key in the second key information, or store the input parameters so that the above operation can be performed again to obtain the key in the first key information or the key in the second key information when needed later.
[0351] Another embodiment is that after executing steps 217 to 218, the security function F1 generates an encryption key, generates fourth key information based on the encryption key and the first key information or the second key information, and returns it to the terminal device F2, and the terminal device F2 stores the fourth key information.
[0352] Another embodiment is: the messages in step 202, step 205, step 209, and step 216 are direct interactions between the mobile terminal F3 and the base station protection function F6 (through interface S1 and interface S2, or interface S1, interface S3, and interface S4), so that steps 203, step 204, step 210, and step 212 are direct interactions between the base station protection function F6 and the authentication service function F7 (through interface S5, or interface S4 and interface S6), and steps 213 and 215 are not required.
[0353] Another embodiment is: the messages in step 202, step 205, step 209, and step 216 are direct interactions between the mobile terminal F3 and the base station protection function F6 (through interface S1 and interface S2, or interface S1, interface S3, and interface S4), so that steps 203, step 204, step 210, and step 212 are direct interactions between the base station protection function F6 and the authentication service function F7 (through interface S5, or interface S4 and interface S6), and steps 213 and 215 are not required.
[0354] Another embodiment is: after step 216 and before step 217, the terminal device F2 stores the third key information, and steps 217 and 218 do not need to be executed at this time, but are executed when needed, so as to obtain the first key information to authenticate the message sent by the base station F4.
[0355] Another embodiment is: 217 to 218 are not executed, but the terminal device F2 sends part or all of the third key information or the calculation result based on part or all of the third key information (for example, using SHA-256) together with the received verification information (the verification information in step 214 is sent down through the authentication function F5) to the security function F1, and the security function F1 verifies based on the input parameters and the verification information, such as calculating the expected verification information based on the input parameters and IKp (for example, using HMAC-SHA-256), and then compares the expected verification information with the input verification information, and the security function F1 returns the verification result to the terminal device F2.
[0356] From then on, in the case of using an asymmetric key system, the mobile terminal F3 has a mobile network private key, and the base station F4 has a mobile network public key. The base station can use the mobile network public key to digitally sign the entire content of the message sent to the mobile terminal F3 or part of the content in the message, and the mobile terminal F3 can use the mobile network private key to verify the digital signature, so as to determine whether the message has been tampered with (digitally sign the entire content), and can also determine whether the base station is a fake base station (digitally sign the entire or part of the content). In the case of using a symmetric key system, the mobile terminal F3 has the first key information and can obtain the second key information based on the first key information, or has the second key information, and the base station F4 generates a message authentication code MAC based on the entire content of the message sent to the mobile terminal F3 or part of the content in the message, and the mobile terminal F3 can use the second key information to verify the MAC, so as to determine whether the message has been tampered with (generate MAC with the entire content), and can also determine whether the base station is a fake base station (generate MAC with the entire or part of the content).
[0357] Embodiment seven:
[0358] Fig.12 1 is a schematic diagram of a mobile terminal key issuance process according to an embodiment of the present invention, the process includes:
[0359] S301~S309:with Fig.11 The descriptions of S201 to S209 are the same.
[0360] S310: The authentication function F5 sends a protection request, such as a Key Request, to the base station protection function F6. If the base station protection function F6 is co-located with the authentication function F5, this step and the subsequent step 311 are internal operations of the authentication function F5.
[0361] S311: The base station protection function F6 sends a protection response to the authentication function F5, such as sending a Key Response message carrying the first key information or the second key information.
[0362] S312: The authentication function F5 sends an authentication execution to the authentication service function F7, such as sending an AuthenticationConfirmation message, the message carries a challenge response and the first key information, or carries a challenge response and the second key information.
[0363] S313: The authentication service function F7 generates a protection key based on the session key and other parameters, such as RAND, AUTN, or network identification, in the same way as the security function F1 generates the protection key in step 307. The authentication service function F7 may also request the contract data management function F8 to generate a protection key and return the protection key to the authentication service function F7. The contract data management function F8 generates the protection key in the same way as the security function F1 generates the protection key. The authentication service function F7 generates the third key information based on the protection key and the first key information, such as encrypting the first key information with the confidentiality protection key CKp, and / or, performing integrity protection on the first key information or the encrypted first key information with the integrity protection key IKp, and finally generates the third key information. Or the authentication service function F7 generates the third key information based on the protection key and the second key information, such as encrypting the second key information with the confidentiality protection key CKp, and / or, performing integrity protection on the second key information or the encrypted second key information with the integrity protection key IKp, and finally generates the third key information. The authentication service function F7 may also send the first key information or the second key information to the contract data management function F8, which performs the above operation to generate the third key information and then returns the third key information to the authentication service function F7.
[0364] S314: The authentication service function F7 sends an authentication confirmation to the authentication function F5, such as sending an AuthenticationAcknowledge message carrying the third key information.
[0365] S315~S317:with Fig.11 The description of steps 216 to 218 in is the same.
[0366] Another embodiment is: the messages in step 302, step 305, step 309, and step 316 are direct interactions between the mobile terminal F3 and the base station protection function F6 (through interface S1 and interface S2, or interface S1, interface S3, and interface S4), so that steps 303, step 304, step 312, and step 314 are direct interactions between the base station protection function F6 and the authentication service function F7 (through interface S5, or interface S4 and interface S6), and steps 310 and 311 are not required.
[0367] Another embodiment is: after step 315 and before step 316, the terminal device F2 stores the third key information, and steps 316 and 317 do not need to be executed at this time, but are executed when needed, so as to obtain the first key information to authenticate the message sent by the base station F4.
[0368] Embodiment eight:
[0369] Fig.13 1 is a schematic diagram of a mobile terminal key issuance process according to an embodiment of the present invention. In this embodiment, the base station protection function F6 and the authentication function F5 are separately arranged. The process includes:
[0370] S401: Fig.11 The description of S201 in is the same.
[0371] S402: The mobile terminal F3 sends a key provisioning request to the base station protection function F6, such as sending a KeyProvisioning Request message. More specifically, the terminal device F2 may send the request.
[0372] S403: The base station protection function F6 sends an authentication request to the authentication function F5, such as sending an AuthenticationRequired message.
[0373] S404~S413:with Fig.11 The descriptions of S203 to S212 are the same.
[0374] S414: The authentication function F5 sends an authentication response to the base station protection function F6, such as sending an AuthenticationAcknowledge message, the message carrying a protection key, and the base station protection function F6 can store the protection key to facilitate the operation of subsequent update processes.
[0375] S415: With Fig.11 The description of S214 is the same as in.
[0376] S416: The base station protection function F6 sends a key provisioning response to the mobile terminal F3, such as sending a KeyProvisioning Response message, the message carrying the third key information. More specifically, the terminal device F2 receives the key provisioning response from the base station protection function F6.
[0377] S417~S418:with Fig.11 The descriptions of S217 to S218 are the same.
[0378] Another embodiment is: after step 416 and before step 417, the terminal device F2 stores the third key information, and steps 417 and 418 do not need to be executed at this time, but are executed when needed, so as to obtain the first key information to authenticate the message sent by the base station F4.
[0379] Embodiment nine:
[0380] Fig.14 1 is a schematic diagram of a mobile terminal key issuance process according to an embodiment of the present invention, the process includes:
[0381] S501: With Fig.11 The description of S201 in is the same.
[0382] S502: The mobile terminal F3 wants to initiate a request to access the network. Specifically, the terminal device F2 wants to initiate a request to access the network, so the key generation operation of the security function F1 is called, and the operation may include a random string RANDue.
[0383] S503: If the security function F1 does not have a protection key, a random string RANDue is generated, or a random string RANDue is read, or RANDue in a key generation operation called by the terminal device F2 is used, and the security function F1 generates a protection key based on the user key and RANDue.
[0384] S504: The security function F1 returns RANDue to the terminal device F2.
[0385] S505: The terminal device F2 initiates a key provision request to the authentication function F5, such as sending a Key Provisioning Request message, or sending a Registration Request message, the message carrying RANDue.
[0386] S506: The authentication function F5 sends an authentication request to the authentication service function F7, such as sending an AuthenticationRequest message, where the message carries RANDue.
[0387] S507: The authentication service function F7 requests the subscription data management function for an authentication vector, carrying RANDue. After the authentication service function F7 obtains the authentication vector, it triggers the subsequent standard mutual authentication process between the network and the terminal, such as the standard EPS AKA or 5G AKA or EAP-AKA' process.
[0388] S508: The contract data management function F8 generates a protection key based on the received RANDue and the user key of the corresponding user, for example, using a hash function such as HMAC-SHA-256.
[0389] S509~S515:with Fig.11 The description of steps S212 to S218 in is the same.
[0390] Another embodiment is: after step 513 and before step 514, the terminal device F2 stores the third key information, and steps 514 and 515 do not need to be executed at this time, but are executed when needed, so as to obtain the first key information to authenticate the message sent by the base station F4.
[0391] Embodiment ten:
[0392] Fig.15 1 is a schematic diagram of a mobile terminal key issuance process according to an embodiment of the present invention, the process includes:
[0393] S601: Fig.11 The step S201 described in is the same as that in FIG.
[0394] S602: The mobile terminal F3 wants to initiate a request to access the network. Specifically, the terminal device F2 wants to initiate a request to access the network, so the key generation operation of the security function F1 is called.
[0395] S603: If the security function F1 has not sent a confidentiality key to the mobile network (regardless of the user key), a confidentiality key is generated, or a stored confidentiality key is read. The security function F1 generates a transmission key based on the home network public key and the confidentiality key, such as encrypting the confidentiality key using the home network public key, or generates a transmission key based on the home network shared key and the confidentiality key, such as deriving an encryption key based on the home network shared key, and then using the encryption key to encrypt the confidentiality key to generate a transmission key.
[0396] S604: The security function F1 returns the transmission key to the terminal device F2.
[0397] S605: The terminal device F2 initiates a key provision request to the authentication function F5, such as sending a Key ProvisioningRequest message, or sending a Registration Request message, where the message carries a transmission key.
[0398] S606: The authentication function F5 sends an authentication request to the authentication service function F7, such as sending an AuthenticationRequest message, where the message carries a transmission key.
[0399] S607: The authentication service function F7 requests the authentication vector from the contract data management function, carrying the transmission key. After the authentication service function F7 obtains the authentication vector, it triggers the subsequent standard process of mutual authentication between the network and the terminal, such as the standard EPSAKA or 5G AKA or EAP-AKA' process.
[0400] S608: The contract data management function F8 generates a confidential key based on the received transmission key using the home network private key (matched with the home network public key), such as using the home network private key to decrypt the transmission key to obtain the confidential key, or uses the home network shared key to generate a confidential key, such as using the home network shared key to derive an encryption key, and then uses the encryption key to decrypt the transmission key to obtain the confidential key.
[0401] S609~S615:with Fig.11 The steps S212 to S218 described in are the same, except that the protection key is replaced by the confidential key.
[0402] Another embodiment is: after step 613 and before step 614, the terminal device F2 stores the third key information, and steps 614 and 615 do not need to be executed at this time, but are executed when needed, so as to obtain the first key information to authenticate the message sent by the base station F4.
[0403] Another embodiment is: 614 to 615 are not executed, but the terminal device F2 sends part or all of the third key information or the calculation result based on part or all of the third key information (for example, using SHA-256) together with the received verification information (the verification information in step 611 is sent down through the authentication function F5) to the security function F1, and the security function F1 verifies based on the input parameters and the verification information, such as calculating the expected verification information based on the input parameters and the confidential key (for example, using HMAC-SHA-256), and then compares the expected verification information with the input verification information, and the security function F1 returns the verification result to the terminal device F2.
[0404] Embodiment eleven:
[0405] Fig.16 The mobile terminal key issuance process of the sixth embodiment of the present invention is shown in FIG. Figure 6 , the process includes:
[0406] S701: Fig.11 The step S201 described in is the same as that in FIG.
[0407] S702: The mobile terminal F3 wants to initiate a request to access the network. Specifically, the terminal device F2 wants to initiate a request to access the network, so the key generation operation of the security function F1 is called.
[0408] S703: If the security function F1 does not have a confidentiality key (not related to the user key), a confidentiality key is generated. The security function F1 generates a transmission key based on the visited network public key and the confidentiality key, for example, by encrypting the confidentiality key using the visited network public key.
[0409] S704: The security function F1 returns the transmission key to the terminal device F2.
[0410] S705: The terminal device F2 initiates a key provision request to the base station protection function F6, such as sending a KeyProvisioning Request message, or sending a Registration Request message, where the message carries a transmission key.
[0411] S706: The base station protection function F6 generates a confidentiality key based on the received transmission key and the visited network private key (matched with the visited network public key), for example, by using the visited network private key to decrypt the transmission key to obtain the confidentiality key. Fig.11The operation is performed in the manner described in step S214 in the above, except that the protection key is replaced by the confidential key.
[0412] Another embodiment is that step 705 passes through the authentication function F5, then step 706 can be that the authentication function F5 first obtains the confidentiality key, and then transmits the confidentiality key to the base station protection function F6, and then F6 executes Figure 2 The operation described in step 214 is just to replace the protection key with the confidential key.
[0413] S707~S709:with Fig.13 The steps S416 to S418 are described in the same way, except that the protection key is replaced by the confidential key.
[0414] In another embodiment, step 705 passes through the authentication function F5, and then step 706 may be that the authentication function F5 first obtains the confidential key, and then F6 transmits the first key information or the second key information to the authentication function F5, and the authentication function F5 executes Figure 2 The operation described in step 214 is just to replace the protection key with the confidential key.
[0415] Another embodiment is: after step 707 and before step 708, the terminal device F2 stores the third key information, and steps 708 and 709 do not need to be executed at this time, but are executed when needed, so as to obtain the first key information to authenticate the message sent by the base station F4.
[0416] Embodiment 12:
[0417] Fig.17 1 is a schematic diagram of a mobile terminal key update process according to an embodiment of the present invention, the process includes:
[0418] S801: Fig.11 The description of step S201 in is the same as that of step S202, except that the first key information in the base station protection function F6 has been updated, so the second key information in the corresponding base station F4 has also been updated, and if indication information is carried, the indication information indicates the update.
[0419] S802: Optionally, the mobile terminal F3 sends a key provisioning request to the base station protection function F6, such as sending a KeyProvisioning Request message. More specifically, the terminal device F2 may send the request. Another embodiment is that the base station protection function F6 triggers the subsequent steps 803 to 806 due to key update. The first key information or the second key information may include the key update time, or the third key information may include the key update time. The mobile terminal F3 may send a key provisioning request after the key update time expires.
[0420] S803~S806:with Fig.13 The description of steps S415 to 418 in is the same.
[0421] In another embodiment, step S803 generates third key information based on the confidentiality key and the first key information or the second key information, and step S806 generates a key in the first key information or a key in the second key information based on the confidentiality key and part or all of the third key information.
[0422] In this embodiment, in addition to the above implementation, there is also the following implementation: the first key information or the second key information stored in the security function F1, or the third key information stored in the terminal device F2, and the protection key in the security function F1 can be used Figure 11 to Figure 14 The same or similar method as described in the above may also be used to obtain the key, and other methods may also be used to obtain the key, such as the OTA mechanism, that is, the base station protection function F6 transmits the relevant information to the contract data management. Under other mechanisms, such as the OTA mechanism, the protection key may be independent of the user key, so the scheme of the following embodiment is different from Figure 11 to Figure 14 The described scenario has no relevance.
[0423] Embodiment 13:
[0424] This embodiment provides this embodiment also provides a computer-readable storage medium, which includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include but are not limited to RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer.
[0425] In one example, the computer-readable storage medium in this embodiment can be used to store one or more first computer programs, second computer programs, third computer programs, fourth computer programs and second computer programs, and the one or more of the above-mentioned computer programs can be executed by one or more processors to implement the steps of the key issuance method as described in the above-mentioned embodiments.
[0426] This embodiment also provides a computer program (or computer software), which can be distributed on a computer-readable medium and executed by a computing device to implement at least one step of the key issuance method shown in the above embodiments; and in some cases, at least one step shown or described can be executed in an order different from that described in the above embodiments.
[0427] This embodiment further provides a computer program product, including a computer readable device, on which the computer program as shown above is stored. In this embodiment, the computer readable device may include the computer readable storage medium as shown above.
[0428] It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules / units in the above disclosed methods can be implemented as software (which can be implemented with computer program code executable by a computing device), firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be performed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.
[0429] In addition, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, computer program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media. Therefore, the present invention is not limited to any specific hardware and software combination.
[0430] The above contents are further detailed descriptions of the embodiments of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A key issuance method, applied to a mobile terminal side, characterized in that: The method includes: Receive the third key information sent by the mobile network side; the third key information is obtained by the mobile network side by encrypting the first key information based on the second verification key; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the third verification key is obtained by the mobile terminal side based on the result of encrypting the second verification key, and sent to the mobile network side; wherein the first key information is the key information stored in the first core network of the mobile network side; Generate the first key information based on the result of decrypting the third key information using the first verification key or the second verification key, where the first verification key is generated by the mobile terminal side based on the terminal user key; The network user key is a backup of the user key on the mobile network side, and the terminal user key is a backup of the user key on the mobile terminal side.
2. The key distribution method according to claim 1, characterized in that: The method further comprises: The first key information or the third key information includes a key update time; After the key update time expires, a message requesting the third key information is sent to the mobile network side.
3. The key distribution method according to claim 1, characterized in that: The method further comprises: The first verification key is generated based on the terminal user key and derived information, wherein the derived information is sent by the mobile terminal side to the mobile network side, or received by the mobile terminal side from the mobile network side.
4. The key distribution method according to claim 1, characterized in that: The method further comprises: The network information corresponding to the first key information is stored, or the network information corresponding to the third key information is stored.
5. The key distribution method according to claim 1, characterized in that: The method further comprises: Receiving verification information sent by the mobile network side; The verification information is verified based on the first verification key or the second verification key and the third key information, or the verification information is verified based on the first verification key or the second verification key and the first key information.
6. The key distribution method according to claim 1, characterized in that: The step of obtaining the third verification key by the mobile terminal side based on the result of encrypting the second verification key further includes: The mobile terminal side obtains the result of encrypting the second verification key based on a confidentiality key, where the confidentiality key is a public key of the mobile network side or a symmetric key shared with the mobile network side.
7. A key distribution method, applied to the security function on the mobile terminal side, characterized in that: The method comprises: A first call is received from the terminal device on the mobile terminal side, and the result of the first call is returned; the result of the first call does not include the first verification key, or the result of the first call includes the second derived information, or the result of the first call includes the third verification key; wherein the first verification key is generated based on the terminal user key, the second derived information is used to generate the first verification key together with the terminal user key, the third verification key is obtained by the mobile terminal side based on the result of encrypting the second verification key, and sent to the mobile network side, the terminal user key is a backup of the user key on the security function of the mobile terminal side; a second call is received from the terminal device on the mobile terminal side, and the result of the second call is returned result; the second call includes the third key information, and the result of the second call does not include the first key information; wherein, the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key, and the third key information is obtained by the mobile network side based on the result of encrypting the first key information based on the second verification key, and sent to the mobile terminal side; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the first key information is the key information stored in the first core network on the mobile network side; the network user key is the backup of the user key on the mobile network side.
8. The key issuing method according to claim 7, characterized in that: The first call includes first derived information, and the first verification key is generated based on the end-user key and the first derived information.
9. The key issuing method according to claim 7, characterized in that: The result of the first call includes second derived information, and the first verification key is generated based on the end-user key and the second derived information.
10. The key issuing method according to claim 7, characterized in that: The method further comprises: The network information corresponding to the first key information is stored.
11. The key issuing method according to claim 7, characterized in that: The third verification key is obtained based on the result of encrypting the second verification key, comprising: The third verification key is obtained based on a result of encrypting the second verification key with a confidentiality key, where the confidentiality key is a public key of the mobile network side or a symmetric key shared with the mobile network side.
12. The method according to claim 7, characterized in that The method further comprises: A third call is received from the terminal device on the mobile terminal side; the input parameter of the third call includes verification information and part or all of the third key information, or the input parameter of the third call includes verification information and a calculation result generated based on part or all of the third key information; Returning a result of the third call, wherein the result of the third call includes a result of verifying the verification information based on the input parameters using the first verification key or the second verification key; The third key information is used to generate the first key information by using the first verification key or the second verification key to decrypt the third key information.
13. A key issuing method, applied to a terminal device on a mobile terminal side, characterized in that: The method comprises: receiving third key information from the mobile network side, and initiating a second call to the security function on the mobile terminal side, wherein the second call includes the third key information; The third key information is obtained by encrypting the first key information based on the second verification key on the mobile network side, wherein the first key information is the key information stored in the first core network on the mobile network side; the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side based on the result of decrypting the third verification key, the third verification key is sent by the mobile terminal side to the mobile network side, and the network user key is a backup of the user key on the mobile network side; the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key; the mobile terminal side generates the first verification key based on the terminal user key; the terminal user key is a backup of the user key on the mobile terminal side.
14. The key issuing method according to claim 13, characterized in that: The method further comprises: A first call is initiated to the security function on the mobile terminal side, and a result of the first call is received, where the result of the first call includes the third verification key.
15. The key issuing method according to claim 13, characterized in that: The method further comprises: Initiate a third call to the security function on the mobile terminal side, where the input parameters of the third call include verification information and part or all of the third key information, or the input parameters of the third call include verification information and a calculation result generated based on part or all of the third key information; A verification result returned by the security function on the mobile terminal side is received, where the verification result is a result of verifying the verification information based on the input parameters using the first verification key or the second verification key.
16. The key issuing method according to claim 13, characterized in that: The method further comprises: A first call is initiated to the security function on the mobile terminal side, and a result of the first call is received, wherein the first call includes first derived information, and the first derived information is used to generate a first verification key together with the terminal user key, and is generated by the terminal device on the mobile terminal side, or received from the mobile network side, and the first verification key is used to decrypt the third key information.
17. The key issuing method according to claim 16, characterized in that: The method further comprises: The first derived information is sent to the mobile network side.
18. The key issuing method according to claim 13, characterized in that: The method further comprises: Initiate a first call to the security function on the mobile terminal side, receive a result of the first call, the result of the first call includes second derived information, the second derived information is used to generate a first verification key together with the terminal user key, the first verification key is used to decrypt the third key information; The second derived information is sent to the mobile network side.
19. A key distribution method, applied to a first core network function on a mobile network side, characterized in that: The method comprises: Sending third key information to the mobile terminal side; or, Sending first key information to the second core network function, receiving third key information sent by the second core network function, and sending the third key information to the mobile terminal side; wherein the first key information is key information stored in the first core network on the mobile network side; Among them, the third key information is generated based on the second verification key and the first key information; the second verification key is generated by decrypting the third verification key, or is generated by the second core network function based on the network user key; the third verification key is received from the mobile terminal side, and the network user key is a backup of the user key on the second core network function side.
20. The key issuing method according to claim 19, characterized in that: The method further comprises: Sending a key request to the second core network function; Receive the second authentication key from the second core network function.
21. The key issuing method according to claim 20, characterized in that: The key request includes third derived information; the third derived information is received from the mobile terminal side and is used to generate the second verification key together with the network user key.
22. The key issuing method according to claim 21, characterized in that: The key request also includes the third verification key.
23. The key issuing method according to claim 19, characterized in that: The method further comprises: Sending first derived information to the mobile terminal side; the first derived information is received from the second core network function and is used to generate the second verification key together with the network user key.
24. The key issuing method according to claim 19, characterized in that: The method further comprises: Sending verification information to the mobile terminal side; In which, the verification information is generated based on the second verification key and part or all of the third key information; or is generated based on the second verification key and a first calculation result, and the first calculation result is generated based on part or all of the third key information; or is generated based on the second verification key and part or all of the first key information; or is generated based on the second verification key and a second calculation result, and the second calculation result is generated based on part or all of the first key information.
25. A key distribution method, applied to a second core network function, characterized in that: The method comprises: receiving first key information from a first core network function, and sending third key information to the first core network function, so that the first core network function sends the third key information to the mobile terminal side; the third key information is generated based on the first key information and a second verification key, the second verification key is generated based on a network user key, or based on a decrypted third verification key, and the third verification key is received from the first core network function; or, receiving second derived information from a first core network function, and sending a second verification key to the first core network function, wherein the second verification key is generated based on the second derived information and a network user key; or, Sending first derived information to a first core network function, and sending a second verification key to the first core network function, the second verification key being generated based on the first derived information and a network user key; The network user key is a backup of the user key on the second core network function side; wherein the first key information is the key information stored in the first core network on the mobile network side.
26. A mobile terminal, characterized in that: include: A first receiving module, used to receive third key information sent by the mobile network side; The third key information is obtained by the mobile network side encrypting the first key information based on the second verification key; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the third verification key is obtained by the mobile terminal based on the result of encrypting the second verification key and sent to the mobile network side; wherein the first key information is the key information stored in the first core network of the mobile network side; The first key generation module is used to generate the first key information based on the result of decrypting the third key information using the first verification key or the second verification key, wherein the first verification key is generated by the mobile terminal based on the terminal user key, wherein the network user key is a backup of the user key on the mobile network side, and the terminal user key is a backup of the user key on the mobile terminal.
27. A key issuing device, characterized in that: include: A first calling module, used for receiving a first call from a terminal device on the mobile terminal side, and returning a result of the first call; The result of the first call does not include the first verification key, or the result of the first call includes the second derived information, or the result of the first call includes the third verification key; wherein the first verification key is generated based on the terminal user key, the second derived information is used to generate the first verification key together with the terminal user key, and the third verification key is obtained by the mobile terminal side based on the result of encrypting the second verification key and sent to the mobile network side; the terminal user key is a backup of the user key on the security function of the mobile terminal side; A second calling module is used to receive a second call from the terminal device on the mobile terminal side and return the result of the second call; the second call includes third key information, and the result of the second call does not include the first key information; wherein, the first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key, and the third key information is obtained by encrypting the first key information based on the second verification key on the mobile network side and sent to the mobile terminal side; the second verification key is generated by the mobile network side based on the network user key or obtained by the mobile network side based on the result of decrypting the third verification key; the first key information is the key information stored in the first core network on the mobile network side; the network user key is a backup of the user key on the mobile network side.
28. A mobile terminal, characterized in that: include: A second receiving module, used to receive third key information from the mobile network side, and initiate a second call to the key issuing device, wherein the second call includes the third key information; The third key information is obtained by encrypting the first key information based on the second verification key on the mobile network side, wherein the first key information is key information stored in the first core network on the mobile network side; the second verification key is generated by the mobile network side based on the network user key, or the second verification key is obtained by the mobile network side based on the result of decrypting the third verification key, the third verification key is sent by the mobile terminal side to the mobile network side, and the network user key is a backup of the user key on the mobile network side; The first key information is generated based on the result of decrypting the third key information using the first verification key or the second verification key; the mobile terminal side generates the first verification key based on the terminal user key; the terminal user key is a backup of the user key on the mobile terminal side.
29. A communication device, characterized in that: include: A first sending module, used for sending third key information to the mobile terminal side; or, sending the first key information to the second core network function; A third receiving module is used to receive the third key information sent from the second core network function, and send the third key information to the mobile terminal side; wherein the first key information is the key information stored in the first core network on the mobile network side; Among them, the third key information is generated based on the second verification key and the first key information; the second verification key is generated by decrypting the third verification key, or is generated by the second core network function based on the network user key; the third verification key is received from the mobile terminal side, and the network user key is a backup of the user key on the second core network function side.
30. A communication device, characterized in that: include: A fourth receiving module and a second sending module; The fourth receiving module is used to receive the first key information from the first core network function, and the second sending module is used to send the third key information to the first core network function, so that the first core network function sends the third key information to the mobile terminal side; the third key information is generated based on the first key information and the second verification key, the second verification key is generated based on the network user key, or based on the decryption of the third verification key, and the third verification key is received from the first core network function; or, The fourth receiving module is used to receive second derived information from the first core network function, and the second sending module is used to send a second verification key to the first core network function, where the second verification key is generated based on the second derived information and a network user key; or, The second sending module is used to send first derived information to the first core network function, and the second sending module sends a second verification key to the first core network function, the second verification key is generated based on the first derived information and a network user key, and the network user key is a backup of the user key on the second core network function side; wherein the first key information is the key information stored in the first core network on the mobile network side.
31. A communication device, characterized in that: include: Processor, memory, communication unit and communication bus; The communication bus is used to realize wireless communication connection between the processor, the communication unit and the memory; The processor is used to execute one or more first programs stored in the memory to implement the steps of the key issuance method according to any one of claims 1 to 6; The processor is used to execute one or more second programs stored in the memory to implement the steps of the key issuance method according to any one of claims 7 to 12; The processor is used to execute one or more third programs stored in the memory to implement the steps of the key issuance method according to any one of claims 13 to 18. The processor is used to execute one or more fourth programs stored in the memory to implement the steps of the key issuance method according to any one of claims 19 to 24; The processor is used to execute one or more fifth programs stored in the memory to implement the steps of the key issuance method as claimed in claim 25.
32. A computer-readable storage medium, wherein the computer-readable storage medium stores one or more first computer programs, a second computer program, a third computer program, a fourth computer program and a second computer program, wherein the one or more first computer programs can be executed by one or more processors to implement the steps of the key issuing method according to any one of claims 1 to 6; The one or more second computer programs can be executed by one or more processors to implement the steps of the key issuance method according to any one of claims 7 to 12; The one or more third computer programs can be executed by one or more processors to implement the steps of the key issuing method according to any one of claims 13 to 18. The one or more fourth computer programs can be executed by one or more processors to implement the steps of the key issuance method according to any one of claims 19 to 24; The one or more fifth computer programs can be executed by one or more processors to implement the steps of the key issuing method according to claim 25.
