Two-factor authentication method and system
Through a two-factor authentication scheme of homomorphic encryption and robust hash function, combining biometric and private key authentication, the problems of replay attacks and database theft in the existing technology are solved, and efficient and secure identity authentication is achieved.
Patent Information
- Application Number
- CN202310607786.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-05-10
- Filing Date
- 2023-05-26
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2043-05-26
AI Technical Summary
The existing two-factor authentication scheme cannot withstand replay attacks, the security model is weak and the efficiency is low, and it cannot effectively prevent the opponent from stealing database content and private keys, resulting in low authentication security.
Using homomorphic encryption public key encryption scheme and a hash function with robust predicate relationships, the server randomly generates the challenge number and the user's biometrics and private key authentication factors to protect the user's biometrics and private key authentication factors. Private key information, resist replay attacks and database theft.
It significantly improves the security and efficiency of authentication, can effectively defend against replay attacks and database theft, improves the threshold for authentication, and meets users' security and efficiency needs.
Smart Images

Figure CN118944851A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer security technology, and in particular to identity authentication technology. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the present application as recited in the claims. The description herein is not admitted to be prior art as disclosed by virtue of its inclusion in this section.
[0003] Homomorphic encryption is a special encryption method that allows specific calculations to be performed on ciphertext, and the result obtained is the same as the corresponding plaintext calculation result. In simple terms, it is to perform calculations in the ciphertext domain without decrypting the plaintext. Homomorphic encryption can be used to protect data privacy while allowing data processing in an encrypted state, thereby achieving data sharing and processing security. Homomorphic encryption can be divided into two types: fully homomorphic encryption and partially homomorphic encryption. The former can perform any calculation, while the latter can only perform specific types of calculations. Homomorphic encryption has been widely used in cloud computing, the Internet of Things, blockchain and other fields.
[0004] Two-factor authentication schemes refer to authentication schemes that use two different authentication factors to verify the identity of a user. Usually, the two factors include the user's physical characteristics (such as fingerprints, facial recognition, iris scans, etc.) and a secret factor (such as a password, private key, etc.). In a two-factor authentication scheme, the user needs to provide both factors at the same time to pass the identity authentication. Compared with single-factor authentication, two-factor authentication schemes are more secure because an attacker needs to obtain two different factors at the same time to successfully impersonate a user.
[0005] The following further introduces the two-factor authentication solution in the prior art.
[0006] See also Figure 1 The user registers with the server. In the registration phase, the user first calls the homomorphic encryption key generation algorithm to generate a pair of public and private keys (pk, sk) ← HE.KeyGen(1 λ ), collect the user's facial information feature vector Γ=(Γ1,…,Γ k ). Then call the homomorphic encryption algorithm for each bit to get c i =(α i , β i )←HE.Enc(pk,Γ i ). Combine ID with ciphertext c1,…,c k And the public key pk is sent to the server, which stores it.
[0007] In the authentication phase, the BlindESED algorithm is used to represent the blind squared Euclidean distance algorithm.
[0008] See also Figure 2 , when a user wants to authenticate, the following steps are performed:
[0009] Step 1: First, sample the facial biometric features to obtain Γ′=(Γ′1,…,Γ k ′), the user's ID and C i ′=(α i , β i )←HE.Enc(pk,Γ i ′) is sent to the server.
[0010] Step 2: The server receives C i 'After that, r0 and r1 are uniformly randomly generated and the blind squared Euclidean distance calculation algorithm is called to obtain the second-order ciphertext S * =(α * , β * ) is sent to the user.
[0011] Step 3: User receives S * After that, call the decryption algorithm s * ←HE.Dec(sk,S * ) is sent to the server.
[0012] Step 4: The server will * Calculate the threshold s and compare it with the standard threshold to determine whether the authentication is passed.
[0013] However, the above solution has the following technical problems:
[0014] Unable to resist replay attacks: A malicious user can pass the authentication by replaying the first message without knowing the user's facial feature vector, so this scheme cannot prevent replay attacks.
[0015] Weak security model: The adversary does not consider stealing the database content. If the adversary steals the registration information C in the server's database, as long as the adversary obtains the user's private key authentication factor sk, C can be decrypted to obtain the user's biometric authentication factor Γ. In this way, the adversary obtains two authentication factors, so he can impersonate the user to pass the authentication.
[0016] Low efficiency: This scheme uses a quadratic homomorphic encryption scheme, which has low encryption and decryption efficiency, so it may face efficiency issues in practical applications.
[0017] Therefore, the above solution has low security and low efficiency and cannot well meet the needs of users. Summary of the invention
[0018] The purpose of this application is to provide a two-factor authentication method and system to solve the problems raised in the above background technology.
[0019] The present application discloses a two-factor authentication method, comprising:
[0020] Step A: The server calls the key generation algorithm of public key encryption to generate the first pair of public and private keys, and samples the robust predicate-retaining hash function to obtain h and sets it as a system parameter, initializes the database to be empty, and stores the first pair of public and private keys and h;
[0021] Step B: During the user registration phase, the user generates a second pair of public and private keys using a homomorphic encryption key generation algorithm and samples his or her own biometric features. The ciphertext c is obtained by encrypting the biometric authentication factor w and the public key of the second pair of public and private keys. w At the same time, the user encrypts the random number s with the public key of the first pair of private keys to obtain c s , the private key of the second public-private key pair is stored in the user's device, and the ciphertext c w 、c s The public key of the second pair of public and private keys is stored in the server;
[0022] Step C: In the user authentication phase, homomorphic encryption is used to protect the user's private key information, and two-factor authentication using biometric authentication factors and private key authentication factors is used, and a robust predicate-preserving hash function is used to protect the user's biometric information.
[0023] In a preferred embodiment, in step A, the server first calls the key generation algorithm of the public key encryption PKE to generate a pair of public and private keys (pk s ,sk s ), then the robust predicate-preserving hash function RPPH is sampled to obtain h, and h is used as the system parameter pp 2fa Set up and generate a pair of public and private keys (pk s ,sk s ) and h are stored in the server, where pk s is the public key generated by the server and used to encrypt the challenge and verify the user's authentication factor, sk s It is the server's private key, which is used to decrypt received information.
[0024] In a preferred embodiment, in step B, the user generates a pair of public and private keys (pk c ,sk c )←PKE.KeyGen(1 λ ), and samples its own biometric features w←Sample(W), then performs a hash operation on the biometric authentication factor w to obtain h(w), and then uniformly randomly generates s∈{0,1} λ , s∈{0,1} λAdd h(w) and call pk c Encrypted to get ciphertext c w At the same time, the user encrypts the random number s with the server's public key to obtain the ciphertext c s ; User secret storage sk c , will (id c , c w , c s , pk c ) and sent to the server, where id c represents the user's identity identifier, w represents the user's biometric authentication factor, h w represents the hash value obtained by hashing the biometric authentication factor w, pk c Represents the public key generated by the user, sk c represents the private key authentication factor generated by the user, c w 、c s are the ciphertexts obtained using two public keys and random number s respectively.
[0025] In a preferred example, the private key authentication factor is stored confidentially by the user, and only the user knows its value, which cannot be obtained by others.
[0026] In a preferred example, the biometric feature of the user is one of the following or any combination thereof: a facial image of the user, a fingerprint of the user, or an iris of the user.
[0027] In a preferred embodiment, the step C further comprises the following steps:
[0028] The user requests a service from the server and sends a request message (id c , Request) is sent to the server to initialize Among them, C Indicates the user's current execution status. Two states; S Indicates the current execution status of the server. There are two states: {0, 1}. Initialized to
[0029] The server first initializes Get the registration information corresponding to the user identity identifier idc from the database. If not, return Ψ S = 0, otherwise the corresponding homomorphic encryption and biometric authentication factor ciphertext c is returned w 、c s and public key pk c , randomly generate a string r s ←{0, 1} λ and sent to the user, who receives r sAfter that, it samples the biometric feature to obtain w′ and generates a random string r c ←{0, 1} λ ; Then the user end pk c and r c Encrypt to get the ciphertext cK, and then s Encrypt with cK to obtain c1, and encrypt pk s and h(w′)-r s -r c Encrypt to obtain c2, and return c = (c1, c2) to the server;
[0030] After the server receives c = (c1, c2), it first uses sk s Decrypt the message m with c1 and perform pk on m c The re-encryption under m ; Encryption pk s , c1 gets cK, and then pk c and r s Re-encrypt to get the ciphertext c r . Then call the ciphertext c m , cK, public key pk c Perform the Eval operation in RPPH to obtain the ciphertext c', and then use the user's public key pk c and c′, c r Perform the Eval operation in RPPH to obtain the ciphertext c hw ′; then decrypt sk s 、c s Get s′, for pk c , s′ performs encryption operation in RPPH to obtain ciphertext c s′ , call pk c 、c w and c s′ Perform the Eval operation in RPPH to obtain the ciphertext c hw ; Next, the server calls pk c 、c hw′ 、c hw Perform the Eval operation in RPPH to generate the ciphertext c″. After that, the server randomly generates a string r←{0, 1} λ , call pk c , r, c″ perform the Eval operation in RPPH to obtain the final ciphertext And calculate the hash value u = H (r) of r, and finally call H2 (cK) and Perform the encryption algorithm of authentication encryption AE to obtain the ciphertext ct and send it to the user;
[0031] After receiving the ciphertext ct, the user sets the status Ψ Cis finished, and then the decryption algorithm of the authenticated encryption scheme is called to call H2(cK) and ct to decrypt to get c′. If c′=⊥, it returns to terminate. Otherwise, c′ is divided into And to sk c , Run the PRPH decryption algorithm to get r', then check if H(r') = u, otherwise terminate. Finally, calculate the hash value v = H1((r s , c, ct, r′)) and sends the result to the server; the server receives the hash value v and compares v with H1((r s , c, ct, r′)) are equal.
[0032] In a preferred embodiment, if v and H1((r s , c, ct, r)) are equal, the authentication succeeds, otherwise the authentication fails.
[0033] The present application also discloses a two-factor authentication system comprising:
[0034] a memory for storing computer executable instructions; and,
[0035] A processor, configured to implement the steps in the method according to any one of claims 1 to 8 when executing the computer executable instructions.
[0036] The present application also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps in the method according to any one of claims 1 to 8 are implemented.
[0037] In the implementation manner of the present application, a two-factor authentication scheme based on biometric information and homomorphic encryption is intended to improve the security and efficiency of authentication. The scheme uses a public key encryption scheme of homomorphic encryption and a robust hash function that preserves predicate relations to implement the authentication process, and has the ability to resist replay attacks and tolerate adversaries obtaining the server's database. Specifically, the scheme resists replay attacks by randomly generating random numbers through the server; and uses two-factor authentication of biometric authentication factors and private key authentication factors to tolerate adversaries obtaining the server's database. At the same time, the scheme uses a robust hash function that preserves predicate relations to protect the user's biometric information, and uses a public key encryption scheme of homomorphic encryption to protect the user's private key information. The present application significantly improves the security and efficiency of authentication, and can better meet the needs of users.
[0038] A large number of technical features are recorded in the specification of this application, which are distributed in various technical solutions. If all possible combinations of technical features of this application (i.e., technical solutions) are to be listed, the specification will be too long. In order to avoid this problem, the various technical features disclosed in the above-mentioned invention content of this application, the various technical features disclosed in the various embodiments and examples below, and the various technical features disclosed in the accompanying drawings can be freely combined with each other to form various new technical solutions (these technical solutions are all deemed to have been recorded in this specification), unless the combination of such technical features is technically infeasible. For example, in one example, feature A+B+C is disclosed, and in another example, feature A+B+D+E is disclosed, and features C and D are equivalent technical means that play the same role. Technically, only one can be used, and it is impossible to use them at the same time. Feature E can be combined with feature C technically. Then, the solution of A+B+C+D should not be deemed to have been recorded because it is technically infeasible, and the solution of A+B+C+E should be deemed to have been recorded. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a schematic diagram of the user registration stage with the server in the prior art authentication;
[0040] Figure 2 This is a schematic diagram of the authentication stage of a user to a server in the prior art authentication;
[0041] Figure 3 is a flowchart of a two-factor authentication method according to an embodiment of the present application;
[0042] Figure 4 This is a schematic diagram of a ciphertext integrity experiment of authenticated encryption according to an embodiment of the present application;
[0043] Figure 5 It is a schematic diagram of a two-factor authentication protocol based on biometric information and homomorphic encryption technology in the two-factor authentication method of the present application. DETAILED DESCRIPTION
[0044] In the following description, many technical details are provided to help readers better understand the present application. However, those skilled in the art can understand that the technical solution claimed in the present application can be implemented even without these technical details and various changes and modifications based on the following embodiments.
[0045] Description of some concepts:
[0046] Authentication factor: The evidence provided by the authenticated party to prove his or her identity is called authentication factor. Authentication factor can be PIN value, password value, physical unclonable function value, inherent biometric features such as fingerprint, face, etc.
[0047] Two-factor authentication: Two-factor authentication refers to the use of two different authentication factors for authentication. Single-factor authentication refers to the use of a single authentication factor for authentication. With the popularity of remote services, people's requirements for security are gradually increasing, and the security strength of single-factor authentication may not meet the requirements. Therefore, two-factor authentication is gradually being considered for application by some authentication schemes. Two-factor authentication is more secure than single-factor authentication. Its advantage is that when one of the two authentication factors is obtained by the adversary, the other can still ensure the security of the protocol.
[0048] Client-server authentication system: There is a user and a server in the system. The user obtains services by using the client device to authenticate to the server. The server authenticates the user's identity by executing the authentication protocol and provides services to the authenticated user.
[0049] Adversary’s attack behavior: According to the nature of the adversary’s attack behavior, it can be divided into two categories.
[0050] (1) Passive attack: The adversary can observe every message or data sent or received in the communication, but cannot update or modify them. For example, eavesdropping is a passive attack.
[0051] (2) Active attack: The adversary can modify, replay, intercept, etc. the messages transmitted in the channel.
[0052] Security Model:
[0053] In the client-server authentication system, based on the role of the adversary and the nature of the above attack behaviors, the adversary can be divided into the following three types:
[0054] (1) Malicious server: A malicious server will target a client and attempt to obtain the user's private information related to the authentication factor through some active or passive attacks;
[0055] (2) Honest but curious server: An honest but curious server will target a certain client and execute the protocol normally, trying to learn the other party's private information from the normal execution of the protocol, but the server will not launch malicious active attacks;
[0056] (3) Malicious users: Malicious users can launch both passive attacks and active attacks on the server, and may even steal some (but not all) of the target user's authentication factors, thereby impersonating the target user to achieve authentication.
[0057] The above three adversaries can be combined to obtain the following two security models and security goals:
[0058] Model 1: The adversary can be a malicious server or a malicious user.
[0059] Model 2: The enemy can be an honest but curious server or a malicious user.
[0060] Security goal: When the adversary is a malicious server / honest but curious server, the goal of two-factor authentication is that the adversary cannot obtain the secret information supporting the user authentication factor; when the adversary is a malicious user, the goal of two-factor authentication is that the adversary cannot impersonate other legitimate users to pass authentication.
[0061] From the definition of the adversary type, we know that model 1 is stronger than 2.
[0062] The specific application scenarios of this application are described in detail below. This application can be applied to scenarios such as e-commerce and online banking, where users obtain services through two-factor authentication. Users must hold two authentication factors at the same time to pass the authentication. When an adversary steals one authentication factor and the other authentication factor is missing, the authentication cannot be passed. Compared with single-factor authentication, two-factor authentication can greatly increase the threshold for authentication and prevent unauthorized users from abusing the rights of authorized users.
[0063] After in-depth research and analysis, the inventor of this application creatively proposed a new two-factor authentication method and system for the technical problems raised in the background technology. This application designs a new and efficient two-factor authentication protocol based on biometric information and homomorphic encryption technology.
[0064] The dual factor in this application is: one authentication factor is the user's biometric information Another authentication factor is the user's private key sk c .
[0065] The two-factor authentication protocol of this application takes into account a stronger security model (the server initiates a malicious active attack), and the authentication effect to be achieved is as follows:
[0066] 1. Legitimate users have two authentication factors: their own biometric information and private key. With the help of these two authentication factors, users can authenticate their identities to the server.
[0067] 2. The adversary steals one authentication factor of the user (it may be the user's biometric authentication factor or the user's private key authentication factor, but not both), and the missing other authentication factor can ensure that the adversary cannot impersonate the user to authenticate to the server.
[0068] Therefore, the two-factor authentication of this application is a more secure and efficient identity authentication method, which can effectively defend against malicious attacks. In practical applications, the authentication protocol can be applied to various scenarios, such as identity authentication in the fields of finance, e-commerce, and the Internet of Things.
[0069] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0070] The first implementation of the present application relates to a two-factor authentication method, the process of which is as follows: Figure 3 As shown, the method comprises the following steps:
[0071] Step 101: The server invokes a key generation algorithm of public key encryption to generate a first pair of public and private keys, and samples a robust predicate-retaining hash function to obtain h and sets it as a system parameter, initializes the database DB to be empty, and stores the first pair of public and private keys and h;
[0072] Step 102: During the user registration phase, the user generates a second pair of public and private keys using a homomorphic encryption key generation algorithm, samples his or her own biometric features, and encrypts the ciphertext c using the biometric authentication factor w and the public key of the second pair of public and private keys. w At the same time, the user encrypts the random number s with the public key of the first pair of private keys to obtain c s , the private key of the second public-private key pair is stored in the user's device, and the ciphertext c w 、c s The public key of the second pair of public and private keys is stored in the server;
[0073] Step 103: In the user authentication phase, use homomorphic encryption of public key encryption to protect the user's private key information, use two-factor authentication of biometric authentication factor and private key authentication factor, and use a robust predicate-preserving hash function to protect the user's biometric information.
[0074] A homomorphic encryption scheme HE = (HE.KeyGen, HE.Enc, HE.Dec, HE.Eval) consists of 4 algorithms:
[0075] (pk, sk)←HE.KeyGen(1 λ ): Input security parameter λ and generate a pair of public and private keys (pk, sk).
[0076] c←HE.Enc(pk, m): Input public key pk and message m, and output ciphertext c.
[0077] m←HE.Dec(sk, c): Input private key sk and ciphertext c, and output decrypted message value m.
[0078] c′←HE.Eval(pk,C,c1,…,c n ): Input public key pk, circuit C and n ciphertexts c1, ..., c n , output ciphertext c′.
[0079] The plaintext attack security of homomorphic encryption schemes is semantic security. HE has homomorphic properties, which means that for a circuit family If for all All circuit inputs x1,…,x n have
[0080] Pr[HE.Dec(sk,HE.Eval(pk,C,c1,…,c n ))≠C(x1,…,x n )] = negl(λ),
[0081] where (pk, sk) ← HE.KeyGen(1 λ ) and c i =HE.Enc(pk, x i ). We use negl(λ) to represent the negligible amount.
[0082] PKE = (PKE.KeyGen, PKE.Enc, PKE.Dec) constitutes a public key encryption scheme. The definitions of these three algorithms are the same as the first three algorithms of the above homomorphic encryption scheme.
[0083] The definition of Robust Property-Preserving Hash (RPPH) with robust predicate preservation is explained below.
[0084] Definition 1: [Robust Property-Preserving Hash (RPPH)] For a two-input predicate relation P: {0, 1} n ×{0, 1} n →{0, 1, ⊥}, a robust predicate-preserving hash family H = {h: {0, 1} n →{0, 1} m} is a family of efficiently computable functions, and has the following two algorithms, which are compressible, correct and robust.
[0085] RPPH algorithm:
[0086] Sample(λ)→h: This is a polynomial-time algorithm to obtain a random hash function h.
[0087] Eval(h, y1, y2) → 0 / 1: This is a deterministic polynomial-time algorithm, given the input and y1,y2∈{0,1} m Outputs a single bit.
[0088] Compression of RPPH: The length n of the hash input must be greater than the output length m.
[0089] Correctness of PPH: Yes The following formula holds:
[0090]
[0091] Robustness of RPPH: to any polynomial adversary Officially established
[0092]
[0093] In this example, the inventors consider the predicate relationship for Hamming distance. 0<t<n, the Hamming distance predicate relation HAM between two inputs n,t , (x1, x2) is defined as
[0094]
[0095] Among them, reference [2] ([2] Justin Holmgren, Minghao Liu, LaKyah Tyner, Daniel Wichs: Nearly Optimal Property Preserving Hashing. CRYPTO (3) 2022: 473-502) gives an efficient construction of RPPH for Hamming distance predicate relations.
[0096] Definition 2: [Authenticated Encryption (AE)] An authenticated encryption scheme consists of two algorithms:
[0097] c←AE.Enc(K, m): The encryption algorithm AE.Enc inputs the key K and the message m, and outputs the ciphertext c;
[0098] m′←AE.Dec(K, c): The decryption algorithm AE.Dec inputs the key K and the ciphertext c, and outputs the message m′.
[0099] AE correctness. For all have
[0100] AE.Dec(K,AE.Enc(K,m))=m.
[0101] Definition 3: [Ciphertext integrity of authenticated encryption] An authenticated encryption scheme has ciphertext integrity if it is resistant to all PPT adversaries. have
[0102]
[0103] like Figure 4 shown.
[0104] Definition 4: [Semantic security of authenticated encryption] An authenticated encryption scheme has ciphertext integrity if, for all PPT adversaries have
[0105]
[0106] In this example, the specific construction of the two-factor authentication protocol based on biometric information and homomorphic encryption technology is as follows: Figure 5 Each step is described in detail below.
[0107] In step 101, the server first calls the key generation algorithm of public key encryption PKE to generate a pair of public and private keys (pk s ,sk s ), then sample the robust predicate-preserving hash function RPPH to obtain h, initialize the database to be empty, and use h as the system parameter pp 2fa Set up and generate a pair of public and private keys (pk s ,sk s ) and h are stored in the server, where pk s is the public key generated by the server and used to encrypt the challenge and verify the user's authentication factor, sk s It is the server's private key, which is used to decrypt received information.
[0108] In step 102, the user generates a pair of public and private keys (pk c ,sk c )←PKE.KeyGen(1 λ ), and sample its own biometric features w←Sample(S), then perform a hash operation on the biometric authentication factor w to obtain h(w), and then uniformly randomly generate s∈{0,1} λ , h(w) minus s∈{0,1} λ And call pk c Encrypted to get ciphertext c w At the same time, the user encrypts the random number s with the server's public key to obtain the ciphertext c s ; User secret storage sk c , will (id c , cw , c s , pk c ) and sent to the server, the server updates the database DB: = DB∪(id c , c w , c s , pk c ).
[0109] Among them, id c represents the user's identity identifier, w represents the user's biometric authentication factor, h w represents the hash value obtained by hashing the biometric authentication factor w, pk c Represents the public key generated by the user, used to encrypt and send the biometric authentication factor to the server, sk c Represents the private key authentication factor generated by the user, which is used to decrypt the challenge number sent by the server during the authentication process to generate a response, c w 、c s are the ciphertexts obtained using two public keys and a random number s respectively. The private key authentication factor is stored confidentially by the user, and only the user knows its value, and no one else can obtain it.
[0110] In step 103, during the user authentication phase, the user requests a service from the server and sends a request message (id c , Request) is sent to the server to initialize Among them, C Indicates the user's current execution status. Two states; S Indicates the current execution status of the server. There are two states: {0, 1}. Initialized to
[0111] The server first initializes Get the registration information corresponding to the user identity identifier idc from the database. If not, return Ψ S = 0, otherwise the corresponding homomorphic encryption and biometric authentication factor ciphertext c is returned w 、c s and public key pk c , randomly generate a string r s ←{0, 1} λ and sent to the user, who receives r s After that, it samples the biometric feature to obtain w′ and generates a random string r c ←{0, 1} λ ; Then the user end pk c and r c Encrypt to get the ciphertext cK, and then s Encrypt with cK to obtain c1, and encrypt pks and h(w′)-r s -r c Encrypt to obtain c2, and return c = (c1, c2) to the server;
[0112] After the server receives c = (c1, c2), it first uses sk s Decrypt the message m with c1 and perform pk on m c The re-encryption under m ; Encryption pk s , c1 gets cK, and then pk c and r s Re-encrypt to get the ciphertext c r . Then call the ciphertext c m , cK, public key pk c Perform the Eval operation in RPPH to obtain the ciphertext c', and then use the user's public key pk c and c′, c r Perform the Eval operation in RPPH to obtain the ciphertext C hw′ ; Then decrypt sk s 、c s Get s′, for pk c , s′ performs encryption operation in RPPH to obtain ciphertext c s′ , call pk c 、c w and c s′ Perform the Eval operation in RPPH to obtain the ciphertext c hw ; Next, the server calls pk c 、c hw′ 、c hw Perform the Eval operation in RPPH to generate the ciphertext c″. After that, the server randomly generates a string r←{0, 1} λ , call pk c , r, c″ perform the Eval operation in RPPH to obtain the final ciphertext And calculate the hash value u = H (r) of r, and finally call H2 (cK) and Perform the encryption algorithm of authentication encryption AE to obtain the ciphertext ct and send it to the user;
[0113] After receiving the ciphertext ct, the user sets the status Ψ C is finished, and then the decryption algorithm of the authenticated encryption scheme is called to call H2(cK) and ct to decrypt to get c′. If c′=⊥, it returns to terminate. Otherwise, c′ is divided into And to sk c , Run the PRPH decryption algorithm to get r', then check if H(r') = u, otherwise terminate. Finally, calculate the hash value v = H1((r s , c, ct, r′)) and sends the result to the server; the server receives the hash value v and compares v with H1((r s , c, ct, r′)) are equal.
[0114] If v and H1((r s , c, ct, r)) are equal, the authentication succeeds, otherwise the authentication fails.
[0115] Among them, (id c Request) refers to the request message sent by the user when requesting a service from the server, where id c Indicates the user's identity, and Request indicates the user's request content. s Refers to the challenge number randomly generated by the server in the following specific step 202, which is used to prevent replay attacks. c is a string randomly generated by the user. In the following specific step 203, pk s and h(w′)-r s -r c Encrypt to get c2, for pk c and r c Encrypt to get c1, return c = (c1, c2) to the server for authentication in subsequent steps. This method can resist replay attacks because malicious attackers cannot know the real challenge number r s and r c , so that the previous authentication request cannot be reused.
[0116] This step embodies the characteristics of "using a homomorphic encryption public key encryption scheme to protect user private key information, thereby tolerating the adversary's access to the database", "using two-factor authentication of biometric authentication factors and private key authentication factors to tolerate the adversary's access to the server's database", and "using a robust predicate-preserving hash function to protect the user's biometric information".
[0117] Optionally, this step further includes the following sub-steps:
[0118] Step 201: The user requests a service from the server and sends a request message (id c , Request) is sent to the server to initialize
[0119] Step 202: The server is first initialized Get the user ID from the database c Corresponding registration information, if not, returns ΨS = 0. Otherwise, the corresponding homomorphic encryption and biometric authentication factor ciphertext c is returned. w 、c s and public key pk c , randomly generate a string r s ←{0, 1} λ and send it to the user;
[0120] Step 203: The user receives r s After that, it samples the biometric feature to obtain w′ and generates a random string r c ←{0, 1} λ ; Then the user end pk c and r c Encrypt to get cK, for pk s Encrypt with cK to obtain c1, and encrypt pk s and h(w′)-r s -r c Encrypt to obtain c2, and return c = (c1, c2) to the server;
[0121] This step reflects the use of a homomorphic encryption public key encryption scheme to protect the user's private key information, thereby tolerating the adversary's access to the database. In this step, the user generates a random number r c , which is encrypted by the public and private keys on the user side and sent to the server. The server cannot obtain the user's private key authentication factor and cannot correctly decrypt the random number r c value, thus failing authentication.
[0122] Furthermore, this step also reflects "using two-factor authentication of biometric authentication factors and private key authentication factors to tolerate adversaries obtaining the server's database", in which the user uses his own private key authentication factor to encrypt and sample his own biological source to obtain the biometric authentication factor, and combines the two factors together for authentication to ensure that the authentication request comes from a legitimate user.
[0123] Step 204:
[0124] After the server receives c = (c1, c2), it first uses sk s Decrypt the message m with c1 and perform pk on m c The re-encryption under m ; Encryption pk s , c1 gets cK, and then pk c and r s Re-encrypt to get the ciphertext c r . Then call the ciphertext c m , cK, public key pk cPerform the Eval operation in RPPH to obtain the ciphertext c', and then use the user's public key pk c and c′, c r Perform the Eval operation in RPPH to obtain the ciphertext c hw′ ; Then decrypt sk s 、c s Get s′, for pk c , s′ performs encryption operation in RPPH to obtain ciphertext c s′ , call pk c 、c w and c s′ Perform the Eval operation in RPPH to obtain the ciphertext c hw ; Next, the server calls pk c 、c hw′ 、c hw Perform the Eval operation in RPPH to generate the ciphertext c″. After that, the server randomly generates a string r←{0, 1} λ , call pk c , r, c″ perform the Eval operation in RPPH to obtain the final ciphertext And calculate the hash value u = H (r) of r, and finally call H2 (cK) and Perform the encryption algorithm of authentication encryption AE to obtain the ciphertext ct and send it to the user;
[0125] Step 205: After receiving the ciphertext ct, the user sets the state Ψ C Then the decryption algorithm of the authenticated encryption scheme is called to call H2(cK) and ct to decrypt c′. If c′=⊥, the system returns to terminate. Otherwise, c′ is divided into And to sk c , Run the PRPH decryption algorithm to get r', then check if H(r') = u, otherwise terminate. Finally, calculate the hash value v = H1((r s ,c,ct,r′)) and send the result to the server;
[0126] Step 206: The server receives the hash value v and compares v with H1((r s , c, ct, r′)) are equal.
[0127] Technical effects:
[0128] According to the above technical scheme, a two-factor authentication scheme based on biometric information and homomorphic encryption is designed to improve the security and efficiency of authentication. The scheme uses a public key encryption scheme with homomorphic encryption and a robust hash function that preserves predicate relations to implement the authentication process, and has the ability to resist replay attacks and tolerate adversaries obtaining databases. Specifically, the scheme resists replay attacks by randomly generating a challenge number in the second step by the server and encrypting it with the user's public key; and uses two-factor authentication of biometric authentication factors and private key authentication factors to tolerate adversaries obtaining the server's database. At the same time, the scheme uses a robust hash function that preserves predicate relations to protect the user's biometric information, and uses a semantically secure public key encryption scheme to protect the user's private key information. The efficiency of the scheme has also been optimized, and it is more efficient than the scheme using homomorphic encryption.
[0129] Technical effect:
[0130] As mentioned above, the solutions based on homomorphic encryption in the prior art have the following technical problems: they cannot resist replay attacks; they cannot resist attacks from malicious servers; and they are inefficient. Compared with the prior art, the technical solution of the present application can resist replay attacks and attacks from malicious servers, and it is more efficient. The details are as follows:
[0131] First, high security:
[0132] We analyze the security of the authentication protocol given in this patent in the following four situations:
[0133] The server involves a nonce in both the second and fourth steps, so each challenge is different. In order for the adversary to pass the authentication, it must respond correctly to the nonce, so the adversary cannot replay the message to pass the authentication;
[0134] The adversary only obtains the user's private key authentication factor, but does not have the user's other authentication factor - biometrics, nor the server's secret information: In this case, since the adversary does not have the user's biometric information, due to the semantic security of PKE, it is impossible to forge or guess h w The value of , thus it is impossible to give a ciphertext c that can pass the authentication;
[0135] The adversary only obtains the user's biometric authentication factor, but does not have the user's other authentication factor - the private key, nor the server's secret information: In this case, since the adversary does not have the user's private key, according to the security definition of the public key encryption scheme with semantic security, the adversary cannot correctly decrypt the value of the random number r', and according to the non-collision property of the hash function, the adversary cannot give a hash value v that can pass the authentication;
[0136] When the adversary steals the database of user data stored on the server, as long as the adversary cannot obtain the user's two authentication factors at the same time, the adversary still cannot break the authentication of the scheme. We discuss the following two cases:
[0137] The adversary stole the server's database and obtained the user's registration information (id c , c w , c s , pk c ), and obtain the user's private key authentication factor sk c :User registration information (id c , c w , c s , pk c ), c w The user's public key encrypts h(w)-s. Even if the adversary uses the private key authentication factor to decrypt it, he can only get h(w)-s. s is the ciphertext encrypted with the server’s public key to the blinding factor s. Due to the semantic security of PKE, the adversary cannot obtain s The information of the blinding factor s is obtained from . Since the blinding factor s masks h(w), the adversary cannot obtain any information of h(w), and thus cannot impersonate the user to pass the server authentication.
[0138] The adversary stole the server's database and obtained the user's registration information (id c , c w , c s , pk c ), and obtain the user's biometric authentication factor Due to the semantic security of PKE, the adversary cannot The information of r is obtained from the hash function. Due to the anti-collision property of the hash function, it is difficult for the adversary to guess the hash value of r, and thus it is impossible to pass the server's authentication.
[0139] Second, scalability: The scheme can be further extended to two-way authentication: This protocol implements the authentication of the server to the user, which is a one-way authentication. In the second and fourth steps of the protocol, the server can sign the message it sends, and the user verifies the message signature. In this way, the user can authenticate the server, and then realize the authentication of both parties.
[0140] In addition, the embodiment of the present application also provides a two-factor authentication system, which includes a memory for storing computer executable instructions, and a processor; the processor is used to implement the steps in the above-mentioned method implementation when executing the computer executable instructions in the memory. Among them, the processor can be a central processing unit (Central Processing Unit, referred to as "CPU"), or other general-purpose processors, digital signal processors (Digital Signal Processor, referred to as "DSP"), Application Specific Integrated Circuit (Application Specific Integrated Circuit, referred to as "ASIC"), etc. The aforementioned memory can be a read-only memory (read-only memory, referred to as "ROM"), a random access memory (random access memory, referred to as "RAM"), a flash memory (Flash), a hard disk or a solid-state hard disk, etc. The steps of the method disclosed in each embodiment of the present invention can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.
[0141] It should be noted that in the application documents of this patent, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements. In the application documents of this patent, if it is mentioned that an action is performed according to an element, it means that the action is performed at least according to the element, which includes two situations: performing the action only according to the element, and performing the action according to the element and other elements. Expressions such as multiple, multiple, and multiple include 2, 2 times, 2 kinds, and more than 2, more than 2 times, and more than 2 kinds.
[0142] All documents mentioned in this application are considered to be included in the disclosure of this application as a whole, so that they can be used as the basis for modification when necessary. In addition, it should be understood that after reading the above disclosure of this application, those skilled in the art can make various changes or modifications to this application, and these equivalent forms also fall within the scope of protection claimed in this application.
Claims
1. A two-factor authentication method, characterized in that: include: Step A: The server calls the key generation algorithm of public key encryption to generate the first pair of public and private keys, and samples the robust predicate-retaining hash function to obtain h and sets it as a system parameter, initializes the database to be empty, and stores the first pair of public and private keys and h; Step B: During the user registration phase, the user generates a second pair of public and private keys using a homomorphic encryption key generation algorithm and samples his or her own biometric features. The ciphertext c is obtained by encrypting the biometric authentication factor w and the public key of the second pair of public and private keys. w At the same time, the user encrypts the random number s with the public key of the first pair of private keys to obtain c s , the private key of the second public-private key pair is stored in the user's device, and the ciphertext c w 、c s The public key of the second pair of public and private keys is stored in the server; Step C: In the user authentication phase, homomorphic encryption is used to protect the user's private key information, and two-factor authentication using biometric authentication factors and private key authentication factors is used, and a robust predicate-preserving hash function is used to protect the user's biometric information.
2. The method according to claim 1, characterized in that In step A, the server first calls the public key encryption PKE key generation algorithm to generate a pair of public and private keys (pk s ,sk s ), then the robust predicate-preserving hash function RPPH is sampled to obtain h, and h is used as the system parameter pp 2fa Set up and generate a pair of public and private keys (pk s ,sk s ) and h are stored in the server, where pk s is the public key generated by the server and used to encrypt the challenge and verify the user's authentication factor, sk s It is the server's private key, which is used to decrypt received information.
3. The method according to claim 2, characterized in that In step B, the user generates a pair of public and private keys (pk c ,sk c )←PKE.KeyGen(1 λ ), and samples its own biometric features w←Sample(W), then performs a hash operation on the biometric authentication factor w to obtain h(w), and then uniformly randomly generates s∈{0,1} λ , h(w) minus s∈{0,1} λ And call pk c Encrypted to get ciphertext c w At the same time, the user encrypts the random number s with the server's public key to obtain the ciphertext c s ; User secret storage sk c , will (id c , c w , c s , pk c ) and sent to the server, where id c represents the user's identity identifier, w represents the user's biometric authentication factor, h w represents the hash value obtained by hashing the biometric authentication factor w, pk c Represents the public key generated by the user, sk c represents the private key authentication factor generated by the user, c w 、c s are the ciphertexts obtained using two public keys and random number s respectively.
4. The method according to claim 3, characterized in that the private key authentication factor is stored confidentially by the user, and only the user knows its value, which cannot be obtained by others.
5. The method according to claim 3, characterized in that The user's biometric feature is one of the following or any combination thereof: the user's facial image, the user's fingerprint, and the user's iris.
6. The method according to claim 3, characterized in that The step C further comprises the following steps: The user requests a service from the server and sends a request message (id c , Request) is sent to the server to initialize Among them, C Indicates the user's current execution status. Two states; S Indicates the current execution status of the server. There are two states: {0, 1}. Initialized to The server first initializes Get the user ID from the database c Corresponding registration information, if not, returns Ψ S = 0, otherwise the corresponding homomorphic encryption and biometric authentication factor ciphertext c is returned w 、c s and public key pk c , randomly generate a string r s ←{0, 1} λ and sent to the user, who receives r s After that, it samples the biometric feature to obtain w′ and generates a random string r c ←{0, 1} λ ; Then the user end pk c and r c Encrypt to get the ciphertext cK, and then s Encrypt with cK to obtain c1, and encrypt pk s and h(w′)-r s -r c Encrypt to obtain c2, and return c = (c1, c2) to the server; After the server receives c = (c1, c2), it first uses sk s Decrypt the message m with c1 and perform pk on m c The re-encryption under m ; Encryption pk s , c1 gets cK, and then pk c and r s Re-encrypt to get the ciphertext c r . Then call the ciphertext c m , cK, public key pk c Perform the Eval operation in RPPH to obtain the ciphertext c', and then use the user's public key pk c and c′, c r Perform the Eval operation in RPPH to obtain the ciphertext c hw′ ; Then decrypt sk s 、c s Get s′, for pk c , s′ performs encryption operation in RPPH to obtain ciphertext c s′ , call pk c 、c w and c s′ Perform the Eval operation in RPPH to obtain the ciphertext c hw ; Next, the server calls pk c , C hw′ 、c hw Perform the Eval operation in RPPH to generate the ciphertext c″. After that, the server randomly generates a string r←{0, 1} λ , call pk c , r, c″ perform the Eval operation in RPPH to obtain the final ciphertext And calculate the hash value u = H (r) of r, and finally call H2 (cK) and Perform the encryption algorithm of authentication encryption AE to obtain the ciphertext ct and send it to the user; After receiving the ciphertext ct, the user sets the status Ψ C is finished, and then the decryption algorithm of the authenticated encryption scheme is called to call H2(cK) and ct to decrypt to get c′. If c′=⊥, it returns to terminate. Otherwise, c′ is divided into And to sk c , Run the PRPH decryption algorithm to get r', then check if H(r') = u, otherwise terminate. Finally, calculate the hash value v = H1((r s , c, ct, r′)) and sends the result to the server; the server receives the hash value v and compares v with H1((r s , c, ct, r′)) are equal.
7. The method according to claim 6, characterized in that If v and H1((r s , c, ct, r)) are equal, the authentication succeeds, otherwise the authentication fails.
8. A two-factor authentication system, characterized in that: include: A memory for storing computer executable instructions; as well as, A processor, configured to implement the steps in the method according to any one of claims 1 to 7 when executing the computer executable instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Double-factor identity authentication method and system based on biological identification technique
CN107733933A
Biological characteristic sensitive information outsourcing identity authentication method based on homomorphic encryption
CN107919965A
Double-factor authentication method, device and system based on a national cryptographic algorithm and biological characteristics
CN111262702A
Dynamic password authentication method for resisting man-in-the-middle attack
CN112235105A
System and Method for Electronic Certification and Authentification
US20090031139A1
