WO2020037958A1 - Gba-based client registration and key sharing method, device, and system - Google Patents

Gba-based client registration and key sharing method, device, and system Download PDF

Info

Publication number
WO2020037958A1
WO2020037958A1 PCT/CN2019/074725 CN2019074725W WO2020037958A1 WO 2020037958 A1 WO2020037958 A1 WO 2020037958A1 CN 2019074725 W CN2019074725 W CN 2019074725W WO 2020037958 A1 WO2020037958 A1 WO 2020037958A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
naf
user terminal
service server
character string
Prior art date
Application number
PCT/CN2019/074725
Other languages
French (fr)
Chinese (zh)
Inventor
刘高峰
Original Assignee
刘高峰
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201810978212.5A external-priority patent/CN109121135A/en
Application filed by 刘高峰 filed Critical 刘高峰
Priority to CN201910775078.3A priority Critical patent/CN111050322B/en
Publication of WO2020037958A1 publication Critical patent/WO2020037958A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication

Definitions

  • the present invention relates to the field of communication technology and Internet technology, and in particular, to a generic boot architecture-based (Generic Bootstrapping Architecture (GBA) client registration and key sharing method, device and system.
  • GBA Generic Bootstrapping Architecture
  • the 3GPP specification TS 33.220 defines a universal security authentication mechanism suitable for mobile networks-Generic Boot Architecture (Generic Bootstrapping Architecture (GBA), which is part of the Generic Authentication Architecture (GAA).
  • GBA Generic Bootstrapping Architecture
  • GAA Generic Authentication Architecture
  • GBA provides a mechanism based on authentication and key agreement (AKA) in user equipment (UE) and network application server (network application function (NAF).
  • AKA authentication and key agreement
  • UE user equipment
  • NAF network application function
  • the GBA architecture is mainly divided into two processes: GBA initialization and application key negotiation:
  • the first process is the GBA initialization process (GBA Bootstrapping: UE and bootstrapping service server server function (BSF), BSF, and home subscriber server
  • GBA GBA initialization process
  • BSF bootstrapping service server server function
  • HLR home subscriber server
  • the server (HSS) / home location register (HLR) performs key negotiation based on the AKA mechanism.
  • the UE and BSF negotiate a GBA master key Ks and generate a bootstrapping identifier (bootstrapping).
  • transaction identifier (B-TID) and the master keys Ks and B-TID are stored on the UE and BSF, respectively.
  • the second process is the application key negotiation process (Bootstrapping Usage Procedure): the UE negotiates the application key with NAF, and NAF obtains the application key and user information from the BSF according to the application key negotiation request sent by the UE, and then the UE and NAF Use this application key for authentication, message encryption, and other operations. More specifically, referring to FIG. 1, the application key negotiation process includes the following steps:
  • the UE sends an application connection request to the NAF through the Ua interface, and the request message carries the B-TID.
  • the UE uses the following formula to generate the application key Ks_ (ext / int) _NAF.
  • a TLS link can be established in advance to ensure the communication security of the Ua interface.
  • Ks_NAF KDF (Ks, "gba-me”, RAND, IMPI, NAF_Id)
  • Ks_ext_NAF KDF (Ks, "gba-me”, RAND, IMPI, NAF_Id)
  • Ks_int_NAF KDF (Ks, "gba-u”, RAND, IMPI, NAF_Id)
  • Ks is the master key Ks generated during the GBA initialization process
  • "gba-me” and “gba-u” are fixed strings
  • RAND is a random number generated during the GBA initialization process
  • IMPI is an IP multimedia private identification (IP Multimedia Private Identity)
  • NAF_Id is the identity of NAF
  • KDF is the abbreviation of key derivation function.
  • the NAF_Id is formed by connecting the FQDN (Fully Qualified Domain Name) of the NAF to be accessed and the protocol identifier (UaID) on the Ua interface.
  • the NAF After receiving the application connection request from the UE, the NAF sends an authentication request message to the BSF, which carries the B-TID and NAF_Id.
  • the BSF has already stored the B-TID and the IMPI corresponding to the B-TID, the master key Ks, the Ks key validity period, the GBA initialization time, and the GBA User security settings information (GUSS, GBA User Security Settings), etc.
  • the BSF After the BSF receives the NAF authentication request, the BSF verifies the identity of the sender according to the FQDN in the NAF_Id, and finds the corresponding master key Ks according to the B-TID.
  • the BSF If the BSF does not find the corresponding master key Ks or Ks has expired, the BSF returns an authentication failure response message to the NAF and asks the UE to re-initiate the GBA initialization process.
  • the BSF uses the same application key calculation formula as the UE to calculate the application key Ks_ (ext / int) _NAF, and then returns an authentication success response message to the NAF server, and According to the preset settings, Ks_ (ext / int) _NAF, Ks_ (ext / int) _NAF validity period, GBA initialization time, and corresponding user security settings (USS) are sent to NAF in the authentication success response message. .
  • NAF After NAF stores Ks_ (ext / int) _NAF and Ks_ (ext / int) _NAF validity period information, it returns an authentication success response message to the UE. In this way, an application key Ks_ (ext / int) _NAF is established between the UE and NAF. For subsequent authentication, message encryption and other operations.
  • the GBA architecture has been used in IMS services, such as multimedia broadcast multicast services.
  • IMS multimedia broadcast multicast services.
  • broadcast / multicast service MBMS
  • SUPL secure user plane location
  • a third-party application server is equivalent to As an example, NAF has the following technical defects:
  • Defect 1 Because the third-party application server is provided by a different third-party application service provider, and because NAF_Id is a parameter that is relatively easy to obtain through public channels or software reverse.
  • the third-party application server collects the B-TID carried in the application connection request of the third-party application client, and then generates an application connection request according to the B-TID and the NAF_Id of the other third-party application server.
  • Other third-party application servers initiate application connections, which will cause BSF to perform unnecessary application key Ks_ (ext / int) _NAF generation calculations, and will cause other third-party application servers to store unnecessary application keys Ks_ (ext / int ) _NAF, which will consume computing and storage resources of BSF and other third-party application servers. Since each third-party application server can collect B-TIDs, the more B-TIDs collected, the greater the potential harm to other third-party application servers.
  • Defect 2 Because a large number of third-party application clients will be installed on the user terminal, they are provided by different third-party application service providers, but the calculation method of the application key Ks_ (ext / int) _NAF in the GBA existing mechanism Among them, "gba-me” and “gba-u” are fixed string parameters, IMPI is a fixed parameter that is the same in the same user terminal, Ks and RAND are parameters that are the same during the validity period of Ks, and NAF_Id is It is easier to obtain the parameters through public channels or software reversely. Therefore, the third-party application client on the same user terminal can easily calculate the application key Ks_ (ext / int) _NAF of other third-party application clients, thereby counterfeiting. Access to other third-party application clients.
  • the main purpose of the present invention is to provide a method, device and system for client registration and key sharing based on GBA, which aims at providing a secure registration method, device and system for a third-party application client running in a user terminal.
  • Application client application key issues, so that the GBA architecture is more securely and effectively applied in the field of Internet technology.
  • the present invention provides the following technical solutions:
  • a GBA-based client registration and key sharing method is provided, which is applied to a user terminal running a third-party application client.
  • the method includes:
  • the GBA-based client registration and key sharing method is characterized in that the method is applied to a user terminal running a third-party application client, and the method includes:
  • the generating a first authentication key based on the first master key Ks includes: using the first master key Ks as the first authentication key; or, based on including the first master secret
  • the key Ks and the first fixed character string or / and the first random character string or / and the first time stamp or / and the B-TID or / and NAF_Id information generate a first authentication key
  • the generation method of the key is the same as the generation method of generating the second authentication key by the guided service server BSF
  • the first fixed character string is a first fixed character string that is pre-configured and pre-configured with the guided service server BSF
  • the first random string is a randomly generated string
  • the first timestamp is generated by obtaining the current system time of the user terminal
  • the NAF_Id is the third-party application client If the information generating the first authentication key includes the first random character string or / and the first time stamp or / and the NAF_Id, the first random character string or /
  • the generating the first verification information includes: generating the based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id.
  • the first authentication information, and the generation method of the first authentication information is consistent with the generation method of generating the second authentication information by the guidance service server BSF, and the second fixed character string is pre-configured and is the same as the guidance service server A second fixed string pre-configured by the BSF with the same value, the second random string is a randomly generated string, and the second time stamp is generated by obtaining the current system time of the user terminal;
  • Generating the first verification information includes based on the second random string or / and a second time stamp or / and the NAF_Id, and using a signature encryption algorithm to pair the first verification information based on the first authentication key.
  • the signature encryption generates the first encrypted value, and then sends the second random character string or / and the second time stamp or / and the NAF_Id to the guidance service server BSF.
  • the generating the first verification information based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id includes: One of the second fixed character string or the second random character string or the second time stamp or the B-TID or the NAF_Id as the first verification information; or A second fixed character string or / and the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id information generates the first verification information.
  • the encrypting and generating the first encrypted value based on the first authentication key and the first verification information includes: signing and encrypting the first verification information based on the first authentication key using a signature encryption algorithm.
  • the first encrypted value or, using a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate the first encrypted value.
  • receiving the registration information and services provided by the guidance service server BSF includes: generating a first application key based on the first master key Ks, and The method of generating the first application key is consistent with the method of generating the second application key generated by the guided service server BSF, and the first application key is used as an application key in the third-party application client;
  • a user token sent by the guided service server BSF is received, and the user token is used for the third party application client to access the corresponding third party application server for authentication.
  • the transmitting NAF_Id to the guidance service server BSF includes: further including the NAF_Id in the security authentication request sent to the guidance service server BSF; or, if a symmetric encryption algorithm is used based on the first authentication key
  • the key pair including the first authentication information is symmetrically encrypted to generate the first encrypted value, and the information generating the first authentication information further includes the NAF_Id, so that the guided service server BSF retrieves the The NAF_Id is obtained in the plaintext after the first encrypted value is decrypted.
  • the generating a first application key based on the first master key Ks includes: generating the first application key based on the first master key Ks and optional parameters; the optional parameters include One or more of Salt, RAND, IMPI, and NAF_Id, where Salt is the same salt value as the guided service server BSF; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI of the user terminal NAF_Id is the NAF_Id; KDF is the same key derivation function as the guided service server BSF; the optional parameters are consistent with the optional parameters when the guided service server BSF generates a second application key.
  • the optional parameters include One or more of Salt, RAND, IMPI, and NAF_Id, where Salt is the same salt value as the guided service server BSF; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI of the user terminal NAF_Id is the NAF_Id; KDF is the same key derivation function as the guided service
  • the method further includes: receiving the information sent by the guidance service server BSF Receiving an application authorization request message; displaying an application authorization verification interface; receiving authorization information entered by a terminal user in the application authorization verification interface; and if the authorization information indicates authorization confirmation, sending an application authorization response message to the boot service server BSF,
  • the application authorization response message is an application authorization confirmation message.
  • a method for client registration and key sharing based on GBA is provided, which is applied to guide a service server BSF, and the method includes:
  • the generating a second authentication key based on the second master key Ks includes: using the second master key Ks as the first authentication key; or, based on including the second master key
  • the key Ks and the first fixed character string or / and the first random character string or / and the first time stamp or / and the B-TID or / and NAF_Id information generate a first authentication key
  • the generation method of the key is the same as the generation method of generating the first authentication key by the user terminal
  • the first fixed character string is pre-configured and has the same value as the first fixed character string pre-configured by the user terminal.
  • a character string, the first random character string or / and the first timestamp or / and the NAF_Id are sent by the user terminal.
  • the generating the second verification information includes generating the second verification information based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id.
  • the second authentication information, and the generation method of the second authentication information is consistent with the generation method of generating the first authentication information by the user terminal, and the second fixed character string is pre-configured and pre-configured by the user terminal A string with the same value in the second fixed string, and the second random string or / and the second time stamp or / and the NAF_Id are sent by the user terminal.
  • generating the second verification information based on a second fixed character string or / and a second random character string or / and the B-TID or / and the NAF_Id includes: Or one of the second random character string or the second time stamp or the B-TID or the NAF_Id as the second verification information; or, according to including the second fixed character string or / Generating the second verification information with the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id information.
  • the verifying the first encrypted value based on the second authentication key and the second verification information includes: if the user terminal generates the first encrypted value using a signature encryption algorithm, using the same The signature encryption algorithm verifies the first encrypted value based on the second authentication key and the second verification information; or, if the user terminal generates the first encrypted value using a symmetric encryption algorithm, the same symmetric is used An encryption algorithm verifies the first encrypted value based on the second authentication key and the second verification information.
  • the using the same signature encryption algorithm to verify the first encryption value based on the second authentication key and the second verification information includes: using the same signature encryption algorithm as the user terminal, based on the The second authentication key signs and encrypts the second verification information to generate a second encrypted value; compares whether the second encrypted value is consistent with the first encrypted value; if they are consistent, it is determined that the verification of the first encrypted value is successful .
  • using the same symmetric encryption algorithm to verify the first encryption value based on the second authentication key and the second verification information includes: using the same symmetric encryption algorithm as the user terminal, based on the The second authentication key decrypts the first encrypted value to obtain a plaintext, and obtains the first verification information from the decrypted plaintext; compares whether the second verification information is consistent with the first verification information; if they are consistent; , It is determined that the verification of the first encrypted value is successful.
  • the providing registration information and services to the user terminal includes: generating a user token corresponding to the NAF_Id, so that The user token is an authentication used for the third-party application client to access a corresponding third-party application server; the registration success response message sent to the user terminal includes the user token, so that the user command The card is used to access the authentication and authentication of the corresponding third-party application server in the third-party application client corresponding to the NAF_Id.
  • the generating a user token corresponding to the NAF_Id includes: using a randomly generated globally unique character string as the user token; establishing a correspondence between the user token and the NAF_Id or / and the B-TID The relationship of IMPI.
  • the method further includes: generating a second application key based on the second master key Ks, and the second application The generation method of the key is consistent with the generation method of generating the first application key by the user terminal, and the correspondence between the B-TID and the NAF_Id and the second application key is established.
  • the generating a second application key based on the second master key Ks includes: generating the second application key based on the second master key Ks and optional parameters; the optional parameters include One or more of Salt, RAND, IMPI, and NAF_Id, where Salt is the same salt value as the user terminal; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI corresponding to the B-TID NAF_Id is the NAF_Id; KDF is the same key derivation function as the user terminal; the optional parameters are consistent with the optional parameters when the user terminal generates the first application key.
  • the optional parameters include One or more of Salt, RAND, IMPI, and NAF_Id, where Salt is the same salt value as the user terminal; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI corresponding to the B-TID NAF_Id is the NAF_Id; KDF is the same key derivation function as the user terminal; the optional parameters are
  • the method further includes: sending an application authorization to the user terminal.
  • Request message the application authorization request message includes a third-party application name or / and a mobile user name, the third-party application name is obtained according to the NAF_Id, and the mobile user name is according to an IMPI corresponding to the B-TID Acquired; receiving an application authorization response message sent by the user terminal; and if the application authorization response message is an application authorization confirmation message, performing the steps of providing registration information and services to the user terminal.
  • a GBA-based client registration and key sharing device which is characterized in that the device is applied to a user terminal running a third-party application client and includes: a memory, a processor, and the processor is used for When the program stored in the memory is executed, the method executes any one of the methods described above and applied to a user terminal running a third-party application client.
  • a GBA-based client registration and key sharing device which is characterized in that the device is used to guide a service server BSF and includes a memory and a processor, where the processor is configured to run a program stored in the memory, When the program runs, the method includes any one of the methods described above and applied to a guided service server BSF.
  • a client registration and key sharing system based on GBA is provided, which is characterized in that the system includes: a user terminal and a guided service server BSF; the user terminal includes the above-mentioned application in a user terminal running a third-party application client The device; the guided service server BSF includes the above-mentioned device applied to the guided service server BSF.
  • a storage medium is provided, characterized in that a program is stored in the storage medium, and the program is configured to implement any one of the methods described above in a user terminal running on a third-party application client.
  • a storage medium is provided, characterized in that a program is stored in the storage medium, and the program is configured to implement the method including any one of the above-mentioned application to guide a service server BSF.
  • the present invention provides a secure registration environment for third-party application clients running in user terminals after the GBA initialization process, and guides the service server BSF to provide corresponding registration information and only for authenticated user terminals. Services, including the generation of application keys, effectively solve the technical shortcomings of the GBA architecture application described in the background in the field of Internet technology.
  • FIG. 1 is a schematic flowchart of a GBA application key negotiation process
  • FIG. 2 is a schematic structural diagram of an implementation environment involved in a GBA-based client registration and key sharing method according to an embodiment of the present invention
  • Embodiment 3 is a schematic flowchart of Embodiment 1 of a GBA-based client registration and key sharing method according to the present invention
  • Embodiment 4 is a schematic flowchart of Embodiment 2 of a GBA-based client registration and key sharing method according to the present invention
  • FIG. 5 is a schematic flowchart of Embodiment 3 of a GBA-based client registration and key sharing method provided by the present invention.
  • NAF_Id is used to uniquely identify a third-party application server and to identify a third-party application client corresponding to the third-party application server.
  • NAF_Id can be a Fully Qualified Domain Name (FQDN), or it can be a connection between the FQDN and the protocol identifier (UaID) on the Ua interface, or it can be a string.
  • FQDN Fully Qualified Domain Name
  • UaID protocol identifier
  • Signature encryption algorithm refers to the encryption algorithm used to verify the authenticity of the information. Only a sender of the information can generate a string of numbers that cannot be forged by others. This digital string is also one of the authenticity of the information sent by the sender of the information.
  • Valid proofs such as message authentication codes (such as hash-based message authentication code HMAC, cipher block chain message authentication code CBC-MAC, Galois message authentication code GMAC, etc.), hash functions with key encryption, RSA-based Digital schemes (such as RSA-PSS), digital signature algorithms (DSA), and elliptic curve digital signature algorithms.
  • Symmetric encryption algorithm refers to an encryption algorithm that uses the same key for encryption and decryption, such as the Triple Data Encryption Standard (Triple Data Encryption Standard (DES), Advanced Encryption Standard (AES), etc.
  • Triple Data Encryption Standard Triple Data Encryption Standard (DES), Advanced Encryption Standard (AES), etc.
  • DES Triple Data Encryption Standard
  • AES Advanced Encryption Standard
  • FIG. 2 is a schematic structural diagram of an implementation environment involved in a GBA-based client registration and key sharing method according to an embodiment of the present invention.
  • the implementation environment includes a guided service server BSF, a user terminal, and a third-party application client.
  • BSF Guided service server BSF: BSF is usually provided by a communication operator service provider, which is connected to user terminals and third-party application servers through the Internet or a dedicated network, and communicates with HSS (Home Subscriber Server, home subscribers) through the communication operator network and a dedicated interface. Server) or / and HLR (Home Location Register (Home Location Register) connection. It should be noted that the BSF in this application can also be connected to unified data management (UDM).
  • UDM unified data management
  • the user terminal accesses the network through wired or wireless methods such as WLAN (including wifi), mobile data, LAN, and fixed broadband, and performs data connection with the guidance service server BSF.
  • the user terminal supports the GBA function, usually a smart phone, or a smart TV, a set-top box, a tablet computer, a portable computer, a desktop computer, and the like.
  • Third-party application client An application running in the operating system of a user terminal, provided by a third-party application service provider.
  • each user terminal may run multiple third-party application clients provided by different third-party application service providers, and each third-party The application client can connect to and access the corresponding third-party application server to obtain the required business application data and services.
  • HSS Home Subscriber Server
  • HLR Home Location Register
  • AP Authentication Proxy
  • SLF Subscriber Locator Function
  • the third-party application server is equivalent to NAF in the GBA architecture. It is provided by a third-party application service provider and is used to connect with third-party application clients through the network to provide users with required application services, such as information, shopping, social networking, etc .; It is connected with the guidance service server BSF through the network to obtain the corresponding information of the B-TID.
  • FIG. 2 does not constitute a limitation on the implementation environment, and may include more or fewer components than shown, or some components may be combined, or different components may be arranged.
  • the user terminal and the guidance service server BSF have successfully performed the GBA initialization process.
  • the user terminal has a B-TID and corresponding RAND and Ks (that is, the first master key Ks); the guidance service server
  • the BSF stores the corresponding relationship between the B-TID and the corresponding RAND and Ks (that is, the second master key Ks), and simultaneously guides the service server BSF to store the B-TID and IMPI (IP Multimedia Private Identity, IP Multimedia Private Identity), that is, the BPI can be used to find and obtain the IMPI corresponding to the user terminal.
  • IMPI IP Multimedia Private Identity, IP Multimedia Private Identity
  • FIG. 3 shows a flowchart of Embodiment 1 of a GBA-based client registration and key sharing method provided by the present invention.
  • This embodiment can be used in the implementation environment shown in FIG. 2. This embodiment includes:
  • the user terminal starts the GBA-based client registration and key sharing process after obtaining an operation instruction for starting the GBA-based client registration and key sharing process.
  • the process may include the following three sub-processes and corresponding steps:
  • the user terminal and the guided service server BSF generate an authentication key with the same value based on the same B-TID and the same master key Ks. This can include:
  • Step 301 The user terminal obtains the B-TID and the first master key Ks.
  • the user terminal obtains the B-TID and the first master key Ks.
  • the B-TID and the B-TID should be stored on the guided service server BSF.
  • the second master key Ks corresponding to the TID.
  • Step 302 The user terminal generates a first authentication key based on the first master key Ks.
  • the first master key Ks may be used as the first authentication key.
  • the first fixed character string (1) is a character string that is pre-configured and has the same value as the first fixed character string (2) that is pre-configured on the boot service server BSF, the first random character string
  • the character string is a locally randomly generated character string, and the first time stamp is generated by acquiring the current system time of the user terminal.
  • DK PBKDF2 (passphrase, Salt, c, dkLen), where: DK is the first authentication key generated, PBKDF2 is the key derivation algorithm, passphrase is the first master key Ks and is the same as the first fixed string (1) or / And the first random string or / and the first timestamp or / and the B-TID or / and NAF_Id combination string; Salt is the salt value, in this case a fixed string; c is the number of iterations ; DlLen is the key output length, which can be used to generate a key length that meets the requirements according to the encryption algorithm used.
  • NAF_Id is the identity of the third-party application client running in the user terminal.
  • the third-party application client software installation package has built-in storage and is stored in a configuration file after installation, and the user terminal obtains the NAF_Id from the configuration file;
  • the third-party application client obtains the request after sending the request to the corresponding third-party application server, and the user terminal obtains the request from the third-party application client.
  • Step 303 The user terminal sends the B-TID and the information for generating the first authentication key to the guidance service server BSF.
  • the user terminal sends the B-TID to the guidance service server BSF, so that the guidance service server BSF can obtain the corresponding second master key Ks according to the B-TID.
  • the guided service server BSF In order for the guided service server BSF to generate a second authentication key with the same value as the first authentication key, if the information for generating the first authentication key further includes a first random character string or / and a first time stamp or / and NAF_Id, then send the first random character string or / and the first time stamp or / and the NAF_Id to the guidance service server BSF.
  • the guidance service server BSF receives the B-TID and the first random character string or / and the NAF_Id sent by the user terminal.
  • the above-mentioned information for generating the first authentication key further includes the first fixed character string (1), since the fixed character string can be configured in advance with a fixed character string of the same value on the guidance service server BSF, the first character string can be omitted.
  • a fixed string (1) is sent to the BSF.
  • Step 304 The service server BSF is guided to obtain the second master key Ks according to the B-TID.
  • a correspondence relationship between the B-TID and the second master key Ks is stored on the guidance service server BSF.
  • Step 305 The service server BSF is guided to generate a second authentication key based on the second master key Ks.
  • the guidance service server BSF uses the same authentication key generation method as the user terminal, and generates a second authentication key based on the second master key Ks.
  • the guide service server BSF uses the second master key Ks as the first authentication key.
  • the second authentication key is the same authentication key generation method as that of the user terminal in step 302 as an example.
  • the user terminal is based on including the first master key Ks and the first fixed character string (1) or / and the first random character string or / And the first timestamp or / and the B-TID or / and NAF_Id to generate a first authentication key
  • guide the service server BSF based on including the second master key Ks and the first fixed character string (2) or / and A first random character string or / and a first time stamp or / and the B-TID or / and NAF_Id information is used to generate a first authentication key
  • the second authentication key is generated in a manner that is similar to the first authentication key generated by the user terminal.
  • the key generation method is the same; wherein the first fixed character string (2) is a character string that is pre-configured and has the same value as the first fixed character string (1) that is pre-configured by the user terminal, the first random character string or / And the first time stamp or / and NAF_Id are sent by the user terminal.
  • the value of the first master key Ks corresponding to the same B-TID on the user terminal and the second master key Ks corresponding to the bootstrap service server BSF are the same.
  • the first authentication key and the second authentication key are generated using the same key generation method and based on the master key Ks having the same value. Therefore, the values of the first authentication key and the second authentication key are also the same.
  • the second sub-process the user terminal and the guidance service server BSF generate the same verification information. This can include:
  • Step 306. The user terminal generates first authentication information.
  • the user terminal generates first verification information, so that the first verification information is used for encryption, and the first verification information is made to have the same value as the second verification information generated by the guidance service server BSF.
  • the user terminal may use one of the second fixed character string (1) or the second random character string or the second time stamp or the B-TID or the NAF_Id as the first verification information; or, the user terminal may The character string (1) or / and the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id information generates first verification information, for example, the user terminal sends a second fixed character string (1) or / and the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id combination to generate the first verification information.
  • the second fixed character string (1) is a pre-configured character string having the same value as the second fixed character string (2) pre-configured on the guidance service server BSF, and the second random character string is generated locally and randomly.
  • a character string, and the second timestamp is generated by acquiring the current system time of the user terminal.
  • the user terminal sends the information for generating the first verification information to the guidance service server BSF.
  • the user terminal After the user terminal generates the first authentication information, in order to cause the guided service server BSF to generate the second authentication information having the same value as the first authentication information, if the generated first authentication information further includes a second random character string or / and a second Timestamp or / and the B-TID or / and the NAF_Id, and uses a signature encryption algorithm to sign and encrypt the first verification information to generate a first encrypted value, then the second random string or / and the second timestamp Or / and the B-TID or / and the NAF_Id are sent to the guidance service server BSF.
  • the guidance service server BSF receives the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id sent by the user terminal.
  • the above-mentioned information for generating the first verification information further includes a second fixed character string (1), since the fixed character string can be configured in advance with a fixed character string of the same value on the guidance service server BSF, the second character string can be omitted
  • the fixed character string (1) is sent to the guidance service server BSF.
  • the generated first verification information further includes the second random character string or / and the second timestamp or / and the B-TID or / and the NAF_Id
  • the first verification information is obtained by using a symmetric encryption algorithm
  • the first encrypted value is generated by symmetric encryption. Since the first authentication information can be obtained after decrypting the first encrypted value, the second random string or / and the second time stamp or / and the B can be omitted.
  • the TID or / and the NAF_Id is sent to the guidance service server BSF.
  • this step can also be combined with the above step 303 into one step for implementation, that is, the user terminal can send the B-TID, the information for generating the first authentication key, and the information for generating the first authentication information at the same time in one transmission request.
  • the guidance service server BSF correspondingly, the above-mentioned corresponding steps of the guidance service server BSF generating the second authentication key and generating the second authentication information are also implemented after the combined step.
  • Step 308 Guide the service server BSF to generate the second verification information.
  • the service server BSF is guided to generate the second verification information, and the value of the generated second verification information is the same as the value of the first verification information generated by the user terminal.
  • step 406 Taking the method of generating the same authentication information as in step 406 as an example, if the user terminal uses one of the second fixed character string (1) or the second random character string or the second time stamp or the B-TID or the NAF_Id as The first verification information will guide the service server BSF to use the second fixed character string (2) or the second random character string or the second time stamp or the B-TID or the NAF_Id as the second verification information.
  • step 306 Taking the method of generating the same authentication information as step 306 as an example, if the user terminal includes a second fixed character string (1) or / and a second random character string or / and a second time stamp or / and the B-TID or / And the NAF_Id information to generate the first verification information, then guide the service server BSF to include the second fixed character string (2) or / and the second random character string or / and the second time stamp or / and the B-TID or / And the NAF_Id information generates second verification information.
  • the service server BSF is guided to send the second fixed character string (2) or / and the second random character string or / and the second time stamp or / and the B-TID or / Combined with the NAF_Id to generate second verification information.
  • the second fixed character string (2) is a character string that is pre-configured and has the same value as the second fixed character string (1) that is pre-configured on the user terminal, the second random character string or / and the second The timestamp or NAF_Id is sent by the user terminal.
  • the values of the first verification information and the second verification information are also the same.
  • the guidance service server BSF compares the second time stamp with the current system time of the guidance service server BSF. , Determine whether the time difference between the two is within the preset valid range: if it is within the valid range, then perform the following steps; if it is not within the valid range, then do not perform the following steps, and end this time based on GBA Client registration and key sharing methods.
  • the third sub-process The user terminal and the guided service server BSF implement security authentication based on an authentication key having the same value and authentication information having the same value. This can include:
  • Step 309 The user terminal encrypts and generates a first encrypted value based on the first authentication key and the first authentication information.
  • the user terminal encrypts and generates a first encrypted value based on the first authentication key and the first authentication information.
  • a first encrypted value based on the first authentication key and the first authentication information.
  • multiple implementations can be included, including at least:
  • the user terminal uses a signature encryption algorithm to sign-encrypt the first verification information based on the first authentication key to generate a first encrypted value.
  • the user terminal uses a signature encryption algorithm based on the first authentication key to sign and encrypt the first verification information.
  • the first encryption value is a signature value.
  • the signature value can uniquely identify the first verification information. Only the same signature is used. Only the encryption algorithm, the signature key with the same value, and the information to be signed with the same value can generate the same signature value.
  • the signature encryption algorithm uses a hash message authentication code as an example.
  • Signature SHA256 (k
  • the user terminal uses a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate a first encrypted value.
  • the user terminal uses a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate a first encrypted value.
  • the first encrypted value is a cipher text of the information including the first authentication information. Only the same symmetric encryption algorithm and the same value of the key can be used to decrypt the ciphertext to obtain the original plaintext.
  • the above-mentioned information including the first verification information means that the generated information also includes the first verification information and other information, for example, information generated after combining the first verification information and other information, and for the other information, Information, unless otherwise specified, is not limited in this embodiment.
  • Step 310 The user terminal sends a security authentication request to the guidance service server BSF, where the security authentication request includes the first encrypted value.
  • the user terminal sends a security authentication request to the boot service server BSF, where the security authentication request includes the first encrypted value, so that the boot service server BSF implements security authentication of the user terminal by verifying the first encrypted value.
  • the guidance service server BSF receives the security authentication request sent by the user terminal, and obtains the first encrypted value included in the security authentication request.
  • this step can also be combined with the above step 303 or / and step 307 into a single step for implementation, that is, the user terminal can send the security authentication request with the information of sending the B-TID and generating the first authentication key, or sending the first A step of verifying the information of the information is simultaneously sent to the guidance service server BSF in one transmission request. Accordingly, the corresponding steps of the guidance service server BSF generating the second authentication key and generating the second authentication information are also in the combined step. After implementation.
  • Step 311 The service server BSF is guided to verify the first encrypted value based on the second authentication key and the second verification information.
  • the guidance service server BSF needs to use the corresponding implementation manner to verify the first encrypted value based on the second authentication key and the second verification information.
  • the first implementation manner corresponds to the implementation manner in which the user terminal uses the signature encryption algorithm to generate the first encrypted value, and guides the service server BSF to use the same signature encryption algorithm as the user terminal, based on the second authentication key and the second
  • the verification information verifies the first encrypted value.
  • Step 311a The service server BSF is guided to use the same signature encryption algorithm as the user terminal to sign and encrypt the second verification information based on the second authentication key to generate a second encryption value.
  • the guidance service server BSF uses the same signature encryption algorithm as the user terminal to encrypt and sign the second verification information based on the second authentication key to generate a signature value, and the signature value is also expressed herein as a second encryption value.
  • the second authentication information and the first authentication information are the information to be signed with the same value, and the second authentication key and the first authentication key are the same value.
  • the signing key the second encrypted value and the first encrypted value generated should be the same.
  • Step 311b The service server BSF is guided to compare whether the second encrypted value is consistent with the first encrypted value; if they are consistent, it is determined that the security verification is successful.
  • the service server BSF is guided to use the same symmetric encryption algorithm as the user terminal to verify based on the second authentication key and the second verification information.
  • the second encrypted value can include:
  • Step 311i The service server BSF is guided to use the same symmetric encryption algorithm as the user terminal, decrypt the first encrypted value based on the second authentication key to obtain a plaintext, and obtain the first verification information from the plaintext.
  • the service server BSF is guided to use the same symmetric encryption algorithm as the user terminal to decrypt the first encrypted value based on the second authentication key, so as to obtain the decrypted plaintext.
  • the first verification information can be obtained from the plain text.
  • Step 311ii The service server BSF is guided to compare whether the second verification information is consistent with the first verification information; if they are consistent, it is determined that the security verification is successful.
  • Step 312. The service server BSF is guided to determine whether the security authentication is successful and perform a corresponding operation according to the verification result of the first encrypted value.
  • the guided service server BSF can provide the required data and services to the user terminal, such as sending a registration success response message to the user terminal, or providing registration information and services to the user terminal.
  • the user terminal may receive data and services provided by the guided service server BSF as needed, for example, receive a registration success response message sent by the guided service server BSF, or receive registration information and information provided by the guided service server BSF. Services, etc.
  • the guidance service server BSF can provide the required data and services to the user terminal, including sending a registration failure response message to the user terminal.
  • the user terminal After determining that the security authentication fails, the user terminal receives a registration failure response message and the like sent by the guidance service server BSF.
  • the method provided in this embodiment is mainly based on the B-TID and the first master key Ks in the user terminal, and based on the same B-TID and the corresponding second master stored in the boot service server BSF.
  • the key Ks guides the service server BSF to perform security authentication on the user terminal by using the same encryption algorithm as the user terminal. After the security authentication is successful, it can provide the user terminal and the third-party application client running on the user terminal with a corresponding security. Register information and services, and return a registration success response message to the user terminal.
  • FIG. 5 shows a flowchart of a second embodiment of a GBA-based client registration and key sharing method provided by the present invention.
  • the method can be used in the implementation environment shown in FIG. 2.
  • This embodiment further provides registration information for a third-party application client running in the user terminal, where the registration information includes an application key.
  • the user terminal In order for the guided service server BSF to provide corresponding registration information and services for the third-party application client running in the user terminal, the user terminal needs to pass the NAF_Id corresponding to the third-party application client to the guided service server BSF.
  • the user terminal passing the NAF_Id to the guided service server BSF may include various implementation manners, for example, it may include:
  • the user terminal sends the NAF_Id to the guidance service server BSF, and the guidance service server BSF receives the NAF_Id.
  • the user terminal sends the NAF_Id to the guidance service server BSF.
  • the NAF_Id can be sent to the guidance service server BSF in a separate transmission request, or the NAF_Id can be combined in the security authentication request or other transmission request to the guidance service server.
  • the BSF is, for example, incorporated in the security authentication request in the foregoing or step 310, or in the related steps in which the user terminal sends an authentication key or authentication information in step 303 or / and step 307.
  • the service server BSF is guided to receive the NAF_Id sent by the user terminal.
  • the user terminal encrypts the NAF_Id, and sends the encrypted cipher text to the guidance service server BSF, and the guidance service server BSF decrypts the cipher text to obtain the NAF_Id.
  • the user terminal uses the same key generation method to generate an encryption key with the same value based on the first master key Ks and the guidance service server BSF based on the second master key Ks.
  • the user terminal uses a symmetric encryption algorithm and the encryption key pair.
  • the NAF_Id is encrypted, and the encrypted cipher text is sent to the guidance service server BSF.
  • the guidance service server BSF decrypts the encryption key with the same value to obtain the NAF_Id.
  • the user terminal uses a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate a first encrypted value, and then includes The information of the first verification information includes the NAF_Id. Therefore, in the second embodiment of step 411, the service server BSF is guided to obtain the NAF_Id from the decrypted plaintext.
  • the guided service server BSF can provide the registration information including the application key to the third-party application client running in the user terminal, that is, the following steps of this embodiment apply for registration on the GBA-based client And the key sharing method after the first embodiment. This can include:
  • Step 401 Guide the service server BSF to generate a second application key based on the second master key Ks.
  • the guidance service server BSF uses a key derivation algorithm to generate a second application key based on the second master key Ks. Further, the guidance service server BSF uses a key derivation algorithm based on the second master key Ks and / or a salt value, And / or RAND, and / or IMPI, and / or NAF_Id to generate a second application key.
  • Key KDF (Ks, Salt, RAND, IMPI, NAF_Id).
  • Key is the second application key
  • Ks is the second master key Ks
  • Salt is the salt value, which can be a fixed string or a random value. When it is a random value, then The guiding service server BSF must send this value to the user terminal
  • RAND is the RAND generated during the GBA initialization process
  • IMPI is the IMPI corresponding to the B-TID
  • NAF_Id is the NAF_Id obtained from the client registration request
  • KDF is the key derivation function .
  • Ks is a required parameter
  • Salt, RAND, IMPI, and NAF_Id are optional parameters.
  • Step 401a The service server BSF is guided to obtain the corresponding IMPI according to the B-TID.
  • the corresponding relationship between the B-TID and the IMPI is stored on the boot service server BSF, that is, the corresponding IMPI can be found and obtained according to the B-TID.
  • Step 401b The service server BSF is guided to obtain the RAND according to the B-TID.
  • the corresponding relationship between the B-TID and the RAND is stored on the boot service server BSF, that is, the corresponding RAND can be found and obtained according to the B-TID.
  • the generation format of the B-TID is "base64encode (RAND) @BSF_servers_domain_name"
  • the corresponding RAND can also be obtained from the B-TID.
  • Step 401c The guidance service server BSF generates a second application key based on the second master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id.
  • the guide service server BSF generates a second application key based on the second master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id, and the calculation formula is:
  • KDF Ks, "gba-me”, RAND, IMPI, NAF_Id
  • Step 402. The service server BSF is guided to establish a correspondence between the B-TID and the NAF-Id and the second application key.
  • the service server BSF is guided to establish a correspondence between the B-TID and the NAF-Id and the second application key, so that the second application key can be found according to the B-TID and the NAF-Id.
  • the guidance service server BSF has established the correspondence between the B-TID and the NAF-Id and the second application key.
  • the guidance service server BSF can store the correspondence locally or send the correspondence to a third-party authentication server. Or send the correspondence to a third-party application server corresponding to the NAF_Id. Then, based on the corresponding relationship, if the third-party application client running on the user terminal has the same B-TID and the same application key as the value of the second application key, the identity of the third-party application client can be realized Authentication, data encryption, etc.
  • the guidance service server BSF has previously established an account key relationship table for the NAF_Id, and the account key relationship table stores the B-TID and the second application key.
  • the account key relationship table stores the B-TID and the second application key.
  • One-to-one correspondence Guide the service server BSF to find the second application key in the account key relationship table according to the B-TID. If the second application key is not found, add the B-TID and The one-to-one correspondence of the second application key. If a second application key is found, the newly-generated second application key is used in the account key relationship table to replace the existing B-TID. The second application key.
  • steps 401 and 402 may also be performed after the following step 403, which is not limited in the present invention.
  • Step 403. The service server BSF is guided to send a registration response message to the user terminal, where the registration response message is a registration success response message.
  • the registration success response message sent to the user terminal also includes the Salt salt value.
  • Step 404 The user terminal receives the registration response message sent by the guided service server BSF and performs a corresponding operation.
  • the user terminal receives a registration response message sent by the guided service server BSF, and the registration response message is a registration success response message or a registration failure response message.
  • the user terminal performs corresponding operations according to the client registration response message, including:
  • step 405 is performed.
  • the process is ended, or the user terminal ends the process after sending the registration failure response message to a third-party application client.
  • Step 405 The user terminal uses the same application key generation method as the bootstrap service server BSF, and generates a first application key based on the first master key Ks.
  • the user terminal uses the same application key generation method as the bootstrap service server BSF, and generates a first application key based on the first master key Ks.
  • Key KDF (Ks, Salt, RAND, IMPI, NAF_Id).
  • Key is the first application key
  • Ks is the first master key
  • Salt is the same salt value as the boot service server BSF.
  • salt is the same If the salt value of the boot service server is a random value, the user terminal obtains the salt value from the registration success response message;
  • RAND is the RAND generated during the GBA initialization process;
  • IMPI is the IMPI of the user terminal;
  • NAF_Id Is the NAF_Id corresponding to the third-party application client;
  • KDF is the same key derivation function as the BSF of the boot service server.
  • Ks is a required parameter, Salt, RAND, IMPI, NAF_Id are optional parameters, and the optional parameters selected are consistent with the guidance service server BSF.
  • the key derivation algorithm formula Key KDF (Ks, "gba-me”, RAND, IMPI, NAF_Id) as an example, the first application key generation steps are as follows:
  • Step 405a The user terminal acquires the IMPI of the user terminal.
  • the user terminal obtains the IMPI of the user terminal, and the IMPI is the same IMPI obtained during the GBA initialization process.
  • an IMPI is obtained from an IP Multimedia Services Identity Module (ISIM) using a method consistent with the GBA initialization process.
  • ISIM IP Multimedia Services Identity Module
  • Step 405b The user terminal obtains RAND.
  • the B-TID and the corresponding RAND are stored on the user terminal, and the user terminal obtains the RAND.
  • the generation format of the B-TID is "base64encode (RAND) @BSF_servers_domain_name"
  • the corresponding RAND can also be obtained from the B-TID.
  • Step 405c The user terminal generates a first application key based on the first master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id.
  • the user terminal generates a second application key based on the first master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id, and the calculation formula is:
  • KDF Ks, "gba-me”, RAND, IMPI, NAF_Id
  • the B-TID stored on the user terminal and the corresponding RAND, Ks (that is, the first master key Ks) and the RAND corresponding to the B-TID stored on the boot service server BSF Ks (that is, the second master key Ks) is the same, and the IMPI obtained on the user terminal and the IMPI corresponding to the B-TID stored on the guided service server BSF are the same, and because the user terminal and the guided service server BSF are the same. If the same application key generation method, the same NAF_Id, and the same salt value are used, the values of the generated first application key and the second application key are the same.
  • the user terminal sends the B-TID and the first application key to the third-party application client corresponding to the NAF_Id. Based on the B-TID and the first application key, the third-party application client can quickly implement the third-party application server. , Secure identity authentication, data encryption and other operations.
  • an application key is further generated on the user terminal and the guidance service server BSF for the third-party application client on the user terminal, which not only has the effects of the first embodiment
  • the second aspect even if multiple key sharing processes are performed for the same third-party application client after the same GBA initialization process, if a random value is used by Salt, it is generated.
  • the application keys are also different for better security.
  • FIG. 5 illustrates a flowchart of a third embodiment of a GBA-based client registration and key sharing method provided by the present invention.
  • the method can be used in the implementation environment shown in FIG. 2.
  • This embodiment further provides registration information for a third-party application client running in the user terminal, and the registration information includes generating a user token for the third-party application client running in the user terminal.
  • the user terminal In order for the guided service server BSF to provide corresponding registration information and services for the third-party application client running in the user terminal, the user terminal needs to pass the NAF_Id corresponding to the third-party application client to the guided service server BSF.
  • the user terminal passing the NAF_Id to the guidance service server BSF may include various implementation manners. For specific implementation manners, reference may be made to the second embodiment of the above-mentioned GBA-based client registration and key sharing method, and details are not described herein again.
  • the guided service server BSF can provide the registration information including the user token to the third-party application client running in the user terminal, that is, the following steps of this embodiment apply for registration on the GBA-based client And the key sharing method after the first embodiment. This can include:
  • Step 501 The service server BSF is guided to generate a user token for the NAF_Id.
  • the service server BSF is guided to generate a user token for the NAF_Id.
  • the user token is unique and has sufficient length and sufficient randomness, making it difficult to be guessed and cracked.
  • Step 502. The service server BSF is guided to establish an association relationship between the user token and the NAF_Id or / and the IMPI corresponding to the B-TID.
  • the guide service server BSF can store the association locally, or send the association to the third-party authentication server synchronously, or send the association to the NAF_Id synchronously.
  • Corresponding third-party application server Corresponding third-party application server. Then, based on the association, if the third-party application client running on the user terminal has the same user token, the third-party application server can implement authentication to the third-party application client according to the association, for example, to the user For example, the token is sent to the third-party application server corresponding to the NAF_Id.
  • the third-party application server receives an authentication request including a user token, and searches for the corresponding user token in the association relationship. If so, the authentication succeeds. , Thereby determining that the sender of the authentication request is a third-party application client corresponding to the third-party application server.
  • an association relationship between the user token and the IMPI corresponding to the NAF_Id and the B-TID should be established so that the corresponding user terminal can be found according to the user token NAF_Id and IMPI to provide continuous service for the same user.
  • the third-party application server receives an authentication request including a user token, and searches for the corresponding IMPI in the association according to the user token. If found, it can provide continuous application services to users associated with the IMPI.
  • a cleaning mechanism should also be provided, and the corresponding association relationship should be cleared in time for the user token that has expired, such as deleting the corresponding association relationship of the user token after the user token is verified once, or setting the user token Set a valid period, and delete the corresponding association relationship of the user token that has expired in time according to the valid period.
  • the specific cleaning mechanism will not be repeated here.
  • Step 503. The service server BSF is guided to send a registration response message to the user terminal, where the registration response message is a registration success response message and includes the user token.
  • Step 504 The user terminal receives the registration response message sent by the guided service server BSF and performs a corresponding operation.
  • the user terminal receives a registration response message sent by the guided service server BSF, and the registration response message is a registration success response message or a registration failure response message.
  • the user terminal performs corresponding operations according to the registration response message, including:
  • the registration response message is a registration success response message
  • obtain the user token in the registration success response message and pass the user token to the third-party application client corresponding to NAF_Id for authentication and authentication, and then end this Process.
  • the process is ended, or the user terminal ends the process after sending the registration failure response message to a third-party application client.
  • the process of the above embodiment generates a user token for a third-party application client running in the user terminal.
  • the effects include: in the first aspect, automatically obtaining user tokens for third-party application clients, reducing end-user input operations and improving the user experience; in the second aspect, the user token can be used for The third-party application client authenticates to the corresponding third-party application server, thereby improving the user experience.
  • the user token when used for authentication, the user token does not need to perform operations such as cryptographic calculations. Suitable for some lightweight application clients (such as browser-based web applications).
  • FIG. 6 shows a flowchart of a fourth embodiment of a GBA-based client registration and key sharing method provided by the present invention.
  • the method can be used in the implementation environment shown in FIG. 2.
  • this embodiment further implements the authorization confirmation process of the end user.
  • the following steps of this method are based on the GBA-based client registration and key sharing method embodiment two, which is applied after the user terminal passes the NAF_Id and security authentication to the guided service server BSF, and the application is applied to the guided service server BSF as Before the third-party application client running in the user terminal provides the registration information including the application key, it specifically includes the following steps:
  • Step a Guide the service server BSF to send an application authorization request message to the user terminal.
  • the application authorization request message may include:
  • the corresponding relationship between the NAF_Id and the third-party application name is pre-stored on the boot service server BSF to guide the service server BSF Find and obtain the corresponding third-party application name in the corresponding relationship according to the NAF_Id.
  • the name is used to identify the mobile user.
  • the correspondence between the IMPI and the name of the mobile user is stored in the guidance service server BSF in advance.
  • the guidance service server BSF searches and obtains the correspondence according to the IMPI.
  • the IMPI is obtained by the guidance service server BSF according to the B-TID: After the GBA initialization process, the correspondence relationship between the B-TID and IMPI is stored on the guidance service server BSF, that is, the corresponding IMPI can be found and obtained according to the B-TID to guide the service.
  • the server BSF searches for and obtains the corresponding IMPI in the corresponding relationship according to the B-TID.
  • the user terminal receives the application authorization request message sent by the guidance service server BSF.
  • Step b The user terminal displays an application authorization verification interface.
  • the user terminal After receiving the application authorization request message sent by the service server BSF, the user terminal invokes and displays the application authorization verification interface to ask the end user whether to agree to authorize the third-party application.
  • the third-party application name or / and mobile user name included in the application authorization request message can be displayed, specifically:
  • Third-party application name which is the name of the third-party application client and third-party application server to be authorized
  • Mobile user name the name of the mobile user to be authorized.
  • the end user can enter authorization information indicating confirmation of authorization or cancellation of authorization.
  • a security verification code input box may also be included to ask the end user to enter a security verification code.
  • the security verification code is used to further verify the authorization of the end user.
  • the corresponding relationship between the B-TID and the security verification code is stored in advance on the guidance service server BSF.
  • Step c The user terminal receives authorization information entered by the end user in the application authorization verification interface.
  • Step d The user terminal sends an application authorization response message to the guidance service server BSF, where the application authorization response message is an application authorization confirmation message or an application authorization cancellation message.
  • the user terminal performs corresponding operations according to the authorization information input by the terminal user, including:
  • the application authorization response message sent by the user terminal to the guidance service server BSF is an application authorization confirmation message.
  • a security verification code input box is further included on the displayed application authorization verification interface, and the authorization message input by the end user received by the user terminal includes the security verification code, the user terminal sends the application authorization to the guidance service server BSF
  • the confirmation message also includes the security verification code.
  • the application authorization response message sent by the user terminal to the guidance service server BSF is an application authorization cancellation message.
  • Step e Guide the service server BSF to receive the application authorization response message sent by the user terminal and perform the corresponding operation.
  • the guidance service server BSF receives an application authorization response message sent by the user terminal, where the application authorization response message is an application authorization response message indicating confirmation of authorization or cancellation of authorization.
  • the corresponding relationship between the B-TID and the security verification code is stored in the guidance service server BSF in advance. If the application authorization confirmation message received by the guidance service server BSF includes the security verification code, the guidance service server BSF according to B- TID finds and obtains the corresponding security verification code in this correspondence, and compares whether the two security verification codes are consistent: if they are consistent, the subsequent steps are continued; if they are not consistent, the process is ended without guiding the service server BSF to the user terminal.
  • a third-party application client running in the process of providing registration information including a third-party user ID and application key
  • the process ends, and the process of directing the service server BSF to provide the third-party application client running in the user terminal with registration information including the third-party user identification and application key is not performed.
  • the method provided in this embodiment is based on the first embodiment of the GBA-based client registration and key sharing method, and adds a process for the end user to verify and authorize. By adding this process, the client registration information can be more confirmed.
  • the provision has obtained the authorization permission of the end user, so as to prevent the unnecessary third party application client from being authorized due to misoperation and the like.
  • This embodiment can also be combined with the third embodiment of the GBA-based client registration and key sharing method to form a new embodiment, that is, to apply the method steps of this embodiment after the user terminal passes the NAF_Id to the boot service server BSF and the security authentication is successful Before the application guides the service server BSF to provide a third-party application client running in the user terminal with a process including a user token, the specific process is not described in detail.
  • the present invention also provides a client registration and key sharing device based on GBA.
  • the key sharing and identity authentication device is applied to a user terminal running a third-party application client, and includes: a memory , A processor, and a GBA-based client registration and key sharing program stored on the memory and executable on the processor, the GBA-based client registration and key sharing program being used by the processor Implement the steps of the above-mentioned GBA-based client registration and key sharing method when executed.
  • the present invention also provides a GBA-based client registration and key sharing device.
  • the key sharing and identity authentication device is used to guide a service server BSF, and includes: a memory, a processor, and a storage device.
  • the GBA-based client registration and key sharing program on the memory and which can be run on the processor, the GBA-based client registration and key sharing program is implemented by the processor to implement the above-mentioned based on Steps of GBA's client registration and key sharing method.
  • the present invention also provides a GBA-based client registration and key sharing system.
  • the GBA-based client registration and key sharing system includes: a user terminal and a guided service server BSF;
  • the user terminal includes the above-mentioned GBA-based client registration and key sharing device applied to a user terminal running a third-party application client;
  • the guided service server BSF includes the above GBA-based client registration and key sharing device applied to the guided service server BSF.
  • the present invention also provides a storage medium applied to a user terminal, which is characterized in that a program is stored in the storage medium, and the program is used to implement the application to a third party running as described above.
  • GBA-based client registration and key sharing method in a user terminal of an application client is characterized in that a program is stored in the storage medium, and the program is used to implement the application to a third party running as described above.
  • the present invention also provides a storage medium applied to the boot service server BSF, which is characterized in that a program is stored in the storage medium, and the program is used to implement the application boot service server as described above.
  • the methods, devices, and systems of the present invention can be implemented in many ways.
  • the methods and systems of the present invention can be implemented by software, hardware, firmware or any combination of software, hardware, firmware.
  • the above-mentioned order of the steps of the method is merely for the purpose of illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless specifically stated otherwise.
  • the present invention can also be implemented as programs recorded in a recording medium, which programs include machine-readable instructions for implementing the method according to the present invention.
  • the present invention also covers a recording medium storing a program for executing the method according to the present invention.
  • the present invention provides a secure registration environment for third-party application clients running in user terminals after the GBA initialization process, and guides the service server BSF to provide corresponding registration information and only for authenticated user terminals. Services, including the generation of application keys, effectively solve the technical shortcomings of the GBA architecture application described in the background in the field of Internet technology.

Landscapes

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

Abstract

Disclosed are a GBA-based client registration and key sharing method, device, and system. The method comprises: a user terminal running a third-party application client performing security authentication with a bootstrapping server function (BSF) on the basis of a B-TID acquired during a GBA bootstrapping and a key generated during the GBA bootstrapping; and after the security authentication succeeds, the BSF providing secure registration information and service for the third-party application client, and generating a user token or an application key for the third-party application client. The invention solves the issue in which a third-party application server generates a malicious counterfeit request to consume computation and storage resources of a BSF and other third-party application servers, and also enables a third-party application server at the same user device to easily calculate an application key of another third-party application client.

Description

基于GBA的客户端注册和密钥共享方法、装置及***GBA-based client registration and key sharing method, device and system 技术领域Technical field
本发明涉及通信技术领域和互联网技术领域,尤其涉及一种基于通用引导架构(Generic Bootstrapping Architecture,GBA)的客户端注册和密钥共享方法、装置及***。       The present invention relates to the field of communication technology and Internet technology, and in particular, to a generic boot architecture-based (Generic Bootstrapping Architecture (GBA) client registration and key sharing method, device and system.
背景技术Background technique
3GPP规范TS 33.220定义了一种适用于移动网络的通用安全认证机制—通用引导架构(Generic Bootstrapping Architecture,GBA),它属于通用认证架构(Generic Authentication Architecture,GAA)的一部分。The 3GPP specification TS 33.220 defines a universal security authentication mechanism suitable for mobile networks-Generic Boot Architecture (Generic Bootstrapping Architecture (GBA), which is part of the Generic Authentication Architecture (GAA).
GBA提供了一种基于认证和密钥协商机制(authentication and key agreement,AKA)在用户终端(user equipment,UE)和网络应用服务器(network application function,NAF)之间建立应用密钥的通用机制。GBA provides a mechanism based on authentication and key agreement (AKA) in user equipment (UE) and network application server (network application function (NAF).
GBA架构主要分为GBA初始化和应用密钥协商两个过程:The GBA architecture is mainly divided into two processes: GBA initialization and application key negotiation:
第一个过程是GBA初始化过程(GBA Bootstrapping):UE和引导业务服务器(bootstrapping server function,BSF)、BSF和归属用户服务器(home subscriber server,HSS)/归属位置寄存器(home location register,HLR)之间基于AKA机制进行密钥协商,最终UE和BSF协商出一个GBA主密钥Ks,以及产生一个引导事务标识(bootstrapping transaction identifier,B-TID),并且主密钥Ks和B-TID都分别存储在UE和BSF上。The first process is the GBA initialization process (GBA Bootstrapping: UE and bootstrapping service server server function (BSF), BSF, and home subscriber server The server (HSS) / home location register (HLR) performs key negotiation based on the AKA mechanism. In the end, the UE and BSF negotiate a GBA master key Ks and generate a bootstrapping identifier (bootstrapping). transaction identifier (B-TID), and the master keys Ks and B-TID are stored on the UE and BSF, respectively.
第二个过程是应用密钥协商过程(Bootstrapping Usage Procedure):UE与NAF协商应用密钥,NAF根据UE发送的应用密钥协商请求,从BSF中获取应用密钥和用户信息,随后UE和NAF之间使用此应用密钥进行认证、消息加密等操作。更具体地,参考图1所示,该应用密钥协商过程包括如下步骤:The second process is the application key negotiation process (Bootstrapping Usage Procedure): the UE negotiates the application key with NAF, and NAF obtains the application key and user information from the BSF according to the application key negotiation request sent by the UE, and then the UE and NAF Use this application key for authentication, message encryption, and other operations. More specifically, referring to FIG. 1, the application key negotiation process includes the following steps:
1.    UE通过Ua接口向NAF发送应用连接请求,且请求消息中携带有B-TID,同时UE采用如下公式生成应用密钥Ks_(ext/int)_NAF。本步骤之前可以事先建立TLS 链接,以保证Ua接口的通讯安全。1. The UE sends an application connection request to the NAF through the Ua interface, and the request message carries the B-TID. At the same time, the UE uses the following formula to generate the application key Ks_ (ext / int) _NAF. Before this step, a TLS link can be established in advance to ensure the communication security of the Ua interface.
在“GBA_ME”模式下的计算公式:Calculation formula in "GBA_ME" mode:
Ks_NAF = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)Ks_NAF = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)
或者,在“GBA_U”模式下的计算公式:Or, the calculation formula in "GBA_U" mode:
Ks_ext_NAF = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)Ks_ext_NAF = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)
Ks_int_NAF = KDF (Ks, "gba-u", RAND, IMPI, NAF_Id)Ks_int_NAF = KDF (Ks, "gba-u", RAND, IMPI, NAF_Id)
其中,Ks是GBA初始化过程中生成的主密钥Ks,“gba-me”和“gba-u”是固定字符串,RAND是GBA初始化过程中生成的随机数,IMPI是IP多媒体私有标识(IP Multimedia Private Identity),NAF_Id是NAF的标识,KDF是密钥导出函数的缩写。Among them, Ks is the master key Ks generated during the GBA initialization process, "gba-me" and "gba-u" are fixed strings, RAND is a random number generated during the GBA initialization process, and IMPI is an IP multimedia private identification (IP Multimedia Private Identity), NAF_Id is the identity of NAF, and KDF is the abbreviation of key derivation function.
NAF_Id由要访问的NAF的FQDN(Fully Qualified Domain Name,完全限定域名)和Ua 接口上的协议标识(UaID)连接而成,连接方法可表述为:NAF_Id = FQDN || UaID。The NAF_Id is formed by connecting the FQDN (Fully Qualified Domain Name) of the NAF to be accessed and the protocol identifier (UaID) on the Ua interface. The connection method can be expressed as: NAF_Id = FQDN || UaID.
2.    NAF 收到UE的应用连接请求后,向BSF发出认证请求消息,其中携带B-TID、NAF_Id。2. After receiving the application connection request from the UE, the NAF sends an authentication request message to the BSF, which carries the B-TID and NAF_Id.
3.    由于在第一个过程(即GBA初始化过程)完成后,BSF上已经存储有B-TID,以及存储有该B-TID对应的IMPI、主密钥Ks、Ks密钥有效期、GBA初始化时间、GBA 用户安全设置信息(GUSS,GBA User Security Settings)等。3. After the first process (that is, the GBA initialization process) is completed, the BSF has already stored the B-TID and the IMPI corresponding to the B-TID, the master key Ks, the Ks key validity period, the GBA initialization time, and the GBA User security settings information (GUSS, GBA User Security Settings), etc.
在BSF接收到NAF的认证请求后,BSF根据NAF_Id中的FQDN验证发送方的身份,并根据B-TID查找对应的主密钥Ks。After the BSF receives the NAF authentication request, the BSF verifies the identity of the sender according to the FQDN in the NAF_Id, and finds the corresponding master key Ks according to the B-TID.
如果BSF没有查找到对应的主密钥Ks或Ks已经过期,则BSF向NAF返回认证失败应答消息并要求UE重新发起GBA初始化过程。If the BSF does not find the corresponding master key Ks or Ks has expired, the BSF returns an authentication failure response message to the NAF and asks the UE to re-initiate the GBA initialization process.
如果查找到相应的主密钥Ks并且在有效期内,BSF再使用与UE相同的应用密钥计算公式计算出应用密钥Ks_(ext/int)_NAF,然后向NAF服务器返回认证成功应答消息,并根据预先的设置在认证成功应答消息中把Ks_(ext/int)_NAF、Ks_(ext/int)_NAF有效期、GBA初始化时间、以及对应的用户安全设置信息(user security settings, USS)等发给NAF。If the corresponding master key Ks is found and within the validity period, the BSF uses the same application key calculation formula as the UE to calculate the application key Ks_ (ext / int) _NAF, and then returns an authentication success response message to the NAF server, and According to the preset settings, Ks_ (ext / int) _NAF, Ks_ (ext / int) _NAF validity period, GBA initialization time, and corresponding user security settings (USS) are sent to NAF in the authentication success response message. .
4.    NAF存储Ks_(ext/int)_NAF和Ks_(ext/int)_NAF有效期信息后,返回认证成功应答消息给UE,这样UE和NAF之间建立了应用密钥Ks_(ext/int)_NAF,可以用于后续的认证、消息加密等操作。4. After NAF stores Ks_ (ext / int) _NAF and Ks_ (ext / int) _NAF validity period information, it returns an authentication success response message to the UE. In this way, an application key Ks_ (ext / int) _NAF is established between the UE and NAF. For subsequent authentication, message encryption and other operations.
GBA架构在IMS业务中已经得到了一定的应用,例如多媒体广播多播服务(multimedia broadcast/multicast service,MBMS)、安全用户平面定位(secure user plane location,SUPL)等业务。The GBA architecture has been used in IMS services, such as multimedia broadcast multicast services. broadcast / multicast service (MBMS), secure user plane location (SUPL) and other services.
技术问题technical problem
随着用户终端的智能化(如移动智能手机)以及在互联网技术领域的广泛使用,用户在用户终端上会安装有大量的第三方应用客户端,而第三方应用客户端在使用过程中,通常需要先进行用户的身份认证,并与对应的第三方应用服务器之间协商共享密钥以满足数据加密等方面的需要。如果能将GBA架构应用在此领域,将极大提高安全性和增强用户体验,然而GBA架构的第二个过程即应用密钥协商过程并不能满足这方面的要求,以第三方应用服务器相当于NAF为例说明,其存在如下技术缺陷:With the intelligentization of user terminals (such as mobile smartphones) and widespread use in the field of Internet technology, users will install a large number of third-party application clients on the user terminals. During the use of third-party application clients, usually The user's identity needs to be authenticated first, and the shared key must be negotiated with the corresponding third-party application server to meet the needs of data encryption and other aspects. If the GBA architecture can be applied in this field, it will greatly improve security and enhance user experience. However, the second process of the GBA architecture, the application key negotiation process, cannot meet this requirement. A third-party application server is equivalent to As an example, NAF has the following technical defects:
缺陷一:由于第三方应用服务器是由不同的第三方应用服务商提供的,又由于NAF_Id是较容易通过公开途径或者软件逆向获取的参数。第三方应用服务器通过收集第三方应用客户端的应用连接请求中携带的B-TID,然后根据该B-TID以及其他第三方应用服务器的NAF_Id生成应用连接请求,从而可以仿冒其他第三方应用客户端向其他第三方应用服务器发起应用连接,从而会使得BSF进行不必要的应用密钥Ks_(ext/int)_NAF生成计算,以及会使得其他第三方应用服务器存储不必要的应用密钥Ks_(ext/int)_NAF,由此会消耗BSF和其他第三方应用服务器的计算、存储资源。由于每个第三方应用服务器都可以收集B-TID,则收集的B-TID越多,对其他第三方应用服务器的潜在危害越大。Defect 1: Because the third-party application server is provided by a different third-party application service provider, and because NAF_Id is a parameter that is relatively easy to obtain through public channels or software reverse. The third-party application server collects the B-TID carried in the application connection request of the third-party application client, and then generates an application connection request according to the B-TID and the NAF_Id of the other third-party application server. Other third-party application servers initiate application connections, which will cause BSF to perform unnecessary application key Ks_ (ext / int) _NAF generation calculations, and will cause other third-party application servers to store unnecessary application keys Ks_ (ext / int ) _NAF, which will consume computing and storage resources of BSF and other third-party application servers. Since each third-party application server can collect B-TIDs, the more B-TIDs collected, the greater the potential harm to other third-party application servers.
缺陷二:由于用户终端上会安装有大量的第三方应用客户端,它们是由不同的第三方应用服务商提供的,但GBA现有机制中应用密钥Ks_(ext/int)_NAF的计算方法,其中的“gba-me”、“gba-u”是固定的字符串参数,IMPI是在同一用户终端内都相同的固定参数,Ks、RAND是在一个Ks有效期内都相同的参数,NAF_Id是较容易通过公开途径或者软件逆向获取的参数,因此,同一用户终端上的第三方应用客户端能够较容易地计算出其他第三方应用客户端的应用密钥Ks_(ext/int)_NAF,从而来仿冒其他第三方应用客户端的访问。Defect 2: Because a large number of third-party application clients will be installed on the user terminal, they are provided by different third-party application service providers, but the calculation method of the application key Ks_ (ext / int) _NAF in the GBA existing mechanism Among them, "gba-me" and "gba-u" are fixed string parameters, IMPI is a fixed parameter that is the same in the same user terminal, Ks and RAND are parameters that are the same during the validity period of Ks, and NAF_Id is It is easier to obtain the parameters through public channels or software reversely. Therefore, the third-party application client on the same user terminal can easily calculate the application key Ks_ (ext / int) _NAF of other third-party application clients, thereby counterfeiting. Access to other third-party application clients.
技术解决方案Technical solutions
本发明的主要目的在于提供一种基于GBA的客户端注册和密钥共享方法、装置及***,旨在为用户终端中运行的第三方应用客户端提供一种安全的注册方法、装置及***,解决第三方应用服务器仿冒恶意请求消耗引导业务服务器BSF和其他第三方应用服务器的计算、存储资源的问题,进而又解决第三方应用客户端能够较容易地计算出同一个用户终端上的其他第三方应用客户端的应用密钥的问题,从而更安全有效地让GBA架构应用在互联网技术领域。The main purpose of the present invention is to provide a method, device and system for client registration and key sharing based on GBA, which aims at providing a secure registration method, device and system for a third-party application client running in a user terminal. Solve the problem that the third-party application server spoofs malicious requests to consume the computing and storage resources of the business server BSF and other third-party application servers, and then solve the third-party application client's ability to easily calculate other third parties on the same user terminal. Application client application key issues, so that the GBA architecture is more securely and effectively applied in the field of Internet technology.
为达到上述目的,本发明提供了以下技术方案:To achieve the above object, the present invention provides the following technical solutions:
第一方面,提供了一种基于GBA的客户端注册和密钥共享方法,应用于运行有第三方应用客户端的用户终端中,该方法包括:In a first aspect, a GBA-based client registration and key sharing method is provided, which is applied to a user terminal running a third-party application client. The method includes:
基于GBA的客户端注册和密钥共享方法,其特征在于,应用于运行有第三方应用客户端的用户终端中,所述方法包括:The GBA-based client registration and key sharing method is characterized in that the method is applied to a user terminal running a third-party application client, and the method includes:
执行GBA初始化过程,获取B-TID和生成第一主密钥Ks;Execute GBA initialization process, obtain B-TID and generate first master key Ks;
基于所述第一主密钥Ks生成第一认证密钥;Generating a first authentication key based on the first master key Ks;
生成第一验证信息,并且使得所述第一验证信息与所述引导业务服务器BSF生成的第二验证信息的值相同;Generating first verification information, and making the first verification information the same value as the second verification information generated by the guidance service server BSF;
基于所述第一认证密钥和所述第一验证信息加密生成第一加密值;Generating a first encrypted value based on the first authentication key and the first verification information;
将所述B-TID和所述第一加密值发送给所述引导业务服务器BSF;Sending the B-TID and the first encrypted value to the guided service server BSF;
接收所述引导业务服务器BSF提供的注册信息和服务,所述注册信息和服务是在所述引导业务服务器BSF验证所述第一加密值有效之后提供的。Receiving registration information and services provided by the guided service server BSF, where the registration information and services are provided after the guided service server BSF verifies that the first encrypted value is valid.
优选的,所述基于所述第一主密钥Ks生成第一认证密钥包括:将所述第一主密钥Ks作为所述第一认证密钥;或者,基于包括所述第一主密钥Ks以及第一固定字符串或/和第一随机字符串或/和第一时间戳或/和所述B-TID或/和NAF_Id的信息生成第一认证密钥,并且所述第一认证密钥的生成方式与所述引导业务服务器BSF生成第二认证密钥的生成方式一致,所述第一固定字符串为预先配置的并且与所述引导业务服务器BSF预先配置的第一固定字符串的值相同的字符串,所述第一随机字符串为随机生成的字符串,所述第一时间戳为通过获取所述用户终端的当前***时间生成,所述NAF_Id是所述第三方应用客户端的标识;若生成所述第一认证密钥的信息包括所述第一随机字符串或/和第一时间戳或/和所述NAF_Id,则将所述第一随机字符串或/和所述第一时间戳或/和所述NAF_Id发送给所述引导业务服务器BSF。Preferably, the generating a first authentication key based on the first master key Ks includes: using the first master key Ks as the first authentication key; or, based on including the first master secret The key Ks and the first fixed character string or / and the first random character string or / and the first time stamp or / and the B-TID or / and NAF_Id information generate a first authentication key, and the first authentication The generation method of the key is the same as the generation method of generating the second authentication key by the guided service server BSF, and the first fixed character string is a first fixed character string that is pre-configured and pre-configured with the guided service server BSF A string with the same value, the first random string is a randomly generated string, the first timestamp is generated by obtaining the current system time of the user terminal, and the NAF_Id is the third-party application client If the information generating the first authentication key includes the first random character string or / and the first time stamp or / and the NAF_Id, the first random character string or / and the The first timestamp or / and the NAF_Id Send to the guidance service server BSF.
优选的,所述生成第一验证信息包括:基于第二固定字符串或/和第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id生成所述第一验证信息,并且所述第一验证信息的生成方式与所述引导业务服务器BSF生成第二验证信息的生成方式一致,所述第二固定字符串为预先配置的并且与所述引导业务服务器BSF预先配置的第二固定字符串的值相同的字符串,所述第二随机字符串为随机生成的字符串,所述第二时间戳为通过获取所述用户终端的当前***时间生成;若生成所述第一验证信息包括基于所述第二随机字符串或/和第二时间戳或/和所述NAF_Id,并且使用签名加密算法基于所述第一认证密钥对所述第一验证信息签名加密生成所述第一加密值,则将所述第二随机字符串或/和所述第二时间戳或/和所述NAF_Id发送给所述引导业务服务器BSF。Preferably, the generating the first verification information includes: generating the based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id. The first authentication information, and the generation method of the first authentication information is consistent with the generation method of generating the second authentication information by the guidance service server BSF, and the second fixed character string is pre-configured and is the same as the guidance service server A second fixed string pre-configured by the BSF with the same value, the second random string is a randomly generated string, and the second time stamp is generated by obtaining the current system time of the user terminal; Generating the first verification information includes based on the second random string or / and a second time stamp or / and the NAF_Id, and using a signature encryption algorithm to pair the first verification information based on the first authentication key. The signature encryption generates the first encrypted value, and then sends the second random character string or / and the second time stamp or / and the NAF_Id to the guidance service server BSF.
优选的,所述基于第二固定字符串或/和第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id生成所述第一验证信息包括:将所述第二固定字符串或所述第二随机字符串或所述第二时间戳或所述B-TID或所述NAF_Id中的一种作为所述第一验证信息;或者,根据包括所述第二固定字符串或/和所述第二随机字符串或/和所述第二时间戳或/和所述B-TID或/和所述NAF_Id的信息生成所述第一验证信息。Preferably, the generating the first verification information based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id includes: One of the second fixed character string or the second random character string or the second time stamp or the B-TID or the NAF_Id as the first verification information; or A second fixed character string or / and the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id information generates the first verification information.
优选的,所述基于所述第一认证密钥和所述第一验证信息加密生成第一加密值包括:使用签名加密算法基于所述第一认证密钥对所述第一验证信息签名加密生成所述第一加密值;或者,使用对称加密算法基于所述第一认证密钥对包括所述第一验证信息的信息对称加密生成所述第一加密值。Preferably, the encrypting and generating the first encrypted value based on the first authentication key and the first verification information includes: signing and encrypting the first verification information based on the first authentication key using a signature encryption algorithm. The first encrypted value; or, using a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate the first encrypted value.
优选的,若向所述引导业务服务器BSF传递了NAF_Id,则所述接收所述引导业务服务器BSF提供的注册信息和服务包括:基于所述第一主密钥Ks生成第一应用密钥,所述第一应用密钥的生成方式与所述引导业务服务器BSF生成第二应用密钥的生成方式一致,所述第一应用密钥用于在所述第三方应用客户端中作为应用密钥;或者,接收所述引导业务服务器BSF发送的用户令牌,所述用户令牌用于所述第三方应用客户端访问对应第三方应用服务器的认证鉴权。Preferably, if NAF_Id is passed to the guidance service server BSF, receiving the registration information and services provided by the guidance service server BSF includes: generating a first application key based on the first master key Ks, and The method of generating the first application key is consistent with the method of generating the second application key generated by the guided service server BSF, and the first application key is used as an application key in the third-party application client; Alternatively, a user token sent by the guided service server BSF is received, and the user token is used for the third party application client to access the corresponding third party application server for authentication.
优选的,所述向所述引导业务服务器BSF传递NAF_Id包括:在向所述引导业务服务器BSF发送的安全认证请求中还包括所述NAF_Id;或者,若使用对称加密算法基于所述第一认证密钥对包括所述第一验证信息的信息对称加密生成所述第一加密值,则在生成所述第一验证信息的信息中还包括所述NAF_Id,以使得所述引导业务服务器BSF从对所述第一加密值解密后的明文中获取所述NAF_Id。Preferably, the transmitting NAF_Id to the guidance service server BSF includes: further including the NAF_Id in the security authentication request sent to the guidance service server BSF; or, if a symmetric encryption algorithm is used based on the first authentication key The key pair including the first authentication information is symmetrically encrypted to generate the first encrypted value, and the information generating the first authentication information further includes the NAF_Id, so that the guided service server BSF retrieves the The NAF_Id is obtained in the plaintext after the first encrypted value is decrypted.
优选的,所述基于所述第一主密钥Ks生成第一应用密钥包括:基于所述第一主密钥Ks以及可选参数生成所述第一应用密钥;所述可选参数包括Salt、RAND、IMPI以及NAF_Id中的一个或多个,其中,Salt是与所述引导业务服务器BSF相同的盐值;RAND是所述GBA初始化过程中生成的RAND;IMPI是所述用户终端的IMPI;NAF_Id是所述NAF_Id;KDF是与所述引导业务服务器BSF相同的密钥导出函数;所述可选参数与所述引导业务服务器BSF生成第二应用密钥时的可选参数一致。Preferably, the generating a first application key based on the first master key Ks includes: generating the first application key based on the first master key Ks and optional parameters; the optional parameters include One or more of Salt, RAND, IMPI, and NAF_Id, where Salt is the same salt value as the guided service server BSF; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI of the user terminal NAF_Id is the NAF_Id; KDF is the same key derivation function as the guided service server BSF; the optional parameters are consistent with the optional parameters when the guided service server BSF generates a second application key.
优选的,在所述若向所述引导业务服务器BSF传递了NAF_Id之后,以及在所述接收所述引导业务服务器BSF提供的注册信息和服务之前,还包括:接收所述引导业务服务器BSF发送的应用授权请求消息;显示应用授权验证界面;接收终端用户在所述应用授权验证界面中输入的授权信息;若所述授权信息表示确认授权,则向所述引导业务服务器BSF发送应用授权应答消息,所述应用授权应答消息为应用授权确认消息。Preferably, after the NAF_Id is passed to the guidance service server BSF and before the receiving the registration information and services provided by the guidance service server BSF, the method further includes: receiving the information sent by the guidance service server BSF Receiving an application authorization request message; displaying an application authorization verification interface; receiving authorization information entered by a terminal user in the application authorization verification interface; and if the authorization information indicates authorization confirmation, sending an application authorization response message to the boot service server BSF, The application authorization response message is an application authorization confirmation message.
 Zh
第二方面,提供了一种基于GBA的客户端注册和密钥共享方法,应用于引导业务服务器BSF中,所述方法包括:In a second aspect, a method for client registration and key sharing based on GBA is provided, which is applied to guide a service server BSF, and the method includes:
接收用户终端发送的B-TID和第一加密值;Receiving the B-TID and the first encrypted value sent by the user terminal;
根据所述B-TID获取对应的第二主密钥Ks;Obtaining a corresponding second master key Ks according to the B-TID;
基于所述第二主密钥Ks生成第二认证密钥;Generating a second authentication key based on the second master key Ks;
生成第二验证信息,并且使得所述第二验证信息与所述用户终端生成的第一验证信息的值相同;Generating second verification information, and making the second verification information the same value as the first verification information generated by the user terminal;
基于所述第二认证密钥和所述第二验证信息验证所述第一加密值;Verifying the first encrypted value based on the second authentication key and the second verification information;
若验证所述第一加密值有效,则向所述用户终端提供注册信息和服务。If the first encrypted value is verified to be valid, registration information and services are provided to the user terminal.
优选的,所述基于所述第二主密钥Ks生成第二认证密钥包括:将所述第二主密钥Ks作为所述第一认证密钥;或者,基于包括所述第二主密钥Ks以及第一固定字符串或/和第一随机字符串或/和第一时间戳或/和所述B-TID或/和NAF_Id的信息生成第一认证密钥,并且所述第二认证密钥的生成方式与所述用户终端生成第一认证密钥的生成方式一致,所述第一固定字符串为预先配置的并且与所述用户终端预先配置的第一固定字符串的值相同的字符串,所述第一随机字符串或/和所述第一时间戳或/和所述NAF_Id为所述用户终端所发送的。Preferably, the generating a second authentication key based on the second master key Ks includes: using the second master key Ks as the first authentication key; or, based on including the second master key The key Ks and the first fixed character string or / and the first random character string or / and the first time stamp or / and the B-TID or / and NAF_Id information generate a first authentication key, and the second authentication The generation method of the key is the same as the generation method of generating the first authentication key by the user terminal, and the first fixed character string is pre-configured and has the same value as the first fixed character string pre-configured by the user terminal. A character string, the first random character string or / and the first timestamp or / and the NAF_Id are sent by the user terminal.
优选的,所述生成第二验证信息包括:基于第二固定字符串或/和第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id生成所述第二验证信息,并且所述第二验证信息的生成方式与所述用户终端生成第一验证信息的生成方式一致,所述第二固定字符串为预先配置的并且与所述用户终端预先配置的第二固定字符串的值相同的字符串,所述第二随机字符串或/和所述第二时间戳或/和所述NAF_Id为所述用户终端所发送的。Preferably, the generating the second verification information includes generating the second verification information based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id. The second authentication information, and the generation method of the second authentication information is consistent with the generation method of generating the first authentication information by the user terminal, and the second fixed character string is pre-configured and pre-configured by the user terminal A string with the same value in the second fixed string, and the second random string or / and the second time stamp or / and the NAF_Id are sent by the user terminal.
优选的,所述基于第二固定字符串或/和第二随机字符串或/和所述B-TID或/和所述NAF_Id生成所述第二验证信息包括:将所述第二固定字符串或所述第二随机字符串或所述第二时间戳或所述B-TID或所述NAF_Id中的一种作为所述第二验证信息;或者,根据包括所述第二固定字符串或/和所述第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id的信息生成所述第二验证信息。Preferably, generating the second verification information based on a second fixed character string or / and a second random character string or / and the B-TID or / and the NAF_Id includes: Or one of the second random character string or the second time stamp or the B-TID or the NAF_Id as the second verification information; or, according to including the second fixed character string or / Generating the second verification information with the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id information.
优选的,所述基于所述第二认证密钥和所述第二验证信息验证所述第一加密值包括:若所述用户终端使用签名加密算法生成所述第一加密值,则使用相同的签名加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值;或者,若所述用户终端使用对称加密算法生成所述第一加密值,则使用相同的对称加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值。Preferably, the verifying the first encrypted value based on the second authentication key and the second verification information includes: if the user terminal generates the first encrypted value using a signature encryption algorithm, using the same The signature encryption algorithm verifies the first encrypted value based on the second authentication key and the second verification information; or, if the user terminal generates the first encrypted value using a symmetric encryption algorithm, the same symmetric is used An encryption algorithm verifies the first encrypted value based on the second authentication key and the second verification information.
优选的,所述使用相同的签名加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值包括:使用和所述用户终端相同的签名加密算法,基于所述第二认证密钥对所述第二验证信息签名加密生成第二加密值;比较所述第二加密值与所述第一加密值是否一致;若一致,则确定所述第一加密值验证成功。Preferably, the using the same signature encryption algorithm to verify the first encryption value based on the second authentication key and the second verification information includes: using the same signature encryption algorithm as the user terminal, based on the The second authentication key signs and encrypts the second verification information to generate a second encrypted value; compares whether the second encrypted value is consistent with the first encrypted value; if they are consistent, it is determined that the verification of the first encrypted value is successful .
优选的,所述使用相同的对称加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值包括:使用和所述用户终端相同的对称加密算法,基于所述第二认证密钥对所述第一加密值解密获得明文,并从所述解密获得的明文中获取第一验证信息;比较所述第二验证信息与所述第一验证信息是否一致;若一致,则确定所述第一加密值验证成功。Preferably, using the same symmetric encryption algorithm to verify the first encryption value based on the second authentication key and the second verification information includes: using the same symmetric encryption algorithm as the user terminal, based on the The second authentication key decrypts the first encrypted value to obtain a plaintext, and obtains the first verification information from the decrypted plaintext; compares whether the second verification information is consistent with the first verification information; if they are consistent; , It is determined that the verification of the first encrypted value is successful.
优选的,若接收到所述用户终端传递的NAF_Id以及若验证所述第一加密值有效之后,所述向所述用户终端提供注册信息和服务包括:生成所述NAF_Id对应的用户令牌,所述用户令牌为用于所述第三方应用客户端访问对应第三方应用服务器的认证鉴权;向所述用户终端发送的注册成功应答消息中包括所述用户令牌,以使得所述用户令牌用于在所述NAF_Id对应的第三方应用客户端中访问对应第三方应用服务器的认证鉴权。Preferably, if the NAF_Id passed by the user terminal is received and if the first encrypted value is verified to be valid, the providing registration information and services to the user terminal includes: generating a user token corresponding to the NAF_Id, so that The user token is an authentication used for the third-party application client to access a corresponding third-party application server; the registration success response message sent to the user terminal includes the user token, so that the user command The card is used to access the authentication and authentication of the corresponding third-party application server in the third-party application client corresponding to the NAF_Id.
优选的,所述生成所述NAF_Id对应的用户令牌包括:使用随机生成的全局唯一字符串作为所述用户令牌;建立所述用户令牌和所述NAF_Id或/和所述B-TID对应的IMPI的关联关系。Preferably, the generating a user token corresponding to the NAF_Id includes: using a randomly generated globally unique character string as the user token; establishing a correspondence between the user token and the NAF_Id or / and the B-TID The relationship of IMPI.
优选的,若接收到所述用户终端传递的NAF_Id以及若验证所述第一加密值有效之后,则还包括:基于所述第二主密钥Ks生成第二应用密钥,所述第二应用密钥的生成方式与所述用户终端生成第一应用密钥的生成方式一致,并且建立所述B-TID和所 述NAF_Id与所述第二应用密钥的对应关系。Preferably, if the NAF_Id passed by the user terminal is received and if the first encrypted value is verified to be valid, the method further includes: generating a second application key based on the second master key Ks, and the second application The generation method of the key is consistent with the generation method of generating the first application key by the user terminal, and the correspondence between the B-TID and the NAF_Id and the second application key is established.
优选的,所述基于所述第二主密钥Ks生成第二应用密钥包括:基于所述第二主密钥Ks以及可选参数生成所述第二应用密钥;所述可选参数包括Salt、RAND、IMPI以及NAF_Id中的一个或多个,其中,Salt是与所述用户终端相同的盐值;RAND是所述GBA初始化过程中生成的RAND;IMPI是所述B-TID对应的IMPI;NAF_Id是所述NAF_Id;KDF是与所述用户终端相同的密钥导出函数;所述可选参数与所述用户终端生成第一应用密钥时的可选参数一致。Preferably, the generating a second application key based on the second master key Ks includes: generating the second application key based on the second master key Ks and optional parameters; the optional parameters include One or more of Salt, RAND, IMPI, and NAF_Id, where Salt is the same salt value as the user terminal; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI corresponding to the B-TID NAF_Id is the NAF_Id; KDF is the same key derivation function as the user terminal; the optional parameters are consistent with the optional parameters when the user terminal generates the first application key.
优选的,在若接收到所述用户终端传递的NAF_Id以及若验证所述第一加密值有效之后,以及向所述用户终端提供注册信息和服务之前,还包括:向所述用户终端发送应用授权请求消息,所述应用授权请求消息包括第三方应用名称或/和移动用户名称,所述第三方应用名称是根据所述NAF_Id获取的,所述移动用户名称是根据所述B-TID对应的IMPI获取的;接收所述用户终端发送的应用授权应答消息;若所述应用授权应答消息为应用授权确认消息,则执行向所述用户终端提供注册信息和服务的步骤。Preferably, after receiving the NAF_Id passed by the user terminal and if the first encrypted value is verified to be valid, and before providing registration information and services to the user terminal, the method further includes: sending an application authorization to the user terminal. Request message, the application authorization request message includes a third-party application name or / and a mobile user name, the third-party application name is obtained according to the NAF_Id, and the mobile user name is according to an IMPI corresponding to the B-TID Acquired; receiving an application authorization response message sent by the user terminal; and if the application authorization response message is an application authorization confirmation message, performing the steps of providing registration information and services to the user terminal.
 Zh
第三方面,提供一种基于GBA的客户端注册和密钥共享装置,其特征在于,所述装置应用于运行有第三方应用客户端的用户终端中,包括:存储器、处理器,所述处理器用于运行所述存储器所存储的程序,所述程序运行时执行包括上述应用于运行有第三方应用客户端的用户终端中的任一项所述方法。According to a third aspect, a GBA-based client registration and key sharing device is provided, which is characterized in that the device is applied to a user terminal running a third-party application client and includes: a memory, a processor, and the processor is used for When the program stored in the memory is executed, the method executes any one of the methods described above and applied to a user terminal running a third-party application client.
提供一种基于GBA的客户端注册和密钥共享装置,其特征在于,所述装置应用于引导业务服务器BSF,包括:存储器、处理器,所述处理器用于运行所述存储器所存储的程序,所述程序运行时执行包括上述应用于引导业务服务器BSF中的任一项所述方法。Provided is a GBA-based client registration and key sharing device, which is characterized in that the device is used to guide a service server BSF and includes a memory and a processor, where the processor is configured to run a program stored in the memory, When the program runs, the method includes any one of the methods described above and applied to a guided service server BSF.
提供一种基于GBA的客户端注册和密钥共享***,其特征在于,所述***包括:用户终端以及引导业务服务器BSF;所述用户终端包括上述应用于运行有第三方应用客户端的用户终端中所述的装置;所述引导业务服务器BSF包括上述应用于引导业务服务器BSF所述的装置。A client registration and key sharing system based on GBA is provided, which is characterized in that the system includes: a user terminal and a guided service server BSF; the user terminal includes the above-mentioned application in a user terminal running a third-party application client The device; the guided service server BSF includes the above-mentioned device applied to the guided service server BSF.
提供一种存储介质,其特征在于,所述存储介质中存储有程序,所述程序用于实现包括上述应用于运行有第三方应用客户端的用户终端中的任一项所述方法。A storage medium is provided, characterized in that a program is stored in the storage medium, and the program is configured to implement any one of the methods described above in a user terminal running on a third-party application client.
提供一种存储介质,其特征在于,所述存储介质中存储有程序,所述程序用于实现包括上述应用于引导业务服务器BSF中的任一项所述方法。A storage medium is provided, characterized in that a program is stored in the storage medium, and the program is configured to implement the method including any one of the above-mentioned application to guide a service server BSF.
有益效果Beneficial effect
综上所述,本发明在GBA初始化过程之后,为在用户终端中运行的第三方应用客户端提供了安全的注册环境,引导业务服务器BSF只为通过验证的用户终端才提供相应的注册信息和服务,包括生成应用密钥,有效解决了如背景技术中所述的GBA架构应用在互联网技术领域存在的技术缺陷。In summary, the present invention provides a secure registration environment for third-party application clients running in user terminals after the GBA initialization process, and guides the service server BSF to provide corresponding registration information and only for authenticated user terminals. Services, including the generation of application keys, effectively solve the technical shortcomings of the GBA architecture application described in the background in the field of Internet technology.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without paying creative labor.
图1为GBA应用密钥协商过程的流程示意图;FIG. 1 is a schematic flowchart of a GBA application key negotiation process;
图2为本发明实施例提供的基于GBA的客户端注册和密钥共享方法所涉及的一种实施环境结构示意图;2 is a schematic structural diagram of an implementation environment involved in a GBA-based client registration and key sharing method according to an embodiment of the present invention;
图3为本发明提供的基于GBA的客户端注册和密钥共享方法实施例一的流程示意图;3 is a schematic flowchart of Embodiment 1 of a GBA-based client registration and key sharing method according to the present invention;
图4为本发明提供的基于GBA的客户端注册和密钥共享方法实施例二的流程示意图;4 is a schematic flowchart of Embodiment 2 of a GBA-based client registration and key sharing method according to the present invention;
图5为本发明提供的基于GBA的客户端注册和密钥共享方法实施例三的流程示意图。FIG. 5 is a schematic flowchart of Embodiment 3 of a GBA-based client registration and key sharing method provided by the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional characteristics and advantages of the present invention will be further explained with reference to the embodiments and the drawings.
本发明的最佳实施方式Best Mode of the Invention
在此处键入本发明的最佳实施方式描述段落。Type the description of the preferred embodiment of the invention here.
本发明的实施方式Embodiments of the invention
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
一、相关名词术语I. Related Terms
为了便于理解,对本文中涉及的一些名词作介绍和说明。In order to facilitate understanding, some terms involved in this article are introduced and explained.
NAF_Id:NAF_Id用于唯一地标识第三方应用服务器,以及用于标识该第三方应用服务器对应的第三方应用客户端。NAF_Id可以是完全限定域名(Fully Qualified Domain Name,FQDN),也可以是FQDN和Ua 接口上的协议标识(UaID)连接而成,也可以是一个字符串。NAF_Id: NAF_Id is used to uniquely identify a third-party application server and to identify a third-party application client corresponding to the third-party application server. NAF_Id can be a Fully Qualified Domain Name (FQDN), or it can be a connection between the FQDN and the protocol identifier (UaID) on the Ua interface, or it can be a string.
签名加密算法:指用于加密地核实信息真实性的加密算法,只有信息的发送者才能产生的别人无法伪造的一段数字串,这段数字串同时也是对信息的发送者发送信息真实性的一个有效证明,例如消息认证码(诸如基于哈希的消息认证码HMAC、密码分组链接消息认证码CBC-MAC、伽罗瓦消息认证码GMAC等)、含密钥加密的哈希函数、基于RSA的数字方案(诸如RSA-PSS)、数字签名算法(DSA)和椭圆曲线数字签名算法等。Signature encryption algorithm: refers to the encryption algorithm used to verify the authenticity of the information. Only a sender of the information can generate a string of numbers that cannot be forged by others. This digital string is also one of the authenticity of the information sent by the sender of the information. Valid proofs, such as message authentication codes (such as hash-based message authentication code HMAC, cipher block chain message authentication code CBC-MAC, Galois message authentication code GMAC, etc.), hash functions with key encryption, RSA-based Digital schemes (such as RSA-PSS), digital signature algorithms (DSA), and elliptic curve digital signature algorithms.
对称加密算法:指加密和解密使用相同密钥的加密算法,例如三重数据加密标准(Triple Data Encryption Standard,DES)、高级加密标准(Advanced Encryption Standard,AES)等。Symmetric encryption algorithm: refers to an encryption algorithm that uses the same key for encryption and decryption, such as the Triple Data Encryption Standard (Triple Data Encryption Standard (DES), Advanced Encryption Standard (AES), etc.
二、实施环境结构示意图Schematic diagram of the implementation environment
请参考图2,其示出了本发明实施例提供的一种基于GBA的客户端注册和密钥共享方法所涉及的一种实施环境的结构示意图。该实施环境包括引导业务服务器BSF、用户终端、第三方应用客户端。Please refer to FIG. 2, which is a schematic structural diagram of an implementation environment involved in a GBA-based client registration and key sharing method according to an embodiment of the present invention. The implementation environment includes a guided service server BSF, a user terminal, and a third-party application client.
引导业务服务器BSF:BSF通常由通信运营服务商提供,通过互联网或专用网络等与用户终端、第三方应用服务器分别进行连接,并通过通信运营商网络和专用接口与HSS(Home Subscriber Server,归属用户服务器)或/和HLR(Home Location Register,归属位置寄存器)连接,需要说明的是,本申请中的BSF还可以与统一数据管理(unified data management,UDM)连接。Guided service server BSF: BSF is usually provided by a communication operator service provider, which is connected to user terminals and third-party application servers through the Internet or a dedicated network, and communicates with HSS (Home Subscriber Server, home subscribers) through the communication operator network and a dedicated interface. Server) or / and HLR (Home Location Register (Home Location Register) connection. It should be noted that the BSF in this application can also be connected to unified data management (UDM).
用户终端:用户终端通过WLAN(包括wifi)、移动数据、LAN、固定宽带等有线或无线方式接入网络并与引导业务服务器BSF进行数据连接。用户终端支持GBA功能,通常是智能手机,也可以是智能电视、机顶盒、平板电脑、便携计算机、台式计算机等。User terminal: The user terminal accesses the network through wired or wireless methods such as WLAN (including wifi), mobile data, LAN, and fixed broadband, and performs data connection with the guidance service server BSF. The user terminal supports the GBA function, usually a smart phone, or a smart TV, a set-top box, a tablet computer, a portable computer, a desktop computer, and the like.
第三方应用客户端:运行在用户终端的操作***中的应用程序,由第三方应用服务商提供。Third-party application client: An application running in the operating system of a user terminal, provided by a third-party application service provider.
可以理解的是,在实际实施环境中,可以包括有多个或大量的用户终端,每个用户终端中可以运行多个由不同第三方应用服务商提供的第三方应用客户端,每个第三方应用客户端可以连接访问对应的第三方应用服务器,从而获取所需业务应用数据和服务。It can be understood that in an actual implementation environment, multiple or a large number of user terminals may be included, and each user terminal may run multiple third-party application clients provided by different third-party application service providers, and each third-party The application client can connect to and access the corresponding third-party application server to obtain the required business application data and services.
为了简洁,在不影响本发明实施的前提下,实施图中忽略了GBA架构中其他的组件,例如归属用户服务器(Home Subscriber Server,HSS)、归属位置寄存器(Home Location Register、HLR)、认证代理功能(Authentication Proxy,AP)、用户归属功能(Subscriber Locator Function,SLF)等,然而,本领域技术人员可理解的是在必要应用场景中已经使用了这些组件。For the sake of simplicity, other components in the GBA architecture, such as the home user server (Home Subscriber Server (HSS), Home Location Register (HLR), Authentication Proxy (AP), Subscriber Locator Function (SLF), etc. However, those skilled in the art will understand that These components are already used in the necessary application scenarios.
还需要说明的是,在实际业务应用环境中,还应当有第三方应用服务器。第三方应用服务器相当于GBA架构中的NAF,由第三方应用服务商提供,用于和第三方应用客户端通过网络相连,向用户提供所需的应用服务,例如资讯、购物、社交等;用于和引导业务服务器BSF通过网络相连,获取B-TID相应的信息。It should also be noted that in an actual business application environment, there should also be a third-party application server. The third-party application server is equivalent to NAF in the GBA architecture. It is provided by a third-party application service provider and is used to connect with third-party application clients through the network to provide users with required application services, such as information, shopping, social networking, etc .; It is connected with the guidance service server BSF through the network to obtain the corresponding information of the B-TID.
本领域技术人员可以理解,图2中示出的实施环境结构并不构成对实施环境的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the implementation environment shown in FIG. 2 does not constitute a limitation on the implementation environment, and may include more or fewer components than shown, or some components may be combined, or different components may be arranged.
三、实施前提3. Prerequisites for implementation
在实施本发明各实施例之前,用户终端与引导业务服务器BSF已经成功执行完成GBA初始化过程,用户终端上有B-TID及对应的RAND、Ks(即第一主密钥Ks);引导业务服务器BSF上存储有该B-TID及对应的RAND、Ks(即第二主密钥Ks)的对应关系,同时引导业务服务器BSF上存储有B-TID与IMPI(IP多媒体私有标识,IP Multimedia Private Identity)的对应关系,即通过B-TID能够查找和获取用户终端所对应的IMPI。Before implementing the embodiments of the present invention, the user terminal and the guidance service server BSF have successfully performed the GBA initialization process. The user terminal has a B-TID and corresponding RAND and Ks (that is, the first master key Ks); the guidance service server The BSF stores the corresponding relationship between the B-TID and the corresponding RAND and Ks (that is, the second master key Ks), and simultaneously guides the service server BSF to store the B-TID and IMPI (IP Multimedia Private Identity, IP Multimedia Private Identity), that is, the BPI can be used to find and obtain the IMPI corresponding to the user terminal.
四、基于GBA的客户端注册和密钥共享方法实施例一Fourth, GBA-based client registration and key sharing method embodiment one
请参考图3,其示出了本发明提供的基于GBA的客户端注册和密钥共享方法实施例一的流程图,该实施例可用于图2所示的实施环境中。该实施例包括:Please refer to FIG. 3, which shows a flowchart of Embodiment 1 of a GBA-based client registration and key sharing method provided by the present invention. This embodiment can be used in the implementation environment shown in FIG. 2. This embodiment includes:
用户终端在获取到用于启动基于GBA的客户端注册和密钥共享过程的操作指示之后启动基于GBA的客户端注册和密钥共享过程,该过程可以包括如下三个子过程和相应的步骤:The user terminal starts the GBA-based client registration and key sharing process after obtaining an operation instruction for starting the GBA-based client registration and key sharing process. The process may include the following three sub-processes and corresponding steps:
第一子过程:用户终端与引导业务服务器BSF基于相同的B-TID和值相同的主密钥Ks生成值相同的认证密钥。具体可以包括:First sub-process: The user terminal and the guided service server BSF generate an authentication key with the same value based on the same B-TID and the same master key Ks. This can include:
步骤301.用户终端获取B-TID和第一主密钥Ks。Step 301: The user terminal obtains the B-TID and the first master key Ks.
用户终端获取B-TID和第一主密钥Ks,相对应的,在用户终端与引导业务服务器BSF执行GBA初始化过程成功之后,在引导业务服务器BSF上应当存储有该B-TID以及与该B-TID对应的第二主密钥Ks。The user terminal obtains the B-TID and the first master key Ks. Correspondingly, after the user terminal and the guided service server BSF successfully perform the GBA initialization process, the B-TID and the B-TID should be stored on the guided service server BSF. -The second master key Ks corresponding to the TID.
步骤302.用户终端基于该第一主密钥Ks生成第一认证密钥。Step 302: The user terminal generates a first authentication key based on the first master key Ks.
例如,可将该第一主密钥Ks作为第一认证密钥。For example, the first master key Ks may be used as the first authentication key.
又例如,基于包括该第一主密钥Ks以及第一固定字符串(1)或/和第一随机字符串或/和第一时间戳或/和该B-TID或/和NAF_Id的信息生成第一认证密钥;其中,该第一固定字符串(1)为预先配置的并且与引导业务服务器BSF上预先配置的第一固定字符串(2)的值相同的字符串,该第一随机字符串为本地随机生成的字符串,该第一时间戳为通过获取用户终端的当前***时间生成。具体地,以密钥派生算法公式为例,可以表示为:DK= PBKDF2(passphrase,Salt,c,dkLen),其中:DK是生成的第一认证密钥,PBKDF2是密钥派生算法,passphrase是该第一主密钥Ks并且和第一固定字符串(1)或/和第一随机字符串或/和第一时间戳或/和该B-TID或/和NAF_Id组合拼接的字符串;Salt是盐值,在本例中是一个固定字符串;c是迭代次数;dlLen是密钥输出长度,可以根据使用的加密算法生成符合要求的密钥长度。For another example, based on information including the first master key Ks and the first fixed character string (1) or / and the first random character string or / and the first time stamp or / and the B-TID or / and NAF_Id A first authentication key; wherein the first fixed character string (1) is a character string that is pre-configured and has the same value as the first fixed character string (2) that is pre-configured on the boot service server BSF, the first random character string The character string is a locally randomly generated character string, and the first time stamp is generated by acquiring the current system time of the user terminal. Specifically, taking the key derivation algorithm formula as an example, it can be expressed as: DK = PBKDF2 (passphrase, Salt, c, dkLen), where: DK is the first authentication key generated, PBKDF2 is the key derivation algorithm, passphrase is the first master key Ks and is the same as the first fixed string (1) or / And the first random string or / and the first timestamp or / and the B-TID or / and NAF_Id combination string; Salt is the salt value, in this case a fixed string; c is the number of iterations ; DlLen is the key output length, which can be used to generate a key length that meets the requirements according to the encryption algorithm used.
NAF_Id是用户终端中运行的第三方应用客户端的标识,例如,在第三方应用客户端软件安装包内已经内置存储并且在安装后存储在配置文件中,用户终端从该配置文件中获取该NAF_Id;或者,由第三方应用客户端向对应的第三方应用服务器发送请求后获得,再由用户终端从该第三方应用客户端获取。NAF_Id is the identity of the third-party application client running in the user terminal. For example, the third-party application client software installation package has built-in storage and is stored in a configuration file after installation, and the user terminal obtains the NAF_Id from the configuration file; Alternatively, the third-party application client obtains the request after sending the request to the corresponding third-party application server, and the user terminal obtains the request from the third-party application client.
步骤303.用户终端将该B-TID以及生成第一认证密钥的信息发送给引导业务服务器BSF。Step 303: The user terminal sends the B-TID and the information for generating the first authentication key to the guidance service server BSF.
用户终端将该B-TID发送给引导业务服务器BSF,以使得引导业务服务器BSF根据该B-TID能获取到对应的第二主密钥Ks。The user terminal sends the B-TID to the guidance service server BSF, so that the guidance service server BSF can obtain the corresponding second master key Ks according to the B-TID.
为了使得引导业务服务器BSF生成与第一认证密钥的值相同的第二认证密钥,则如果生成第一认证密钥的信息还包括第一随机字符串或/和第一时间戳或/和NAF_Id,则将该第一随机字符串或/和该第一时间戳或/和该NAF_Id发送给引导业务服务器BSF。In order for the guided service server BSF to generate a second authentication key with the same value as the first authentication key, if the information for generating the first authentication key further includes a first random character string or / and a first time stamp or / and NAF_Id, then send the first random character string or / and the first time stamp or / and the NAF_Id to the guidance service server BSF.
相应地,引导业务服务器BSF接收用户终端发送的该B-TID以及该第一随机字符串或/和该NAF_Id。Correspondingly, the guidance service server BSF receives the B-TID and the first random character string or / and the NAF_Id sent by the user terminal.
可以理解,如果上述生成第一认证密钥的信息还包括第一固定字符串(1),由于固定字符串在引导业务服务器BSF上可以预先配置相同值的固定字符串,则可以不用将该第一固定字符串(1)发送给引导业务服务器BSF。It can be understood that if the above-mentioned information for generating the first authentication key further includes the first fixed character string (1), since the fixed character string can be configured in advance with a fixed character string of the same value on the guidance service server BSF, the first character string can be omitted. A fixed string (1) is sent to the BSF.
步骤304.引导业务服务器BSF根据该B-TID获取第二主密钥Ks。Step 304. The service server BSF is guided to obtain the second master key Ks according to the B-TID.
在引导业务服务器BSF上存储有B-TID和第二主密钥Ks的对应关系。A correspondence relationship between the B-TID and the second master key Ks is stored on the guidance service server BSF.
引导业务服务器BSF根据该B-TID在该对应关系中查找和获取对应的第二主密钥Ks。Guide the service server BSF to find and obtain the corresponding second master key Ks in the corresponding relationship according to the B-TID.
步骤305.引导业务服务器BSF基于该第二主密钥Ks生成第二认证密钥。Step 305. The service server BSF is guided to generate a second authentication key based on the second master key Ks.
引导业务服务器BSF使用和用户终端相同的认证密钥生成方式,基于该第二主密钥Ks生成第二认证密钥。The guidance service server BSF uses the same authentication key generation method as the user terminal, and generates a second authentication key based on the second master key Ks.
例如,以使用和步骤302用户终端相同的认证密钥生成方式为例,如果用户终端使用第一主密钥Ks作为第一认证密钥,则引导业务服务器BSF使用该第二主密钥Ks作为第二认证密钥。For example, using the same authentication key generation method as that of the user terminal in step 302 as an example, if the user terminal uses the first master key Ks as the first authentication key, the guide service server BSF uses the second master key Ks as the first authentication key. The second authentication key.
又例如,以使用和步骤302用户终端相同的认证密钥生成方式为例,如果用户终端基于包括该第一主密钥Ks以及第一固定字符串(1)或/和第一随机字符串或/和第一时间戳或/和该B-TID或/和NAF_Id生成第一认证密钥,则引导业务服务器BSF基于包括该第二主密钥Ks以及第一固定字符串(2)或/和第一随机字符串或/和第一时间戳或/和该B-TID或/和NAF_Id的信息生成第一认证密钥,并且该第二认证密钥的生成方式与用户终端生成第一认证密钥的生成方式一致;其中,该第一固定字符串(2)为预先配置的并且与用户终端预先配置的第一固定字符串(1)的值相同的字符串,该第一随机字符串或/和第一时间戳或/和NAF_Id为用户终端所发送的。For another example, taking the same authentication key generation method as the user terminal in step 302 as an example, if the user terminal is based on including the first master key Ks and the first fixed character string (1) or / and the first random character string or / And the first timestamp or / and the B-TID or / and NAF_Id to generate a first authentication key, then guide the service server BSF based on including the second master key Ks and the first fixed character string (2) or / and A first random character string or / and a first time stamp or / and the B-TID or / and NAF_Id information is used to generate a first authentication key, and the second authentication key is generated in a manner that is similar to the first authentication key generated by the user terminal. The key generation method is the same; wherein the first fixed character string (2) is a character string that is pre-configured and has the same value as the first fixed character string (1) that is pre-configured by the user terminal, the first random character string or / And the first time stamp or / and NAF_Id are sent by the user terminal.
具体地,以步骤302相对应的示例为例,密钥派生算法公式为:DK = PBKDF2(passphrase,Salt,c,dkLen),其中:DK是生成的第二认证密钥,PBKDF2是与用户终端相同的密钥派生算法,passphrase是该第二主密钥Ks并且和第一固定字符串(2)或/和第一随机字符串或/和第一时间戳或/和该B-TID或/和NAF_Id组合拼接的字符串;Salt是盐值,是一个与用户终端相同的固定字符串;c是与用户终端中相同的迭代次数;dlLen是与用户终端中相同的密钥输出长度。Specifically, taking the example corresponding to step 302 as an example, the formula of the key derivation algorithm is: DK = PBKDF2 (passphrase, Salt, c, dkLen), where: DK is the generated second authentication key, PBKDF2 is the same key derivation algorithm as the user terminal, passphrase is the second master key Ks and is the same as the first fixed character String (2) or / and the first random string or / and the first timestamp or / and the B-TID or / and NAF_Id combination string; Salt is the salt value, which is a fixed character same as the user terminal String; c is the same number of iterations as in the user terminal; dlLen is the same key output length as in the user terminal.
至此,由于在成功执行GBA初始化过程之后,同一B-TID在用户终端上对应的第一主密钥Ks和在引导业务服务器BSF上对应的第二主密钥Ks的值是相同的,而由于第一认证密钥和第二认证密钥是使用相同的密钥生成方式、基于值相同的主密钥Ks生成的,因此,第一认证密钥和第二认证密钥的值也是相同的。So far, after the GBA initialization process is successfully performed, the value of the first master key Ks corresponding to the same B-TID on the user terminal and the second master key Ks corresponding to the bootstrap service server BSF are the same. The first authentication key and the second authentication key are generated using the same key generation method and based on the master key Ks having the same value. Therefore, the values of the first authentication key and the second authentication key are also the same.
第二子过程:用户终端与引导业务服务器BSF生成值相同的验证信息。具体可以包括:The second sub-process: the user terminal and the guidance service server BSF generate the same verification information. This can include:
步骤306.用户终端生成第一验证信息。Step 306. The user terminal generates first authentication information.
用户终端生成第一验证信息,以使得该第一验证信息用于加密,并且要使得该第一验证信息与引导业务服务器BSF生成的第二验证信息的值相同。The user terminal generates first verification information, so that the first verification information is used for encryption, and the first verification information is made to have the same value as the second verification information generated by the guidance service server BSF.
用户终端可以将第二固定字符串(1)或第二随机字符串或第二时间戳或该B-TID或该NAF_Id中的一种作为第一验证信息;或者,用户终端根据包括第二固定字符串(1)或/和第二随机字符串或/和第二时间戳或/和该B-TID或/和该NAF_Id的信息生成第一验证信息,例如,用户终端将第二固定字符串(1)或/和第二随机字符串或/和第二时间戳或/和该B-TID或/和该NAF_Id组合拼接后生成第一验证信息。The user terminal may use one of the second fixed character string (1) or the second random character string or the second time stamp or the B-TID or the NAF_Id as the first verification information; or, the user terminal may The character string (1) or / and the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id information generates first verification information, for example, the user terminal sends a second fixed character string (1) or / and the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id combination to generate the first verification information.
其中,该第二固定字符串(1)为预先配置的与引导业务服务器BSF上预先配置的第二固定字符串(2)的值相同的字符串,该第二随机字符串为本地随机生成的字符串,该第二时间戳为通过获取用户终端的当前***时间生成。The second fixed character string (1) is a pre-configured character string having the same value as the second fixed character string (2) pre-configured on the guidance service server BSF, and the second random character string is generated locally and randomly. A character string, and the second timestamp is generated by acquiring the current system time of the user terminal.
步骤307.可选的,用户终端将生成第一验证信息的信息发送给引导业务服务器BSF。Step 307. Optionally, the user terminal sends the information for generating the first verification information to the guidance service server BSF.
在用户终端生成第一验证信息之后,为了使得引导业务服务器BSF生成与第一认证信息的值相同的第二认证信息,如果生成的第一验证信息还包括第二随机字符串或/和第二时间戳或/和该B-TID或/和该NAF_Id,并且是使用签名加密算法对第一验证信息签名加密生成第一加密值,则将该第二随机字符串或/和该第二时间戳或/和该B-TID或/和该NAF_Id发送给引导业务服务器BSF。After the user terminal generates the first authentication information, in order to cause the guided service server BSF to generate the second authentication information having the same value as the first authentication information, if the generated first authentication information further includes a second random character string or / and a second Timestamp or / and the B-TID or / and the NAF_Id, and uses a signature encryption algorithm to sign and encrypt the first verification information to generate a first encrypted value, then the second random string or / and the second timestamp Or / and the B-TID or / and the NAF_Id are sent to the guidance service server BSF.
相应地,引导业务服务器BSF接收用户终端发送的该第二随机字符串或/和该第二时间戳或/和该B-TID或/和该NAF_Id。Accordingly, the guidance service server BSF receives the second random character string or / and the second time stamp or / and the B-TID or / and the NAF_Id sent by the user terminal.
可以理解,如果上述生成第一验证信息的信息还包括第二固定字符串(1),由于固定字符串在引导业务服务器BSF上可以预先配置相同值的固定字符串,则可以不用将该第二固定字符串(1)发送给引导业务服务器BSF。It can be understood that if the above-mentioned information for generating the first verification information further includes a second fixed character string (1), since the fixed character string can be configured in advance with a fixed character string of the same value on the guidance service server BSF, the second character string can be omitted The fixed character string (1) is sent to the guidance service server BSF.
可以理解,如果生成的第一验证信息还包括该第二随机字符串或/和该第二时间戳或/和该B-TID或/和该NAF_Id,并且是使用对称加密算法对第一验证信息对称加密生成第一加密值,由于对该第一加密值解密后可以获取到第一验证信息,因此,则可以不用将该第二随机字符串或/和该第二时间戳或/和该B-TID或/和该NAF_Id发送给引导业务服务器BSF。It can be understood that if the generated first verification information further includes the second random character string or / and the second timestamp or / and the B-TID or / and the NAF_Id, and the first verification information is obtained by using a symmetric encryption algorithm The first encrypted value is generated by symmetric encryption. Since the first authentication information can be obtained after decrypting the first encrypted value, the second random string or / and the second time stamp or / and the B can be omitted. -The TID or / and the NAF_Id is sent to the guidance service server BSF.
可以理解,本步骤还可以与上述步骤303合并成一个步骤实施,即用户终端可以将该B-TID以及生成第一认证密钥的信息和生成第一验证信息的信息在一个发送请求中同时发送给引导业务服务器BSF,相应地,则上述引导业务服务器BSF生成第二认证密钥、生成第二验证信息的相应步骤也在该合并的步骤后实施。It can be understood that this step can also be combined with the above step 303 into one step for implementation, that is, the user terminal can send the B-TID, the information for generating the first authentication key, and the information for generating the first authentication information at the same time in one transmission request. To the guidance service server BSF, correspondingly, the above-mentioned corresponding steps of the guidance service server BSF generating the second authentication key and generating the second authentication information are also implemented after the combined step.
可以理解,如果合并成一个步骤实施,则两个步骤中如果生成第一认证密钥的信息与生成第一验证信息的信息有相同的信息,则可以不用重复发送该相同的信息。It can be understood that if the combination is implemented in one step, if the information of generating the first authentication key and the information of generating the first authentication information in the two steps have the same information, the same information may not be sent repeatedly.
步骤308.引导业务服务器BSF生成第二验证信息。Step 308: Guide the service server BSF to generate the second verification information.
引导业务服务器BSF生成第二验证信息,并且要使得该生成的第二验证信息的值与用户终端生成的第一验证信息的值相同。The service server BSF is guided to generate the second verification information, and the value of the generated second verification information is the same as the value of the first verification information generated by the user terminal.
以使用和步骤406相同的验证信息生成方式为例,如果用户终端将第二固定字符串(1)或第二随机字符串或第二时间戳或该B-TID或该NAF_Id中的一种作为第一验证信息,将引导业务服务器BSF将第二固定字符串(2)或第二随机字符串或第二时间戳或该B-TID或该NAF_Id中的一种作为第二验证信息。Taking the method of generating the same authentication information as in step 406 as an example, if the user terminal uses one of the second fixed character string (1) or the second random character string or the second time stamp or the B-TID or the NAF_Id as The first verification information will guide the service server BSF to use the second fixed character string (2) or the second random character string or the second time stamp or the B-TID or the NAF_Id as the second verification information.
以使用和步骤306相同的验证信息生成方式为例,如果用户终端根据包括第二固定字符串(1)或/和第二随机字符串或/和第二时间戳或/和该B-TID或/和该NAF_Id的信息生成第一验证信息,则引导业务服务器BSF根据包括第二固定字符串(2)或/和第二随机字符串或/和第二时间戳或/和该B-TID或/和该NAF_Id的信息生成第二验证信息。例如,与步骤306用户终端相对应的示例为例,引导业务服务器BSF将第二固定字符串(2)或/和第二随机字符串或/和第二时间戳或/和该B-TID或/和该NAF_Id组合拼接后生成第二验证信息。Taking the method of generating the same authentication information as step 306 as an example, if the user terminal includes a second fixed character string (1) or / and a second random character string or / and a second time stamp or / and the B-TID or / And the NAF_Id information to generate the first verification information, then guide the service server BSF to include the second fixed character string (2) or / and the second random character string or / and the second time stamp or / and the B-TID or / And the NAF_Id information generates second verification information. For example, taking the example corresponding to the user terminal in step 306 as an example, the service server BSF is guided to send the second fixed character string (2) or / and the second random character string or / and the second time stamp or / and the B-TID or / Combined with the NAF_Id to generate second verification information.
其中,该第二固定字符串(2)为预先配置的并且与用户终端上预先配置的第二固定字符串(1)的值相同的字符串,该第二随机字符串或/和该第二时间戳或/和NAF_Id为用户终端所发送的。The second fixed character string (2) is a character string that is pre-configured and has the same value as the second fixed character string (1) that is pre-configured on the user terminal, the second random character string or / and the second The timestamp or NAF_Id is sent by the user terminal.
至此,由于第一验证信息和第二验证信息是使用相同的验证信息生成方式、基于相同值的信息生成的,因此,第一验证信息和第二验证信息的值也是相同的。So far, since the first verification information and the second verification information are generated using the same verification information generation method and based on the same value information, the values of the first verification information and the second verification information are also the same.
进一步地,如果生成第一验证信息的信息还包括第二时间戳,则引导业务服务器BSF在接收到该第二时间戳之后,将该第二时间戳与引导业务服务器BSF的当前***时间进行比较,确定两者的时间差是否在预先设定的有效范围内:如果是在有效的范围内,则执行下述步骤;如果不是在有效的范围内,则不执行下述步骤,结束本次基于GBA的客户端注册和密钥共享方法。Further, if the information for generating the first verification information further includes a second time stamp, after receiving the second time stamp, the guidance service server BSF compares the second time stamp with the current system time of the guidance service server BSF. , Determine whether the time difference between the two is within the preset valid range: if it is within the valid range, then perform the following steps; if it is not within the valid range, then do not perform the following steps, and end this time based on GBA Client registration and key sharing methods.
第三子过程:用户终端与引导业务服务器BSF基于值相同的认证密钥和值相同的验证信息实现安全认证。具体可以包括:The third sub-process: The user terminal and the guided service server BSF implement security authentication based on an authentication key having the same value and authentication information having the same value. This can include:
步骤309.用户终端基于该第一认证密钥和该第一验证信息加密生成第一加密值。Step 309: The user terminal encrypts and generates a first encrypted value based on the first authentication key and the first authentication information.
根据上述步骤中生成的第一认证密钥和第一验证信息,用户终端基于该第一认证密钥和该第一验证信息加密生成第一加密值。根据所使用的加密算法,可以包括多种实施方式,至少可以包括:According to the first authentication key and the first authentication information generated in the above steps, the user terminal encrypts and generates a first encrypted value based on the first authentication key and the first authentication information. Depending on the encryption algorithm used, multiple implementations can be included, including at least:
第一种实施方式,用户终端使用签名加密算法基于该第一认证密钥对该第一验证信息签名加密生成第一加密值。In a first implementation manner, the user terminal uses a signature encryption algorithm to sign-encrypt the first verification information based on the first authentication key to generate a first encrypted value.
用户终端使用签名加密算法基于该第一认证密钥对该第一验证信息签名加密计算生成的第一加密值,即为签名值,签名值可以唯一地识别第一验证信息,只有使用相同的签名加密算法、相同值的签名密钥、相同值的待签名信息才可以生成相同的签名值。The user terminal uses a signature encryption algorithm based on the first authentication key to sign and encrypt the first verification information. The first encryption value is a signature value. The signature value can uniquely identify the first verification information. Only the same signature is used. Only the encryption algorithm, the signature key with the same value, and the information to be signed with the same value can generate the same signature value.
例如,以签名加密算法使用哈希消息认证码为例,签名方式可以表示为:Signature=HMAC_SHA256(k,m),其中m是待签名信息即该第一验证信息,k是签名密钥即该第一认证密钥,HMAC_SHA256是签名加密算法,Signature是签名值即第一加密值。For example, the signature encryption algorithm uses a hash message authentication code as an example. The signature method can be expressed as: Signature = HMAC_SHA256 (k, m), where m is the information to be signed, which is the first verification information, and k is the signature key, which is the The first authentication key, HMAC_SHA256 is a signature encryption algorithm, and Signature is a signature value, that is, a first encryption value.
又例如,以签名加密算法使用含密钥加密的哈希函数为例,签名方式可以表示为:Signature= SHA256(k||m),其中m是待签名信息即该第一验证信息,k是签名密钥即该第一认证密钥,“k||m”表示将k和m组合拼接,SHA256是哈希函数,Signature是签名值即第一加密值。For another example, taking a hash function with key encryption as an example for a signature encryption algorithm, the signature method can be expressed as: Signature = SHA256 (k || m), where m is the information to be signed, that is, the first verification information, k is the signing key, that is, the first authentication key, "k || m" means that k and m are combined together, and SHA256 is Hash function, Signature is the first encrypted value of the signature value.
第二种实施方式,用户终端使用对称加密算法基于该第一认证密钥对包括该第一验证信息的信息对称加密生成第一加密值。In a second implementation manner, the user terminal uses a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate a first encrypted value.
用户终端使用对称加密算法基于该第一认证密钥对包括该第一验证信息的信息对称加密生成第一加密值,该第一加密值即为包括该第一验证信息的信息的密文,只有使用相同的对称加密算法、相同值的密钥才可以将该密文解密后得到原来的明文。The user terminal uses a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate a first encrypted value. The first encrypted value is a cipher text of the information including the first authentication information. Only the same symmetric encryption algorithm and the same value of the key can be used to decrypt the ciphertext to obtain the original plaintext.
例如,以对称加密算法使用AES为例,加密方式可以表示为:s=AES_ENCRYPT(m,k),其中m是明文,该明文为包括该第一验证信息的信息,k是加密密钥即该第一认证密钥,AES_ENCRYPT是加密算法,s是加密结果即第一加密值。For example, using symmetric encryption algorithm using AES as an example, the encryption method can be expressed as: s = AES_ENCRYPT (m, k), where m is the plaintext, the plaintext is the information including the first authentication information, and k is the encryption key, which is the The first authentication key, AES_ENCRYPT is an encryption algorithm, and s is an encryption result, that is, a first encryption value.
上述的包括该第一验证信息的信息,是指在生成的信息中还包括该第一验证信息和其他信息,例如将该第一验证信息和其他信息组合拼接后所生成的信息,对于该其他信息,如非特别说明,在本实施例中并不进行限定。The above-mentioned information including the first verification information means that the generated information also includes the first verification information and other information, for example, information generated after combining the first verification information and other information, and for the other information, Information, unless otherwise specified, is not limited in this embodiment.
步骤310.用户终端向引导业务服务器BSF发送安全认证请求,该安全认证请求包括该第一加密值。Step 310: The user terminal sends a security authentication request to the guidance service server BSF, where the security authentication request includes the first encrypted value.
用户终端向引导业务服务器BSF发送安全认证请求,该安全认证请求包括该第一加密值,以使得引导业务服务器BSF通过验证该第一加密值而实现对用户终端的安全认证。The user terminal sends a security authentication request to the boot service server BSF, where the security authentication request includes the first encrypted value, so that the boot service server BSF implements security authentication of the user terminal by verifying the first encrypted value.
相应地,引导业务服务器BSF接收用户终端发送的安全认证请求,并且获取该安全认证请求中包括的该第一加密值。Correspondingly, the guidance service server BSF receives the security authentication request sent by the user terminal, and obtains the first encrypted value included in the security authentication request.
可以理解,本步骤还可以与上述步骤303或/和步骤307合并成一个步骤实施,即用户终端可以将该安全认证请求与发送B-TID以及生成第一认证密钥的信息、或发送生成第一验证信息的信息的步骤在一个发送请求中同时发送给引导业务服务器BSF,相应地,则上述引导业务服务器BSF生成第二认证密钥、生成第二验证信息的相应步骤也在该合并的步骤后实施。It can be understood that this step can also be combined with the above step 303 or / and step 307 into a single step for implementation, that is, the user terminal can send the security authentication request with the information of sending the B-TID and generating the first authentication key, or sending the first A step of verifying the information of the information is simultaneously sent to the guidance service server BSF in one transmission request. Accordingly, the corresponding steps of the guidance service server BSF generating the second authentication key and generating the second authentication information are also in the combined step. After implementation.
步骤311.引导业务服务器BSF基于该第二认证密钥和该第二验证信息验证该第一加密值。Step 311. The service server BSF is guided to verify the first encrypted value based on the second authentication key and the second verification information.
与用户终端中生成第一加密值可以包括的多种实施方式相对应的,引导业务服务器BSF基于该第二认证密钥和该第二验证信息验证该第一加密值需使用相对应的实施方式,包括:Corresponding to various implementation manners that can be included in generating the first encrypted value in the user terminal, the guidance service server BSF needs to use the corresponding implementation manner to verify the first encrypted value based on the second authentication key and the second verification information. ,include:
第一种实施方式,与用户终端使用签名加密算法生成第一加密值的实施方式相对应的,引导业务服务器BSF使用和用户终端相同的签名加密算法,基于该第二认证密钥和该第二验证信息验证该第一加密值。具体可以包括:The first implementation manner corresponds to the implementation manner in which the user terminal uses the signature encryption algorithm to generate the first encrypted value, and guides the service server BSF to use the same signature encryption algorithm as the user terminal, based on the second authentication key and the second The verification information verifies the first encrypted value. This can include:
步骤311a.引导业务服务器BSF使用和用户终端相同的签名加密算法,基于该第二认证密钥对该第二验证信息签名加密生成第二加密值。Step 311a. The service server BSF is guided to use the same signature encryption algorithm as the user terminal to sign and encrypt the second verification information based on the second authentication key to generate a second encryption value.
引导业务服务器BSF使用和用户终端相同的签名加密算法基于该第二认证密钥对该第二验证信息签名加密生成签名值,该签名值也这里表述为是第二加密值。The guidance service server BSF uses the same signature encryption algorithm as the user terminal to encrypt and sign the second verification information based on the second authentication key to generate a signature value, and the signature value is also expressed herein as a second encryption value.
例如,以签名加密算法使用和步骤309用户终端中相同的哈希消息认证码为例,签名方式可以表示为:Signature=HMAC_SHA256(k,m),其中m是待签名信息即第二验证信息,k是签名密钥即第二认证密钥,HMAC_SHA256是与用户终端相同的哈希消息认证码,Signature是签名值即第二加密值。For example, taking the signature encryption algorithm using the same hash message authentication code as that in the user terminal in step 309 as an example, the signature method can be expressed as: Signature = HMAC_SHA256 (k, m), where m is the information to be signed, that is, the second verification information, k is the signature key, which is the second authentication key, HMAC_SHA256 is the same hash message authentication code as the user terminal, and Signature is the signature value, which is the second encrypted value.
又例如,以签名算法使用和步骤309用户终端中相同的含密钥加密的哈希函数为例,签名方式可以表示为:Signature= SHA256(k||m),其中m是待签名信息即第二验证信息,k是签名密钥即第二认证密钥,SHA256是与用户终端相同的哈希函数,Signature是签名值即第二加密值。For another example, taking the signature algorithm using the same hash function with key encryption in the user terminal in step 309 as an example, the signature method can be expressed as: Signature = SHA256 (k || m), where m is the information to be signed, which is the second verification information, k is the signature key, which is the second authentication key, SHA256 is the same hash function as the user terminal, and Signature is the signature value, which is the second Encrypted value.
至此,由于引导业务服务器BSF使用的是和用户终端相同的签名算法,第二验证信息和第一验证信息是值相同的待签名信息,第二认证密钥和第一认证密钥是值相同的签名密钥,则生成的第二加密值和第一加密值应当相同。So far, since the guiding service server BSF uses the same signature algorithm as the user terminal, the second authentication information and the first authentication information are the information to be signed with the same value, and the second authentication key and the first authentication key are the same value. For the signing key, the second encrypted value and the first encrypted value generated should be the same.
步骤311b.引导业务服务器BSF比较该第二加密值与该第一加密值是否一致;若一致,则确定安全验证成功。Step 311b. The service server BSF is guided to compare whether the second encrypted value is consistent with the first encrypted value; if they are consistent, it is determined that the security verification is successful.
引导业务服务器BSF比较该第二加密值和该第一加密值是否一致,并根据比较结果执行相应的操作,包括:Guide the service server BSF to compare whether the second encrypted value and the first encrypted value are consistent, and perform corresponding operations according to the comparison result, including:
如果比较结果是一致的,则确定该第一加密值验证成功。If the comparison results are consistent, it is determined that the first encrypted value verification is successful.
如果比较结果是不一致的,则确定该第一加密值验证失败。If the comparison result is inconsistent, it is determined that the first encrypted value verification fails.
第二种实施方式,与用户终端使用对称加密算法生成第一加密值相对应的,引导业务服务器BSF使用和用户终端相同的对称加密算法,基于该第二认证密钥和该第二验证信息验证该第二加密值。具体可以包括:In a second implementation manner, corresponding to the first encrypted value generated by the user terminal using a symmetric encryption algorithm, the service server BSF is guided to use the same symmetric encryption algorithm as the user terminal to verify based on the second authentication key and the second verification information. The second encrypted value. This can include:
步骤311i.引导业务服务器BSF使用和用户终端相同的对称加密算法,基于该第二认证密钥对该第一加密值解密获得明文,并从该明文中获取第一验证信息。Step 311i. The service server BSF is guided to use the same symmetric encryption algorithm as the user terminal, decrypt the first encrypted value based on the second authentication key to obtain a plaintext, and obtain the first verification information from the plaintext.
引导业务服务器BSF使用和用户终端相同的对称加密算法基于该第二认证密钥对该第一加密值解密,从而获得解密后的明文。The service server BSF is guided to use the same symmetric encryption algorithm as the user terminal to decrypt the first encrypted value based on the second authentication key, so as to obtain the decrypted plaintext.
例如,以对称加密算法使用和步骤309用户终端中相同的AES为例,解密方式可以表示为:m=AES_DENCRYPT(s,k),其中m是解密后的结果值,即解密后的明文,k是解密密钥即该第二认证密钥,AES_DENCRYPT是解密算法,s是密文即第一加密值。For example, taking the symmetric encryption algorithm using the same AES as that in the user terminal in step 309 as an example, the decryption method can be expressed as: m = AES_DENCRYPT (s, k), where m is the decrypted result value, that is, the decrypted plain text, k Is the decryption key, that is, the second authentication key, AES_DENCRYPT is the decryption algorithm, and s is the ciphertext, that is, the first encrypted value.
由于该明文是第一验证信息或者是包括该第一验证信息的信息,因此,可以从该明文中获取到第一验证信息。Since the plain text is the first verification information or information including the first verification information, the first verification information can be obtained from the plain text.
步骤311ii.引导业务服务器BSF比较该第二验证信息与该第一验证信息是否一致;若一致,则确定安全验证成功。Step 311ii. The service server BSF is guided to compare whether the second verification information is consistent with the first verification information; if they are consistent, it is determined that the security verification is successful.
引导业务服务器BSF比较该第二验证信息和该解密后获得的明文是否一致,并根据比较结果执行相应的操作,包括:Guide the service server BSF to compare whether the second verification information is consistent with the plaintext obtained after decryption, and perform corresponding operations according to the comparison result, including:
如果比较结果是一致的,则确定该第一加密值验证成功。If the comparison results are consistent, it is determined that the first encrypted value verification is successful.
如果比较结果是不一致的,则确定该第一加密值验证失败。If the comparison result is inconsistent, it is determined that the first encrypted value verification fails.
步骤312.引导业务服务器BSF根据对第一加密值的验证结果确定安全认证是否成功并执行相应的操作。Step 312. The service server BSF is guided to determine whether the security authentication is successful and perform a corresponding operation according to the verification result of the first encrypted value.
引导业务服务器BSF根据对该第一加密值的验证结果确定安全认证是否成功,并执行相应的操作,包括:Guide the service server BSF to determine whether the security authentication is successful according to the verification result of the first encrypted value, and perform corresponding operations, including:
若确定该第一加密值验证成功,则确定安全认证成功。在确定安全认证成功之后,引导业务服务器BSF可以根据需要向用户终端提供所需的数据和服务,例如向用户终端发送注册成功应答消息,或者向用户终端提供注册信息和服务等。If it is determined that the first encryption value verification is successful, it is determined that the security authentication is successful. After determining that the security authentication is successful, the guided service server BSF can provide the required data and services to the user terminal, such as sending a registration success response message to the user terminal, or providing registration information and services to the user terminal.
相应地,在确定安全认证成功之后,用户终端可以根据需要接收引导业务服务器BSF提供的数据和服务,例如接收引导业务服务器BSF发送的注册成功应答消息,或者接收引导业务服务器BSF提供的注册信息和服务等。Correspondingly, after determining that the security authentication is successful, the user terminal may receive data and services provided by the guided service server BSF as needed, for example, receive a registration success response message sent by the guided service server BSF, or receive registration information and information provided by the guided service server BSF. Services, etc.
若确定该第一加密值验证失败,则确定安全认证失败。在确定安全认证失败之后,引导业务服务器BSF可以根据不向用户终端提供所需的数据和服务,包括可以向用户终端发送注册失败应答消息等。If it is determined that the first encryption value verification fails, it is determined that the security authentication fails. After determining that the security authentication fails, the guidance service server BSF can provide the required data and services to the user terminal, including sending a registration failure response message to the user terminal.
相应地,在确定安全认证失败之后,用户终端接收引导业务服务器BSF发送的注册失败应答消息等。Accordingly, after determining that the security authentication fails, the user terminal receives a registration failure response message and the like sent by the guidance service server BSF.
综上所述,本实施例提供的方法,主要是基于用户终端中的B-TID和第一主密钥Ks,以及基于引导业务服务器BSF中存储的相同的B-TID和对应的第二主密钥Ks,引导业务服务器BSF通过使用和用户终端相同的加密算法对用户终端进行安全认证,在安全认证成功之后,可以为用户终端及用户终端上运行的第三方应用客户端安全地提供相应的注册信息和服务,并向用户终端返回注册成功应答消息。In summary, the method provided in this embodiment is mainly based on the B-TID and the first master key Ks in the user terminal, and based on the same B-TID and the corresponding second master stored in the boot service server BSF. The key Ks guides the service server BSF to perform security authentication on the user terminal by using the same encryption algorithm as the user terminal. After the security authentication is successful, it can provide the user terminal and the third-party application client running on the user terminal with a corresponding security. Register information and services, and return a registration success response message to the user terminal.
五、基于GBA的客户端注册和密钥共享方法实施例二V. GBA-based client registration and key sharing method embodiment two
请参考图5,其示出了本发明提供的基于GBA的客户端注册和密钥共享方法实施例二的流程图,该方法可用于图2所示的实施环境中。本实施例进一步为用户终端中运行的第三方应用客户端提供了注册信息,该注册信息包括应用密钥。Please refer to FIG. 5, which shows a flowchart of a second embodiment of a GBA-based client registration and key sharing method provided by the present invention. The method can be used in the implementation environment shown in FIG. 2. This embodiment further provides registration information for a third-party application client running in the user terminal, where the registration information includes an application key.
为了让引导业务服务器BSF为用户终端中运行的第三方应用客户端提供相应的注册信息和服务,则用户终端需将第三方应用客户端对应的NAF_Id传递给引导业务服务器BSF。In order for the guided service server BSF to provide corresponding registration information and services for the third-party application client running in the user terminal, the user terminal needs to pass the NAF_Id corresponding to the third-party application client to the guided service server BSF.
具体的,用户终端将NAF_Id传递给引导业务服务器BSF可以包括多种实施方式,例如可以包括:Specifically, the user terminal passing the NAF_Id to the guided service server BSF may include various implementation manners, for example, it may include:
第一种实施方式,用户终端将该NAF_Id发送给引导业务服务器BSF,引导业务服务器BSF接收该NAF_Id。In a first implementation manner, the user terminal sends the NAF_Id to the guidance service server BSF, and the guidance service server BSF receives the NAF_Id.
用户终端将该NAF_Id发送给引导业务服务器BSF,可以以一个单独的发送请求将该NAF_Id发送给引导业务服务器BSF,也可以合并在安全认证请求或其他的发送请求中将该NAF_Id发送给引导业务服务器BSF,例如合并在上述或步骤310的安全认证请求中,或者合并在上述步骤303或/和步骤307用户终端发送认证密钥或认证信息的相关步骤中。The user terminal sends the NAF_Id to the guidance service server BSF. The NAF_Id can be sent to the guidance service server BSF in a separate transmission request, or the NAF_Id can be combined in the security authentication request or other transmission request to the guidance service server. The BSF is, for example, incorporated in the security authentication request in the foregoing or step 310, or in the related steps in which the user terminal sends an authentication key or authentication information in step 303 or / and step 307.
相应地,引导业务服务器BSF接收用户终端发送的NAF_Id。Accordingly, the service server BSF is guided to receive the NAF_Id sent by the user terminal.
第二种实施方式,用户终端将该NAF_Id加密,并将加密后的密文发送给引导业务服务器BSF,引导业务服务器BSF将该密文解密后获得该NAF_Id。In a second implementation manner, the user terminal encrypts the NAF_Id, and sends the encrypted cipher text to the guidance service server BSF, and the guidance service server BSF decrypts the cipher text to obtain the NAF_Id.
例如,用户终端基于第一主密钥Ks以及引导业务服务器BSF基于第二主密钥Ks使用相同的密钥生成方式生成值相同的加密密钥,用户终端使用对称加密算法和该加密密钥对该NAF_Id加密,将加密后的密文发送给引导业务服务器BSF,引导业务服务器BSF使用值相同的加密密钥解密后获得该NAF_Id。For example, the user terminal uses the same key generation method to generate an encryption key with the same value based on the first master key Ks and the guidance service server BSF based on the second master key Ks. The user terminal uses a symmetric encryption algorithm and the encryption key pair. The NAF_Id is encrypted, and the encrypted cipher text is sent to the guidance service server BSF. The guidance service server BSF decrypts the encryption key with the same value to obtain the NAF_Id.
又例如,与上述步骤309的第二种实施方式相对应的,用户终端使用对称加密算法基于该第一认证密钥对包括该第一验证信息的信息对称加密生成第一加密值,则在包括该第一验证信息的信息中包括该NAF_Id。从而在步骤411的第二种实施方式中,引导业务服务器BSF从解密获得的明文中获取该NAF_Id。For another example, corresponding to the second embodiment of step 309, the user terminal uses a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate a first encrypted value, and then includes The information of the first verification information includes the NAF_Id. Therefore, in the second embodiment of step 411, the service server BSF is guided to obtain the NAF_Id from the decrypted plaintext.
在传递NAF_Id以及安全认证成功以后,引导业务服务器BSF可以为用户终端中运行的第三方应用客户端提供包括应用密钥的注册信息,即本实施例的下述步骤应用在基于GBA的客户端注册和密钥共享方法实施例一之后。具体可以包括:After the NAF_Id is passed and the security authentication is successful, the guided service server BSF can provide the registration information including the application key to the third-party application client running in the user terminal, that is, the following steps of this embodiment apply for registration on the GBA-based client And the key sharing method after the first embodiment. This can include:
步骤401.引导业务服务器BSF基于该第二主密钥Ks生成第二应用密钥。Step 401: Guide the service server BSF to generate a second application key based on the second master key Ks.
引导业务服务器BSF使用密钥派生算法基于该第二主密钥Ks生成第二应用密钥,进一步的,引导业务服务器BSF使用密钥派生算法基于第二主密钥Ks以及和/或盐值、和/或RAND、和/或IMPI、和/或NAF_Id生成第二应用密钥。The guidance service server BSF uses a key derivation algorithm to generate a second application key based on the second master key Ks. Further, the guidance service server BSF uses a key derivation algorithm based on the second master key Ks and / or a salt value, And / or RAND, and / or IMPI, and / or NAF_Id to generate a second application key.
密钥派生算法公式可以表示为:Key = KDF (Ks, Salt, RAND, IMPI, NAF_Id)。其中,Key是第二应用密钥;Ks是该第二主密钥Ks;Salt是盐值,该盐值可以是一个固定字符串,也可以是一个随机值,当是一个随机值时,则引导业务服务器BSF须将该值发送给用户终端;RAND是GBA初始化过程中生成的RAND;IMPI是B-TID对应的IMPI;NAF_Id是从客户端注册请求中获取的NAF_Id;KDF是密钥导出函数。Ks是必选参数,Salt、RAND、IMPI、NAF_Id是可选参数。The key derivation algorithm formula can be expressed as: Key = KDF (Ks, Salt, RAND, IMPI, NAF_Id). Among them, Key is the second application key; Ks is the second master key Ks; Salt is the salt value, which can be a fixed string or a random value. When it is a random value, then The guiding service server BSF must send this value to the user terminal; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI corresponding to the B-TID; NAF_Id is the NAF_Id obtained from the client registration request; KDF is the key derivation function . Ks is a required parameter, and Salt, RAND, IMPI, and NAF_Id are optional parameters.
以使用密钥派生算法公式Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id) 为例,第二应用密钥生成步骤如下:To use the key derivation algorithm formula Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id) as an example, the second application key generation steps are as follows:
步骤401a.引导业务服务器BSF根据该B-TID获取对应的IMPI。Step 401a. The service server BSF is guided to obtain the corresponding IMPI according to the B-TID.
在成功执行GBA初始化过程之后,在引导业务服务器BSF上存储有B-TID与IMPI的对应关系,即根据B-TID能查找和获取对应的IMPI。After the GBA initialization process is successfully performed, the corresponding relationship between the B-TID and the IMPI is stored on the boot service server BSF, that is, the corresponding IMPI can be found and obtained according to the B-TID.
引导业务服务器BSF根据该B-TID在该对应关系中查找和获取对应的IMPI。Guide the service server BSF to find and obtain the corresponding IMPI in the corresponding relationship according to the B-TID.
步骤401b.引导业务服务器BSF根据该B-TID获取RAND。Step 401b. The service server BSF is guided to obtain the RAND according to the B-TID.
在GBA初始化过程之后,在引导业务服务器BSF上存储有B-TID与RAND的对应关系,即根据B-TID能查找和获取对应的RAND。After the GBA initialization process, the corresponding relationship between the B-TID and the RAND is stored on the boot service server BSF, that is, the corresponding RAND can be found and obtained according to the B-TID.
引导业务服务器BSF根据该B-TID在该对应关系中查找和获取对应的RAND。Guide the service server BSF to find and obtain the corresponding RAND in the corresponding relationship according to the B-TID.
另外,由于B-TID的生成格式为“base64encode(RAND)@BSF_servers_domain_name”,因此,也可以从该B-TID中获取对应的RAND。In addition, since the generation format of the B-TID is "base64encode (RAND) @BSF_servers_domain_name", the corresponding RAND can also be obtained from the B-TID.
步骤401c.引导业务服务器BSF基于该第二主密钥Ks以及"gba-me"、该RAND、该IMPI和该NAF_Id生成第二应用密钥。Step 401c. The guidance service server BSF generates a second application key based on the second master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id.
引导业务服务器BSF基于该第二主密钥Ks以及"gba-me"、该RAND、该IMPI和该NAF_Id生成第二应用密钥,计算公式为:The guide service server BSF generates a second application key based on the second master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id, and the calculation formula is:
Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)
步骤402.引导业务服务器BSF建立该B-TID和该NAF-Id与该第二应用密钥的对应关系。Step 402. The service server BSF is guided to establish a correspondence between the B-TID and the NAF-Id and the second application key.
引导业务服务器BSF建立该B-TID和该NAF-Id与该第二应用密钥的对应关系,以使得根据该B-TID和该NAF-Id能查找到该第二应用密钥。The service server BSF is guided to establish a correspondence between the B-TID and the NAF-Id and the second application key, so that the second application key can be found according to the B-TID and the NAF-Id.
至此,引导业务服务器BSF建立了该B-TID和该NAF-Id与该第二应用密钥的对应关系,引导业务服务器BSF可以本地存储该对应关系,或者将该对应关系发送给第三方认证服务器,或者将该对应关系发送给该NAF_Id对应的第三方应用服务器。然后,基于该对应关系,如果运行在用户终端的第三方应用客户端有相同的B-TID和与该第二应用密钥的值相同的应用密钥,将可以实现对第三方应用客户端的身份认证、数据加密等操作。So far, the guidance service server BSF has established the correspondence between the B-TID and the NAF-Id and the second application key. The guidance service server BSF can store the correspondence locally or send the correspondence to a third-party authentication server. Or send the correspondence to a third-party application server corresponding to the NAF_Id. Then, based on the corresponding relationship, if the third-party application client running on the user terminal has the same B-TID and the same application key as the value of the second application key, the identity of the third-party application client can be realized Authentication, data encryption, etc.
以引导业务服务器BSF本地存储该对应关系为例,引导业务服务器BSF预先建立有用于该NAF_Id的账户密钥关系表,在该账户密钥关系表中存储有B-TID和第二应用密钥的一一对应关系。引导业务服务器BSF根据该B-TID在该账户密钥关系表中查找第二应用密钥,如果没有查找到第二应用密钥,则在该账户密钥关系表中新增该B-TID和该第二应用密钥的一一对应关系,如果查找到第二应用密钥,则在该账户密钥关系表中使用本次新生成的该第二应用密钥替换该B-TID已有的第二应用密钥。Taking the guidance service server BSF to store the corresponding relationship as an example, the guidance service server BSF has previously established an account key relationship table for the NAF_Id, and the account key relationship table stores the B-TID and the second application key. One-to-one correspondence. Guide the service server BSF to find the second application key in the account key relationship table according to the B-TID. If the second application key is not found, add the B-TID and The one-to-one correspondence of the second application key. If a second application key is found, the newly-generated second application key is used in the account key relationship table to replace the existing B-TID. The second application key.
需要说明的是,上述步骤401和步骤402还可以在下述步骤403之后执行,本发明并不对此进行限定。It should be noted that the above steps 401 and 402 may also be performed after the following step 403, which is not limited in the present invention.
步骤403.引导业务服务器BSF向用户终端发送注册应答消息,该注册应答消息是注册成功应答消息。Step 403. The service server BSF is guided to send a registration response message to the user terminal, where the registration response message is a registration success response message.
与步骤401相对应的,如果生成第二应用密钥的参数还包括Salt盐值,向用户终端发送的该注册成功应答消息,还包括该Salt盐值。Corresponding to step 401, if the parameter for generating the second application key further includes a Salt salt value, the registration success response message sent to the user terminal also includes the Salt salt value.
步骤404.用户终端接收引导业务服务器BSF发送的注册应答消息并执行相应的操作。Step 404: The user terminal receives the registration response message sent by the guided service server BSF and performs a corresponding operation.
用户终端接收引导业务服务器BSF发送的注册应答消息,该注册应答消息是注册成功应答消息或者是注册失败应答消息。The user terminal receives a registration response message sent by the guided service server BSF, and the registration response message is a registration success response message or a registration failure response message.
用户终端根据该客户端注册应答消息执行相应的操作,包括:The user terminal performs corresponding operations according to the client registration response message, including:
如果该注册应答消息是注册成功应答消息,则执行下述步骤405。If the registration response message is a registration success response message, step 405 described below is performed.
如果该注册应答消息是注册失败应答消息,则结束本流程,或者用户终端将该注册失败应答消息发送给第三方应用客户端之后结束本流程。If the registration response message is a registration failure response message, the process is ended, or the user terminal ends the process after sending the registration failure response message to a third-party application client.
步骤405.用户终端使用和引导业务服务器BSF相同的应用密钥生成方式,基于该第一主密钥Ks生成第一应用密钥。Step 405: The user terminal uses the same application key generation method as the bootstrap service server BSF, and generates a first application key based on the first master key Ks.
用户终端使用和引导业务服务器BSF相同的应用密钥生成方式,基于该第一主密钥Ks生成第一应用密钥。The user terminal uses the same application key generation method as the bootstrap service server BSF, and generates a first application key based on the first master key Ks.
以步骤401中引导业务服务器BSF使用的密钥派生算法公式为例:Key = KDF (Ks, Salt, RAND, IMPI, NAF_Id)。其中:Key是第一应用密钥;Ks是该第一主密钥Ks;Salt是与引导业务服务器BSF相同的盐值,如果引导业务服务器的盐值是一个固定字符串,则Salt是一个相同的固定字符串,如果引导业务服务器的盐值是一个随机值,则用户终端从注册成功应答消息中获取该盐值;RAND是GBA初始化过程中生成的RAND;IMPI是该用户终端的IMPI;NAF_Id是该第三方应用客户端对应的NAF_Id;KDF是与引导业务服务器BSF相同的密钥导出函数。Ks是必选参数,Salt、RAND、IMPI、NAF_Id是可选参数,并且选择的可选参数与引导业务服务器BSF一致。Take the key derivation algorithm formula used by the business server BSF in step 401 as an example: Key = KDF (Ks, Salt, RAND, IMPI, NAF_Id). Among them: Key is the first application key; Ks is the first master key Ks; Salt is the same salt value as the boot service server BSF. If the salt value of the boot service server is a fixed string, Salt is the same If the salt value of the boot service server is a random value, the user terminal obtains the salt value from the registration success response message; RAND is the RAND generated during the GBA initialization process; IMPI is the IMPI of the user terminal; NAF_Id Is the NAF_Id corresponding to the third-party application client; KDF is the same key derivation function as the BSF of the boot service server. Ks is a required parameter, Salt, RAND, IMPI, NAF_Id are optional parameters, and the optional parameters selected are consistent with the guidance service server BSF.
相应地,以步骤401中引导业务服务器BSF使用的密钥派生算法公式Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id) 为例,第一应用密钥生成步骤如下:Accordingly, the key derivation algorithm formula Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id) as an example, the first application key generation steps are as follows:
步骤405a.用户终端获取用户终端的IMPI。Step 405a. The user terminal acquires the IMPI of the user terminal.
用户终端获取用户终端的IMPI,该IMPI与GBA初始化过程中获取的IMPI是相同的IMPI。例如,使用与GBA初始化过程中一致的方法从IP多媒体服务识别模块(ISIM,IP Multimedia Services Identity Module)中获取IMPI。The user terminal obtains the IMPI of the user terminal, and the IMPI is the same IMPI obtained during the GBA initialization process. For example, an IMPI is obtained from an IP Multimedia Services Identity Module (ISIM) using a method consistent with the GBA initialization process.
步骤405b.用户终端获取RAND。Step 405b. The user terminal obtains RAND.
在GBA初始化过程之后,在用户终端上存储有B-TID及对应的RAND,用户终端获取该RAND。After the GBA initialization process, the B-TID and the corresponding RAND are stored on the user terminal, and the user terminal obtains the RAND.
另外,由于B-TID的生成格式为“base64encode(RAND)@BSF_servers_domain_name”,因此,也可以从该B-TID中获取对应的RAND。In addition, since the generation format of the B-TID is "base64encode (RAND) @BSF_servers_domain_name", the corresponding RAND can also be obtained from the B-TID.
步骤405c.用户终端基于第一主密钥Ks以及"gba-me"、该RAND、该IMPI和该NAF_Id生成第一应用密钥。Step 405c. The user terminal generates a first application key based on the first master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id.
用户终端基于第一主密钥Ks以及"gba-me"、该RAND、该IMPI和该NAF_Id生成第二应用密钥,计算公式为:The user terminal generates a second application key based on the first master key Ks and "gba-me", the RAND, the IMPI, and the NAF_Id, and the calculation formula is:
Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)Key = KDF (Ks, "gba-me", RAND, IMPI, NAF_Id)
至此,由于在GBA初始化过程成功执行之后,在用户终端上存储的B-TID及对应的RAND、Ks(即第一主密钥Ks)与引导业务服务器BSF上存储的该B-TID对应的RAND、Ks(即第二主密钥Ks)是相同的,而用户终端上获取的IMPI和引导业务服务器BSF上存储的该B-TID对应的IMPI是相同的,又由于用户终端和引导业务服务器BSF使用的是相同的应用密钥生成方式、相同的NAF_Id、相同的盐值,则生成的第一应用密钥和第二应用密钥的值是相同的。用户终端将该B-TID和第一应用密钥发送给NAF_Id对应的第三方应用客户端,第三方应用客户端基于该B-TID和第一应用密钥,将可以向第三方应用服务器实现快捷、安全的身份认证、数据加密等操作。So far, after the GBA initialization process is successfully performed, the B-TID stored on the user terminal and the corresponding RAND, Ks (that is, the first master key Ks) and the RAND corresponding to the B-TID stored on the boot service server BSF Ks (that is, the second master key Ks) is the same, and the IMPI obtained on the user terminal and the IMPI corresponding to the B-TID stored on the guided service server BSF are the same, and because the user terminal and the guided service server BSF are the same If the same application key generation method, the same NAF_Id, and the same salt value are used, the values of the generated first application key and the second application key are the same. The user terminal sends the B-TID and the first application key to the third-party application client corresponding to the NAF_Id. Based on the B-TID and the first application key, the third-party application client can quickly implement the third-party application server. , Secure identity authentication, data encryption and other operations.
如上流程,在实施例一的基础上,本实施例中还进一步在用户终端和引导业务服务器BSF上为用户终端上的第三方应用客户端生成了应用密钥,不仅具有实施例一具有的效果,带来的效果至少还包括:第一方面,有效解决了背景技术中的缺陷一即GBA架构的第二个过程应用密钥协商过程中第三方应用服务器仿冒恶意请求消耗引导业务服务器BSF和其他第三方应用服务器的计算、存储资源的问题;第二方面,即使是在同一GBA初始化过程之后为同一第三方应用客户端执行的多次密钥共享过程,如果Salt使用的是随机值,则生成的应用密钥也不相同,从而提高安全性。As described above, on the basis of the first embodiment, in this embodiment, an application key is further generated on the user terminal and the guidance service server BSF for the third-party application client on the user terminal, which not only has the effects of the first embodiment The effects brought by at least include: the first aspect, effectively solves the defects in the background technology-the second process of the GBA architecture-the third-party application server in the process of application key negotiation, counterfeits malicious requests, and guides the business server BSF and other The problem of computing and storage resources of the third-party application server. In the second aspect, even if multiple key sharing processes are performed for the same third-party application client after the same GBA initialization process, if a random value is used by Salt, it is generated. The application keys are also different for better security.
六、基于GBA的客户端注册和密钥共享方法实施例三Sixth, GBA-based client registration and key sharing method embodiment three
请参考图5,其示出了本发明提供的基于GBA的客户端注册和密钥共享方法实施例三的流程图,该方法可用于图2所示的实施环境中。本实施例进一步为用户终端中运行的第三方应用客户端提供了注册信息,该注册信息包括为用户终端中运行的第三方应用客户端生成用户令牌。Please refer to FIG. 5, which illustrates a flowchart of a third embodiment of a GBA-based client registration and key sharing method provided by the present invention. The method can be used in the implementation environment shown in FIG. 2. This embodiment further provides registration information for a third-party application client running in the user terminal, and the registration information includes generating a user token for the third-party application client running in the user terminal.
为了让引导业务服务器BSF为用户终端中运行的第三方应用客户端提供相应的注册信息和服务,则用户终端需将第三方应用客户端对应的NAF_Id传递给引导业务服务器BSF。用户终端将NAF_Id传递给引导业务服务器BSF可以包括多种实施方式,具体实施方式可以参照上述基于GBA的客户端注册和密钥共享方法实施例二,在此不再赘述。In order for the guided service server BSF to provide corresponding registration information and services for the third-party application client running in the user terminal, the user terminal needs to pass the NAF_Id corresponding to the third-party application client to the guided service server BSF. The user terminal passing the NAF_Id to the guidance service server BSF may include various implementation manners. For specific implementation manners, reference may be made to the second embodiment of the above-mentioned GBA-based client registration and key sharing method, and details are not described herein again.
在传递NAF_Id以及安全认证成功以后,引导业务服务器BSF可以为用户终端中运行的第三方应用客户端提供包括用户令牌的注册信息,即本实施例的下述步骤应用在基于GBA的客户端注册和密钥共享方法实施例一之后。具体可以包括:After the NAF_Id is passed and the security authentication is successful, the guided service server BSF can provide the registration information including the user token to the third-party application client running in the user terminal, that is, the following steps of this embodiment apply for registration on the GBA-based client And the key sharing method after the first embodiment. This can include:
步骤501.引导业务服务器BSF为该NAF_Id生成用户令牌。Step 501. The service server BSF is guided to generate a user token for the NAF_Id.
引导业务服务器BSF为该NAF_Id生成用户令牌,该用户令牌是唯一的,并且具有足够的长度和足够的随机性,使得难以被猜测破解。The service server BSF is guided to generate a user token for the NAF_Id. The user token is unique and has sufficient length and sufficient randomness, making it difficult to be guessed and cracked.
步骤502.引导业务服务器BSF建立该用户令牌与该NAF_Id或/和该B-TID对应的IMPI的关联关系。Step 502. The service server BSF is guided to establish an association relationship between the user token and the NAF_Id or / and the IMPI corresponding to the B-TID.
引导业务服务器BSF建立该用户令牌与该NAF_Id的关联关系,引导业务服务器BSF可以本地存储该关联关系,或者将该关联关系同步发送给第三方认证服务器,或者将该关联关系同步发送给该NAF_Id对应的第三方应用服务器。然后,基于该关联关系,如果运行在用户终端的第三方应用客户端有相同的用户令牌,第三方应用服务器将可以根据该关联关系实现对第三方应用客户端的认证,例如,以将该用户令牌同步发送给该NAF_Id对应的第三方应用服务器为例,该第三方应用服务器接收包括用户令牌的认证请求,在该关联关系中查找是否有对应的用户令牌,若有,则认证成功,从而可确定发送该认证请求的发送方是该第三方应用服务器对应的第三方应用客户端。Guide the service server BSF to establish the association between the user token and the NAF_Id. The guide service server BSF can store the association locally, or send the association to the third-party authentication server synchronously, or send the association to the NAF_Id synchronously. Corresponding third-party application server. Then, based on the association, if the third-party application client running on the user terminal has the same user token, the third-party application server can implement authentication to the third-party application client according to the association, for example, to the user For example, the token is sent to the third-party application server corresponding to the NAF_Id. The third-party application server receives an authentication request including a user token, and searches for the corresponding user token in the association relationship. If so, the authentication succeeds. , Thereby determining that the sender of the authentication request is a third-party application client corresponding to the third-party application server.
进一步的,为了给同一用户提供持续的应用服务,还应当建立该用户令牌与该NAF_Id和该B-TID对应的IMPI的关联关系,以使得能根据该用户令牌能查找到同一用户终端对应的NAF_Id和IMPI,从而为同一用户提供持续的服务。例如,以将该关联关系同步发送给该NAF_Id对应的第三方应用服务器为例,该第三方应用服务器接收包括用户令牌的认证请求,根据该用户令牌在该关联关系中查找对应的IMPI,若查找到,则可以向该IMPI关联的用户提供持续的应用服务。Further, in order to provide continuous application services to the same user, an association relationship between the user token and the IMPI corresponding to the NAF_Id and the B-TID should be established so that the corresponding user terminal can be found according to the user token NAF_Id and IMPI to provide continuous service for the same user. For example, taking the association to the third-party application server corresponding to the NAF_Id as an example, the third-party application server receives an authentication request including a user token, and searches for the corresponding IMPI in the association according to the user token. If found, it can provide continuous application services to users associated with the IMPI.
进一步的,为了不致于在第三方应用服务器上泄露IMPI,还可以创建一个与该IMPI对应的唯一用户标识,再建立该用户令牌与该NAF_Id和该唯一用户标识的对应关系,从而避免用户的IMPI泄露给第三方应用服务器。Further, in order not to leak the IMPI on the third-party application server, it is also possible to create a unique user ID corresponding to the IMPI, and then establish the correspondence between the user token and the NAF_Id and the unique user ID, thereby avoiding the user ’s IMPI was leaked to a third-party application server.
需要说明的是,还应当提供清理机制,对于已经失效的用户令牌应当及时清理相应的关联关系,例如在用户令牌验证一次后删除该用户令牌相应的关联关系,或者给用户令牌设定一个有效期,依据有效期及时删除已过有效期的用户令牌相应的关联关系。具体清理机制在此不赘述。It should be noted that a cleaning mechanism should also be provided, and the corresponding association relationship should be cleared in time for the user token that has expired, such as deleting the corresponding association relationship of the user token after the user token is verified once, or setting the user token Set a valid period, and delete the corresponding association relationship of the user token that has expired in time according to the valid period. The specific cleaning mechanism will not be repeated here.
步骤503.引导业务服务器BSF向用户终端发送注册应答消息,该注册应答消息是注册成功应答消息,并且包括该用户令牌。Step 503. The service server BSF is guided to send a registration response message to the user terminal, where the registration response message is a registration success response message and includes the user token.
步骤504.用户终端接收引导业务服务器BSF发送的注册应答消息并执行相应的操作。Step 504: The user terminal receives the registration response message sent by the guided service server BSF and performs a corresponding operation.
用户终端接收引导业务服务器BSF发送的注册应答消息,该注册应答消息是注册成功应答消息或者是注册失败应答消息。The user terminal receives a registration response message sent by the guided service server BSF, and the registration response message is a registration success response message or a registration failure response message.
用户终端根据该注册应答消息执行相应的操作,包括:The user terminal performs corresponding operations according to the registration response message, including:
如果该注册应答消息是注册成功应答消息,则获取该注册成功应答消息中的用户令牌,并且将该用户令牌传递给NAF_Id对应的第三方应用客户端以用于认证鉴权,然后结束本流程。If the registration response message is a registration success response message, obtain the user token in the registration success response message, and pass the user token to the third-party application client corresponding to NAF_Id for authentication and authentication, and then end this Process.
如果该注册应答消息是注册失败应答消息,则结束本流程,或者用户终端将该注册失败应答消息发送给第三方应用客户端之后结束本流程。If the registration response message is a registration failure response message, the process is ended, or the user terminal ends the process after sending the registration failure response message to a third-party application client.
如上实施例过程,为用户终端中运行的第三方应用客户端生成了用户令牌。带来的效果包括:第一方面,自动为第三方应用客户端获取用户令牌,减少了终端用户的输入操作,提升了用户的使用体验;第二方面,该用户令牌将可以用于第三方应用客户端向对应的第三方应用服务器的认证鉴权,从而提升用户的使用体验;第三方面,在用于认证鉴权时,该用户令牌由于不需要进行加密计算等操作,因此,更适用于一些轻量级的应用客户端(如基于浏览器的网页应用)。The process of the above embodiment generates a user token for a third-party application client running in the user terminal. The effects include: in the first aspect, automatically obtaining user tokens for third-party application clients, reducing end-user input operations and improving the user experience; in the second aspect, the user token can be used for The third-party application client authenticates to the corresponding third-party application server, thereby improving the user experience. In the third aspect, when used for authentication, the user token does not need to perform operations such as cryptographic calculations. Suitable for some lightweight application clients (such as browser-based web applications).
七、基于GBA的客户端注册和密钥共享方法实施例四Seven, GBA-based client registration and key sharing method embodiment four
请参考图6,其示出了本发明提供的基于GBA的客户端注册和密钥共享方法实施例四的流程图,该方法可用于图2所示的实施环境中。作为基于基于GBA的客户端注册和密钥共享方法实施例二提供的更为优选地实施例,本实施例还进一步实现了终端用户的授权确认过程。Please refer to FIG. 6, which shows a flowchart of a fourth embodiment of a GBA-based client registration and key sharing method provided by the present invention. The method can be used in the implementation environment shown in FIG. 2. As a more preferred embodiment provided in the second embodiment based on the GBA-based client registration and key sharing method, this embodiment further implements the authorization confirmation process of the end user.
该方法的下述步骤在基于GBA的客户端注册和密钥共享方法实施例二的基础上,应用在用户终端向引导业务服务器BSF传递NAF_Id以及安全认证成功以后,以及应用在引导业务服务器BSF为用户终端中运行的第三方应用客户端提供包括应用密钥的注册信息的过程之前,具体包括如下几个步骤:The following steps of this method are based on the GBA-based client registration and key sharing method embodiment two, which is applied after the user terminal passes the NAF_Id and security authentication to the guided service server BSF, and the application is applied to the guided service server BSF as Before the third-party application client running in the user terminal provides the registration information including the application key, it specifically includes the following steps:
步骤a.引导业务服务器BSF向用户终端发送应用授权请求消息。Step a. Guide the service server BSF to send an application authorization request message to the user terminal.
该应用授权请求消息中可以包括:The application authorization request message may include:
或/和第三方应用名称,该名称是用于识别第三方应用客户端和第三方应用服务器的名称,在引导业务服务器BSF上预先存储有NAF_Id和第三方应用名称的对应关系,引导业务服务器BSF根据NAF_Id在该对应关系中查找和获取对应的第三方应用名称。Or / and the name of the third-party application. This name is used to identify the third-party application client and the third-party application server. The corresponding relationship between the NAF_Id and the third-party application name is pre-stored on the boot service server BSF to guide the service server BSF Find and obtain the corresponding third-party application name in the corresponding relationship according to the NAF_Id.
或/和移动用户名称,该名称是用于识别移动用户的名称,在引导业务服务器BSF上预先存储有IMPI和移动用户名称的对应关系,引导业务服务器BSF根据IMPI在该对应关系中查找和获取对应的移动用户名称。IMPI由引导业务服务器BSF根据B-TID获取:在GBA初始化过程之后,在引导业务服务器BSF上存储有B-TID与IMPI的对应关系,即根据B-TID能查找和获取对应的IMPI,引导业务服务器BSF根据该B-TID在该对应关系中查找和获取对应的IMPI。Or / and the name of the mobile user. The name is used to identify the mobile user. The correspondence between the IMPI and the name of the mobile user is stored in the guidance service server BSF in advance. The guidance service server BSF searches and obtains the correspondence according to the IMPI. Corresponding mobile user name. The IMPI is obtained by the guidance service server BSF according to the B-TID: After the GBA initialization process, the correspondence relationship between the B-TID and IMPI is stored on the guidance service server BSF, that is, the corresponding IMPI can be found and obtained according to the B-TID to guide the service. The server BSF searches for and obtains the corresponding IMPI in the corresponding relationship according to the B-TID.
相应地,用户终端接收引导业务服务器BSF发送的应用授权请求消息。Accordingly, the user terminal receives the application authorization request message sent by the guidance service server BSF.
步骤b.用户终端显示应用授权验证界面。Step b. The user terminal displays an application authorization verification interface.
用户终端接收到引导业务服务器BSF发送的应用授权请求消息之后,调用并显示应用授权验证界面,以询问终端用户是否同意向该第三方应用授权。After receiving the application authorization request message sent by the service server BSF, the user terminal invokes and displays the application authorization verification interface to ask the end user whether to agree to authorize the third-party application.
在显示的应用授权验证界面上,可以显示应用授权请求消息中所包括的第三方应用名称或/和移动用户名称,具体为:On the displayed application authorization verification interface, the third-party application name or / and mobile user name included in the application authorization request message can be displayed, specifically:
第三方应用名称,即将要授权的第三方应用客户端和第三方应用服务器的名称;Third-party application name, which is the name of the third-party application client and third-party application server to be authorized;
移动用户名称,即将要授权的移动用户名称。Mobile user name, the name of the mobile user to be authorized.
在显示应用授权验证界面之后,终端用户可以输入表示确认授权或者表示取消授权的授权信息。After the application authorization verification interface is displayed, the end user can enter authorization information indicating confirmation of authorization or cancellation of authorization.
可选地,在显示的应用授权验证界面上,还可以包括安全验证码输入框,以询问终端用户输入安全验证码。该安全验证码用于进一步地验证终端用户的授权,相应地,在引导业务服务器BSF上预先存储有B-TID和安全验证码的对应关系。Optionally, on the displayed application authorization verification interface, a security verification code input box may also be included to ask the end user to enter a security verification code. The security verification code is used to further verify the authorization of the end user. Correspondingly, the corresponding relationship between the B-TID and the security verification code is stored in advance on the guidance service server BSF.
步骤c.用户终端接收终端用户在应用授权验证界面中输入的授权信息。Step c. The user terminal receives authorization information entered by the end user in the application authorization verification interface.
步骤d.用户终端向引导业务服务器BSF发送应用授权应答消息,该应用授权应答消息是应用授权确认消息或者是应用授权取消消息。Step d. The user terminal sends an application authorization response message to the guidance service server BSF, where the application authorization response message is an application authorization confirmation message or an application authorization cancellation message.
用户终端根据终端用户输入的授权信息执行相应的操作,包括:The user terminal performs corresponding operations according to the authorization information input by the terminal user, including:
如果授权信息是表示确认授权的授权信息,则用户终端向引导业务服务器BSF发送的应用授权应答消息是应用授权确认消息。If the authorization information is authorization information indicating confirmation of authorization, the application authorization response message sent by the user terminal to the guidance service server BSF is an application authorization confirmation message.
可选地,如果在显示的应用授权验证界面上还包括安全验证码输入框,并且用户终端接收的终端用户输入的授权消息中包括安全验证码,则用户终端向引导业务服务器BSF发送的应用授权确认消息中还包括该安全验证码。Optionally, if a security verification code input box is further included on the displayed application authorization verification interface, and the authorization message input by the end user received by the user terminal includes the security verification code, the user terminal sends the application authorization to the guidance service server BSF The confirmation message also includes the security verification code.
如果授权信息是表示取消授权的授权信息,则用户终端向引导业务服务器BSF发送的应用授权应答消息是应用授权取消消息。If the authorization information is authorization information indicating that the authorization is cancelled, the application authorization response message sent by the user terminal to the guidance service server BSF is an application authorization cancellation message.
步骤e.引导业务服务器BSF接收用户终端发送的应用授权应答消息并执行相应的操作。Step e. Guide the service server BSF to receive the application authorization response message sent by the user terminal and perform the corresponding operation.
引导业务服务器BSF接收用户终端发送的应用授权应答消息,该应用授权应答消息是表示确认授权或者是表示取消授权的应用授权应答消息。The guidance service server BSF receives an application authorization response message sent by the user terminal, where the application authorization response message is an application authorization response message indicating confirmation of authorization or cancellation of authorization.
引导业务服务器BSF根据该应用授权应答消息执行相应的操作,包括:Guide the service server BSF to perform corresponding operations according to the application authorization response message, including:
如果该应用授权应答消息是应用授权确认消息,则继续执行后续步骤。If the application authorization response message is an application authorization confirmation message, the subsequent steps continue.
可选地,在引导业务服务器BSF上预先存储有B-TID和安全验证码的对应关系,如果在引导业务服务器BSF接收的应用授权确认消息中包括安全验证码,则引导业务服务器BSF根据B-TID在该对应关系中查找和获取对应的安全验证码,并且比较两个安全验证码是否一致:如果一致,则继续执行后续步骤;如果不一致,则结束流程,不执行引导业务服务器BSF为用户终端中运行的第三方应用客户端提供包括第三方用户标识和应用密钥的注册信息的过程Optionally, the corresponding relationship between the B-TID and the security verification code is stored in the guidance service server BSF in advance. If the application authorization confirmation message received by the guidance service server BSF includes the security verification code, the guidance service server BSF according to B- TID finds and obtains the corresponding security verification code in this correspondence, and compares whether the two security verification codes are consistent: if they are consistent, the subsequent steps are continued; if they are not consistent, the process is ended without guiding the service server BSF to the user terminal. Of a third-party application client running in the process of providing registration information including a third-party user ID and application key
如果该应用授权应答消息是应用授权取消消息,则结束流程,不执行引导业务服务器BSF为用户终端中运行的第三方应用客户端提供包括第三方用户标识和应用密钥的注册信息的过程。If the application authorization response message is an application authorization cancellation message, the process ends, and the process of directing the service server BSF to provide the third-party application client running in the user terminal with registration information including the third-party user identification and application key is not performed.
本实施例提供的方法,在基于GBA的客户端注册和密钥共享方法实施例一的基础上,增加了让终端用户验证授权的过程,通过增加这一过程,可以更加确认客户端注册信息的提供得到了终端用户的授权许可,避免由于误操作等原因给非必要的第三方应用客户端进行了授权。The method provided in this embodiment is based on the first embodiment of the GBA-based client registration and key sharing method, and adds a process for the end user to verify and authorize. By adding this process, the client registration information can be more confirmed. The provision has obtained the authorization permission of the end user, so as to prevent the unnecessary third party application client from being authorized due to misoperation and the like.
本实施例还可以与基于GBA的客户端注册和密钥共享方法实施例三组成一个新的实施例,即将本实施例的方法步骤应用在用户终端向引导业务服务器BSF传递NAF_Id以及安全认证成功以后,以及应用在引导业务服务器BSF为用户终端中运行的第三方应用客户端提供包括用户令牌的过程之前,具体过程不赘述。This embodiment can also be combined with the third embodiment of the GBA-based client registration and key sharing method to form a new embodiment, that is, to apply the method steps of this embodiment after the user terminal passes the NAF_Id to the boot service server BSF and the security authentication is successful Before the application guides the service server BSF to provide a third-party application client running in the user terminal with a process including a user token, the specific process is not described in detail.
 Zh
此外,为实现上述目的,本发明还提供一种基于GBA的客户端注册和密钥共享装置,所述密钥共享与身份认证装置应用于运行有第三方应用客户端的用户终端中,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于GBA的客户端注册和密钥共享程序,所述基于GBA的客户端注册和密钥共享程序被所述处理器执行时实现上述的基于GBA的客户端注册和密钥共享方法的步骤。In addition, in order to achieve the above object, the present invention also provides a client registration and key sharing device based on GBA. The key sharing and identity authentication device is applied to a user terminal running a third-party application client, and includes: a memory , A processor, and a GBA-based client registration and key sharing program stored on the memory and executable on the processor, the GBA-based client registration and key sharing program being used by the processor Implement the steps of the above-mentioned GBA-based client registration and key sharing method when executed.
此外,为实现上述目的,本发明还提供一种基于GBA的客户端注册和密钥共享装置,所述密钥共享与身份认证装置应用于引导业务服务器BSF,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于GBA的客户端注册和密钥共享程序,所述基于GBA的客户端注册和密钥共享程序被所述处理器执行时实现上述的基于GBA的客户端注册和密钥共享方法的步骤。In addition, in order to achieve the above object, the present invention also provides a GBA-based client registration and key sharing device. The key sharing and identity authentication device is used to guide a service server BSF, and includes: a memory, a processor, and a storage device. The GBA-based client registration and key sharing program on the memory and which can be run on the processor, the GBA-based client registration and key sharing program is implemented by the processor to implement the above-mentioned based on Steps of GBA's client registration and key sharing method.
此外,为实现上述目的,本发明还提供一种基于GBA的客户端注册和密钥共享***,所述基于GBA的客户端注册和密钥共享***包括:用户终端以及引导业务服务器BSF;In addition, in order to achieve the above object, the present invention also provides a GBA-based client registration and key sharing system. The GBA-based client registration and key sharing system includes: a user terminal and a guided service server BSF;
所述用户终端包括上述应用于运行有第三方应用客户端的用户终端中的基于GBA的客户端注册和密钥共享装置;The user terminal includes the above-mentioned GBA-based client registration and key sharing device applied to a user terminal running a third-party application client;
所述引导业务服务器BSF包括上述应用于引导业务服务器BSF的基于GBA的客户端注册和密钥共享装置。The guided service server BSF includes the above GBA-based client registration and key sharing device applied to the guided service server BSF.
此外,为实现上述目的,本发明还提供了一种应用于用户终端的存储介质,其特征在于,所述存储介质中存储有程序,所述程序用于实现如上所述应用于运行有第三方应用客户端的用户终端中的基于GBA的客户端注册和密钥共享方法。In addition, in order to achieve the foregoing object, the present invention also provides a storage medium applied to a user terminal, which is characterized in that a program is stored in the storage medium, and the program is used to implement the application to a third party running as described above. GBA-based client registration and key sharing method in a user terminal of an application client.
此外,为实现上述目的,本发明还提供了一种应用于引导业务服务器BSF的存储介质,其特征在于,所述存储介质中存储有程序,所述程序用于实现如上所述应用引导业务服务器BSF的基于GBA的客户端注册和密钥共享装置。In addition, in order to achieve the above object, the present invention also provides a storage medium applied to the boot service server BSF, which is characterized in that a program is stored in the storage medium, and the program is used to implement the application boot service server as described above. BSF's GBA-based client registration and key sharing device.
 Zh
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还可以包括没有明确列出的其他要素,或者是还可以包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者***中还存在另外的相同要素。It should be noted that, in this article, the terms "including", "including" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, It may also include other elements not explicitly listed, or may also include elements inherent to such a process, method, article, or system. Without more restrictions, an element limited by the sentence "including a ..." does not exclude the existence of other identical elements in the process, method, article, or system that includes the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The sequence numbers of the foregoing embodiments of the present invention are only for description, and do not represent the superiority or inferiority of the embodiments.
可以以许多方式来实现本发明的方法、装置和***。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本发明的方法和***。用于方法的步骤的上述顺序仅是为了进行说明,本发明的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本发明实施为记录在记录介质中的程序,这些程序包括用于实现根据本发明的方法的机器可读指令。因而,本发明还覆盖存储用于执行根据本发明的方法的程序的记录介质。The methods, devices, and systems of the present invention can be implemented in many ways. For example, the methods and systems of the present invention can be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above-mentioned order of the steps of the method is merely for the purpose of illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless specifically stated otherwise. Furthermore, in some embodiments, the present invention can also be implemented as programs recorded in a recording medium, which programs include machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and thus do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description and drawings of the present invention, or directly or indirectly used in other related technical fields All are included in the patent protection scope of the present invention.
工业实用性Industrial applicability
综上所述,本发明在GBA初始化过程之后,为在用户终端中运行的第三方应用客户端提供了安全的注册环境,引导业务服务器BSF只为通过验证的用户终端才提供相应的注册信息和服务,包括生成应用密钥,有效解决了如背景技术中所述的GBA架构应用在互联网技术领域存在的技术缺陷。In summary, the present invention provides a secure registration environment for third-party application clients running in user terminals after the GBA initialization process, and guides the service server BSF to provide corresponding registration information and only for authenticated user terminals. Services, including the generation of application keys, effectively solve the technical shortcomings of the GBA architecture application described in the background in the field of Internet technology.
序列表自由内容Sequence Listing Free Content
在此处键入序列表自由内容描述段落。Type the free description paragraph of the sequence list here.

Claims (26)

1.基于GBA的客户端注册和密钥共享方法,其特征在于,应用于运行有第三方应用客户端的用户终端中,所述方法包括:1. A client registration and key sharing method based on GBA, characterized in that the method is applied to a user terminal running a third-party application client, and the method includes:
执行GBA初始化过程,获取B-TID和生成第一主密钥Ks;Execute GBA initialization process, obtain B-TID and generate first master key Ks;
基于所述第一主密钥Ks生成第一认证密钥;Generating a first authentication key based on the first master key Ks;
生成第一验证信息,并且使得所述第一验证信息与所述引导业务服务器BSF生成的第二验证信息的值相同;Generating first verification information, and making the first verification information the same value as the second verification information generated by the guidance service server BSF;
基于所述第一认证密钥和所述第一验证信息加密生成第一加密值;Generating a first encrypted value based on the first authentication key and the first verification information;
将所述B-TID和所述第一加密值发送给所述引导业务服务器BSF;Sending the B-TID and the first encrypted value to the guided service server BSF;
接收所述引导业务服务器BSF提供的注册信息和服务,所述注册信息和服务是在所述引导业务服务器BSF验证所述第一加密值有效之后提供的。Receiving registration information and services provided by the guided service server BSF, where the registration information and services are provided after the guided service server BSF verifies that the first encrypted value is valid.
2.根据权利要求1所述的方法,其特征在于,所述基于所述第一主密钥Ks生成第一认证密钥包括:The method according to claim 1, wherein the generating a first authentication key based on the first master key Ks comprises:
将所述第一主密钥Ks作为所述第一认证密钥;或者,Using the first master key Ks as the first authentication key; or
基于包括所述第一主密钥Ks以及第一固定字符串或/和第一随机字符串或/和第一时间戳或/和所述B-TID或/和NAF_Id的信息生成第一认证密钥,并且所述第一认证密钥的生成方式与所述引导业务服务器BSF生成第二认证密钥的生成方式一致,所述第一固定字符串为预先配置的并且与所述引导业务服务器BSF预先配置的第一固定字符串的值相同的字符串,所述第一随机字符串为随机生成的字符串,所述第一时间戳为通过获取所述用户终端的当前***时间生成,所述NAF_Id是所述第三方应用客户端的标识;Generate a first authentication key based on information including the first master key Ks and a first fixed character string or / and a first random character string or / and a first time stamp or / and the B-TID or / and NAF_Id Key, and the generation method of the first authentication key is consistent with the generation method of the guidance service server BSF generating the second authentication key, the first fixed character string is pre-configured and is the same as the guidance service server BSF A first pre-configured character string with the same value, the first random character string is a randomly generated character string, and the first time stamp is generated by obtaining the current system time of the user terminal, the NAF_Id is an identifier of the third-party application client;
若生成所述第一认证密钥的信息包括所述第一随机字符串或/和第一时间戳或/和所述NAF_Id,则将所述第一随机字符串或/和所述第一时间戳或/和所述NAF_Id发送给所述引导业务服务器BSF。If the information for generating the first authentication key includes the first random character string or / and the first time stamp or / and the NAF_Id, the first random character string or / and the first time Sending the stamp or / and the NAF_Id to the guidance service server BSF.
3.根据权利要求1所述的方法,其特征在于,所述生成第一验证信息包括:The method according to claim 1, wherein the generating the first verification information comprises:
基于第二固定字符串或/和第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id生成所述第一验证信息,并且所述第一验证信息的生成方式与所述引导业务服务器BSF生成第二验证信息的生成方式一致,所述第二固定字符串为预先配置的并且与所述引导业务服务器BSF预先配置的第二固定字符串的值相同的字符串,所述第二随机字符串为随机生成的字符串,所述第二时间戳为通过获取所述用户终端的当前***时间生成;Generating the first verification information based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id, and the first verification information The generation method is the same as the method for generating the second verification information by the guidance service server BSF, and the second fixed character string is pre-configured and has the same value as the second fixed character string pre-configured by the guidance service server BSF The second random string is a randomly generated string, and the second timestamp is generated by obtaining the current system time of the user terminal;
若生成所述第一验证信息包括基于所述第二随机字符串或/和第二时间戳或/和所述NAF_Id,并且使用签名加密算法基于所述第一认证密钥对所述第一验证信息签名加密生成所述第一加密值,则将所述第二随机字符串或/和所述第二时间戳或/和所述NAF_Id发送给所述引导业务服务器BSF。If generating the first verification information includes based on the second random string or / and a second time stamp or / and the NAF_Id, and using a signature encryption algorithm to verify the first verification based on the first authentication key The information signature is encrypted to generate the first encrypted value, and then the second random character string or / and the second time stamp or / and the NAF_Id are sent to the guidance service server BSF.
4.根据权利要求3所述的方法,其特征在于,所述基于第二固定字符串或/和第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id生成所述第一验证信息包括:The method according to claim 3, wherein the second fixed character string or / and the second random character string or / and the second time stamp or / and the B-TID or / and The NAF_Id generating the first verification information includes:
将所述第二固定字符串或所述第二随机字符串或所述第二时间戳或所述B-TID或所述NAF_Id中的一种作为所述第一验证信息;或者,Using one of the second fixed character string or the second random character string or the second time stamp or the B-TID or the NAF_Id as the first verification information; or,
根据包括所述第二固定字符串或/和所述第二随机字符串或/和所述第二时间戳或/和所述B-TID或/和所述NAF_Id的信息生成所述第一验证信息。Generating the first verification based on information including the second fixed character string or / and the second random character string or / and the second timestamp or / and the B-TID or / and the NAF_Id information.
5.根据权利要求1所述的方法,其特征在于,所述基于所述第一认证密钥和所述第一验证信息加密生成第一加密值包括:The method according to claim 1, wherein the encrypting and generating the first encrypted value based on the first authentication key and the first authentication information comprises:
使用签名加密算法基于所述第一认证密钥对所述第一验证信息签名加密生成所述第一加密值;或者,Signing and encrypting the first verification information based on the first authentication key using a signature encryption algorithm to generate the first encrypted value; or
使用对称加密算法基于所述第一认证密钥对包括所述第一验证信息的信息对称加密生成所述第一加密值。Use a symmetric encryption algorithm to symmetrically encrypt the information including the first authentication information based on the first authentication key to generate the first encrypted value.
6.根据权利要求5所述的方法,其特征在于,若向所述引导业务服务器BSF传递了NAF_Id,则所述接收所述引导业务服务器BSF提供的注册信息和服务包括:The method according to claim 5, characterized in that, if a NAF_Id is passed to the guidance service server BSF, the receiving the registration information and services provided by the guidance service server BSF comprises:
基于所述第一主密钥Ks生成第一应用密钥,所述第一应用密钥的生成方式与所述引导业务服务器BSF生成第二应用密钥的生成方式一致,所述第一应用密钥用于在所述第三方应用客户端中作为应用密钥;或者,A first application key is generated based on the first master key Ks. The first application key is generated in the same manner as the second service key generated by the boot service server BSF. The first application secret The key is used as an application key in the third-party application client; or,
接收所述引导业务服务器BSF发送的用户令牌,所述用户令牌用于所述第三方应用客户端访问对应第三方应用服务器的认证鉴权。Receiving a user token sent by the guided service server BSF, where the user token is used for the third party application client to access the corresponding third party application server for authentication.
7.根据权利要求12所述的方法,其特征在于,所述向所述引导业务服务器BSF传递NAF_Id包括:The method according to claim 12, characterized in that the passing of the NAF_Id to the guided service server (BSF) comprises:
在向所述引导业务服务器BSF发送的安全认证请求中还包括所述NAF_Id;或者,The security authentication request sent to the guidance service server BSF further includes the NAF_Id; or
若使用对称加密算法基于所述第一认证密钥对包括所述第一验证信息的信息对称加密生成所述第一加密值,则在生成所述第一验证信息的信息中还包括所述NAF_Id,以使得所述引导业务服务器BSF从对所述第一加密值解密后的明文中获取所述NAF_Id。If a symmetric encryption algorithm is used to generate the first encrypted value based on symmetric encryption of the information including the first authentication information on the first authentication key, the NAF_Id is further included in the information for generating the first authentication information. So that the guided service server BSF obtains the NAF_Id from the plaintext after decrypting the first encrypted value.
8.根据权利要求6所述的方法,其特征在于,所述基于所述第一主密钥Ks生成第一应用密钥包括:The method according to claim 6, wherein the generating a first application key based on the first master key Ks comprises:
基于所述第一主密钥Ks以及可选参数生成所述第一应用密钥;所述可选参数包括Salt、RAND、IMPI以及NAF_Id中的一个或多个,其中,Generate the first application key based on the first master key Ks and optional parameters; the optional parameters include one or more of Salt, RAND, IMPI, and NAF_Id, where:
Salt是与所述引导业务服务器BSF相同的盐值;Salt is the same salt value as the guided service server BSF;
RAND是所述GBA初始化过程中生成的RAND;RAND is a RAND generated during the GBA initialization process;
IMPI是所述用户终端的IMPI;IMPI is the IMPI of the user terminal;
NAF_Id是所述NAF_Id;NAF_Id is the NAF_Id;
KDF是与所述引导业务服务器BSF相同的密钥导出函数;KDF is the same key derivation function as the BSF;
所述可选参数与所述引导业务服务器BSF生成第二应用密钥时的可选参数一致。The optional parameters are consistent with the optional parameters when the boot service server BSF generates the second application key.
9.根据权利要求6至8任一项所述的方法,其特征在于,在所述若向所述引导业务服务器BSF传递了NAF_Id之后,以及在所述接收所述引导业务服务器BSF提供的注册信息和服务之前,还包括:The method according to any one of claims 6 to 8, wherein after the NAF_Id is passed to the guidance service server BSF, and after receiving the registration provided by the guidance service server BSF Information and services also include:
接收所述引导业务服务器BSF发送的应用授权请求消息;Receiving an application authorization request message sent by the guided service server BSF;
显示应用授权验证界面;Display the application authorization verification interface;
接收终端用户在所述应用授权验证界面中输入的授权信息;Receiving authorization information input by a terminal user in the application authorization verification interface;
若所述授权信息表示确认授权,则向所述引导业务服务器BSF发送应用授权应答消息,所述应用授权应答消息为应用授权确认消息。If the authorization information indicates confirmation of authorization, sending an application authorization response message to the bootstrapping service server BSF, where the application authorization response message is an application authorization confirmation message.
10.基于GBA的客户端注册和密钥共享方法,其特征在于,应用于引导业务服务器BSF中,所述方法包括:10. A client registration and key sharing method based on GBA, characterized in that the method is applied to a guided service server BSF, and the method includes:
接收用户终端发送的B-TID和第一加密值;Receiving the B-TID and the first encrypted value sent by the user terminal;
根据所述B-TID获取对应的第二主密钥Ks;Obtaining a corresponding second master key Ks according to the B-TID;
基于所述第二主密钥Ks生成第二认证密钥;Generating a second authentication key based on the second master key Ks;
生成第二验证信息,并且使得所述第二验证信息与所述用户终端生成的第一验证信息的值相同;Generating second verification information, and making the second verification information the same value as the first verification information generated by the user terminal;
基于所述第二认证密钥和所述第二验证信息验证所述第一加密值;Verifying the first encrypted value based on the second authentication key and the second verification information;
若验证所述第一加密值有效,则向所述用户终端提供注册信息和服务。If the first encrypted value is verified to be valid, registration information and services are provided to the user terminal.
11.根据权利要求10所述的方法,其特征在于,所述基于所述第二主密钥Ks生成第二认证密钥包括:The method according to claim 10, wherein the generating a second authentication key based on the second master key Ks comprises:
将所述第二主密钥Ks作为所述第一认证密钥;或者,Using the second master key Ks as the first authentication key; or
基于包括所述第二主密钥Ks以及第一固定字符串或/和第一随机字符串或/和第一时间戳或/和所述B-TID或/和NAF_Id的信息生成第一认证密钥,并且所述第二认证密钥的生成方式与所述用户终端生成第一认证密钥的生成方式一致,所述第一固定字符串为预先配置的并且与所述用户终端预先配置的第一固定字符串的值相同的字符串,所述第一随机字符串或/和所述第一时间戳或/和所述NAF_Id为所述用户终端所发送的。Generate a first authentication key based on information including the second master key Ks and a first fixed character string or / and a first random character string or / and a first time stamp or / and the B-TID or / and NAF_Id Key, and the generation mode of the second authentication key is the same as the generation method of generating the first authentication key by the user terminal, and the first fixed character string is pre-configured and the first A character string with the same value of a fixed character string, the first random character string or / and the first time stamp or / and the NAF_Id is sent by the user terminal.
12.根据权利要求10所述的方法,其特征在于,所述生成第二验证信息包括:The method according to claim 10, wherein the generating the second verification information comprises:
基于第二固定字符串或/和第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id生成所述第二验证信息,并且所述第二验证信息的生成方式与所述用户终端生成第一验证信息的生成方式一致,所述第二固定字符串为预先配置的并且与所述用户终端预先配置的第二固定字符串的值相同的字符串,所述第二随机字符串或/和所述第二时间戳或/和所述NAF_Id为所述用户终端所发送的。Generating the second verification information based on a second fixed character string or / and a second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id, and the second verification information The generation method is the same as the method used by the user terminal to generate the first verification information. The second fixed character string is a character string that is pre-configured and has the same value as the second fixed character string that is pre-configured by the user terminal. The second random character string or / and the second time stamp or / and the NAF_Id is sent by the user terminal.
13.根据权利要求12所述的方法,其特征在于,所述基于第二固定字符串或/和第二随机字符串或/和所述B-TID或/和所述NAF_Id生成所述第二验证信息包括:13. The method according to claim 12, wherein the generating the second based on a second fixed character string or / and a second random character string or / and the B-TID or / and the NAF_Id Verification information includes:
将所述第二固定字符串或所述第二随机字符串或所述第二时间戳或所述B-TID或所述NAF_Id中的一种作为所述第二验证信息;或者,Using one of the second fixed character string or the second random character string or the second time stamp or the B-TID or the NAF_Id as the second verification information; or,
根据包括所述第二固定字符串或/和所述第二随机字符串或/和第二时间戳或/和所述B-TID或/和所述NAF_Id的信息生成所述第二验证信息。Generating the second verification information according to information including the second fixed character string or / and the second random character string or / and a second time stamp or / and the B-TID or / and the NAF_Id.
14.根据权利要求10所述的方法,其特征在于,所述基于所述第二认证密钥和所述第二验证信息验证所述第一加密值包括:The method according to claim 10, wherein the verifying the first encrypted value based on the second authentication key and the second verification information comprises:
若所述用户终端使用签名加密算法生成所述第一加密值,则使用相同的签名加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值;或者,If the user terminal uses a signature encryption algorithm to generate the first encryption value, using the same signature encryption algorithm to verify the first encryption value based on the second authentication key and the second verification information; or
若所述用户终端使用对称加密算法生成所述第一加密值,则使用相同的对称加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值。If the user terminal generates the first encrypted value using a symmetric encryption algorithm, the same encrypted encryption algorithm is used to verify the first encrypted value based on the second authentication key and the second verification information.
15.根据权利要求14所述的方法,其特征在于,所述使用相同的签名加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值包括:The method according to claim 14, wherein the verifying the first encrypted value based on the second authentication key and the second verification information using the same signature encryption algorithm comprises:
使用和所述用户终端相同的签名加密算法,基于所述第二认证密钥对所述第二验证信息签名加密生成第二加密值;Use the same signature encryption algorithm as the user terminal to sign-encrypt the second verification information based on the second authentication key to generate a second encrypted value;
比较所述第二加密值与所述第一加密值是否一致;若一致,则确定所述第一加密值验证成功。It is compared whether the second encrypted value is consistent with the first encrypted value; if they are consistent, it is determined that the verification of the first encrypted value is successful.
16.根据权利要求14所述的方法,其特征在于,所述使用相同的对称加密算法基于所述第二认证密钥和所述第二验证信息验证所述第一加密值包括:The method according to claim 14, wherein the verifying the first encryption value based on the second authentication key and the second verification information using the same symmetric encryption algorithm comprises:
使用和所述用户终端相同的对称加密算法,基于所述第二认证密钥对所述第一加密值解密获得明文,并从所述解密获得的明文中获取第一验证信息;Using the same symmetric encryption algorithm as the user terminal, decrypting the first encrypted value to obtain a plaintext based on the second authentication key, and obtaining first verification information from the plaintext obtained by the decryption;
比较所述第二验证信息与所述第一验证信息是否一致;若一致,则确定所述第一加密值验证成功。It is compared whether the second verification information is consistent with the first verification information; if they are consistent, it is determined that the verification of the first encrypted value is successful.
17.根据权利要求10所述的方法,其特征在于,若接收到所述用户终端传递的NAF_Id以及若验证所述第一加密值有效之后,所述向所述用户终端提供注册信息和服务包括:The method according to claim 10, wherein after receiving the NAF_Id passed by the user terminal and after verifying that the first encrypted value is valid, the providing registration information and services to the user terminal includes: :
生成所述NAF_Id对应的用户令牌,所述用户令牌为用于所述第三方应用客户端访问对应第三方应用服务器的认证鉴权;Generating a user token corresponding to the NAF_Id, where the user token is an authentication authentication used by the third-party application client to access a corresponding third-party application server;
向所述用户终端发送的注册成功应答消息中包括所述用户令牌,以使得所述用户令牌用于在所述NAF_Id对应的第三方应用客户端中访问对应第三方应用服务器的认证鉴权。The registration success response message sent to the user terminal includes the user token, so that the user token is used to access the corresponding third-party application server for authentication in the third-party application client corresponding to the NAF_Id. .
18.根据权利要求17所述的方法,其特征在于,所述生成所述NAF_Id对应的用户令牌包括:18. The method according to claim 17, wherein the generating a user token corresponding to the NAF_Id comprises:
使用随机生成的全局唯一字符串作为所述用户令牌;Using a randomly generated globally unique string as the user token;
建立所述用户令牌和所述NAF_Id或/和所述B-TID对应的IMPI的关联关系。Establishing an association relationship between the user token and the NAF_Id or / and the IMPI corresponding to the B-TID.
19.根据权利要求10所述的方法,其特征在于,若接收到所述用户终端传递的NAF_Id以及若验证所述第一加密值有效之后,则还包括:The method according to claim 10, wherein, if the NAF_Id passed by the user terminal is received and if the first encrypted value is verified to be valid, the method further comprises:
基于所述第二主密钥Ks生成第二应用密钥,所述第二应用密钥的生成方式与所述用户终端生成第一应用密钥的生成方式一致,并且建立所述B-TID和所 述NAF_Id与所述第二应用密钥的对应关系。Generate a second application key based on the second master key Ks, the generation method of the second application key is consistent with the generation method of generating the first application key by the user terminal, and establish the B-TID and A correspondence between the NAF_Id and the second application key.
20.根据权利要求19所述的方法,其特征在于,所述基于所述第二主密钥Ks生成第二应用密钥包括:The method according to claim 19, wherein the generating a second application key based on the second master key Ks comprises:
基于所述第二主密钥Ks以及可选参数生成所述第二应用密钥;所述可选参数包括Salt、RAND、IMPI以及NAF_Id中的一个或多个,其中,Generate the second application key based on the second master key Ks and optional parameters; the optional parameters include one or more of Salt, RAND, IMPI, and NAF_Id, where:
Salt是与所述用户终端相同的盐值;Salt is the same salt value as the user terminal;
RAND是所述GBA初始化过程中生成的RAND;RAND is a RAND generated during the GBA initialization process;
IMPI是所述B-TID对应的IMPI;IMPI is the IMPI corresponding to the B-TID;
NAF_Id是所述NAF_Id;NAF_Id is the NAF_Id;
KDF是与所述用户终端相同的密钥导出函数;KDF is the same key derivation function as the user terminal;
所述可选参数与所述用户终端生成第一应用密钥时的可选参数一致。The optional parameters are consistent with the optional parameters when the user terminal generates the first application key.
21.根据权利要求17至20中任一项所述的方法,其特征在于,在若接收到所述用户终端传递的NAF_Id以及若验证所述第一加密值有效之后,以及向所述用户终端提供注册信息和服务之前,还包括:The method according to any one of claims 17 to 20, wherein after receiving the NAF_Id passed by the user terminal and if verifying that the first encrypted value is valid, and sending the message to the user terminal Before providing registration information and services, it also includes:
向所述用户终端发送应用授权请求消息,所述应用授权请求消息包括第三方应用名称或/和移动用户名称,所述第三方应用名称是根据所述NAF_Id获取的,所述移动用户名称是根据所述B-TID对应的IMPI获取的;Sending an application authorization request message to the user terminal, where the application authorization request message includes a third-party application name or / and a mobile user name, the third-party application name is obtained according to the NAF_Id, and the mobile user name is based on Obtained by the IMPI corresponding to the B-TID;
接收所述用户终端发送的应用授权应答消息;Receiving an application authorization response message sent by the user terminal;
若所述应用授权应答消息为应用授权确认消息,则执行向所述用户终端提供注册信息和服务的步骤。If the application authorization response message is an application authorization confirmation message, performing the steps of providing registration information and services to the user terminal.
22.基于GBA的客户端注册和密钥共享装置,其特征在于,所述装置应用于运行有第三方应用客户端的用户终端中,包括:存储器、处理器,所述处理器用于运行所述存储器所存储的程序,所述程序运行时执行包括权利要求1至9中任一项所述的方法。22. GBA-based client registration and key sharing device, characterized in that the device is applied to a user terminal running a third-party application client, and includes: a memory, a processor, and the processor is used to run the memory A stored program that, when run, executes the method according to any one of claims 1 to 9.
23.基于GBA的客户端注册和密钥共享装置,其特征在于,所述装置应用于引导业务服务器BSF,包括:存储器、处理器,所述处理器用于运行所述存储器所存储的程序,所述程序运行时执行包括权利要求10至21中任一项所述的方法。23. A GBA-based client registration and key sharing device, characterized in that the device is used to guide a service server BSF, and includes: a memory, a processor, and the processor is configured to run a program stored in the memory. When the program is executed, the method includes the method according to any one of claims 10 to 21.
24.基于GBA的客户端注册和密钥共享***,其特征在于,所述***包括:用户终端以及引导业务服务器BSF;24. A client registration and key sharing system based on GBA, characterized in that the system comprises: a user terminal and a guided service server BSF;
所述用户终端包括如权利要求22所述的装置;The user terminal includes the apparatus according to claim 22;
所述引导业务服务器BSF包括如权利要求23所述的装置。The guided service server BSF includes the device according to claim 23.
25.一种存储介质,其特征在于,所述存储介质中存储有程序,所述程序用于实现包括权利要求1至9中任一项所述的方法。25. A storage medium, wherein a program is stored in the storage medium, and the program is used to implement the method according to any one of claims 1 to 9.
26.一种存储介质,其特征在于,所述存储介质中存储有程序,所述程序用于实现包括权利要求10至21中任一项所述的方法。26. A storage medium, wherein a program is stored in the storage medium, and the program is configured to implement the method according to any one of claims 10 to 21.
 Zh
 Zh
PCT/CN2019/074725 2018-08-23 2019-02-04 Gba-based client registration and key sharing method, device, and system WO2020037958A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910775078.3A CN111050322B (en) 2018-08-23 2019-08-22 GBA-based client registration and key sharing method, device and system

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810978212.5A CN109121135A (en) 2018-08-23 2018-08-23 Client registers and key sharing method, apparatus and system based on GBA
CN201810978212.5 2018-08-23
CNPCT/CN2019/073103 2019-01-25
CN2019073103 2019-01-25

Publications (1)

Publication Number Publication Date
WO2020037958A1 true WO2020037958A1 (en) 2020-02-27

Family

ID=69592297

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/074725 WO2020037958A1 (en) 2018-08-23 2019-02-04 Gba-based client registration and key sharing method, device, and system

Country Status (1)

Country Link
WO (1) WO2020037958A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120284785A1 (en) * 2011-05-05 2012-11-08 Motorola Mobility, Inc. Method for facilitating access to a first access nework of a wireless communication system, wireless communication device, and wireless communication system
CN104348801A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Authentication method, method for generating credential and correlative apparatus
CN106534050A (en) * 2015-09-11 2017-03-22 中移(杭州)信息技术有限公司 Method and device for realizing key agreement of virtual private network (VPN)
CN109121135A (en) * 2018-08-23 2019-01-01 刘高峰 Client registers and key sharing method, apparatus and system based on GBA

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120284785A1 (en) * 2011-05-05 2012-11-08 Motorola Mobility, Inc. Method for facilitating access to a first access nework of a wireless communication system, wireless communication device, and wireless communication system
CN104348801A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Authentication method, method for generating credential and correlative apparatus
CN106534050A (en) * 2015-09-11 2017-03-22 中移(杭州)信息技术有限公司 Method and device for realizing key agreement of virtual private network (VPN)
CN109121135A (en) * 2018-08-23 2019-01-01 刘高峰 Client registers and key sharing method, apparatus and system based on GBA

Similar Documents

Publication Publication Date Title
JP7119040B2 (en) Data transmission method, device and system
CN110380852B (en) Bidirectional authentication method and communication system
Arshad et al. An efficient and secure authentication and key agreement scheme for session initiation protocol using ECC
US10638321B2 (en) Wireless network connection method and apparatus, and storage medium
CN109728909B (en) Identity authentication method and system based on USBKey
CN111050322B (en) GBA-based client registration and key sharing method, device and system
WO2017028593A1 (en) Method for making a network access device access a wireless network access point, network access device, application server, and non-volatile computer readable storage medium
CN108599925B (en) Improved AKA identity authentication system and method based on quantum communication network
WO2018076365A1 (en) Key negotiation method and device
US10411884B2 (en) Secure bootstrapping architecture method based on password-based digest authentication
US8793497B2 (en) Puzzle-based authentication between a token and verifiers
KR101009330B1 (en) Method, system and authentication centre for authenticating in end-to-end communications based on a mobile network
US6993652B2 (en) Method and system for providing client privacy when requesting content from a public server
JP5579872B2 (en) Secure multiple UIM authentication and key exchange
JP4741664B2 (en) Method and apparatus for authentication and privacy
WO2018040758A1 (en) Authentication method, authentication apparatus and authentication system
US11044084B2 (en) Method for unified network and service authentication based on ID-based cryptography
CN110858968A (en) Client registration method, device and system
JP7292263B2 (en) Method and apparatus for managing digital certificates
CN103763356A (en) Establishment method, device and system for connection of secure sockets layers
US20080137859A1 (en) Public key passing
US8397281B2 (en) Service assisted secret provisioning
CN110087240B (en) Wireless network security data transmission method and system based on WPA2-PSK mode
CN108599926B (en) HTTP-Digest improved AKA identity authentication system and method based on symmetric key pool
Nikooghadam et al. A provably secure ECC-based roaming authentication scheme for global mobility networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19852071

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/07/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19852071

Country of ref document: EP

Kind code of ref document: A1