Disclosure of Invention
One of the objectives of the present invention is to provide a biometric authentication method and system, in the authentication process, the authenticator adds a challenge value generated by an authentication key to a biometric distance, so that other computing parties without the authentication key cannot use the public key of the authentication service to encrypt a manufactured biometric distance smaller than a set threshold, so that the authentication service does not pass the authentication of an illegal member, thereby improving the security of the authentication.
Another object of the present invention is to provide a biometric authentication method and system which, when performing authentication using biometrics, because each authentication message is different, the challenge value generated by the authentication key is different, and therefore an adversary cannot record the authentication message and perform replay attack, so that the authentication service does not authenticate an illegal member performing replay attack.
To achieve at least one of the above-mentioned objects, the present invention further provides a biometric authentication method, the method comprising:
in the registration stage, user identity information and first biological characteristics of a user are obtained, a first biological characteristic vector is constructed, and a dynamic authentication key mechanism is constructed;
homomorphic encryption is carried out on the first biological feature vector by using a public key to obtain a first biological feature vector ciphertext, and the user identity information and the first biological feature vector ciphertext are transmitted to a database server;
in the authentication stage, user identity information, a dynamic authentication key and a second biological characteristic of a user are obtained, a second biological characteristic vector is constructed, and a first challenge vector is calculated for the dynamic authentication key;
calculating a temporary biological characteristic distance vector according to the first challenge vector, homomorphic encrypting the temporary biological characteristic distance vector by using a public key to obtain a temporary biological characteristic distance vector ciphertext, and transmitting the temporary biological characteristic distance vector ciphertext to a database server;
the database server obtains a first biological characteristic distance vector ciphertext according to a first biological characteristic vector and the temporary biological characteristic distance vector ciphertext, and sends the first biological characteristic distance vector ciphertext to an application server;
the application server obtains a first biological characteristic distance vector ciphertext as a second biological characteristic distance vector ciphertext, decrypts the second biological characteristic distance vector ciphertext according to a private key of the application server, recalculates the first challenge vector according to the dynamic authentication key, calculates a characteristic distance according to the decrypted second biological distance vector and the recalculated first challenge vector, sets a characteristic distance threshold value, and passes authentication if the calculated characteristic distance is smaller than the characteristic distance threshold value.
According to a preferred embodiment of the present invention, in the registration phase, the method for constructing the dynamic authentication key comprises: using dynamic password, short message verification code, session key or secret distributed true random number as dynamic authentication key between user and application server
According to another preferred embodiment of the present invention, the dynamic authentication key is a dynamic symmetric key, and the dynamic symmetric key is a scalar or a vector.
According to another preferred embodiment of the present invention, the dynamic authentication key is a static symmetric key constructed or calculated according to a timestamp or a current event, and the static symmetric key is a static password or a secret distributed true random number.
According to another preferred embodiment of the present invention, in the registration stage, the public key of the application server is used to perform homomorphic encryption on the first biometric feature vector to obtain the ciphertext of the first biometric feature vector, and the client sends the user identity information and the ciphertext of the first biometric feature vector to the database server for storage.
According to another preferred embodiment of the present invention, the method for calculating the first challenge vector comprises: and taking the authentication request message containing the user identity information and the challenge vector sequence number as messages, and taking the dynamic symmetric key as input, and calculating a message authentication code algorithm to obtain the first challenge vector.
According to another preferred embodiment of the present invention, the method for calculating the temporary biometric distance vector includes: and in the authentication stage, a second biological characteristic vector is obtained, each element of a first challenge vector is obtained, and the difference value of each element of the first challenge vector and each element of the second biological characteristic vector is calculated to obtain the temporary biological characteristic distance vector.
According to another preferred embodiment of the present invention, the application server decrypts the second biometric distance vector ciphertext by using its own secret key, and according to the feature of homomorphic encryption, each element of the second biometric distance vector after decryption, which is relative to the first biometric distance vector, includes a challenge vector element in a corresponding position.
To achieve at least one of the above objects, the present invention further provides a biometric authentication system which performs the above-described biometric authentication method.
The present invention further provides a computer-readable storage medium storing a computer program for execution by a processor to implement a biometric authentication method as described above.
The invention has the following beneficial effects:
1. when the homomorphic encrypted biological characteristics are used for authentication, as the authentication party adds the challenge value generated by the authentication key into the characteristic distance, any member (such as the party who calculates the homomorphic ciphertext or any other illegal member) which does not have the authentication key can not utilize the public key of the authentication service to encrypt a manufactured characteristic distance which is less than the set threshold value, so that the authentication service can not pass the authentication of the illegal member.
2. When the biological characteristics are used for authentication, the authentication keys used for different authentications are different every time, so that the challenge values generated by using the authentication keys are different, an enemy cannot record the authentication information and carry out replay attack, and the authentication service cannot authenticate illegal members carrying out replay attack.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
It is understood that the terms "a" and "an" should be interpreted as meaning that a number of one element or element is one in one embodiment, while a number of other elements is one in another embodiment, and the terms "a" and "an" should not be interpreted as limiting the number.
Referring to fig. 1-2, the present invention discloses a biometric authentication method and system, wherein the method includes two stages, an enrollment stage and an authentication stage, wherein the enrollment stage includes: acquiring user identity information IDA and user biological feature information, wherein the biological feature information comprises but is not limited to a human face, a fingerprint, a voiceprint, aN iris, a retina, a palm print, a vein, a gait, a handwritten signature and the like, and generating a first biological feature vector of a user according to the biological feature information, wherein the first biological feature vector A = (a 1, a2, …, ai, …, aN). In an extreme case, when the feature vector dimension is 1, the first biometric feature vector a is a scalar a1.
During registration, a dynamic symmetric key mechanism between a user of the client U and the application server AS is further set, and the mechanism can generate DK AS an authentication key, wherein the dynamic symmetric key can be preferentially configured to be a dynamic password, a short message verification code, a session key or a secret distributed true random number, and the secret distributed true random number is distributed in a mode that the AS transmits the session key encrypted true random number to the U during secure session communication; or in some other preferred schemes, the dynamic symmetric key can be calculated by a static symmetric key according to the current time and the current event. The static symmetric key can be a static password or a secretly distributed true random number, and the secretly distributed true random number is distributed by the method such AS the AS issuing hardware (such AS an IC card, RFID and the like) with the true random number to the U or distributing the hardware by mail. What is needed isThe dynamic symmetric key DK may be a scalar or a vector corresponding to the a dimension, and when the dynamic symmetric key DK is a vector, DK = (DK 1, DK2, …, dki, …, DK)N )。
Further to the first biometric feature vector a = (a 1, a2, …, ai, …, a) in the registration phaseN ) Performing homomorphic encryption by using an application server public key PKAS to obtain the first biometric feature vector ciphertext EA = (EA 1, EA2, …, eai, …, EA)N ) The encryption method is to use an application server public key PKAS to perform homomorphic encryption on each first biometric characteristic vector scalar value ai to obtain eai = { ai } PKAS. And forwarding the identity information of the user and the first biological characteristic vector ciphertext through a data forwarding sub-module of the application server and then storing the identity information and the first biological characteristic vector ciphertext in a database server. That is, the client U sends IDA | | | EA to the application server AS, which forwards it to the database server DS. The database server DS stores IDA.
In the authentication stage, a user logs in at a client U, and after the user logs in, a dynamic symmetric key DK of the authentication is generated according to a dynamic symmetric key mechanism, so as to obtain the identity information of the user and second biological characteristic information, wherein the second biological characteristic information is obtained through related equipment, for example, face information or iris information can be obtained through camera shooting. The client U converts the second biometric information into a second biometric vector B = (B1, B2, …, bi, …, B)N ). Further calculating a first challenge vector C = (C1, C2, …, ci, …, C) from the dynamic symmetric key DKN ) And when DK is scalar, where ith challenge scalar ci = AUTH (mAuth | | | i, DK), mAuth is authentication request message of user, which includes IDA, such as "IDA requests authentication", or "xx point yy minutes and zz seconds, IDA requests authentication at IP address 192.168.1.100". The AUTH (x, DK) is a message authentication code using x as a message and DK as a symmetric key, preferably, the algorithm used by the message authentication code is an HMAC algorithm, the challenge scalar ci is obtained by calculation, and the first challenge vector C = (C1, C2, …, ci, …, C) is obtained after all the challenge scalars are calculatedN ). When DK is a vector, where the ith challenge scalar ci = AUTH (mAuth | | i, dki).
It is worth mentioning thatIn the authentication stage, the invention needs to calculate a temporary characteristic distance vector DT = (DT 1, DT2, …, dti, …, DT)N ) Wherein the ith temporal feature distance scalar dti = ci-bi. Further using the public key PKAS of the application server to perform homomorphic encryption on the temporary characteristic distance vector DT to obtain a temporary biological characteristic distance vector ciphertext EDT = (EDT, EDT, …, edti, …, EDTN ) The encryption method comprises the following steps: and (3) carrying out homomorphic encryption on each temporary characteristic distance vector scalar value dti by using an application server public key PKAS to obtain edti = { dti } PKAS. The client U forwards the user identity information and the temporary biometric distance vector ciphertext mAUtH | | | EDT to an application server AS, and the application server AS forwards the mAUtH | | EDT to a database server DS. The database server DS finds the first biological characteristic vector ciphertext EA stored in the registration stage according to the user identity information IDA in the mAuth, and calculates to obtain a biological characteristic distance vector ciphertext ED = (ED 1, ED2, …, edi, …, EDN ). Taking the calculation of the ith position as an example, the DS performs homomorphic ciphertext calculation edi = edti ≦ eai, where ≦ is homomorphic addition operation, which may satisfy E (x) ≦ E (y) = E (x + y), that is, the result of encrypting two variables respectively and performing homomorphic addition is equivalent to the result of adding and encrypting two variables, and E (×) is a homomorphic encryption algorithm. And the database server DS sends the biological characteristic distance vector ciphertext ED to the application server AS.
The authentication submodule of the application server AS decrypts the biological characteristic distance of the encryption domain by using a private key to obtain the biological characteristic distance;
AS calculates challenge vector C = (C1, C2, …, ci, …, CN ) The method is the same as before.
AS calculates a second biometric distance vector D '= (D1', D2', …, di', …, D)N ')。
Taking the calculation of the ith position AS an example, according to the property of homomorphic encryption, the AS may decrypt edi with its own private key SKAS to obtain di ', since edi = editi ^ eai = { dti } PKAS ^ ai } PKAS = { ci-bi } PKAS ^ ai } PKAS = { ci + ai-bi } PKAS, the ith characteristic distance scalar di = ai-bi is set, so di' should be equal to di + ci.
The application server AS counts according to the distance vector D' of the second identity characteristicCalculating the characteristic distance d', preferably, the characteristic distance is the Euclidean characteristic distance, in which case
。
As can be seen from di ' = di + ci, since the challenge value generated by the authentication key is added to the biometric distance by the authenticator, any member (such as the party who calculates the state ciphertext) who does not possess the authentication key cannot encrypt a manufactured feature distance smaller than the set threshold value by using the public key of the authentication service, so that the authentication service cannot pass the authentication of the illegal member, for example, assuming that the party who calculates the homomorphic ciphertext manufactures a random feature distance vector D ', the probability that the feature distance D ' smaller than the set threshold value is obtained by the vector calculation is very small; the authentication keys used by different authentications are different every time, so that the challenge values generated by the authentication keys are different, and therefore an enemy cannot record the authentication message and carry out replay attack, so that the authentication service cannot authenticate illegal members carrying out replay attack. And if the characteristic distance is smaller than the set threshold, the user is considered to pass the identity authentication and the identity of the user is confirmed to be IDA, otherwise, the user is considered not to pass the identity authentication.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The computer program, when executed by a Central Processing Unit (CPU), performs the above-described functions defined in the method of the present application. It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wire segments, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless segments, wire segments, fiber optic cables, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood by those skilled in the art that the embodiments of the present invention described above and illustrated in the accompanying drawings are illustrative only and not restrictive of the broad invention, and that the objects of the invention have been fully and effectively achieved and that the functional and structural principles of the present invention have been shown and described in the embodiments and that modifications and variations may be resorted to without departing from the principles described herein.