Communication network authentication key generation method and device
By generating random key templates and using dynamic key switching, the problem of insufficient key security in communication networks is solved, the convenience and security of key generation are improved, operator costs are reduced, and the demand for massive one-time key applications is met.
Patent Information
- Application Number
- CN202511342803.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-12-12
AI Technical Summary
In existing communication networks, the security and convenience of key usage are insufficient, leading to security risks for network information systems, especially when keys are used frequently and fixed key authentication is required.
By generating random key templates, combining key blacklist detection and encryption methods, symmetric keys are dynamically generated, and authentication vectors are used for key selection and switching, reducing the storage space requirements of the USIM card and minimizing the impact of frequent key use on the card's lifespan.
It improves the convenience and security of generating authentication keys for communication networks, reduces operator costs, decreases the frequency of USIM card refills, meets the needs of massive one-time password services, and enhances the security of AKA authentication.
Smart Images

Figure CN121125084A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a method and apparatus for generating authentication keys for communication networks. Background Technology
[0002] With the development of science and technology and the continuous expansion of network communication networks, the network security risks of information systems are constantly increasing, and various threats are continuously challenging the security of information systems. Cryptographic security, for example, can be the foundation of information security and can be used to effectively protect the data security of network information systems. Cryptographic technology is a core technology and important means of protecting network information systems. For example, key-based authentication can be used in communication networks. Therefore, improving the security of key usage has become a key focus. Summary of the Invention
[0003] This disclosure provides a method and apparatus for generating authentication keys for communication networks, which can improve the convenience of generating authentication keys and the security of key use, and enhance the security of authentication via the Authentication and Key Agreement (AKA) protocol. The technical solution of this disclosure is as follows:
[0004] According to a first aspect of the present disclosure, a method for generating authentication keys for a communication network is provided, applied to a network device, comprising:
[0005] Obtain the first key template based on the first randomly generated random number;
[0006] A symmetric key is obtained according to the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template;
[0007] Based on the encryption method corresponding to the first key template and the first random number, obtain the first random challenge number;
[0008] An authentication vector AV is created based on the symmetric key and the first random challenge number, and the authentication vector AV is sent to the terminal. The authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
[0009] According to some embodiments, obtaining the first key template based on a randomly generated first random number includes:
[0010] According to the value selection method corresponding to the first randomly generated first random number, the first bit number corresponding to the value selection method is obtained from the first random number, and the first bit number is used as the first key template.
[0011] According to some embodiments, the method further includes:
[0012] Based on the encryption requirements, the first key template is subjected to key blacklist detection processing, and if the first key template passes the key blacklist detection processing, the second key template is obtained.
[0013] Obtain the first key selection sequence corresponding to the second key template from the key list.
[0014] According to some embodiments, the step of performing key blacklist detection processing on the first key template to obtain the second key template includes:
[0015] Obtain a blacklist of keys corresponding to the encryption requirement information, wherein the blacklist of keys includes at least one third key template;
[0016] Perform a bitwise AND operation on the first key template and each of the at least one third key template to obtain the calculation result;
[0017] If the calculation result is the first preset result, it is determined that there is a key in the key list corresponding to the first key template that belongs to the key blacklist list, and the bit in the first key template that corresponds to the key blacklist list is set to a preset value to obtain the second key template;
[0018] If the calculation result is not the first preset result, it is determined that each key in the key list corresponding to the first key template does not belong to the key blacklist list.
[0019] According to some embodiments, the method further includes:
[0020] If all bits in the first key template are of the first preset value, the first random number is obtained again.
[0021] If the number of bits with the second preset value in all bits of the first key template is greater than the first bit threshold, then the first key template is determined to be the second key template.
[0022] If the number of second bits that are the second preset value in all bits of the first key template is less than the second bit threshold, the first random number is re-acquired, and the second bit threshold is less than the first bit threshold.
[0023] According to some embodiments, obtaining the first random challenge number based on the encryption method corresponding to the first key template and the first random number includes at least one of the following:
[0024] If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random number is used as the first random challenge number;
[0025] When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random number is encrypted using an encryption algorithm and an encryption key to obtain the first random challenge number.
[0026] According to some embodiments, the method further includes:
[0027] The system receives a second random challenge number and a resynchronization authentication token (AUTS) parameter sent by the Security Anchor Function (SEAF). The AUTS parameter is a parameter obtained based on the first random number and sent to the SEAF when the serial number (SEQueNceNumber, SQN) generated by the terminal verification authentication token (AUTN) is out of sync.
[0028] Obtain the first random challenge number corresponding to the second random challenge number;
[0029] Obtain the third key template corresponding to the first random challenge number;
[0030] Obtain the second key selection sequence corresponding to the third key template from the key list;
[0031] Based on the second key selection sequence, obtain the second symmetric key, and use the second symmetric key to verify the AUTS parameter to obtain the verification result;
[0032] Perform SQN parameter synchronization based on the verification results.
[0033] According to a second aspect of the present disclosure, a method for generating an authentication key for a communication network is provided, applied to a terminal, comprising:
[0034] Receive an authentication vector AV sent by a network device, wherein the authentication vector AV includes a first random challenge number;
[0035] The first random number is obtained based on the encryption method corresponding to the first random challenge number and the first key template;
[0036] Based on the first random number, obtain the first key template;
[0037] A symmetric key is obtained based on the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
[0038] According to some embodiments, obtaining the first random number based on the encryption method corresponding to the first random challenge number and the first key template includes:
[0039] If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random challenge number is used as the first random number.
[0040] When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random challenge number is decrypted using a decryption algorithm and a decryption key to obtain the first random number.
[0041] According to some embodiments, the method further includes:
[0042] In the case of SQN asynchrony caused by AUTN verification, the AUTS parameter is obtained according to the first random number and sent to the SEAF. The AUTS parameter is used to instruct the SEAF to send a second random challenge number and the AUTS parameter to the network device.
[0043] According to a third aspect of the present disclosure, a communication network authentication key generation apparatus is provided, comprising:
[0044] The template acquisition unit is used to acquire the first key template based on the first randomly generated first random number;
[0045] A key acquisition unit is used to acquire a symmetric key according to a first key selection sequence in a key list corresponding to the first key template, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template;
[0046] The data acquisition unit is used to acquire a first random challenge number based on the encryption method corresponding to the first key template and the first random number;
[0047] A vector sending unit is configured to create an authentication vector AV based on the symmetric key and the first random challenge number, and send the authentication vector AV to the terminal. The authentication vector AV is configured to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
[0048] According to a fourth aspect of the present disclosure, a communication network authentication key generation apparatus is provided, comprising:
[0049] A vector receiving unit is used to receive an authentication vector AV sent by a network device, wherein the authentication vector AV includes a first random challenge number;
[0050] The random number acquisition unit is used to acquire a first random number based on the encryption method corresponding to the first random challenge number and the first key template;
[0051] A key template acquisition unit is used to acquire a first key template based on the first random number.
[0052] The symmetric key acquisition unit is used to acquire a symmetric key according to a first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
[0053] According to a fifth aspect of the present disclosure, a network device is provided, comprising:
[0054] processor;
[0055] Memory used to store the processor's executable instructions;
[0056] The processor is configured to execute the instructions to implement the communication network authentication key generation method described in any one of the preceding aspects.
[0057] According to a sixth aspect of the present disclosure, a terminal is provided, comprising:
[0058] processor;
[0059] Memory used to store the processor's executable instructions;
[0060] The processor is configured to execute the instructions to implement the communication network authentication key generation method described in any one of the preceding aspects.
[0061] According to a seventh aspect of the present disclosure, a storage medium is provided that, when instructions in the storage medium are executed by a processor of a network device, enables the network device to perform the communication network authentication key generation method described in any of the preceding aspects.
[0062] According to an eighth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in any one of the preceding aspects.
[0063] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:
[0064] In some or related embodiments, a first key template is obtained based on a randomly generated first random number; a symmetric key is obtained based on a first key selection sequence in a key list corresponding to the first key template, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template; a first random challenge number is obtained based on the encryption method corresponding to the first key template and the first random number; an authentication vector AV is created based on the symmetric key and the first random challenge number, and the authentication vector AV is sent to the terminal, wherein the authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence. Therefore, authentication of key templates can be based on random challenge numbers, key switching is possible, the high security risk caused by using only one key for authentication can be reduced, the poor security caused by using fixed keys can be reduced, a large number of keys can be generated based on key lists, the requirements for secure storage space of USIM cards can be reduced, operator costs can be reduced, the frequency of USIM card refilling can be greatly reduced, the frequency of writing can be greatly reduced, the impact on the lifespan of USIM cards can be reduced, the needs of massive one-time key services can be met, the convenience of generating authentication keys for communication networks and the security of key use can be improved, and the security of AKA authentication in communication networks can be enhanced.
[0065] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0067] Figure 1This is a flowchart illustrating a method for generating authentication keys for a communication network according to an exemplary embodiment;
[0068] Figure 2 This is an example schematic diagram illustrating a key selection sequence according to an exemplary embodiment;
[0069] Figure 3 This is a flowchart illustrating a method for generating authentication keys for a communication network according to an exemplary embodiment;
[0070] Figure 4 This is an interactive schematic diagram illustrating an authentication process method according to an exemplary embodiment;
[0071] Figure 5 This is an interactive schematic diagram illustrating an authentication synchronization fault recovery method according to an exemplary embodiment;
[0072] Figure 6 This is a block diagram illustrating a communication network authentication key generation apparatus according to an exemplary embodiment;
[0073] Figure 7 This is a block diagram illustrating a communication network authentication key generation apparatus according to an exemplary embodiment;
[0074] Figure 8 This is a block diagram illustrating a network device according to an exemplary embodiment. Detailed Implementation
[0075] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0076] This disclosure provides a method and apparatus for generating authentication keys for communication networks. In some embodiments, the terms "communication network authentication key generation method" and "information processing method" and "communication method" can be used interchangeably; the terms "communication network authentication key generation apparatus" and "information processing apparatus" and "communication apparatus" can be used interchangeably; and the terms "information processing system" and "communication system" can be used interchangeably.
[0077] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.
[0078] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0079] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure.
[0080] In this embodiment of the disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular expression or a plural expression.
[0081] In the embodiments disclosed herein, "multiple" refers to two or more.
[0082] In some embodiments, the terms “at least one of”, “one or more”, “a plurality of”, “multiple”, etc., may be used interchangeably.
[0083] The prefixes "first," "second," etc., used in the embodiments of this disclosure are merely for distinguishing different descriptive objects and do not impose restrictions on the position, order, priority, quantity, or content of the descriptive objects. The description of the descriptive objects is found in the claims or the context of the embodiments, and the use of prefixes should not constitute unnecessary restrictions. For example, if the descriptive object is a "field," the ordinal numbers preceding "field" in "first field" and "second field" do not restrict the position or order of the "fields." "First" and "second" do not restrict whether the "fields" they modify are in the same message, nor do they restrict the order of "first field" and "second field." Similarly, if the descriptive object is a "level," the ordinal numbers preceding "level" in "first level" and "second level" do not restrict the priority between "levels." Furthermore, the number of descriptive objects is not limited by ordinal numbers and can be one or more. For example, in "first device," the number of "devices" can be one or more. Furthermore, the objects modified by different prefixes can be the same or different. For example, if the object being described is "device", then "first device" and "second device" can be the same device or different devices, and their types can be the same or different. Similarly, if the object being described is "information", then "first information" and "second information" can be the same information or different information, and their content can be the same or different.
[0084] In some embodiments, "terminal" or "terminal device" may be referred to as "user equipment (UE)," "user terminal," "mobile station (MS)," "mobile terminal (MT)," "subscriber station," "mobile unit," "subscriber unit," "wireless unit," "remote unit," "mobile device," "wireless device," "wireless communication device," "remote device," "mobile subscriber station," "access terminal," "mobile terminal," "wireless terminal," "remote terminal," "handset," "user agent," "mobile client," "client," etc.
[0085] In some embodiments, data, information, etc., may be obtained with the user's consent.
[0086] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0087] Figure 1 This is a flowchart illustrating a communication network authentication key generation method according to an exemplary embodiment, such as... Figure 1 As shown, it includes the following steps:
[0088] In step S11, a first key template is obtained based on a randomly generated first random number;
[0089] According to some embodiments, the execution subject of this disclosure is a network device. The name of the network device is not limited. For example, the network device may also be called a server or a server cluster. Specifically, the network device in this disclosure may be a Unified Data Management (UDM). The technical solutions of this disclosure are applied to the AKA protocols of 3rd-Generation (3G), 4th-Generation (4G), and 5th-Generation (5G) mobile communication technologies, and are also applicable to the corresponding Extensible Authentication Protocol-Authentication and Key Agreement (EAP-AKA). This disclosure does not limit the scope of the application.
[0090] In some embodiments, the first random number may be randomly generated by a network device, and this first random number does not specifically refer to a fixed random number. The "first" in the first random number is used to distinguish it from other random numbers. For example, when the method of generating the random number changes, the first random number may also change accordingly. For example, when the number of bits corresponding to the first random number changes, the first random number may also change accordingly. The first random number may, for example, be 128 bits.
[0091] In some embodiments, a key template may be used to indicate the rules for key generation. This key template is not specifically a fixed template. For example, the key template may change accordingly when the selection method corresponding to it changes.
[0092] According to some embodiments, the first key template may be, for example, a key template obtained by a first random number. The "first" in this first key template is used to distinguish it from other key templates and does not specifically refer to a fixed key template. For example, when the selection method corresponding to the first key template changes, the first key template may also change accordingly. For example, when the number of bits in the first key template changes, the first key template may also change accordingly.
[0093] According to some embodiments, for example, a first key template can be obtained based on a first randomly generated first random number.
[0094] According to some embodiments, obtaining a first key template based on a randomly generated first random number includes:
[0095] Based on the value selection method corresponding to the first randomly generated random number, the first bit corresponding to the value selection method is obtained from the first random number, and this first bit is used as the first key template. Therefore, the key template corresponding to the value selection method can be obtained, improving the accuracy of key template acquisition.
[0096] In some embodiments, the first random number can be, for example, R, or n bits of R, where either the lower n bits or the higher n bits of R can be selected. For example, the lower n bits of R can be used as the key template kp. Each bit of kp corresponds to the selection status of each key in the key list; that is, if the i-th bit of kp is 1, it indicates that K_i and KID_i are selected. Figure 2 As shown, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5].
[0097] In step S12, a symmetric key is obtained according to the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template;
[0098] According to some embodiments, the key list may be, for example, a plurality of keys written during the initialization of the Universal Subscriber Identity Module (USIM) card. These multiple keys may be, for example, n+1 keys written according to a security policy. These n+1 keys may include, for example, K0, K1, K2, ..., Kn, where n>=2, and n is the maximum number of keys written. K1, K2, ..., Kn are keys used for authentication, and K0 is a key used to protect KP, i.e., a key used for encryption. K0 may be, for example, an encryption key.
[0099] The USIM can generate a corresponding Key Identifier (KID) for each key. This identifier can be a key index or a unique identifier ID. For example, the KIDs for K1, K2, ..., Kn are 0, 1, ..., n-1. After initialization, the server corresponding to the USIM can synchronize the key data to the UDM.
[0100] In some embodiments, the key list may also be referred to as a key set. The key list may be, for example, a list comprised of at least one key. The key list is not specifically a fixed list. For example, the key list may change when the number of keys in it changes. Similarly, the key list may change when a particular key in it changes.
[0101] In some embodiments, the key selection sequence may be, for example, a sequence of keys selected from a key list based on a key template. This key selection sequence is not specifically a fixed sequence. For example, the key selection sequence may change accordingly when the key list changes. Similarly, the key list may change accordingly when the key template changes.
[0102] According to some embodiments, the first key selection sequence may be, for example, a sequence obtained from a key list based on a first key template. The first key selection sequence does not specifically refer to a fixed sequence. For example, when the first key template changes, the first key selection sequence may also change accordingly. For example, when the key list changes, the first key selection sequence may also change accordingly.
[0103] In some embodiments, each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template. For example, each bit in the first key template may correspond to a key in the key list.
[0104] According to some embodiments, a symmetric key is obtained based on a first key selection sequence in the key list corresponding to a first key template, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
[0105] According to some embodiments, the method further includes:
[0106] Based on the encryption requirements, the first key template is subjected to key blacklist detection, and if the first key template passes the key blacklist detection, the second key template is obtained.
[0107] The first key selection sequence corresponding to the second key template is obtained from the key list. Therefore, the second key template can be obtained through the key blacklist, which can reduce the situation where no key can be used after one or more keys are cracked. By performing key blacklist detection on the key template, keys not in the key blacklist can be used, which can improve the accuracy of key template acquisition and the security of key selection sequence.
[0108] In some embodiments, the encryption requirement information may also be referred to as a security policy. This encryption requirement information does not specifically refer to any particular fixed information. For example, the encryption requirement information may include encryption via a key blacklist, or it may not involve encryption via a key blacklist.
[0109] According to some embodiments, the second key template may be a key template obtained by performing a key blacklist check on the first key template. The second key template is not specifically a fixed template. For example, when the acquisition method corresponding to the second key template changes, the second key template may also change accordingly.
[0110] According to some embodiments, a key blacklist detection process is performed on the first key template to obtain a second key template, including:
[0111] Obtain the key blacklist list corresponding to the encryption requirement information. The key blacklist list includes at least one third key template.
[0112] Perform a bitwise AND operation on the first key template and each of the at least one third key template to obtain the calculation result;
[0113] If the calculation result is the first preset result, determine that there is a key in the key list corresponding to the first key template that belongs to the key blacklist list, and set the bit in the first key template that corresponds to the key blacklist list to a preset value to obtain the second key template;
[0114] If the calculation result is not the first preset result, it is determined that none of the keys in the key list corresponding to the first key template belong to the key blacklist. Therefore, the calculation result can determine whether there are any keys in the key list corresponding to the first key template that belong to the key blacklist, which can improve the accuracy of obtaining the second key template and improve key security.
[0115] In some embodiments, the calculation result is obtained by performing a bitwise AND operation on the first key template and each of the at least one third key template.
[0116] In some embodiments, the key blacklist may include, for example, at least one third key template. The "third" in the third key template is used to distinguish it from the other key templates. The keys included in the key blacklist may be in one of the following states: leaked, cracked, pose a security risk, or have too short a key length.
[0117] In some embodiments, a key blacklist detection process can be performed on the first key template kp. Let the key template corresponding to each key in the key blacklist be kp_b.
[0118] According to some implementations, for example, a bitwise AND operation can be performed on kp and kp_b, i.e., kp&kp_b, to determine whether the key selected in kp is in the key blacklist kp_b:
[0119] A. If kp&kp_b is not 0, it means that there are keys in the key blacklist. For example, if kp = 11001001 and kp_b = 01001101, then kp&kp_b = 01001001, which means that K1, K4, and K7 selected by kp are in the key blacklist.
[0120] According to some embodiments, the bits in kp that match the key blacklist can be set to 0, i.e., kp = kp ⊕ (kp & kp_b). For example, if kp = 11001001 and kp_b = 01001101, then kp & kp_b = 01001001, and kp ⊕ (kp & kp_b) = 11001001 ⊕ 01001001 = 10000000.
[0121] B. If kp&kp_b is 0, it means that no key is in the key blacklist. For example, if kp = 10000010 and kp_b = 01001101, then kp&kp_b = 00000000.
[0122] According to some embodiments, the method further includes:
[0123] If all bits in the first key template are of the first preset value, a first random number is obtained again.
[0124] If the number of bits with the second preset value in all bits of the first key template is greater than the first bit number threshold, the first key template is determined to be the second key template.
[0125] If the number of bits with the second preset value in all bits of the first key template is less than the second bit threshold, the first random number is re-acquired, and the second bit threshold is less than the first bit threshold.
[0126] According to some embodiments, the first preset value may be, for example, a value used to indicate the state corresponding to the key not being selected. This first preset value does not specifically refer to a fixed value. The second preset value may, for example, be used to indicate the state corresponding to the key being selected. The first preset value and the second preset value are different values. The first preset value does not specifically refer to a fixed value. For example, when a modification instruction for the value is received, the first preset value and the second preset value may also change accordingly.
[0127] According to some embodiments, the first preset value may be 0, for example, and the second preset value may be 1, for example. If all bits of kp are 0, it means that kp has not selected a valid key, and R is selected again.
[0128] In some embodiments, for example, it can be determined whether the number of bits where kp is 1 reaches or exceeds the number of bits required by the security policy: if it is less than the threshold number of bits required by the security policy, R can be selected again. For example, kp = 1000000, that is, only 1 key is selected. If the security policy requires the use of at least 2 keys, R can be selected again, and the second bit 1 of all bits in the first key template 1000000 that is the second preset value 1 is less than the second bit threshold 2.
[0129] According to some embodiments, based on each bit of the obtained kp, a key matching kp and a key ID selection sequence are obtained from the key resource pool. That is, if the i-th bit of kp is 1, then K_i and KID_i are obtained, and all obtained keys are put into the key selection sequence [K_i1, K_i2, ..., Kim]. For example, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5].
[0130] In step S13, the first random challenge number is obtained according to the encryption method corresponding to the first key template and the first random number;
[0131] According to some embodiments, the encryption method may be used, for example, to indicate whether to encrypt the first key template, and, if encryption is determined, to employ an encryption algorithm. This encryption method is not specifically defined by any particular method. For example, the encryption method may include encrypting the first key template, or it may include not encrypting the first key template.
[0132] In some embodiments, the first random challenge number (RAND) can be, for example, a random number obtained based on the first key template and the first random number. The first random challenge number has the same length as the first random number. For example, when the length of the first random number is 128 bits, the length of the first random challenge number can also be 128 bits. This first random challenge number can be, for example, RAND.
[0133] In some embodiments, the first random challenge number can be obtained based on the encryption method corresponding to the first key template and the first random number.
[0134] Based on the encryption method corresponding to the first key template and the first random number, obtain the first random challenge number, which includes at least one of the following:
[0135] If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random number will be used as the first random challenge number.
[0136] If the encryption method corresponding to the first key template indicates that the first key template should be encrypted, then the first random number is encrypted using an encryption algorithm and an encryption key to obtain the first random challenge number. Therefore, determining whether encryption is necessary based on the encryption method can improve the accuracy of obtaining the first random challenge number.
[0137] According to some embodiments, if the security policy does not require protection of kp, that is, if the encryption method corresponding to the first key template indicates that the first key template is not encrypted, then R is assigned to RAND.
[0138] According to some embodiments, if the security policy requires protection of kp, i.e., if the encryption method corresponding to the first key template indicates that the first key template should be encrypted, then the encrypted RAND = E(K0, R) is generated. For the encryption algorithm, for example, a symmetric cryptographic algorithm E(K, M) with the same output length as R can be selected. For example, if R is 128 bits, then E should be a symmetric cryptographic algorithm with a 128-bit output, such as AES-128, so that the length of the generated RAND is also 128 bits.
[0139] In step S14, an authentication vector AV is created based on the symmetric key and the first random challenge number, and the authentication vector AV is sent to the terminal. The authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
[0140] According to some embodiments, the authentication vector (AV) can be, for example, a 5G Home Environment Authentication Vector (HE AV). The 5G HE AV can be, for example, a set of core parameters generated by the UDM, used to authenticate the user equipment (UE) and negotiate keys. The 5G HE AV does not specifically refer to a fixed vector. The 5G HE AV can, for example, include RAND, AUTN, XRES, a ciphering key (CK), and an integrity key (IK). When any information in the 5G HE AV changes, the 5G HE AV can also change accordingly. Wherein:
[0141] RAND: Random Challenge Number, used to prevent replay attacks;
[0142] AUTN: Authentication Token, used to verify network identity and message freshness;
[0143] XRES*: Expected response value, used to compare with RES* returned by the UE;
[0144] K AUSF The anchor key generated by the home network is subsequently used to derive K. SEAF Session keys, etc.
[0145] In some embodiments, an authentication vector AV can be created based on the symmetric key and the first random challenge number, and the authentication vector AV can be sent to the terminal. The authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
[0146] According to some embodiments, the network device may be, for example, a UDM, which can calculate AV = (RAND, AUTN, XRES, CK, IK) based on the symmetric key K.
[0147] UDM or ARPF in a network device can create a structure containing RAND, AUTN, XRES*, and K. AUSF The 5G HE AV is sent to AUSF.
[0148] According to some embodiments, the method further includes:
[0149] Receive the second random challenge number and the resynchronization authentication token AUTS parameter sent by the Security Anchor Function (SEAF). The AUTS parameter is a parameter obtained based on the first random number and sent to the SEAF when the serial number SQN generated by the terminal verification authentication token AUTN is out of sync.
[0150] Obtain the first random challenge number corresponding to the second random challenge number;
[0151] Obtain the third key template corresponding to the first random challenge number;
[0152] Retrieve the second key selection sequence corresponding to the third key template from the key list;
[0153] Based on the second key selection sequence, obtain the second symmetric key, and use the second symmetric key to verify the AUTS parameter and obtain the verification result;
[0154] The SQN parameters are synchronized based on the verification results. Therefore, SQN parameters can be synchronized, improving the accuracy of SQN parameter acquisition.
[0155] According to some embodiments, for example, when the USIM in the terminal encounters an SQN synchronization problem during AUTN verification, the USIM calculates AUTS based on K and returns AUTS to the ME. The ME sends AUTS to the serving network SEAF. The SEAF sends RAND and AUTS to the home network UDM. The UDM decrypts RAND to obtain R = D(K0, RAND). The UDM takes n bits of R as the key template kp. Based on each bit of kp, it retrieves the key and key ID selection sequence that match kp from the key resource pool. That is, if the i-th bit of kp is 1, then K_i and KID_i are obtained, and all the obtained keys are put into the key selection sequence [K_i1, K_i2, ..., Kim]. For example, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5]. The UDM calculates K = KDF(K_i1, K_i2, ..., Kim, R) based on the key selection sequence corresponding to kp. The USIM verifies the validity of AUTS based on K. UDM verifies the validity of (RAND, AUTS) and synchronizes the SQN parameters.
[0156] In some or related embodiments, a first key template is obtained based on a randomly generated first random number; a symmetric key is obtained based on a first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template; a first random challenge number is obtained based on the encryption method corresponding to the first key template and the first random number; an authentication vector AV is created based on the symmetric key and the first random challenge number, and the authentication vector AV is sent to the terminal. The authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence. Therefore, key template authentication can be performed based on the random challenge number, key switching is possible, the high security risk caused by using only one key for authentication can be reduced, the poor security caused by using a fixed key can be reduced, and a large number of keys can be generated based on the key list. This can reduce the requirements for secure storage space on the USIM card, reduce operator costs, meet the needs of massive one-time key services, and thus improve the convenience of authentication key generation and the security of key use in communication networks. Furthermore, the technical solution of this disclosure is compatible with the existing 3rd Generation Partnership Project (3GPP) protocol. Only the USIM and UDM need to be modified, and the Serving Network (SN) does not need to be modified. It is unaware of the new protocol modification and does not require modification of other network elements and related interfaces. The modification cost is low and the compatibility with the original protocol is high.
[0157] Figure 3 This is a flowchart illustrating a communication network authentication key generation method according to an exemplary embodiment, such as... Figure 3 As shown, this communication network authentication key generation method can be used in communication network authentication key generation scenarios, and includes the following steps:
[0158] In step S21, the authentication vector AV sent by the network device is received, wherein the authentication vector AV includes a first random challenge number;
[0159] The relevant processes can be described as above, and will not be repeated here.
[0160] In step S22, the first random number is obtained according to the encryption method corresponding to the first random challenge number and the first key template;
[0161] The relevant processes can be described as above, and will not be repeated here.
[0162] In step S23, a first key template is obtained based on the first random number;
[0163] The relevant processes can be described as above, and will not be repeated here.
[0164] In step S24, a symmetric key is obtained according to the first key selection sequence corresponding to the key list and the first key template, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
[0165] The relevant processes can be described as above, and will not be repeated here.
[0166] According to some embodiments, the first random number is obtained based on the encryption method corresponding to the first random challenge number and the first key template, including:
[0167] If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random challenge number is used as the first random number.
[0168] When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random challenge number is decrypted using a decryption algorithm and a decryption key to obtain the first random number.
[0169] According to some embodiments, the method further includes:
[0170] In the case of SQN asynchrony generated by AUTN verification, the AUTS parameter is obtained based on the first random number and sent to SEAF. The AUTS parameter is used to instruct SEAF to send the second random challenge number and the AUTS parameter to the network device.
[0171] According to some embodiments, when R is encrypted, the USIM in the terminal decrypts RAND to obtain R = D(K0, RAND). When R is not encrypted, the USIM in the terminal can directly obtain R. For example, the USIM in the terminal can take the lower n bits of R as the key template kp. Based on each bit of kp, it obtains the key and key ID selection sequence that match kp from the key resource pool key list. That is, if the i-th bit of kp is 1, then K_i and KID_i are obtained, and all the obtained keys are put into the key selection sequence [K_i1, K_i2, ..., Kim]. For example, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5]. The USIM can calculate K = KDF(K_i1, K_i2, ..., Kim, R) based on the key selection sequence corresponding to kp.
[0172] According to some embodiments, when a network device requires a UE to send a Subscription Permanent Identifier (SUCI) for network authentication, the UE sends an Initial Registration Request to the network side. The Mobile Equipment (ME) reads the Subscription Permanent Identifier (SUPI) from the USIM and encrypts the SUPI using an Elliptic Curve Integrated Encryption Scheme (ECIES) to obtain the Subscription Concealed Identifier (SUCI). The SUCI is then forwarded to the home network UDM through relevant network elements. Upon receiving a Nudm_Authenticate_Get Request, if the UDM has received the SUCI, it can decrypt it using ECIES to obtain the SUPI.
[0173] Figure 4 This is an interactive schematic diagram illustrating an authentication process method according to an exemplary embodiment, such as... Figure 4 As shown, the method includes:
[0174] 1.1. UDM randomly generates R, where R and RAND have the same length, for example, both are 128 bits.
[0175] 1.2. UDM takes n bits of R (e.g., the lower n bits or the higher n bits; this embodiment uses the lower n bits for illustration) as the key template kp. Each bit of kp corresponds to the selection state of each key in the key list; that is, if the i-th bit of kp is 1, it indicates that K_i and KID_i are selected. Where kp = 10111, the key selection sequence is [K1, K2, K3, K5].
[0176] 1.3. If a key blacklist mechanism is required according to the security policy, then key blacklist detection processing can be performed on kp.
[0177] 1.3.1. Perform key blacklist detection on kp. Here, let the key template corresponding to the key blacklist be kp_b. The keys in the blacklist may be in the following states: leaked, cracked, pose a security risk, or have too short a key length.
[0178] 1.3.1.1. Perform a bitwise AND operation on kp and kp_b, i.e., kp&kp_b. Determine whether the key selected in kp is in the key blacklist kp_b using the following method:
[0179] 1.3.1.1.1. If kp&kp_b is not 0, it means that there is a key in the key blacklist.
[0180] 1.3.1.1.1.1. Set the bits in kp that match the key blacklist to 0, i.e. calculate kp = kp ⊕ (kp & kp_b).
[0181] 1.3.1.1.2. If kp&kp_b is 0, it means that no key is in the key blacklist.
[0182] 1.3.1.2. If all bits of kp are 0, it means that kp has not selected a valid key, then jump to step 1.1 and reselect R.
[0183] 1.3.1.3. Optional, determine whether the number of bits with kp = 1 has reached or exceeded the number of bits required by the security policy: if it is less than the number of bits required by the security policy, then jump to step 1.1 and reselect R.
[0184] 1.3.2. Replace the lower n bits of R with kp: Based on each bit of kp, obtain the key and key ID selection sequence that match kp from the key resource pool. That is, if the i-th bit of kp is 1, then obtain K_i and KID_i, and put all the obtained keys into the key selection sequence [K_i1, K_i2, ..., Kim]. For example, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5].
[0185] 1.4. Based on the key selection sequence corresponding to kp, calculate K = KDF(K_i1, K_i2, ..., Kim, R).
[0186] 1.5. If the security policy does not require protection for kp, assign R to RAND. (Optional) If the security policy requires protection for kp, generate RAND = E(K0, R) using encryption. For algorithm selection, it is recommended to choose a symmetric cryptographic algorithm E(K, M) with the same output length as R. For example, if R is 128 bits, then E should be a symmetric cryptographic algorithm with a 128-bit output, such as AES-128, so that the generated RAND will also be 128 bits long.
[0187] 1.6. UDM can calculate AV = (RAND, AUTN, XRES, CK, IK) based on the symmetric key K.
[0188] 1.7. UDM / ARPF should create a system containing RAND, AUTN, XRES*, and K. AUSF The 5G HE AV is sent to AUSF.
[0189] 2. In the UDM_UEAuthentication_Get Response message, the UDM returns the requested 5G HE AV to the AUSF and indicates that the 5G HE AV is used for 5G AKA. If the User Data Management (Nudm) UE Authentication Get (Nudm_UEAuthentication_Get) request contains SUCI, the UDM will include SUPI in the Nudm_UEAuthentication_Get response.
[0190] 3. AUSF can temporarily store XRES* and received SUCI or SUPI. AUSF can store K. AUSF .
[0191] 4. AUSF can generate a 5G AV based on the 5G HE AV received from UDM / ARPF. HXRES* is calculated from RAND and XRES*, and K... AUSF Derivation of K SEAF Then use HXRES* and K SEAF Replace XRES* and K in 5G HE AV respectively AUSF .
[0192] 5. AUSF can remove K SEAF The 5G SE AV (RAND, AUTN, HXRES*) is sent to SEAF via the User Authentication Server Function (Nausf) User Authentication Authentication (Nausf_UEAuthentication_Authenticate) response.
[0193] 6. SEAF can send RAND and AUTN to the UE via a Non-Access Stratum (NAS) message (Auth-Req). This message should also contain a New Generation Key Set Identifier (ngKSI) used by the UE and the Access and Mobility Management Function (AMF) to identify the KAMF and part of the native security context. The message should also include the ABBA parameter.
[0194] 7.ME can forward the RAND and AUTN from the NAS message (Auth-Req) to USIM.
[0195] 8. Upon receiving RAND and AUTN, USIM will include:
[0196] 8.1. USIM can decrypt RAND to obtain R = D(K0, RAND).
[0197] 8.2. USIM takes the lower n bits of R as the key template kp. Based on each bit of kp, it retrieves the key and key ID selection sequence that match kp from the key resource pool. That is, if the i-th bit of kp is 1, then K_i and KID_i are retrieved, and all retrieved keys are put into the key selection sequence [K_i1, K_i2, ..., Kim]. For example, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5].
[0198] 8.3. USIM selects the key sequence corresponding to kp and calculates K = KDF(K_i1, K_i2, ..., Kim, R).
[0199] 8.4. USIM verifies the validity of AUTN based on K.
[0200] 8.5. USIM checks whether the Message Authentication Code (MAC) is equal to the XMAC and verifies whether the SQN, etc., are up-to-date.
[0201] 8.6. If the verification passes, USIM shall calculate the response RES and return RES, CK, and IK to ME.
[0202] 9. ME can be used to calculate RES*. ME should be derived from CK||IK. AUSF ME should be from K AUSF Derivation of K SEAFThe ME accessing 5G should check whether the "separation bit" of the AUTN's AMF field is set to 1 during authentication. The "separation bit" is the 0th bit of the AUTN's AMF field. Note: This "separation bit" in the AUTN's AMF is no longer used for operator-specific purposes. The ME should calculate RES* from RES. The ME should derive K from CK||IK. AUSF ME should derive K from KAUSF. SEAF .
[0203] 10. The UE can return RES* to SEAF in the NAS message authentication response.
[0204] 11. SEAF can calculate HRES* from RAND and RES*, and compare HRES* with HXRES*. If the two values match, SEAF can consider the authentication successful from the service network's perspective. If they do not match, SEAF should consider the authentication failed and indicate the failure to AUSF.
[0205] 12. SEAF can send the corresponding SUCI or SUPI from the UE to AUSF via the User Authentication Server Function (Nausf) UE Authentication Request (Nausf_UEAuthentication_Authenticate Request) message.
[0206] 13. Upon receiving a Nausf_UEAuthentication_Authenticate Request message containing RES*, AUSF can verify whether the AV has expired. If the AV has expired, AUSF can consider authentication unsuccessful from the home network's perspective. AUSF should compare the received RES* with the stored XRES*. If RES* and XRES* match, AUSF can consider authentication successful from the home network's perspective.
[0207] 14. AUSF can indicate to SEAF whether authentication was successful via the User Authentication Server Function (Nausf) UE authentication response (Nausf_UEAuthentication_Authenticate Response). If authentication is successful, KSEAF can be sent to SEAF via Nausf_UEAuthentication_Authenticate Response. If AUSF receives SUCI from SEAF upon initiating authentication and authentication is successful, AUSF should also include SUPI in the Nausf_UEAuthentication_Authenticate Response.
[0208] If authentication is successful, SEAF can send the key K received from the Nausf_UEAuthentication_Authenticate Response message. SEAF As the anchor key. Then SEAF can be obtained from K. SEAF The ABBA parameters and SUPI derive KAMF, and provide ngKSI and K to the Access and Mobility Management Function (AMF). AMF .
[0209] If SUCI is used for this authentication, SEAF may only provide ngKSI and K to AMF after receiving a Nausf_UEAuthentication_Authenticate Response message containing SUCI. AMF The UE will not be provided with communication services until the SUPI is known to the Serving Network.
[0210] Figure 5 This is an interactive schematic diagram illustrating an authentication synchronization fault recovery method according to an exemplary embodiment, such as... Figure 5 As shown, the method includes:
[0211] 1. When USIM verifies AUTN and causes SQN synchronization issues, USIM calculates AUTS based on K and returns AUTS to ME.
[0212] 2.ME can send AUTS to the service network SEAF.
[0213] 3. SEAF can send RAND and AUTS to the home network's UDM.
[0214] 4. UDM verifies the validity of AUTS and synchronizes SQN parameters, specifically including:
[0215] 4.1. UDM decrypts RAND to obtain R = D(K0, RAND).
[0216] 4.2. UDM takes n bits of R as the key template kp. Based on each bit of kp, it retrieves the key and key ID selection sequence that match kp from the key resource pool. That is, if the i-th bit of kp is 1, then K_i and KID_i are retrieved, and all retrieved keys are put into the key selection sequence [K_i1, K_i2, ..., Kim]. For example, if kp = 10111, then the key selection sequence is [K1, K2, K3, K5].
[0217] 4.3. UDM selects the sequence of keys corresponding to kp and calculates K = KDF(K_i1, K_i2, ..., Kim, R).
[0218] 4.4. USIM verifies the validity of AUTS based on K.
[0219] 4.5. UDM verifies the validity of (RAND, AUTS) and synchronizes the SQN parameters.
[0220] Regarding step 4.1, if R is encrypted, R can be obtained by decrypting RAND; if R is not encrypted, RAND can be used as R.
[0221] For alternative implementations of this embodiment, please refer to [link / reference]. Figure 1 and Figure 2 Optional implementation methods, and Figure 3 Other related parts in the embodiments involved will not be described in detail here.
[0222] Among them, Figure 4 and Figure 5 The terminology and / or descriptions in the embodiments described above are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. For example, Figure 1 , Figure 2 , Figure 4 and Figure 5 They can be combined into one embodiment.
[0223] A block diagram of a communication network authentication key generation apparatus is shown according to an exemplary embodiment. (Refer to...) Figure 6 The device 600 includes:
[0224] Template acquisition unit 601 is used to acquire a first key template based on a randomly generated first random number;
[0225] The key acquisition unit 602 is used to acquire a symmetric key according to the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template;
[0226] The data acquisition unit 603 is used to acquire the first random challenge number based on the encryption method corresponding to the first key template and the first random number;
[0227] The vector sending unit 604 is used to create an authentication vector AV based on the symmetric key and the first random challenge number, and send the authentication vector AV to the terminal. The authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
[0228] According to some embodiments, when the template acquisition unit 601 acquires the first key template based on a randomly generated first random number, it is specifically used for:
[0229] According to the value selection method corresponding to the first randomly generated first random number, the first bit number corresponding to the value selection method is obtained from the first random number, and the first bit number is used as the first key template.
[0230] According to some embodiments, the template acquisition unit 601 is further configured to:
[0231] Based on the encryption requirements, the first key template is subjected to key blacklist detection, and if the first key template passes the key blacklist detection, the second key template is obtained.
[0232] Obtain the first key selection sequence corresponding to the second key template from the key list.
[0233] According to some embodiments, the template acquisition unit 601 is used to perform key blacklist detection processing on the first key template, and when acquiring the second key template, it is specifically used for:
[0234] Obtain the key blacklist list corresponding to the encryption requirement information. The key blacklist list includes at least one third key template.
[0235] Perform a bitwise AND operation on the first key template and each of the at least one third key template to obtain the calculation result;
[0236] If the calculation result is the first preset result, determine that there is a key in the key list corresponding to the first key template that belongs to the key blacklist list, and set the bit in the first key template that corresponds to the key blacklist list to a preset value to obtain the second key template;
[0237] If the calculation result is not the first preset result, it is determined that each key in the key list corresponding to the first key template does not belong to the key blacklist list.
[0238] According to some embodiments, the template acquisition unit 601 is further specifically used for:
[0239] If all bits in the first key template are of the first preset value, a first random number is obtained again.
[0240] If the number of bits with the second preset value in all bits of the first key template is greater than the first bit number threshold, the first key template is determined to be the second key template.
[0241] If the number of bits with the second preset value in all bits of the first key template is less than the second bit threshold, the first random number is re-acquired, and the second bit threshold is less than the first bit threshold.
[0242] According to some embodiments, when the data acquisition unit 603 acquires the first random challenge number based on the encryption method corresponding to the first key template and the first random number, it is specifically used for at least one of the following:
[0243] If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random number will be used as the first random challenge number.
[0244] When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random number is encrypted using an encryption algorithm and an encryption key to obtain the first random challenge number.
[0245] According to some embodiments, the vector transmitting unit 604 is further specifically used for:
[0246] Receive the second random challenge number and the resynchronization authentication token AUTS parameter sent by the Security Anchor Function (SEAF). The AUTS parameter is a parameter obtained based on the first random number and sent to the SEAF when the serial number SQN generated by the terminal verification authentication token AUTN is out of sync.
[0247] Obtain the first random challenge number corresponding to the second random challenge number;
[0248] Obtain the third key template corresponding to the first random challenge number;
[0249] Retrieve the second key selection sequence corresponding to the third key template from the key list;
[0250] Based on the second key selection sequence, obtain the second symmetric key, and use the second symmetric key to verify the AUTS parameter and obtain the verification result;
[0251] Perform SQN parameter synchronization based on the verification results.
[0252] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0253] In some or related embodiments, a template acquisition unit is used to acquire a first key template based on a randomly generated first random number; a key acquisition unit is used to acquire a symmetric key based on a first key selection sequence in a key list corresponding to the first key template, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template; a data acquisition unit is used to acquire a first random challenge number based on the encryption method corresponding to the first key template and the first random number; and a vector sending unit is used to create an authentication vector AV based on the symmetric key and the first random challenge number, and send the authentication vector AV to the terminal, wherein the authentication vector AV is used to instruct the terminal to determine a first random number based on the first random challenge number, acquire the first key selection sequence corresponding to the first key template based on the first random number, and acquire the symmetric key based on the first key selection sequence. Therefore, authentication of key templates can be based on random challenge numbers, key switching is possible, the high security risk caused by using only one key for authentication can be reduced, the poor security caused by using fixed keys can be reduced, a large number of keys can be generated based on key lists, the requirements for secure storage space of USIM cards can be reduced, operator costs can be reduced, the frequency of USIM card refilling can be greatly reduced, the frequency of writing can be greatly reduced, the impact on the lifespan of USIM cards can be reduced, the needs of massive one-time key services can be met, the convenience of generating authentication keys for communication networks and the security of key use can be improved, and the security of AKA authentication in communication networks can be enhanced.
[0254] A block diagram of a communication network authentication key generation apparatus is shown according to an exemplary embodiment. (Refer to...) Figure 7 The device 700 includes:
[0255] Vector receiving unit 701 is used to receive authentication vector AV sent by network device, wherein authentication vector AV includes a first random challenge number;
[0256] The random number acquisition unit 702 is used to acquire a first random number based on the encryption method corresponding to the first random challenge number and the first key template;
[0257] The key template acquisition unit 703 is used to acquire the first key template based on the first random number;
[0258] The symmetric key acquisition unit 704 is used to acquire a symmetric key according to the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
[0259] According to some embodiments, when the random number acquisition unit 702 acquires the first random number based on the encryption method corresponding to the first random challenge number and the first key template, it is specifically used for:
[0260] If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random challenge number is used as the first random number.
[0261] When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random challenge number is decrypted using a decryption algorithm and a decryption key to obtain the first random number.
[0262] According to some embodiments, the symmetric key acquisition unit 704 is further configured to:
[0263] In the case of SQN asynchrony generated by AUTN verification, the AUTS parameter is obtained based on the first random number and sent to SEAF. The AUTS parameter is used to instruct SEAF to send the second random challenge number and the AUTS parameter to the network device.
[0264] Figure 8 This is a block diagram of a network device 800 provided in an embodiment of this disclosure. For example, the network device 800 can be provided as a network device. See also... Figure 8 The network device 800 includes a processing component 822, which further includes at least one processor, and memory resources represented by memory 832 for storing instructions, such as application programs, that can be executed by the processing component 822. The application programs stored in memory 832 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 822 is configured to execute instructions to perform any of the methods described above applied to the network device.
[0265] Network device 800 may also include a power supply component 827 configured to perform power management of network device 800, a wired or wireless network interface 850 configured to connect network device 800 to a network, and an input / output (I / O) interface 858. Network device 800 can operate on an operating system stored in memory 832, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0266] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0267] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0268] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0269] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0270] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0271] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0272] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0273] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for generating authentication keys for a communication network, characterized in that, Applied to network devices, including: Obtain the first key template based on the first randomly generated random number; A symmetric key is obtained according to the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template; Based on the encryption method corresponding to the first key template and the first random number, obtain the first random challenge number; An authentication vector AV is created based on the symmetric key and the first random challenge number, and the authentication vector AV is sent to the terminal. The authentication vector AV is used to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
2. The method according to claim 1, characterized in that, The step of obtaining the first key template based on a randomly generated first random number includes: According to the value selection method corresponding to the first randomly generated first random number, the first bit number corresponding to the value selection method is obtained from the first random number, and the first bit number is used as the first key template.
3. The method according to claim 2, characterized in that, The method further includes: Based on the encryption requirements, the first key template is subjected to key blacklist detection processing, and if the first key template passes the key blacklist detection processing, the second key template is obtained. Obtain the first key selection sequence corresponding to the second key template from the key list.
4. The method according to claim 3, characterized in that, The step of performing key blacklist detection on the first key template to obtain the second key template includes: Obtain a blacklist of keys corresponding to the encryption requirement information, wherein the blacklist of keys includes at least one third key template; Perform a bitwise AND operation on the first key template and each of the at least one third key template to obtain the calculation result; If the calculation result is the first preset result, it is determined that there is a key in the key list corresponding to the first key template that belongs to the key blacklist list, and the bit in the first key template that corresponds to the key blacklist list is set to a preset value to obtain the second key template; If the calculation result is not the first preset result, it is determined that each key in the key list corresponding to the first key template does not belong to the key blacklist list.
5. The method according to claim 3, characterized in that, The method further includes: If all bits in the first key template are of the first preset value, the first random number is obtained again. If the number of bits with the second preset value in all bits of the first key template is greater than the first bit threshold, then the first key template is determined to be the second key template. If the number of second bits that are the second preset value in all bits of the first key template is less than the second bit threshold, the first random number is re-acquired, and the second bit threshold is less than the first bit threshold.
6. The method according to claim 1, characterized in that, The step of obtaining the first random challenge number based on the encryption method corresponding to the first key template and the first random number includes at least one of the following: If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random number is used as the first random challenge number; When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random number is encrypted using an encryption algorithm and an encryption key to obtain the first random challenge number.
7. The method according to claim 1, characterized in that, The method further includes: The Security Anchor Function (SEAF) sends a second random challenge number and a resynchronization authentication token (AUTS) parameter, wherein the AUTS parameter is a parameter obtained based on the first random number and sent to the SEAF when the serial number SQN generated by the terminal verification authentication token (AUTN) is out of sync. Obtain the first random challenge number corresponding to the second random challenge number; Obtain the third key template corresponding to the first random challenge number; Obtain the second key selection sequence corresponding to the third key template from the key list; Based on the second key selection sequence, obtain the second symmetric key, and use the second symmetric key to verify the AUTS parameter to obtain the verification result; Perform SQN parameter synchronization based on the verification results.
8. A method for generating authentication keys for a communication network, characterized in that, Applied to terminals, including: Receive an authentication vector AV sent by a network device, wherein the authentication vector AV includes a first random challenge number; The first random number is obtained based on the encryption method corresponding to the first random challenge number and the first key template; Based on the first random number, obtain the first key template; A symmetric key is obtained based on the first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
9. The method according to claim 8, characterized in that, The step of obtaining the first random number based on the encryption method corresponding to the first random challenge number and the first key template includes: If the encryption method corresponding to the first key template indicates that the first key template is not encrypted, the first random challenge number is used as the first random number. When the encryption method corresponding to the first key template indicates that the first key template should be encrypted, the first random challenge number is decrypted using a decryption algorithm and a decryption key to obtain the first random number.
10. The method according to claim 1, characterized in that, The method further includes: In the case of SQN asynchrony caused by AUTN verification, the AUTS parameter is obtained according to the first random number and sent to the SEAF. The AUTS parameter is used to instruct the SEAF to send a second random challenge number and the AUTS parameter to the network device.
11. A communication network authentication key generation device, characterized in that, include: The template acquisition unit is used to acquire the first key template based on the first randomly generated first random number; A key acquisition unit is used to acquire a symmetric key according to a first key selection sequence in a key list corresponding to the first key template, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template; The data acquisition unit is used to acquire a first random challenge number based on the encryption method corresponding to the first key template and the first random number; A vector sending unit is configured to create an authentication vector AV based on the symmetric key and the first random challenge number, and send the authentication vector AV to the terminal. The authentication vector AV is configured to instruct the terminal to determine the first random number based on the first random challenge number, obtain the first key selection sequence corresponding to the first key template based on the first random number, and obtain the symmetric key based on the first key selection sequence.
12. A communication network authentication key generation device, characterized in that, include: A vector receiving unit is used to receive an authentication vector AV sent by a network device, wherein the authentication vector AV includes a first random challenge number; The random number acquisition unit is used to acquire a first random number based on the encryption method corresponding to the first random challenge number and the first key template; A key template acquisition unit is used to acquire a first key template based on the first random number. The symmetric key acquisition unit is used to acquire a symmetric key according to a first key selection sequence corresponding to the first key template in the key list, wherein each bit in the first key template is used to indicate the selection status of each key in the key list corresponding to the first key template.
13. A network device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the communication network authentication key generation method as described in any one of claims 1 to 7.
14. A terminal, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the communication network authentication key generation method as described in any one of claims 8 to 10.
15. A storage medium storing instructions, characterized in that, When the instruction is executed on the communication device, the communication device performs the communication network authentication key generation method as described in any one of claims 1 to 7 or 8 to 10.