Identity authentication method and device and electronic equipment

By using user passwords to generate private key fragments and perform identity authentication, the problem of certificate authentication in the prior art consumes a lot of computing resources and insufficient security is solved, and an efficient and secure identity authentication method is realized.

CN119475302AInactive Publication Date: 2025-02-18BEIJING HAITAI FANGYUAN HIGH TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411397971.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing digital signature-based identity authentication method consumes a lot of computing resources during the certificate authentication process, affecting the battery life of the device, and cannot effectively prevent attackers from using legitimate certificates for identity authentication, resulting in insufficient security.

Method used

The user's password is obtained through the first device, and the private key fragment is generated using the password. The private key is determined based on the locally stored private key fragment, and the identity authentication information is signed and sent to the second device. The second device uses the corresponding public key to authenticate. Avoid the risk of certificate use and attackers bypassing passwords.

Benefits of technology

While ensuring security, this method improves the efficiency of identity authentication, avoids the large-scale computing needs of certificates, reduces the energy consumption of the equipment, and enhances the security of identity authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475302A_ABST
    Figure CN119475302A_ABST
Patent Text Reader

Abstract

The invention is applied to the technical field of information security, provides an identity authentication method and device and electronic equipment, and is used for improving the authentication efficiency of the identity authentication method while ensuring the security. The method comprises the steps that first equipment acquires a first password of a user; the first device determines a first private key according to the first password and a locally stored first private key fragment of the user; the first device sends the identity authentication information signed by the first private key to the second device; and the second device performs identity authentication on the identity authentication information through a first public key corresponding to the first private key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to an identity authentication method, device and electronic device. Background Art

[0002] With the development of informatization and computer technology, people are enjoying the many benefits brought by informatization, while network security issues have become a common challenge faced by mankind in the information age. Identity authentication technology is an effective solution generated by the process of confirming the identity of operators in computer networks.

[0003] In GB / T15843.3-2023 "Information Technology Security Technology Entity Authentication Part 3 Mechanisms Using Digital Signature Technology", a scheme for identity authentication based on digital signatures is recommended: the verified device uses the certificate issued by the certificate authority (CA) as the user's identity information, and the verified device can obtain the trust of the verification device through the user's corresponding certificate, thereby realizing data interaction with the verification device. The aforementioned identity authentication method is often used in the fields of Internet of Things, RFID, etc. However, due to the large amount of information in the certificate, the certificate authentication process consumes a lot of computing resources, which has a great impact on the endurance of the verification device; in addition, in the aforementioned identity authentication method, the verification device can only perform identity authentication based on the certificate. Even if the attacker carries the certificate for identity authentication, the verification device may believe that its identity is credible, so security cannot be guaranteed. Summary of the invention

[0004] The present application provides an identity authentication method, device and electronic device, which are used to improve the authentication efficiency of the identity authentication method while ensuring security.

[0005] In a first aspect, the present application provides an identity authentication method. The method includes: a first device obtains a first password of a user; the first device determines a first private key according to the first password and a first private key fragment of the user stored locally; the first device sends identity authentication information signed by the first private key to a second device; the second device authenticates the identity authentication information by using a first public key corresponding to the first private key.

[0006] By adopting this method, the first password is strongly associated with the first private key. An attacker cannot obtain the first private key without obtaining the correct first password, and cannot perform identity authentication. Therefore, this method can avoid the possibility of an attacker bypassing the first password. At the same time, the identity authentication process in this method does not need to introduce a certificate with a large amount of data, which can ensure security while improving the authentication efficiency of the identity authentication method.

[0007] In one possible design, the process of the second device authenticating the identity authentication information may include: the second device determining the first public key based on the first public key fragments of the user stored locally; and the second device authenticating the identity authentication information through the first public key.

[0008] In this way, the second device can determine the first public key based on the first public key fragments stored locally, and thus verify the aforementioned identity authentication information based on the first public key, thereby avoiding security issues caused by an attacker accessing the second device with a certificate.

[0009] In one possible design, the second device may also receive the first public key fragment from the first device.

[0010] In this way, the second device can generate the first public key based on the first public key fragments from the first device, and further implement identity authentication of the identity authentication information, thereby improving security.

[0011] In one possible design, the process of the first device determining the first private key may include: the first device generates a second private key fragment of the user according to the first password; and the first device determines the first private key according to the second private key fragment and the first private key fragment.

[0012] In this way, the first device can generate a second private key fragment based on the first password, and determine the first private key based on the second private key fragment and the first private key fragment, so that the first password is strongly associated with the first private key. An attacker cannot obtain the second private key fragment without obtaining the correct first password, and cannot determine the first private key. This avoids the possibility of an attacker bypassing the first password to obtain the first private key. Therefore, it is possible to ensure security while improving the authentication efficiency of the identity authentication method.

[0013] In one possible design, the first device may also generate a first private key fragment based on the second private key fragment and a third private key fragment of a user from a key generation center (KGC); the first device may also store the first private key fragment locally.

[0014] In this way, the first device can generate the first private key fragment based on the third private key fragment from KGC, that is, the first device can obtain the endorsement of KGC, so that the identity of the first device is authoritatively authenticated, thereby improving the security of identity authentication information; in addition, this design enables the responsibility to be traced through the endorsement node when problems arise later, which is conducive to resolving disputes and ensuring network compliance.

[0015] In a possible design, the first device may also generate a second public key fragment of the user based on the first password; the first device may also send the second public key fragment to the KGC; the KGC may generate a third private key fragment and a first public key fragment based on the KGC's master public key, the KGC's master private key, and the second public key fragment; the KGC may also send the third private key fragment and the first public key fragment to the first device.

[0016] In this way, the first device can generate the user's second public key fragment based on the first password in advance, and then obtain the first public key fragment endorsed by KGC based on the second public key fragment, so that subsequent identity authentication methods can be performed based on the first public key fragment to further ensure security.

[0017] In a second aspect, the present application provides an identity authentication method, which can be applied to a first device, or a component (such as a processor, chip, chip system, circuit, functional module or other, etc.) in the first device, or a software module. The method includes: the first device obtains a first password of a user; the first device determines a first private key based on the first password and a locally stored first private key fragment of the user; the first device sends identity authentication information signed by the first private key to the second device; the identity authentication information is used by the second device to authenticate the identity through the first public key corresponding to the first private key.

[0018] In one possible design, the process of the first device determining the first private key may include: the first device generates a second private key fragment of the user according to the first password; and the first device determines the first private key according to the second private key fragment and the first private key fragment.

[0019] In a possible design, the first device may also generate a first private key fragment based on the second private key fragment and a third private key fragment from a user of the KGC; the first device may also store the first private key fragment locally.

[0020] In a possible design, the first device may also generate a second public key fragment of the user according to the first password; the first device may also send the second public key fragment to the KGC; the first device may also receive a third private key fragment and the first public key fragment from the KGC.

[0021] In one possible design, the first device may also send the first public key fragment to the second device.

[0022] In a third aspect, the present application provides an identity authentication method, which can be applied to a second device, or a component in the second device (such as a processor, chip, chip system, circuit, functional module or other, etc.), or a software module. The method includes: the second device receives identity authentication information signed by a first private key from a first device; the first private key is determined by the first device based on a first password of a user and a locally stored first private key fragment of the user; the second device authenticates the identity authentication information through a first public key corresponding to the first private key.

[0023] In one possible design, the process of the second device authenticating the identity authentication information may include: the second device determining the first public key based on the first public key fragments of the user stored locally; and the second device authenticating the identity authentication information through the first public key.

[0024] In one possible design, the second device may also receive the first public key fragment from the first device.

[0025] In a fourth aspect, the present application provides an identity authentication method, which can be applied to KGC, or a component in KGC (such as a processor, chip, chip system, circuit, functional module or other, etc.), or a software module. The method includes: KGC receives a second public key fragment from a first device; KGC generates a third private key fragment and a first public key fragment according to the master public key of KGC, the master private key of KGC and the second public key fragment; KGC can also send the third private key fragment and the first public key fragment to the first device.

[0026] In a fifth aspect, the present application also provides an identity authentication system, which includes a first device and a second device.

[0027] The first device is used to obtain a first password of a user; the first device is also used to determine a first private key based on the first password and locally stored first private key fragments of the user; the first device is also used to send identity authentication information signed by the first private key; the second device is used to authenticate the identity authentication information through a first public key corresponding to the first private key.

[0028] In one possible design, the second device is specifically used to: determine the first public key based on locally stored first public key fragments of the user; and authenticate the identity authentication information through the first public key.

[0029] In one possible design, the second device is further used to: receive the first public key fragment.

[0030] In one possible design, the first device is specifically used to: generate a second private key fragment of the user according to the first password; and determine the first private key according to the second private key fragment and the first private key fragment.

[0031] In a possible design, the first device is further used to: generate a first private key fragment based on the second private key fragment and the user's third private key fragment; and store the first private key fragment locally.

[0032] In a possible design, the identity authentication system further includes: KCG. The first device is also used to: generate a second public key fragment of the user according to the first password; and send the second public key fragment. KGC is also used to: generate a third private key fragment and a first public key fragment according to the master public key of KGC, the master private key of KGC and the second public key fragment; and send the third private key fragment and the first public key fragment.

[0033] In a sixth aspect, the present application further provides an identity authentication device, which includes a communication module and a processing module, wherein the communication module is used to receive and send data, and the processing module is used to execute the methods shown in the second to fourth aspects.

[0034] In a possible example, the identity authentication device is a first device, which is used to implement the identity authentication method of the second aspect. The communication module is specifically used to: obtain a first password of a user; the processing module is specifically used to: determine a first private key according to the first password and a first private key fragment of the user stored locally; the communication module is also used to: send identity authentication information signed by the first private key to the second device; the identity authentication information is used by the second device to authenticate the identity through a first public key corresponding to the first private key.

[0035] In a possible design, the processing module is specifically used to: generate a second private key fragment of the user according to the first password; and determine the first private key according to the second private key fragment and the first private key fragment.

[0036] In a possible design, the processing module is specifically used to: generate a first private key fragment according to the second private key fragment and a third private key fragment from a user of the KGC; and store the first private key fragment locally.

[0037] In one possible design, the processing module is specifically used to: generate the user's second public key fragment according to the first password; the communication module is specifically used to: send the second public key fragment to the KGC; the communication module is specifically used to: receive the third private key fragment and the first public key fragment from the KGC.

[0038] In one possible design, the communication module is specifically used to send the first public key fragment to the second device.

[0039] In a possible example, the identity authentication device is a second device, which is used to implement the identity authentication method of the third aspect. The communication module is specifically used to: receive the identity authentication information signed by the first private key from the first device; the first private key is determined by the first device according to the first password of the user and the first private key fragment of the user stored locally; the processing module is specifically used to: authenticate the identity of the identity authentication information through the first public key corresponding to the first private key.

[0040] In a possible design, the processing module is specifically used to: determine the first public key based on the first public key fragments of the user stored locally; the processing module is specifically used to: authenticate the identity authentication information through the first public key.

[0041] In one possible design, the communication module is specifically used to: receive a first public key fragment from a first device.

[0042] In a possible example, the identity authentication device is a KGC, which is used to implement the identity authentication method of the fourth aspect. The communication module is specifically used to: receive the second public key fragment from the first device; the processing module is specifically used to: generate the third private key fragment and the first public key fragment according to the master public key of the identity authentication device, the master private key of the identity authentication device and the second public key fragment; the communication module is specifically used to: send the third private key fragment and the first public key fragment to the first device.

[0043] In the seventh aspect, the present application also provides an electronic device, the electronic device comprising a processor and a memory, the processor being used to implement the steps of the first aspect and any possible design identity authentication method when executing a computer program stored in the memory, or the processor being used to implement the steps of the second aspect and any possible design identity authentication method when executing a computer program stored in the memory, or the processor being used to implement the steps of the third aspect and any possible design identity authentication method when executing a computer program stored in the memory, or the processor being used to implement the steps of the fourth aspect and any possible design identity authentication method when executing a computer program stored in the memory.

[0044] In the eighth aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the first aspect and any possible design identity authentication method thereof, or, when executed by a processor, implements the steps of the second aspect and any possible design identity authentication method thereof, or, when executed by a processor, implements the steps of the third aspect and any possible design identity authentication method thereof, or, when executed by a processor, implements the steps of the fourth aspect and any possible design identity authentication method thereof.

[0045] In the ninth aspect, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the first aspect and any possible design identity authentication method, or when the computer program is executed by a processor, it implements the steps of the second aspect and any possible design identity authentication method, or when the computer program is executed by a processor, it implements the steps of the third aspect and any possible design identity authentication method, or when the computer program is executed by a processor, it implements the steps of the fourth aspect and any possible design identity authentication method.

[0046] In addition, the technical effects brought about by the second to ninth aspects can be found in the description of the first aspect above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 An example diagram of an identity authentication architecture provided in an embodiment of the present application;

[0049] Figure 2 A flowchart of an identity authentication method provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of a process for generating public and private key fragments provided in an embodiment of the present application;

[0051] Figure 4 Another example diagram of a public and private key fragment generation process provided in an embodiment of the present application;

[0052] Figure 5 Another example diagram of a public and private key fragment generation process provided in an embodiment of the present application;

[0053] Figure 6 A flowchart of a method for generating a private key provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of an identity authentication interaction process provided in an embodiment of the present application;

[0055] Figure 8 A flowchart of a method for generating a public key provided in an embodiment of the present application;

[0056] Fig. 9A schematic diagram of a modular structure of an identity authentication device provided in an embodiment of the present application;

[0057] Fig.10 A schematic diagram of the structure of another identity authentication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0059] The following are some explanations of the symbols designed in this application:

[0060] (1) “||” indicates character concatenation or string concatenation. For example, “X||Y” means concatenating “X” and “Y”; if X = “123” and Y = “456”, then X||Y = “123456”.

[0061] (2) HASH: Hash algorithm (SM3 algorithm, etc.), abbreviated as "H". For example, H(text) represents the hash value of text.

[0062] (3)ENTL A : It is the user A's identifiable ID specified in the SM2 standard A The bit length of is encoded as 2 bytes in big-endian format. For example, the ID A is "Alice@abc.com", whose bit length is 13×8=104 bits. The ENTL obtained after conversion in big-endian format is A It is a 2-byte byte string "0068".

[0063] (4) a and b: are the curve parameters specified in the SM2 standard. For the definitions of a and b, please refer to GB / T32918-2016 "Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm".

[0064] (5) G: is the base point specified in the SM2 standard. For details, please refer to GB / T 32918-2016 "Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm".

[0065] (6) PBKDF: It is the key derivation function specified in the standard GM / T 0091-2020 "Password-Based Key Derivation Specification".

[0066] (7)T A : A parameter value composed of the purpose of the generated data, timestamp / serial number, random number, etc. For details, see GM / T 0091-2020 "Password-based Key Derivation Specification". Example: T A It consists of a 1-byte path identifier (indicating the purpose of generating the data), a timestamp of not less than 4 bytes, and a random number that can be set to not less than 8 bytes.

[0067] (8) c: Number of iterations. For example, the number of iterations can be implemented in accordance with GM / T 0091-2020 "Password-based Key Derivation Specification".

[0068] (9) len: The byte length of the private key fragment (k1 or k2). For example, according to GB / T 32918.5-2017 "Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm Part 5 Parameter Definition", len is set to 32 bytes.

[0069] (10)T KGC : The parameter value in KGC is composed of the purpose of the generated data, timestamp / serial number, random number, etc. For details, please refer to GM / T 0091-2020 "Password-based Key Derivation Specification". Example: T KGC It consists of a 1-byte path identifier (indicating the purpose of generating the data), a timestamp of not less than 4 bytes, and a random number that can be set to not less than 8 bytes.

[0070] (11) BCAE-ENC: An identifiable encryption mechanism described in GB / T 36624-2018 Information technology security technology identifiable encryption mechanism. For example, the cryptographic algorithm may adopt the SM4 cryptographic algorithm specified in GB / T 32907-2016 Information security technology SM4 block cipher algorithm.

[0071] (12) BCAE-DEC: An identifiable decryption mechanism described in GB / T 36624-2018 "Information Technology Security Technology Authenticated Encryption Mechanism". This decryption mechanism must match the aforementioned encryption mechanism, and the cryptographic algorithm used is recommended to be the same as the cryptographic algorithm used in the aforementioned BCAE-ENC, for example, both use the SM4 algorithm.

[0072] In the embodiments of the present application, the number of nouns, unless otherwise specified, means "singular noun or plural noun", that is, "one or more". "At least one" means one or more, and "plural" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. For example, A / B means: A or B. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c means: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0073] The ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the size, content, order, timing, application scenario, priority or importance of the multiple objects. For example, the first cell and the second cell can be the same cell or different cells, and such a name does not indicate the difference in priority, application scenario or importance of the two cells.

[0074] In the embodiments of the present application, "when...", "under the circumstances...", and "if...", "then" may represent the same meaning and may be replaced with each other.

[0075] The embodiment of the present application provides a possible identity authentication architecture, which includes a first device and a second device. In some examples, the first device is a verified device, that is, an entity corresponding to the authenticated user, and the second device is a verifying device, that is, an entity that verifies the user's identity. Figure 1 This is an example diagram of an identity authentication architecture provided in an embodiment of the present application. In the embodiment of the present application, it is assumed that the first device corresponds to user A, so the first device is also called device A; the second device corresponds to user B, so the second device is also called device B.

[0076] Optionally, the identity authentication architecture may further include a KGC device (referred to as KGC in this application).

[0077] In some examples, the KGC may execute an SM2 key pair generation algorithm to generate a public key of the KGC and a private key of the KGC.

[0078] Among them, the private key of KGC is also called the master private key sk KGC, is a random number between 1 and n-1 (n is the order of the base point G in the SM2 cryptographic algorithm). In this application example, the details of the SM2 algorithm can be found in GB / T 32918-2016 "Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm".

[0079] In addition, the public key of KGC is also called the master public key PK KGC , satisfying the multiple point PK of point G on the SM2 elliptic curve KGC =[sk KGC ]G.

[0080] It should be understood that the aforementioned master private key and master public key are stored in the KGC.

[0081] Optionally, in some examples, KGC can publish a master public key. Accordingly, each device under the jurisdiction of KGC can obtain the master public key PK from KGC. KGC ; For example, both the first device and the second device can obtain the master public key of the KGC.

[0082] In order to improve the authentication efficiency of the identity authentication method while ensuring security, the embodiment of the present application provides an identity authentication method. The identity authentication method in the present application can be applied in the aforementioned identity authentication architecture.

[0083] The identity authentication method provided in the embodiment of the present application is described below in conjunction with the accompanying drawings. Figure 2 An identity authentication method provided in an embodiment of the present application may include the following steps:

[0084] S201: The first device obtains a first password of a user.

[0085] It should be understood that the first device is an entity corresponding to the authenticated user (referred to as user, or user A in the embodiment of the present application).

[0086] Optionally, the first device may also obtain identification information corresponding to the user.

[0087] In some examples, the first device obtains the following information: a user-defined identifiable ID A (i.e. identification information) and user password pwd (i.e. first password). Among them, the identification ID A Less than 8192 bytes. For example, the user sets his own ID A is "Alice@abc.com".

[0088] In some examples, the password is required to be no less than 8 characters in length; since purely numeric passwords do not meet password security requirements, the password characters may include at least one of the following symbols: numbers, uppercase letters, lowercase letters, and special symbols; in some examples, in order to improve the security of the password, the password can be set to include numbers, uppercase letters, lowercase letters, and special symbols at the same time; in other examples, in order to reduce the user's burden of remembering passwords or reduce device computing costs, the password can be set to any two of the aforementioned symbols.

[0089] S202: The first device determines a first private key according to a first password and locally stored first private key fragments of the user.

[0090] In one possible design, the process of the first device determining the first private key includes: the first device generates a second private key fragment of the user according to the first password; and the first device determines the first private key according to the second private key fragment and the first private key fragment.

[0091] Below through Figures 3 to 5 The method flow chart shown exemplarily describes the generation method of at least one private key fragment of the first private key. In some embodiments, during the generation of the private key fragment, the public key fragment of the first public key corresponding to the first private key is also generated at the same time.

[0092] Figure 3 This is a flowchart of an exemplary method for generating public and private key fragments provided in this application, which is used to generate a second public key fragment and a second private key fragment. Figure 3 As shown, the process includes the following steps:

[0093] S3-1: The first device calculates the user's identity hash value Z. The formula for calculating the identity hash value Z may be: Z A =HASH(ENTL A ||ID A ||a||b||G||PK KGC ).

[0094] The "G" in the above formula means that the x-coordinate and y-coordinate of the base point G are fed into the hash, which is abbreviated as G. KGC " means: the primary public key PK is sent to the hash KGC The x-coordinate and y-coordinate of KGC .

[0095] S3-2: The first device generates a second private key fragment of the user according to the first password. The second private key fragment can be recorded as k1. The formula for calculating the second private key fragment can be: k1 = PBKDF (pwd, T A ||Z A, c, len). Wherein, “T A ||Z A " is the salt value required by PBKDF.

[0096] S3-3: The first device calculates the second public key fragment of the user, which can be recorded as PK A,1 .

[0097] Optionally, the formula for calculating the second public key fragment may be: PK A,1 =[k1]G.

[0098] S3-4: The first device may locally store at least one of the following: the second public key fragment, T A The value of .

[0099] Optionally, the first device may also send the second public key fragment to the KGC.

[0100] In one possible design, before the first device locally queries and obtains the first private key fragment, it can also perform the following design: the first device can generate the first private key fragment based on the second private key fragment determined in the aforementioned S3-4 and the third private key fragment from the user of the KGC; further, the first device locally stores the first private key fragment.

[0101] Optionally, the first device may obtain the third private key fragment from the KGC in the following manner: the first device may obtain the second public key fragment; the first device may send the second public key fragment to the KGC; the KGC may generate the third private key fragment and the first public key fragment based on the master public key of the KGC, the master private key of the KGC, and the second public key fragment; the KGC may send the third private key fragment and the first public key fragment to the first device.

[0102] The first device may obtain the second public key fragment by executing the aforementioned S3-3, or may obtain the second public key fragment locally after having executed S3-4.

[0103] Figure 4 Another example of a method for generating public and private key fragments provided in this application is a flow chart for generating a third private key fragment and a first public key fragment. Figure 4 As shown, the process includes the following steps:

[0104] S4-1: KGC calculates the user's identity hash value Z. The formula for calculating the identity hash value Z can be: Z A =HASH(ENTL A ||ID A ||a||b||G||PK KGC ). The meaning of each parameter is the same as S3-1 and will not be repeated here.

[0105] S4-2: KGC calculates the fourth private key fragment of the user, which can be recorded as k2. The formula for calculating the fourth private key fragment can be: k2 = PBKDF (sk KGC , T KGC ||Z A ||PK A,1 , c, len). The meanings of some parameters are the same as those in S3-2 and will not be repeated here. KGC ||Z A ||PK A,1 " is the salt value required by PBKDF.

[0106] S4-3: KGC calculates the first public key fragment based on the second public key fragment. The first public key fragment can be recorded as PK A,3 The formula for calculating the first public key fragment can be: PK A,3 =PK A,1 +[k2]G.

[0107] S4-4: KGC calculates the user identity based on the first public key fragment, thereby determining the integer f. The formula for calculating the integer f may be: f = HASH (PK A,3 ||Z A )mod n.

[0108] In some examples, the specific implementation method is: first, calculate the hash value HASH (PK A,3 ||Z A ); then, convert the byte string into an integer in accordance with Section 4.2.3 of GB / T 32918.1-2016 "Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm Part 1 General Principles"; finally, perform a mod n operation on the integer (i.e., perform a remainder operation after division by n), and record the calculation result as the user identity determination integer f.

[0109] S4-5: KGC determines the fifth private key fragment based on the fourth private key fragment, integer f and KGC's master private key. The fifth private key fragment can be recorded as k3. The formula for calculating the fifth private key fragment can be: k3 = k2 + fsk KGC mod n.

[0110] S4-6: KGC uses the second public key fragment to encrypt the fifth private key fragment, thereby determining the third private key fragment, which can be recorded as k A *. Optionally, the third private key fragment may be calculated by executing the SM2 algorithm; for example, the formula for calculating the third private key fragment may be: k A * = SM2-ENC (PK A,1 , k3).

[0111] S4-7: KGC outputs the calculation result (the third private key fragment and the first public key fragment).

[0112] Optionally, the KGC may send the third private key fragment (ie, the encrypted fifth private key fragment) and the first public key fragment to the first device; correspondingly, the first device may receive the third private key fragment and the first public key fragment from the KGC.

[0113] Furthermore, the first device may locally store the third private key fragment and the first public key fragment.

[0114] Optionally, the KGC may send the first public key fragment to the second device; correspondingly, the second device may receive the first public key fragment from the KGC.

[0115] Furthermore, the second device may store the first public key fragment locally.

[0116] Furthermore, Figure 5 Another example of a method for generating public and private key fragments provided in this application is a flow chart for generating a first private key fragment. Figure 5 As shown, the process includes the following steps:

[0117] S5-1: The first device uses the second private key fragment to decrypt the third private key fragment, thereby determining the fifth private key fragment. In some examples, the first device can obtain the fifth private key fragment based on the third private key fragment and the decryption algorithm (SM2); the formula for calculating the fifth private key fragment can be: k3 = SM2-DEC (k1, k A *).

[0118] In some examples, when the first device does not store the second private key fragment locally, the first device can obtain the second private key fragment by executing the aforementioned S3-1 and S3-2, and the specific execution process is not repeated here.

[0119] S5-2: The first device performs a trans-encryption operation on the fifth private key fragment, thereby obtaining a first private key fragment (or trans-encrypted ciphertext), the first private key fragment can be recorded as ek3. The formula for calculating the first private key fragment can be: ek3 = BCAE-ENC (k1, k3).

[0120] Optionally, an identifiable encryption mechanism may be used to implement the trans-encryption operation, for example, the identifiable encryption mechanism KeyWrap described in GB / T36624-2018 "Information Technology Security Technology Authenticated Encryption Mechanism" is selected, that is, SM4-KeyWrap is executed.

[0121] S5-3: The first device locally stores the aforementioned first private key fragment.

[0122] In this way, even if the first device in the aforementioned S5-1 obtains the fifth private key fragment, it does not need to be stored directly locally, but the fifth private key fragment is transcoded to store the first private key fragment obtained by the transcoded operation; it should be understood that with such a design, even if the first private key fragment is leaked, the attacker cannot decrypt the first private key fragment to obtain the fifth private key fragment without the password, thereby reducing the risk of the private key fragment being stolen and improving security.

[0123] Optionally, based on the aforementioned S4-7, the first device may also store the first public key fragment from the KGC.

[0124] In this way, the first device does not need to store the first private key locally, and can determine the first private key based on the aforementioned multiple private key fragments stored locally (for example, the second private key fragment and the first private key fragment). Figure 6 The method flow chart shown exemplarily describes the process of generating the first private key.

[0125] Figure 6 This is a flowchart of an example private key generation method provided in this application. Figure 6 As shown, the process includes the following steps:

[0126] S6-1: The first device calculates the identity hash value Z of the user. The formula for calculating the identity hash value Z may be: Z A =HASH(ENTL A ||ID A ||a||b||G||PK KGC ).

[0127] S6-2: The first device generates a second private key fragment of the user according to the first password. The formula for calculating the second private key fragment may be: k1 = PBKDF (pwd, T A ||Z A , c, len).

[0128] It should be understood that the aforementioned S6-1 and S6-2 can refer to the aforementioned S3-1 and S3-2, and the repeated parts are not repeated. Assuming that the second private key fragment is stored locally on the first device in the aforementioned S3-4, the first device may not execute S6-1 and S6-2, and directly query and obtain the second private key fragment locally.

[0129] S6-3: The first device uses the second private key fragment to perform a decryption calculation on the locally stored first private key fragment, thereby determining the fifth private key fragment, wherein k3=BCAE-DEC(k1,ek3) of the fifth private key fragment is calculated.

[0130] In some examples, assuming that the first device cannot implement decryption in S6-3, that is, the decryption fails, the first device can report an error and terminate the process, that is, S6-4 is not executed.

[0131] S6-4: The first device determines a first private key according to the second private key fragment and the fifth private key fragment. The first private key can be recorded as sk A The formula for calculating the first private key can be: sk A =k1+k3mod n.

[0132] In this way, the first device only stores the first private key fragment locally, and needs to determine the second private key fragment based on the first password, so as to decrypt the first private key fragment and finally obtain the first private key; that is, the first device must obtain the accurate first password before it can obtain the correct first private key, avoiding the vulnerability of attackers bypassing the password and improving the security of the first private key during storage and use.

[0133] S203: The first device sends identity authentication information (or entity identity authentication credentials) signed by the first private key to the second device.

[0134] like Figure 7 As shown, the first device uses the first private key to sign the identity authentication information and sends it to the second device; the signed identity authentication information can be recorded as Token.

[0135] In some examples, the first device can use USBKEY as the cryptographic machine cipher supervisor of the identity authentication credential. Accordingly, the verification device corresponding to the first device (e.g., the second device) is the cryptographic machine, and the second device needs to verify the identity of the cryptographic machine cipher supervisor. Based on this, the process of the first device signing and sending the identity authentication information can include the following steps:

[0136] S7-1: The first device generates a random number N using its own USBKEY A .

[0137] S7-2: The first device calculates the identity authentication information after the signature. The formula for calculating the identity authentication information after the signature can be: Token = ID A ||N A ||ID B ||PK A,3 ||SM2-SIGN(sk A , N A ||ID B ||PK A,3 ). In the above formula, “SM2-SIGN(sk A , N A ||ID B ||PKA,3 )" means using the private key sk A For message N A ||ID B ||PK A,3 sign.

[0138] S7-3: The first device sends the signed identity authentication information to the second device.

[0139] S204: The second device authenticates the identity authentication information through the first public key corresponding to the first private key.

[0140] In one possible design, a method for the second device to authenticate identity authentication information includes: the second device determines a first public key based on locally stored first public key fragments of the user; and the second device authenticates the identity authentication information through the first public key.

[0141] For example, the second device may obtain the signature data of user A from the identity authentication information, and the signature data may be recorded as sig. The formula for calculating the signature data may be: sig = SM2 - SIGN (sk A , N A ||ID B ||PK A,3 ). Further, the second device may perform signature verification based on the SM2 algorithm, that is, calculate the following formula: SM2-VERIFY(PK A , N A ||ID B ||PK A,3 , sig), thereby obtaining the verification result; when the verification result indicates that the signature verification is passed, the identity authentication is passed; conversely, when the verification result indicates that the signature verification is not passed, the identity authentication is not passed. It should be understood that the present application does not limit the embodiment of the verification result; for example, the verification result return value is 0 or 1, 1 is used to indicate that the signature authentication is passed, and the verification result return value is 0 to indicate that the signature authentication is not passed; for another example, the verification result return value is "signature verification passed", "signature verification failed" or "other errors" (indicating that the signature verification is not passed).

[0142] Optionally, before executing S204, the second device may receive the first public key fragment from the first device. For example, based on the above S4-7, the second device receives the first public key fragment from the KGC.

[0143] In some examples, the second device may locally obtain the first public key fragment.

[0144] Below through Figure 8 The method flow chart shown exemplarily describes the process of generating the first public key.

[0145] Figure 8 This is a flowchart of an example of a public key generation method provided in this application. Figure 8 As shown, the process includes the following steps:

[0146] S8-1: The second device calculates the user's identity hash value Z. The formula for calculating the identity hash value Z may be: Z A =HASH(ENTL A ||ID A ||a||b||G||PK KGC ).

[0147] Optionally, the second device can obtain the identifiable ID of user A from the identity authentication information. A .

[0148] S8-2: The second device calculates the user identity according to the first public key fragment, thereby determining the integer f.

[0149] Get user A's public key fragment 3 (PK A,3 ), and calculate the user A identity confirmation integer f = HASH (PK A,3 ||Z A )modn. The specific implementation method is: first, calculate the hash value HASH(PK A,3 ||Z A ); then, convert the byte string into an integer in accordance with Section 4.2.3 of GB / T 32918.1-2016 "Information Security Technology SM2 Elliptic Curve Public Key Cryptography Algorithm Part 1 General Principles"; finally, perform a mod n operation on the integer (i.e., perform a remainder operation after division by n), and record the calculation result as the user identity determination integer f.

[0150] S8-3: The second device calculates the first public key according to the first public key fragment and the master public key of KGC. The formula for calculating the first public key may be: PK A =PK A,3 +[f]PK GGC .

[0151] In some possible designs, before the second device verifies the aforementioned identity authentication information (i.e., before executing S204), the second device may also verify the validity of basic information corresponding to the identity authentication information. The basic information corresponding to the identity authentication information may include at least one of the following:

[0152] For example, the second device verifies the validity of the identifiable identifier of the verification device carried in the identity authentication information; when the identifiable identifier of the verification device carried in the identity authentication information is the identifiable identifier ID of user B corresponding to the second device BIf the second device receives the random number N carried in the identity authentication information, the verification is successful; otherwise, the verification is unsuccessful. A The validity of the identity authentication information is verified; when the random number N carried in the identity authentication information A If the random number is not equal to the one that has been used before, the verification is successful; otherwise, the verification fails.

[0153] It should be understood that the process of the second device verifying the validity of the basic information corresponding to the identity authentication information can be a combination of multiple verifications or a single verification of a certain basic information, which is not limited in this application. Further, assuming that the verification fails, the second device can output "verification failed" and end the verification process, that is, S204 is not executed; conversely, assuming that the verification passes, the aforementioned S204 continues to be executed.

[0154] Based on the same concept as the above-mentioned identity authentication method, an embodiment of the present application also provides an identity authentication device for implementing the above-mentioned method performed by the identity authentication device.

[0155] Fig. 9 Shown is a schematic diagram of the modular structure of an identity authentication device provided in an embodiment of the present application.

[0156] The communication module 901 can be used to receive and send data, and the processing module 902 can be used to execute the identity authentication method shown in step S201 to step S204. The specific actions and functions executed are not elaborated here, and the description of the aforementioned method embodiment can be referred to.

[0157] Fig.10 A schematic diagram of the structure of an identity authentication device provided in an embodiment of the present application is shown.

[0158] The electronic device in the embodiment of the present application may include a processor 1001. The processor 1001 is the control center of the identity authentication device, and various interfaces and lines can be used to connect the various parts of the identity authentication device, by running or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0159] The processor 1001 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps performed by the first device, the second device, or the KGC disclosed in the embodiments of the present application may be performed directly by a hardware processor, or by a combination of hardware and software modules in the processor.

[0160] In an embodiment of the present application, the memory 1002 stores instructions that can be executed by at least one processor 1001. The at least one processor 1001 can be used to execute the aforementioned steps performed by the first device, the second device or the KGC by executing the instructions stored in the memory 1002.

[0161] The memory 1002 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1002 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 1002 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1002 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0162] In the embodiment of the present application, the network device may further include a communication interface 1003 , and the identity authentication device may transmit data through the communication interface 1003 .

[0163] Optional, can be Fig.10 The processor 1001 (or the processor 1001 and the memory 1002) is implemented Fig. 9 The processing module 902 shown, and / or, is implemented by the communication interface 1003 Fig. 9 The communication module 901 is shown.

[0164] Based on the same inventive concept, the embodiment of the present application also provides a computer-readable storage medium, which may store instructions. When the instructions are executed on a computer, the computer executes the operation steps provided in the above method embodiment. The computer-readable storage medium may be Fig.10 Memory 1002 is shown.

[0165] Based on the same inventive concept, an embodiment of the present application also provides an identity authentication system, which includes a first device and a second device.

[0166] In one possible design, the identity authentication system also includes: KCG.

[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0168] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0171] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An identity authentication method, characterized in that: The method comprises: The first device obtains a first password of the user; The first device determines a first private key according to the first password and a locally stored first private key fragment of the user; The first device sends identity authentication information signed by the first private key to the second device; The second device authenticates the identity authentication information through a first public key corresponding to the first private key.

2. The method according to claim 1, characterized in that The second device authenticates the identity authentication information by using a first public key corresponding to the first private key, including: The second device determines the first public key according to the first public key fragment of the user stored locally; The second device authenticates the identity authentication information through the first public key.

3. The method according to claim 2, characterized in that The method further comprises: The second device receives the first public key fragment from the first device.

4. The method according to any one of claims 1 to 3, characterized in that: The first device determines the first private key according to the first password and the first private key fragment of the user stored locally, including: The first device generates a second private key fragment of the user according to the first password; The first device determines the first private key according to the second private key fragment and the first private key fragment.

5. The method according to claim 4, characterized in that The method further comprises: The first device generates the first private key fragment according to the second private key fragment and the third private key fragment of the user from a key generation center KGC; The first device locally stores the first private key fragment.

6. The method according to claim 5, characterized in that The method further comprises: The first device obtains a second public key fragment; The first device sends the second public key fragment to the KGC; The KGC generates the third private key fragment and the first public key fragment according to the master public key of the KGC, the master private key of the KGC and the second public key fragment; The KGC sends the third private key fragment and the first public key fragment to the first device.

7. An identity authentication system, characterized in that: The system comprises: A first device is used to obtain a first password of a user; the first device is also used to: determine a first private key according to the first password and a first private key fragment of the user stored locally; the first device is also used to: send identity authentication information signed by the first private key; The second device is used to authenticate the identity authentication information by using the first public key corresponding to the first private key.

8. An identity authentication device, characterized in that: The method comprises: A communication module for receiving and sending data; A processing module, used to execute the steps included in the method of any one of claims 1-6.

9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-6 according to the obtained program instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Private key generation method, device and system

    CN108574571A

  • System of generating local key and method thereof

    CN109412799A

  • Identity authentication method, device and system, electronic equipment and storage medium

    CN113836506A