Biometric matching method, terminal device, server, system and medium
Through private key encryption processing of terminal devices and servers, encrypted data of the Euclidean distance calculation operator is constructed, which solves the security risks of biometric data in the process of storing or uploading it in the server, realizes biometric matching without storing plaintext data, and improves security and privacy protection.
Patent Information
- Application Number
- CN202310095121.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-20
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-01-20
AI Technical Summary
There is a risk of leakage of users' biometric data during storage or uploading in the server, leading to data security issues.
The terminal device and server use their respective private keys to encrypt the biometric feature vector to construct encrypted data including the Euclidean distance calculation operator. The terminal device and server complete the matching without storing the plaintext data and use the encrypted data to determine the matching result.
It reduces the security risk of user privacy data, improves the security of biometric matching, ensures the control of personal privacy data and prevents abuse.
Smart Images

Figure CN116070272B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a biometric matching method, terminal device, server, system and medium. Background Art
[0002] With the development of information technology, biometric recognition technologies such as facial recognition are widely used in scenarios such as identity authentication and authorization verification. Using biometric matching technology requires pre-collecting the user's biometric data and uploading it to a server as a matching sample. When the user performs biometric matching, the currently collected biometric data is compared with the biometric data used as the matching sample to achieve biometric matching.
[0003] However, the user's biometrics are the user's private data. Once the matching samples stored in the server or the biometric data during the upload process are leaked, it will pose a huge risk to the user's data security. Summary of the Invention
[0004] The embodiments of the present application provide a biometric matching method, terminal device, server, system and medium, which can reduce the security risks of user privacy data.
[0005] In a first aspect, an embodiment of the present application provides a biometric matching method, which is applied to a terminal device. The method includes: performing multiple interactions and processing with a server based on a first private key, an obtained biometric feature vector to be matched, a preset generator, a second private key, and first encrypted data to obtain second encrypted data, wherein the first private key is the private key of the terminal device, and the second private key is the private key of the server. The first encrypted data is obtained by the terminal device in advance by encrypting a sample biometric feature vector using the generator and the first private key and sending it to the server. A calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector; sending the second encrypted data to the server so that the server uses the second encrypted data, the generator, the second private key, and the preset Euclidean distance matching threshold to obtain a matching result between the biometric feature vector to be matched and the sample biometric feature vector.
[0006] In a second aspect, an embodiment of the present application provides a biometric matching method, which is applied to a server. The method includes: performing multiple interactions and processing with a terminal device based on a second private key, first encrypted data, a first private key, a preset generator, and a biometric vector to be matched obtained by the terminal device, so that the terminal device obtains the second encrypted data, the first private key is the private key of the terminal device, and the second private key is the private key of the server. The first encrypted data is obtained by the terminal device in advance by encrypting the sample biometric vector using the generator and the first private key and sending it to the server. A calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric vector to be matched and the sample biometric vector; receiving the second encrypted data sent by the terminal device; using the second encrypted data, the second private key, the generator, and the preset Euclidean distance matching threshold to obtain a matching result between the biometric vector to be matched and the sample biometric vector.
[0007] In a third aspect, an embodiment of the present application provides a terminal device, comprising a first communication module and a first encryption module; the first communication module and the first encryption module are used to interact and process with the server multiple times based on a first private key, an obtained biometric feature vector to be matched, a preset generator, a second private key and first encrypted data to obtain second encrypted data, the first private key is the private key of the terminal device, the second private key is the private key of the server, the first encrypted data is obtained by the terminal device in advance by encrypting the sample biometric feature vector using the generator and the first private key and sending it to the server, and a calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector; the first communication module is also used to send the second encrypted data to the server, so that the server uses the second encrypted data, the generator, the second private key and the preset Euclidean distance matching threshold to obtain the matching result between the biometric feature vector to be matched and the sample biometric feature vector.
[0008] In a fourth aspect, an embodiment of the present application provides a server comprising a second communication module, a second encryption module and a matching module; the second communication module and the second encryption module are used to interact and process with the terminal device multiple times based on a second private key, first encrypted data, the first private key, a preset generator and a biometric feature vector to be matched obtained by the terminal device, so that the terminal device obtains second encrypted data, the first private key is the private key of the terminal device, the second private key is the private key of the server, the first encrypted data is obtained by the terminal device in advance by encrypting the sample biometric feature vector using the generator and the first private key and sending it to the server, and a calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector; the second communication module is also used to receive the second encrypted data sent by the terminal device; the matching module is used to obtain a matching result between the biometric feature vector to be matched and the sample biometric feature vector using the second encrypted data, the second private key, the generator and the preset Euclidean distance matching threshold.
[0009] In a fifth aspect, an embodiment of the present application provides a terminal device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the biometric matching method of the first aspect is implemented.
[0010] In a sixth aspect, an embodiment of the present application provides a server comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the biometric matching method of the second aspect is implemented.
[0011] In a seventh aspect, an embodiment of the present application provides a biometric matching system, comprising the terminal device of the fifth aspect and the server of the sixth aspect.
[0012] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the biometric matching method of the first aspect or the biometric matching method of the second aspect is implemented.
[0013] The embodiments of the present application provide a biometric matching method, terminal device, server, system, and medium. The terminal device and the server can interact and process multiple times based on a first private key, a biometric vector to be matched, a generator, a second private key, and first encrypted data. The terminal device has the first private key, the biometric to be matched, and the generator, and the server has the second private key and the first encrypted data. Through encryption processing by the terminal device using the first private key, encryption processing by the server using the second private key, and data interaction between the terminal device and the server, the terminal device can obtain second encrypted data including the second private key and a target Euclidean distance calculation operator that can represent the Euclidean distance between the biometric vector to be matched and the sample biometric vector. The second encrypted data contains the second private key, and the terminal device cannot know the second private key, making it difficult to decrypt the plaintext of the biometric vector to be matched and the sample biometric vector. Similarly, the server cannot know the first private key and also finds it difficult to decrypt the first encrypted private key. The server determines the matching result between the biometric feature vector to be matched and the sample biometric feature vector based on the second encrypted data, the generator, the second private key and the preset Euclidean distance matching threshold. The matching can be completed without involving the plaintext of the biometric feature vector to be matched and the plaintext of the sample biometric feature vector, thereby reducing the security risk of user privacy data and improving the security of biometric matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0015] Figure 1 A schematic diagram of the architecture of a biometric matching system provided in an embodiment of the present application;
[0016] Figure 2 A flowchart of a biometric matching method provided in an embodiment of the first aspect of the present application;
[0017] Figure 3 A flowchart of a biometric matching method provided in another embodiment of the first aspect of the present application;
[0018] Figure 4 A flowchart of a biometric matching method provided in an embodiment of the second aspect of the present application;
[0019] Figure 5 Flowchart of a biometric matching method provided for another embodiment of the second aspect of this application
[0020] Figure 6 A schematic diagram of the structure of a terminal device provided for an embodiment of the third aspect of this application
[0021] Figure 7 A schematic diagram of the structure of a server provided in accordance with an embodiment of the fourth aspect of the present application;
[0022] Figure 8 A schematic structural diagram of a terminal device provided in accordance with an embodiment of the fifth aspect of the present application;
[0023] Figure 9 A schematic diagram of the structure of a server provided in accordance with an embodiment of the sixth aspect of the present application. DETAILED DESCRIPTION
[0024] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0025] With the development of information technology, biometric recognition technologies such as facial recognition are widely used in scenarios such as identity authentication and authorization verification. Using biometric matching technology requires pre-collecting the user's biometric data and uploading it to a server as a matching sample. During biometric matching, the currently collected biometric data is compared with the biometric data used as the matching sample to achieve a biometric match. However, a user's biometric data is private. Leaking the matching sample stored on the server or the biometric data during the upload process poses a significant risk to the user's data security.
[0026] The present application provides a biometric matching method, terminal device, server, system, and medium. The terminal device can encrypt a biometric vector using its own private key and interact with a server, which then encrypts the received data using its own private key. Through encryption processing by the terminal device using its own private key and encryption processing by the server using its own private key, encrypted data is constructed that includes a calculation operator for the Euclidean distance that can characterize the similarity between the biometric vector to be matched and the sample biometric vector. This encrypted data is used to obtain a matching result, thereby achieving biometric matching without storing plaintext biometric data on either the terminal device or the server. This reduces the security risk of user privacy data and improves the security of biometric matching.
[0027] It should be noted that the acquisition, storage, use, and processing of information and data in this application have been authorized by users or relevant institutions and comply with relevant provisions of national laws and regulations.
[0028] The biometric matching method, terminal device, server, system, and medium provided in the embodiments of this application can be applied to scenarios requiring identity recognition, such as payment, card swiping, and access, but are not limited thereto. The biometric matching method, terminal device, server, system, and medium provided in this application are described below.
[0029] To facilitate understanding, the system architecture used in the biometric matching method provided in the embodiments of the present application is briefly described here. Figure 1 The schematic diagram of the architecture of the biometric matching system provided in the embodiment of the present application is as follows: Figure 1 As shown, the biometric matching system may include a terminal device 11 and a server 12 .
[0030] The terminal device 11 may be a device used by a user, and an application requiring a biometric recognition function may be installed in the terminal device 11, or the operating system of the terminal device 11 itself may have a requirement for a biometric recognition function, which is not limited here. The terminal device 11 may collect the user's biometric data and process the biometric data. For example, the terminal device 11 may include a mobile phone, a tablet computer, a smart wearable device, a check-in device, a vending machine, and other devices, and the type and quantity of the terminal device 11 are not limited here. The terminal device 11 may communicate and interact with the server 12. In an embodiment of the present application, the terminal device 11 has its own private key, namely the first private key, which can encrypt data.
[0031] Server 12 can communicate and interact with terminal device 11, receiving data transmitted from terminal device 11. Server 12 stores sample biometric data in encrypted form, including biometric data used as a matching sample or identification sample. In this embodiment of the present application, server 12 has its own private key, namely a second private key, which can encrypt data. Server 12 can obtain matching results and feedback the matching results to terminal device 11. The type and number of servers 12 are not limited herein.
[0032] A first aspect of the present application provides a biometric matching method, which can be applied to a terminal device, that is, the biometric matching method can be executed by the terminal device. Figure 2 A flowchart of a biometric matching method provided in an embodiment of the first aspect of the present application is shown as follows: Figure 2 As shown, the biometric matching method may include step S201 and step S202.
[0033] In step S201, multiple interactions and processes are performed with the server based on the first private key, the acquired biometric feature vector to be matched, the preset generator, the second private key and the first encrypted data to obtain the second encrypted data.
[0034] The terminal device has a first private key, a biometric feature vector to be matched, and a generator. The first private key is the private key of the terminal device, and the server cannot know the first private key. The biometric feature vector to be matched is a vector converted from the biometric data to be matched. The terminal device can collect the biometric data to be matched, and the biometric data to be matched is the original biometric data to be matched. The terminal device can use a vector conversion model to convert the biometric data to be matched into a biometric feature vector to be matched. The biometric data to be matched may include one or more of facial data, fingerprint data, palm vein data, iris data, etc., which are not limited here. The vector conversion model can select a conversion model that matches the type of the original biometric data, and the type of the vector conversion model is not limited here. For example, the biometric data to be matched includes facial data, and the facial data can specifically be facial image data. Models such as OpenFace and Eigenface can be used to extract features from the facial data and form a facial feature vector.
[0035] The server has a second private key and the first encrypted data. The second private key is the server's private key, and the terminal device cannot know the second private key. The first encrypted data can be obtained by the terminal device by pre-encrypting the sample biometric vector using the generator and the first private key and sending it to the server. The terminal device can convert the acquired sample biometric data into a sample biometric vector. The sample biometric data may include one or more of facial data, fingerprint data, palm vein data, iris data, etc., which are not limited here. The vector conversion model for converting the sample biometric data into the sample biometric vector can be consistent with the vector conversion model for converting the biometric data to be matched into the biometric vector to be matched. The generator can be pre-agreed upon by both the terminal device and the server, and the generator can serve as one of the basic data participating in the encryption processing of each of the terminal device and the server.
[0036] The terminal device can use the generator and the first private key to encrypt the biometric vector to be matched, and can also encrypt data transmitted from the server. The encrypted data from the terminal device can be sent to the server, which then encrypts the data transmitted from the terminal device. The server can then encrypt the data using the second private key. Through the encryption process and data exchange between the terminal device and the server, second encrypted data can be generated on the terminal device. The second encrypted data is essentially derived from the encryption process performed by the terminal device, the encryption process performed by the server, and the interaction between the terminal device and the server. The second encrypted data contains a calculation operator including the second private key and a target Euclidean distance. The target Euclidean distance includes the Euclidean distance between the biometric vector to be matched and the sample biometric vector. The target Euclidean distance can represent the similarity between the biometric vector to be matched and the sample biometric vector. The smaller the target Euclidean distance, the higher the similarity between the biometric vector to be matched and the sample biometric vector, and the higher the likelihood that the user corresponding to the biometric vector to be matched and the user corresponding to the sample biometric vector are the same user.
[0037] The calculation operator can be regarded as a component of the data obtained by the calculation processing. The calculation processing here is a broad calculation processing, which can include a variety of calculation processing methods, such as encryption processing, conversion processing, mapping processing, judgment processing, etc., which can all be regarded as calculation processing. For example, parameters A, B and C participate in the calculation processing to obtain a data, and the data is AC×(A+B). Then AC and (A+B) can both be calculation operators formed in the data, where the calculation operator AC can be a calculation operator including A or a calculation operator including C. For another example, parameters A, B and C participate in the calculation processing to obtain a data, and the data is A BC , then BC can be a calculation operator formed in the data, wherein the calculation operator BC can be a calculation operator including B or a calculation operator including C. In some examples, the calculation operator can include a modular exponential operator or a point multiplication operator. The modular exponential operator is a calculation operator in the form of an exponential. For example, in data A BC A modular exponential operator BC including B is formed in the data. In other words, a modular exponential operator BC including C is formed. A point multiplication operator is an operator in the form of a multiplier. For example, in the data AC×(A+B), AC and (A+B) can be point multiplication operators, the calculation operator AC can be regarded as a point multiplication operator including A, and the calculation operator AC can also be regarded as a point multiplication operator including C. A calculation operator including the second private key and the target Euclidean distance is formed in the second encrypted data. Let the second private key be b, and the biometric feature vector to be matched be an n-dimensional vector X(x1, x2, x3, ..., x i ,……,x n ), the sample biometric vector is an n-dimensional vector Y(y1,y2,y3,……,y i ,……,yn ), correspondingly, the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector is The second encrypted data may include To facilitate subsequent matching and comparison, in some examples, the second encrypted data may include a calculation operator. The calculation operator include
[0038] In some examples, the first private key may be a random number generated by the terminal device, and the second private key may be a random number generated by the server. To further improve data security, the first private key may be a large integer occupying at least 128 bits, such as a large integer occupying 256 bits. Similarly, the second private key may be a large integer occupying at least 128 bits, such as a large integer occupying 256 bits. By setting the first and second private keys to have a bit number greater than or equal to 128 bits, cryptographic security strength requirements can be met, further improving the security of the user's personal privacy data and the security of biometric matching.
[0039] In step S202, the second encrypted data is sent to the server, so that the server uses the second encrypted data, the second private key, the generator and the preset Euclidean distance matching threshold to obtain a matching result between the biometric feature vector to be matched and the sample biometric feature vector.
[0040] The server can use the second private key, a generator, and a preset Euclidean distance matching threshold to construct data consistent with the second encrypted data format. By comparing the second encrypted data with the data constructed using the second private key, a generator, and the preset Euclidean distance matching threshold, the server can obtain a matching result between the to-be-matched biometric feature vector and the sample biometric feature vector. The preset Euclidean distance matching threshold is a Euclidean distance judgment threshold used to determine whether two vectors are identical. It can be set based on scenarios, requirements, experience, etc. and is not limited here. If the target Euclidean distance is less than or equal to the preset Euclidean distance matching threshold, it indicates that the to-be-matched biometric feature vector and the sample biometric feature vector successfully match, i.e., the matching result is a successful match; if the target Euclidean distance is greater than the preset Euclidean distance matching threshold, it indicates that the to-be-matched biometric feature vector and the sample biometric feature vector fail to match, i.e., the matching result is a failed match. The second encrypted data contains a calculation operator including the second private key and the target Euclidean distance, and the data constructed by the server using the second private key, the generator and the preset Euclidean distance matching threshold contains a calculation operator including the second private key and the preset Euclidean distance matching threshold. Therefore, the comparison result of the second encrypted data with the data constructed by the server using the second private key, the generator and the preset Euclidean distance matching threshold corresponds to the comparison result of the target Euclidean distance and the preset Euclidean distance matching threshold. The comparison result of the target Euclidean distance and the preset Euclidean distance matching threshold can be determined by comparing the second encrypted data with the data constructed by the server using the second private key, the generator and the preset Euclidean distance matching threshold, and the comparison result can represent the matching result.
[0041] In an embodiment of the present application, a terminal device and a server may perform multiple interactions and processes based on a first private key, a biometric feature vector to be matched, a generator, a second private key, and first encrypted data. The terminal device has the first private key, the biometric feature to be matched, and a generator, and the server has the second private key and the first encrypted data. Through encryption processing by the terminal device using the first private key, encryption processing by the server using the second private key, and data interaction between the terminal device and the server, the terminal device can obtain second encrypted data including the second private key and a target Euclidean distance calculation operator that can represent the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. The second encrypted data contains the second private key, and the terminal device cannot know the second private key, making it difficult to decrypt the plaintext of the biometric feature vector to be matched and the sample biometric feature vector. Similarly, the server cannot know the first private key, making it difficult to decrypt the first encrypted private key. The server determines the matching result between the to-be-matched biometric vector and the sample biometric vector based on the second encrypted data, the generator, the second private key, and a preset Euclidean distance matching threshold. This allows the matching to be completed without involving the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, thereby reducing the security risk of user privacy data and improving the security of biometric matching. Because the terminal device and the server do not store the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, users can maintain control over their personal privacy data, thereby limiting the use scenarios of their personal privacy data, complying with the principle of minimizing the use of personal privacy data, and preventing its misuse.
[0042] Furthermore, in the embodiments of the present application, the to-be-matched biometric feature vector and the sample biometric feature vector are encrypted, and the matching result is determined by comparing the encrypted data. Different types of to-be-matched biometric data and sample biometric data may require different vector conversion models, but in the embodiments of the present application, the similarity of the biometric data is described by the similarity of the feature vectors. In the biometric matching process of the embodiments of the present application, the process for protecting personal privacy data and the conversion processes for converting the to-be-matched biometric feature vector and the sample biometric feature vector can be independent of each other, thereby achieving an assembleable and pluggable technical solution for the vector conversion model and the biometric matching model, that is, achieving decoupling of the vector conversion model and the biometric matching model.
[0043] In some embodiments, during the interaction and processing between the terminal device and the server, multiple intermediate encrypted data may be generated, and the second encrypted data may be obtained by further processing the multiple intermediate encrypted data. Figure 3 A flowchart of a biometric matching method provided in another embodiment of the first aspect of the present application is provided. Figure 3 and Figure 2 The difference is that Figure 2Step S201 in the above example can be specifically broken down into Figure 3 Steps S2011 to S2013 in .
[0044] In step S2011, first intermediate encrypted data sent by the server is received.
[0045] The first intermediate encrypted data is obtained by encrypting the first encrypted data using the second private key. The first encrypted data may form a calculation operator including the first private key and the elements in the sample biometric vector. Furthermore, the first encrypted data may form a calculation operator including the product of the first private key and the elements in the sample biometric vector. For example, the first private key is a, and the sample biometric vector is an n-dimensional vector Y (y1, y2, y3, ..., y i ,……,y n ), the first encrypted data may include the calculation operator ay i , the first encrypted data may include a calculation operator i=1,2,……,n; It should be noted that the calculation operator It also includes calculation operators
[0046] The server can use the second private key to encrypt the first encrypted data to obtain the first intermediate encrypted data. The first intermediate encrypted data can form a calculation operator including the product of the first private key, the second private key and the elements in the sample biometric vector. The first encrypted data includes a calculation operator including the product of the first private key and the elements in the sample biometric vector. The second private key can be used to participate in the encryption calculation, so that the calculation operator including the product of the first private key and the elements in the sample biometric vector is multiplied by the second private key, thereby obtaining the first intermediate encrypted data formed with a calculation operator including the product of the first private key, the second private key and the elements in the sample biometric vector. For example, the first private key is a, the second private key is b, and the sample biometric vector is an n-dimensional vector Y(y1, y2, y3, ..., y i ,……,y n ), the first intermediate encrypted data may include the calculation operator aby i .
[0047] In step S2012, second intermediate encrypted data is obtained according to the first intermediate encrypted data, the biometric feature vector to be matched, the generator, and the first private key.
[0048] At least part of the second intermediate encrypted data can be obtained based on the first intermediate encrypted data, and the second intermediate encrypted data forms a calculation operator including the product of the first private key and the elements in the biometric feature vector to be matched. For example, the first private key is a, and the biometric feature vector to be matched is an n-dimensional vector X (x1, x2, x3, ..., x i ,……,x n), the second intermediate encrypted data may include ax i In order to construct the second encrypted data in the subsequent steps, the second intermediate encrypted data can be ax i The second intermediate encrypted data is used to participate in constructing the target Euclidean distance in subsequent steps.
[0049] In some examples, the second intermediate encrypted data includes first intermediate encrypted sub-data and second intermediate encrypted sub-data. Step S2012 can be specifically refined as follows: obtaining the first intermediate encrypted sub-data based on the first intermediate encrypted data and the biometric feature vector to be matched; and obtaining the second intermediate encrypted sub-data based on the first private key, the generator, and the biometric feature vector to be matched.
[0050] The first intermediate encrypted sub-data forms a calculation operator including the first private key, the second private key, the product of the elements in the sample biometric vector and the elements in the biometric vector to be matched. For example, the first private key is a, the second private key is b, and the sample biometric vector is an n-dimensional vector Y (y1, y2, y3, ..., y i ,……,y n ), the biometric feature vector to be matched is an n-dimensional vector X(x1,x2,x3,……,x i ,……,x n ), the first intermediate encrypted sub-data may be formed to include abx i y i In order to construct the target Euclidean distance in the subsequent process, the first intermediate encrypted sub-data may include the calculation operator -2abx i y i .
[0051] The second intermediate encrypted sub-data forms a calculation operator including the product of the first private key, the second private key and the elements in the biometric feature vector to be matched. For example, the first private key is a, and the biometric feature vector to be matched is an n-dimensional vector X (x1, x2, x3, ..., x i ,……,x n ), the second intermediate encrypted data may be formed including ax i In order to construct the target Euclidean distance in the subsequent process, the second intermediate encrypted data may include the calculation operator
[0052] In step S2013, interaction and processing are performed with the server based on the second intermediate encrypted data, the first encrypted data, the first private key and the second private key, the first private key in the processed data is eliminated, and the second encrypted data is obtained.
[0053] After obtaining the second intermediate encrypted data, the second intermediate encrypted data can be sent to the server, which then performs encryption processing based on the second intermediate encrypted data. The server then feeds the encrypted data back to the terminal device, which then processes the received data to obtain the second encrypted data. In this embodiment of the present application, the second encrypted data can be obtained based on the second intermediate encrypted data through processing by the terminal device, processing by the server, and data exchange between the terminal device and the server.
[0054] In some examples, second intermediate encrypted data may be sent to a server so that the server can obtain third intermediate encrypted data based on the second intermediate encrypted data, the first encrypted data, and the second private key; the third intermediate encrypted data sent by the server is received; and the first private key is used to eliminate the first private key in the third intermediate encrypted data to obtain the second encrypted data.
[0055] The server can calculate the second intermediate encrypted data and the first encrypted data to obtain the third intermediate encrypted data. The second intermediate encrypted data includes the first intermediate encrypted sub-data and the second intermediate encrypted sub-data. The specific contents of the first intermediate encrypted sub-data and the second intermediate encrypted sub-data can be found in the relevant descriptions in the above embodiments and will not be repeated here. The server can calculate and process the first intermediate encrypted sub-data, the second intermediate encrypted sub-data and the first encrypted data to obtain the third intermediate encrypted data. A calculation operator including the product of the first private key, the second private key and the target Euclidean distance is formed in the third intermediate encrypted data. For example, the first private key is a, the second private key is b, and the biometric feature vector to be matched is an n-dimensional vector X (x1, x2, x3, ..., x i ,……,x n ), the sample biometric vector is an n-dimensional vector Y(y1,y2,y3,……,y i ,……,y n ), the third intermediate encrypted data may be formed to include For example, the third intermediate encrypted data may include a calculation operator Calculation Operator include The server cannot recognize the first private key and therefore transmits the third intermediate encrypted data to the terminal device. The terminal device, which has the first private key, removes the first private key from the third intermediate encrypted data involving the first private key, thereby obtaining the second encrypted data. The specific content of the second encrypted data can be found in the relevant description of the above embodiment and is not further described here.
[0056] Through the interaction between the terminal device and the server, the terminal device and the server can each further process the received data. Through the interaction and reprocessing of the intermediate encrypted data, the second encrypted data is constructed. The entire processing process does not involve the plaintext of the biometric feature vector to be matched and the plaintext of the sample biometric feature vector, and is safe and reliable.
[0057] In some embodiments, the server can determine whether the match between the to-be-matched biometric feature vector and the sample biometric feature vector is successful by determining whether the second encrypted data belongs to a matching data set. The matching data set can be generated by the server, and the maximum value of the elements in the matching data set is obtained based on the second private key and a preset Euclidean distance matching threshold. In some examples, the maximum value of the elements in the matching data set forms a calculation operator including the product of the second private key and the preset Euclidean distance matching threshold. The preset Euclidean distance matching threshold here can be the preset Euclidean distance matching threshold itself or the preset Euclidean distance matching threshold after integer processing, and is not limited here.
[0058] If the second encrypted data belongs to the matching data set, the matching result includes a successful match; if the second encrypted data does not belong to the matching data set, the matching result includes a failed match. The second encrypted data belongs to the matching data set when the target Euclidean distance is less than or equal to a preset Euclidean distance matching threshold. The second encrypted data does not belong to the matching data set when the target Euclidean distance is greater than the preset Euclidean distance matching threshold.
[0059] In some embodiments, the elements in the biometric vector to be matched, the elements in the sample biometric vector, and the preset Euclidean distance matching threshold are all integerized in equal multiples. That is, the elements in the biometric vector to be matched, the elements in the sample biometric vector, and the preset Euclidean distance matching threshold after equal multiples of integerization are all integers, and are the same multiples of the elements in the original biometric vector to be matched, the elements in the sample biometric vector, and the preset Euclidean distance matching threshold. Correspondingly, since the preset Euclidean distance matching threshold after equal multiples of integerization is an integer, the number of elements in the matching data set is limited, and a calculation operator is formed in the matching data set, including the product of the second private key and the square of 0 to the preset Euclidean distance matching threshold after integerization. For example, if the second private key is b and the preset Euclidean distance matching threshold is θ, the calculation operators involved in the matching data set may include b×0, b×1, b×2, ..., b×θ 2 .
[0060] In some embodiments, to improve the efficiency of biometric matching, a Bloom filter may be used to determine whether the second encrypted data belongs to the matching data set. If all K target hash values in the corresponding positions in a pre-established Bloom filter lookup table are 1, the second encrypted data may be determined to belong to the matching data set. If at least one of the K target hash values in the corresponding positions in the Bloom filter lookup table is 0, the second encrypted data may be determined not to belong to the matching data set.
[0061] Among them, the K target hash values are calculated based on the second encrypted data according to K hash functions. Each second encrypted data can be calculated to obtain a target hash value according to a hash function. Each second encrypted data corresponds to K target hash values. K is a positive integer, which can be set according to the scenario, requirements, experience, etc., and is not limited here. The values in the Bloom filter lookup table are calculated based on the elements in the matching data set according to K hash functions. The Bloom filter lookup table can be generated by a server. Specifically, the server can use K hash functions to calculate each element in the matching data set to obtain K hash values corresponding to each element; map the K hash values corresponding to each element to K positions in a binary array whose values are all 0, and update the values of the K positions corresponding to each element to 1, and determine the updated binary array as the Bloom filter lookup table. The K hash functions used to generate the Bloom filter lookup table are the same as the K hash functions used to calculate the K target hash values. In some examples, the binary array is a binary array in which the value of each position is 0 before the update. Each position in the binary array can be represented by the subscript of the element in the binary array. The hash value corresponding to the element is mapped to the position in the binary array. Specifically, the hash value corresponding to the element can be mapped to the subscript of the element in the binary data.
[0062] By using a Bloom filter to determine whether the second encrypted data belongs to a matching data set, the speed of determining whether the second encrypted data belongs to a matching data set can be improved, especially when the number of biometric feature vectors to be matched and the number of sample biometric feature vectors is very large, which can significantly improve the efficiency of biometric matching.
[0063] In some embodiments, before matching the to-be-matched biometric vector with the sample biometric vector, the terminal device may generate first encrypted data and transmit the first encrypted data to a server, causing the server to store the first encrypted data. Specifically, the terminal device may obtain the sample biometric vector; encrypt the sample biometric vector using a generator and a first private key to obtain the first encrypted data; and transmit the first encrypted data to the server. The calculation operator formed in the first encrypted data, which includes the product of the first private key and the elements of the sample biometric vector, is described in detail in the above embodiments and is not further elaborated here.
[0064] The first encrypted data contains the first private key, and the server cannot know the first private key. Therefore, the first encrypted data is difficult to be cracked on the server side, thereby ensuring the security of personal privacy data stored in the server.
[0065] A second aspect of the present application provides a biometric matching method that can be applied to a server, that is, the biometric matching method can be executed by the server. Figure 4 A flowchart of a biometric matching method provided in an embodiment of the second aspect of the present application is shown in FIG. Figure 4 As shown, the biometric matching method may include steps S301 to S303.
[0066] In step S301, multiple interactions and processes are performed with the terminal device based on the second private key, the first encrypted data, the first private key, the preset generator and the biometric feature vector to be matched obtained by the terminal device, so that the terminal device obtains the second encrypted data.
[0067] The first private key is the private key of the terminal device. The second private key is the private key of the server. The first encrypted data is pre-encrypted by the terminal device using a generator and the first private key to encrypt the sample biometric vector and send it to the server. The second encrypted data forms a calculation operator including the second private key and a target Euclidean distance. The target Euclidean distance includes the Euclidean distance between the biometric vector to be matched and the sample biometric vector.
[0068] In some examples, the computation operator may include a modular exponential operator or a dot product operator.
[0069] In step S302, second encrypted data sent by the terminal device is received.
[0070] In step S303, a matching result between the to-be-matched biometric feature vector and the sample biometric feature vector is obtained using the second encrypted data, the second private key, the generator, and the preset Euclidean distance matching threshold.
[0071] The specific contents of the above steps S301 to S303 can be found in the relevant descriptions in the above embodiments, which will not be repeated here.
[0072] In an embodiment of the present application, a server and a terminal device may perform multiple interactions and processes based on a first private key, a biometric feature vector to be matched, a generator, a second private key, and first encrypted data. The terminal device has the first private key, the biometric feature to be matched, and a generator, and the server has the second private key and the first encrypted data. Through encryption processing by the terminal device using the first private key, encryption processing by the server using the second private key, and data interaction between the terminal device and the server, the terminal device can obtain second encrypted data including the second private key and a target Euclidean distance calculation operator that can represent the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. The second encrypted data contains the second private key, and the terminal device cannot know the second private key, making it difficult to decrypt the plaintext of the biometric feature vector to be matched and the sample biometric feature vector. Similarly, the server cannot know the first private key and thus finds it difficult to decrypt the first encrypted private key. The server determines the matching result between the to-be-matched biometric vector and the sample biometric vector based on the second encrypted data, the generator, the second private key, and a preset Euclidean distance matching threshold. This allows the matching to be completed without involving the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, thereby reducing the security risk of user privacy data and improving the security of biometric matching. Because the terminal device and the server do not store the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, users can maintain control over their personal privacy data, thereby limiting the use scenarios of their personal privacy data, complying with the principle of minimizing the use of personal privacy data, and preventing its misuse.
[0073] Furthermore, in the embodiments of the present application, the to-be-matched biometric feature vector and the sample biometric feature vector are encrypted, and the matching result is determined by comparing the encrypted data. Different types of to-be-matched biometric data and sample biometric data may require different vector conversion models, but in the embodiments of the present application, the similarity of the biometric data is described by the similarity of the feature vectors. In the biometric matching process of the embodiments of the present application, the process for protecting personal privacy data and the conversion processes for converting the to-be-matched biometric feature vector and the sample biometric feature vector can be independent of each other, thereby achieving an assembleable and pluggable technical solution for the vector conversion model and the biometric matching model, that is, achieving decoupling of the vector conversion model and the biometric matching model.
[0074] In some embodiments, during the interaction and processing between the server and the terminal device, multiple intermediate encrypted data may be generated, and the second encrypted data may be obtained by further processing the multiple intermediate encrypted data. Figure 5 A flowchart of a biometric matching method provided in another embodiment of the second aspect of the present application is provided. Figure 5 and Figure 4 The difference is that Figure 4Step S301 in the above example can be specifically broken down into Figure 5 Steps S3011 to S3013 in Figure 4 Step S303 in the above example can be specifically broken down into Figure 5 Steps S3031 to S3033 in .
[0075] In step S3011, the first encrypted data is encrypted using the second private key to obtain first intermediate encrypted data.
[0076] A calculation operator is formed in the first intermediate encrypted data including the product of the first private key, the second private key and the elements in the sample biometric vector.
[0077] In step S3012, the first intermediate encrypted data is sent to the terminal device, so that the terminal device obtains the second intermediate encrypted data according to the first intermediate encrypted data, the biometric feature vector to be matched, the generator and the first private key.
[0078] A calculation operator is formed in the second intermediate encrypted data including the product of the first private key and the elements in the to-be-matched biometric feature vector.
[0079] In some examples, the second intermediate encrypted data includes first intermediate encrypted sub-data and second intermediate encrypted sub-data. The first intermediate encrypted sub-data is obtained by the terminal device based on the first intermediate encrypted data and the biometric feature vector to be matched. The first intermediate encrypted sub-data forms a calculation operator that includes the product of the first private key, the second private key, and the elements of the sample biometric feature vector and the elements of the biometric feature vector to be matched. The second intermediate encrypted sub-data is obtained by the terminal device based on the first private key, a generator, and the biometric feature vector to be matched. The second intermediate encrypted sub-data forms a calculation operator that includes the product of the first private key and the elements of the biometric feature vector to be matched.
[0080] In step S3013, interaction and processing are performed with the terminal device based on the second intermediate encrypted data, the first encrypted data, the first private key and the second private key, so that the terminal device eliminates the first private key in the processed data and obtains the second encrypted data.
[0081] In some examples, step S3013 can be specifically refined as follows: receiving second intermediate encrypted data sent by the terminal device; obtaining third intermediate encrypted data based on the second intermediate encrypted data, the first encrypted data and the second private key, wherein a calculation operator including the product of the first private key, the second private key and the target Euclidean distance is formed in the third intermediate encrypted data; sending the third intermediate encrypted data to the terminal device so that the terminal device uses the first private key to eliminate the first private key in the third intermediate encrypted data to obtain the second encrypted data.
[0082] In step S3031, a matching data set is obtained based on the second private key, the generator and the preset Euclidean distance matching threshold.
[0083] The maximum value of the elements in the matching data set is obtained based on the second private key and a preset Euclidean distance matching threshold.
[0084] In some examples, multiples of the elements in the to-be-matched biometric vector, the elements in the sample biometric vector, and the preset Euclidean distance matching threshold are integerized. Step S3031 can be specifically refined as follows: calculating the product of the second private key and the square of the range from 0 to the integerized preset Euclidean distance matching threshold; and obtaining the matching data set based on the product of the second private key and the square of the range from 0 to the integerized preset Euclidean distance matching threshold and a generator.
[0085] In step S3032, when the second encrypted data belongs to the matching data set, it is determined that the matching result includes a successful match.
[0086] In step S3033, if the second encrypted data does not belong to the matching data set, it is determined that the matching result includes a matching failure.
[0087] In some embodiments, the server may use a Bloom filter to determine whether the second encrypted data belongs to the matching data set. Specifically, the server may calculate K target hash values based on the second encrypted data using K and a hash function. If the values of the K target hash values in the corresponding positions in a pre-established Bloom filter lookup table are all 1, the server determines that the second encrypted data belongs to the matching data set. If at least one of the K target hash values in the corresponding positions in the Bloom filter lookup table is 0, the server determines that the second encrypted data does not belong to the matching data set. The K target hash values are calculated based on the second encrypted data using K hash functions, and the values in the Bloom filter lookup table are calculated based on the elements in the matching data set using K hash functions.
[0088] In some embodiments, the server may pre-generate a Bloom filter lookup table to facilitate the aforementioned Bloom filter-based determination of whether the second encrypted data belongs to the matching data set. Specifically, the server may utilize K hash functions to calculate each element in the matching data set, obtaining K hash values corresponding to each element; map each K hash value corresponding to each element to K positions in a binary array whose values are all 0; update the values of each K positions corresponding to each element to 1; and define the updated binary array as the Bloom filter lookup table.
[0089] The specific contents of the above steps S3011 to S3013, and steps S3031 to S3033 can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0090] In the above embodiment, the calculation operator may include a modular exponential operator or a point multiplication operator. For ease of understanding, the biometric registration and matching process is described below using the examples of calculation operators including modular exponential operators and calculation operators including point multiplication operators. The biometric registration process refers to the process in which a terminal device processes data to obtain first encrypted data, transmits the first encrypted data to a server, and stores it on the server. The biometric matching process refers to the process in which a terminal device interacts with the server multiple times to obtain a matching result between the biometric feature vector to be matched and the sample biometric feature vector.
[0091] In the first example, the calculation operator includes a modular exponential operator, and the biometric registration and matching process may include the following steps c1 to c12.
[0092] In step c1, the terminal device collects sample biological data and converts the sample biological data into a sample biological feature vector Y (y1, y2, y3, ..., y i ,……,y n ).
[0093] In step c2, the terminal device generates a random number a and uses the random number a as the first private key.
[0094] In step c3, the terminal device uses the generator g and the first private key a to generate the sample biometric vector Y (y1, y2, y3, ..., y i ,……,y n ) is encrypted to obtain the first encrypted data.
[0095] The first encrypted data may include the data in the following formula (1): and SY1, or, alternatively, may include the data in the following formula (1) and i=1, 2,…, n.
[0096]
[0097] In step c4, the first encrypted data is sent to the server, and the server stores the first encrypted data.
[0098] The format of the modular exponential operator is g p , the discrete logarithm problem in the field of cryptography can be used to ensure the security of the first encrypted data. That is, in a finite field with a generator of g, given an integer p, calculate g p =q is easy, but calculating p based on g and q is difficult. The server cannot know the first private key a, and due to the discrete logarithm problem, the server gets Can't crack y i , first, the encrypted data is stored in a secret form on the server.
[0099] The above steps c1 to c4 belong to the biometric registration process.
[0100] In step c5, the terminal device collects the biometric data to be matched, and converts the biometric data to be matched into the biometric feature vector X (x1, x2, x3, ..., x i ,……,x n ).
[0101] In step c6, the server generates a random number b and uses the random number b as the second private key.
[0102] In step c7, the server encrypts the first encrypted data using the second private key to obtain first intermediate encrypted data, and sends the first intermediate encrypted data to the terminal device.
[0103] The first intermediate encrypted data may include the following formula (2):
[0104]
[0105] In step c8, the terminal device matches the biometric feature vector X(x1, x2, x3, ..., x i ,……,x n ), the first intermediate encrypted data and the first private key, obtain the second intermediate encrypted data, and send the second intermediate encrypted data to the server.
[0106] The second intermediate encrypted data may include the following formula (3): and
[0107]
[0108] In step c9, the server obtains third intermediate encrypted data using the second intermediate encrypted data, the first encrypted data, and the second private key b, and sends the third intermediate encrypted data to the terminal device.
[0109] The third intermediate encrypted data includes the following formula (4):
[0110]
[0111] It should be noted that, since the terminal device is considered an untrusted party in the biometric matching scenario, the target Euclidean distance in the encrypted state must be constructed by the server.
[0112] In step c10, the terminal device uses the first private key to eliminate the first private key in the third intermediate encrypted data to obtain second encrypted data, and sends the second encrypted data to the server.
[0113] The second encrypted data includes the following formula (5):
[0114]
[0115] Since the terminal device cannot know the second private key, the terminal device cannot construct a calculation operator including a Euclidean distance less than a preset Euclidean distance matching threshold, which further improves data security.
[0116] In step c11, the server obtains the matching data set according to the second private key b and the preset Euclidean distance matching threshold θ
[0117] The preset Euclidean distance matching threshold θ, the previous sample biometric feature vector, and the biometric feature vector to be matched may be data that have been integerized by equal multiples, so the number of elements in the matching data set is limited.
[0118] In step c12, the server determines the second encrypted data Is the data set matching? If it exists, it is determined that the to-be-matched biometric feature vector and the sample biometric feature vector match successfully; if it does not exist, it is determined that the to-be-matched biometric feature vector and the sample biometric feature vector match unsuccessfully.
[0119] The target Euclidean distance is Since the second encrypted data is in a secret state, it is impossible to directly compare the target Euclidean distance with the preset Euclidean distance matching threshold. Is the data set matching? to determine the matching results. Exists in the set In, it means That is, it means It can be determined that the to-be-matched biometric feature vector successfully matches the sample biometric feature vector.
[0120] The above steps c5 to c12 belong to the biometric matching process.
[0121] In the second example, the calculation operator includes a dot product operator, and the biometric registration and matching process may include the following steps d1 to d12.
[0122] In step d1, the terminal device collects sample biological data and converts the sample biological data into a sample biological feature vector Y (y1, y2, y3, ..., y i ,……,y n ).
[0123] In step d2, the terminal device generates a random number a and uses the random number a as the first private key.
[0124] In step d3, the terminal device uses the generator g and the first private key a to generate the sample biometric vector Y (y1, y2, y3, ..., y i ,……,y n ) is encrypted to obtain the first encrypted data.
[0125] The first encrypted data may include the data ay in the following formula (6): i g and SY2, or, alternatively, may include the data ay in the following equation (6): i g and i=1, 2,…, n.
[0126]
[0127] In step d4, the first encrypted data is sent to the server, and the server stores the first encrypted data.
[0128] The format of the point multiplication operator is g×p. The elliptic curve public key algorithm problem in the field of cryptography can be used to ensure the security of the first encrypted data. That is, in the elliptic curve group with generator g, the generator g is a point on the curve. Given an integer p, it is easy to calculate g×p=q, but it is difficult to calculate p based on g and q. The server cannot know the first private key a, and due to the elliptic curve public key algorithm problem, the server obtains ay i g, and cannot crack y i , first, the encrypted data is stored in a secret form on the server.
[0129] The above steps d1 to d4 belong to the biometric registration process.
[0130] In step d5, the terminal device collects the biometric data to be matched, and converts the biometric data to be matched into the biometric feature vector X (x1, x2, x3, ..., x i ,……,x n ).
[0131] In step d6, the server generates a random number b and uses the random number b as the second private key.
[0132] In step d7, the server encrypts the first encrypted data using the second private key to obtain first intermediate encrypted data, and sends the first intermediate encrypted data to the terminal device.
[0133] The first intermediate encrypted data may include aby in the following formula (7): i g.
[0134]
[0135] In step d8, the terminal device matches the biometric feature vector X(x1, x2, x3, ..., x i ,……,x n ), the first intermediate encrypted data and the first private key, obtain the second intermediate encrypted data, and send the second intermediate encrypted data to the server.
[0136] The second intermediate encrypted data may include -2abx in the following formula (8): i y i g and
[0137] In step d9, the server obtains third intermediate encrypted data using the second intermediate encrypted data, the first encrypted data, and the second private key b, and sends the third intermediate encrypted data to the terminal device.
[0138] The third intermediate encrypted data includes the following formula (9):
[0139]
[0140] It should be noted that, since the terminal device is considered an untrusted party in the biometric matching scenario, the target Euclidean distance in the encrypted state must be constructed by the server.
[0141] In step d10, the terminal device uses the first private key to eliminate the first private key in the third intermediate encrypted data to obtain second encrypted data, and sends the second encrypted data to the server.
[0142] The second encrypted data includes the following formula (10):
[0143]
[0144] Since the terminal device cannot know the second private key, the terminal device cannot construct a calculation operator including a Euclidean distance less than a preset Euclidean distance matching threshold, which further improves data security.
[0145] In step d11, the server obtains the matching data set {gb×0, gb×1, gb×2, ..., gb×θ according to the second private key b and the preset Euclidean distance matching threshold θ 2}.
[0146] The preset Euclidean distance matching threshold θ, the previous sample biometric feature vector, and the biometric feature vector to be matched may be data that have been integerized by equal multiples, so the number of elements in the matching data set is limited.
[0147] In step d12, the server determines the second encrypted data Is it matching the data set {gb×0,gb×1,gb×2,……,gb×θ 2}, if it exists, it is determined that the to-be-matched biometric feature vector and the sample biometric feature vector match successfully; if it does not exist, it is determined that the to-be-matched biometric feature vector and the sample biometric feature vector match failed.
[0148] The target Euclidean distance is Since the second encrypted data is in a secret state, it is impossible to directly compare the target Euclidean distance with the preset Euclidean distance matching threshold. Is it matching the data set {gb×0,gb×1,gb×2,……,gb×θ 2} to determine the matching results. Exists in the set {gb×0,gb×1,gb×2,……,gb×θ 2}, indicating That is, it means It can be determined that the to-be-matched biometric feature vector successfully matches the sample biometric feature vector.
[0149] The above steps d5 to d12 belong to the biometric matching process.
[0150] A third aspect of the present application provides a terminal device. Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the third aspect of the present application is shown as follows: Figure 6 As shown, the terminal device 400 may include a first communication module 401 and a first encryption module 402 .
[0151] The first communication module 401 and the first encryption module 402 can be used to perform multiple interactions and processes with the server based on the first private key, the obtained biometric feature vector to be matched, the preset generator, the second private key and the first encrypted data to obtain the second encrypted data.
[0152] The first private key is the private key of the terminal device. The second private key is the private key of the server. The first encrypted data is pre-encrypted by the terminal device using a generator and the first private key to encrypt the sample biometric vector and send it to the server. The second encrypted data forms a calculation operator including the second private key and a target Euclidean distance. The target Euclidean distance includes the Euclidean distance between the biometric vector to be matched and the sample biometric vector.
[0153] In some examples, the computation operator includes a modular exponential operator or a dot product operator.
[0154] The first communication module 401 can also be used to send the second encrypted data to the server, so that the server uses the second encrypted data, the generator, the second private key and the preset Euclidean distance matching threshold to obtain a matching result between the biometric feature vector to be matched and the sample biometric feature vector.
[0155] In an embodiment of the present application, a terminal device and a server may perform multiple interactions and processes based on a first private key, a biometric feature vector to be matched, a generator, a second private key, and first encrypted data. The terminal device has the first private key, the biometric feature to be matched, and a generator, and the server has the second private key and the first encrypted data. Through encryption processing by the terminal device using the first private key, encryption processing by the server using the second private key, and data interaction between the terminal device and the server, the terminal device can obtain second encrypted data including the second private key and a target Euclidean distance calculation operator that can represent the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. The second encrypted data contains the second private key, and the terminal device cannot know the second private key, making it difficult to decrypt the plaintext of the biometric feature vector to be matched and the sample biometric feature vector. Similarly, the server cannot know the first private key, making it difficult to decrypt the first encrypted private key. The server determines the matching result between the to-be-matched biometric vector and the sample biometric vector based on the second encrypted data, the generator, the second private key, and a preset Euclidean distance matching threshold. This allows the matching to be completed without involving the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, thereby reducing the security risk of user privacy data and improving the security of biometric matching. Because the terminal device and the server do not store the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, users can maintain control over their personal privacy data, thereby limiting the use scenarios of their personal privacy data, complying with the principle of minimizing the use of personal privacy data, and preventing its misuse.
[0156] Furthermore, in the embodiments of the present application, the to-be-matched biometric feature vector and the sample biometric feature vector are encrypted, and the matching result is determined by comparing the encrypted data. Different types of to-be-matched biometric data and sample biometric data may require different vector conversion models, but in the embodiments of the present application, the similarity of the biometric data is described by the similarity of the feature vectors. In the biometric matching process of the embodiments of the present application, the process for protecting personal privacy data and the conversion processes for converting the to-be-matched biometric feature vector and the sample biometric feature vector can be independent of each other, thereby achieving an assembleable and pluggable technical solution for the vector conversion model and the biometric matching model, that is, achieving decoupling of the vector conversion model and the biometric matching model.
[0157] In some embodiments, the first communication module 401 may be configured to receive first intermediate encrypted data sent by a server.
[0158] The first intermediate encrypted data is obtained by encrypting the first encrypted data using the second private key by the server. A calculation operator including the product of the first private key, the second private key and the element in the sample biometric feature vector is formed in the first intermediate encrypted data.
[0159] The first encryption module 402 may be configured to obtain the second intermediate encrypted data according to the first intermediate encrypted data, the biometric feature vector to be matched, the generator, and the first private key.
[0160] A calculation operator including a product of the first private key, the second private key, and an element in the to-be-matched biometric feature vector is formed in the second intermediate encrypted data.
[0161] The first communication module 401 and the first encryption module 402 can be used to interact and process with the server based on the second intermediate encrypted data, the first encrypted data, the first private key and the second private key, eliminate the first private key in the processed data, and obtain the second encrypted data.
[0162] In some examples, the second intermediate encrypted data includes first intermediate encrypted sub-data and second intermediate encrypted sub-data.
[0163] The first encryption module 402 may be configured to obtain first intermediate encrypted sub-data based on the first intermediate encrypted data and the biometric feature vector to be matched; and obtain second intermediate encrypted sub-data based on the first private key, the generator, and the biometric feature vector to be matched.
[0164] The first intermediate encrypted sub-data forms a calculation operator that includes the first private key, the second private key, and the product of the elements in the sample biometric vector and the elements in the biometric vector to be matched. The second intermediate encrypted sub-data forms a calculation operator that includes the product of the first private key and the elements in the biometric vector to be matched.
[0165] In some examples, the first communication module 401 may be used to send second intermediate encrypted data to the server so that the server obtains third intermediate encrypted data based on the second intermediate encrypted data, the first encrypted data, and the second private key; and receive the third intermediate encrypted data sent by the server.
[0166] A calculation operator including a product of the first private key, the second private key, and the target Euclidean distance is formed in the third intermediate encrypted data.
[0167] The first encryption module 402 may be configured to utilize the first private key to eliminate the first private key in the third intermediate encrypted data to obtain the second encrypted data.
[0168] In some embodiments, if the second encrypted data belongs to the matching data set, the matching result includes a successful match. If the second encrypted data does not belong to the matching data set, the matching result includes a failed match. The maximum value of elements in the matching data set is obtained based on the second private key and a preset Euclidean distance matching threshold.
[0169] In some examples, multiples of the elements in the to-be-matched biometric vector, the elements in the sample biometric vector, and the preset Euclidean distance matching threshold are integerized. A calculation operator is formed in the matching data set, which includes the product of the second private key and the square of 0 to the integerized preset Euclidean distance matching threshold.
[0170] In some examples, if the K target hash values in corresponding positions in a pre-established Bloom filter lookup table are all 1, the second encrypted data belongs to the matching data set. If at least one of the K target hash values in corresponding positions in the Bloom filter lookup table is 0, the second encrypted data does not belong to the matching data set. The K target hash values are calculated based on the second encrypted data using K hash functions, and the values in the Bloom filter lookup table are calculated based on elements in the matching data set using K hash functions, where K is a positive integer.
[0171] In some embodiments, the terminal device 400 may further include a first acquisition module.
[0172] The first acquisition module is used to acquire a sample biometric feature vector.
[0173] The first encryption module 402 may also be configured to encrypt the sample biometric vector using a generator and a first private key to obtain first encrypted data.
[0174] A computation operator is formed in the first encrypted data to include a product of the first private key and an element in the sample biometric vector.
[0175] The first communication module 401 may also be configured to send first encrypted data to the server.
[0176] A fourth aspect of the present application provides a server. Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the fourth aspect of this application is shown in FIG. Figure 7 As shown, the server 500 may include a second communication module 501 , a second encryption module 502 and a matching module 503 .
[0177] The second communication module 501 and the second encryption module 502 can be used to perform multiple interactions and processes with the terminal device based on the second private key, the first encrypted data, the first private key, the preset generator and the biometric feature vector to be matched obtained by the terminal device, so that the terminal device obtains the second encrypted data.
[0178] The first private key is the private key of the terminal device. The second private key is the private key of the server. The first encrypted data is pre-encrypted by the terminal device using a generator and the first private key to encrypt the sample biometric vector and send it to the server. The second encrypted data forms a calculation operator including the second private key and a target Euclidean distance. The target Euclidean distance includes the Euclidean distance between the biometric vector to be matched and the sample biometric vector.
[0179] In some examples, the computation operator includes a modular exponential operator or a dot product operator.
[0180] The second communication module 501 is further configured to receive second encrypted data sent by the terminal device.
[0181] The matching module 503 may be configured to obtain a matching result between the to-be-matched biometric feature vector and the sample biometric feature vector using the second encrypted data, the second private key, a generator, and a preset Euclidean distance matching threshold.
[0182] In an embodiment of the present application, a server and a terminal device may perform multiple interactions and processes based on a first private key, a biometric feature vector to be matched, a generator, a second private key, and first encrypted data. The terminal device has the first private key, the biometric feature to be matched, and a generator, and the server has the second private key and the first encrypted data. Through encryption processing by the terminal device using the first private key, encryption processing by the server using the second private key, and data interaction between the terminal device and the server, the terminal device can obtain second encrypted data including the second private key and a target Euclidean distance calculation operator that can represent the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. The second encrypted data contains the second private key, and the terminal device cannot know the second private key, making it difficult to decrypt the plaintext of the biometric feature vector to be matched and the sample biometric feature vector. Similarly, the server cannot know the first private key and thus finds it difficult to decrypt the first encrypted private key. The server determines the matching result between the to-be-matched biometric vector and the sample biometric vector based on the second encrypted data, the generator, the second private key, and a preset Euclidean distance matching threshold. This allows the matching to be completed without involving the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, thereby reducing the security risk of user privacy data and improving the security of biometric matching. Because the terminal device and the server do not store the plaintext of the to-be-matched biometric vector or the plaintext of the sample biometric vector, users can maintain control over their personal privacy data, thereby limiting the use scenarios of their personal privacy data, complying with the principle of minimizing the use of personal privacy data, and preventing its misuse.
[0183] Furthermore, in the embodiments of the present application, the to-be-matched biometric feature vector and the sample biometric feature vector are encrypted, and the matching result is determined by comparing the encrypted data. Different types of to-be-matched biometric data and sample biometric data may require different vector conversion models, but in the embodiments of the present application, the similarity of the biometric data is described by the similarity of the feature vectors. In the biometric matching process of the embodiments of the present application, the process for protecting personal privacy data and the conversion processes for converting the to-be-matched biometric feature vector and the sample biometric feature vector can be independent of each other, thereby achieving an assembleable and pluggable technical solution for the vector conversion model and the biometric matching model, that is, achieving decoupling of the vector conversion model and the biometric matching model.
[0184] In some embodiments, the second encryption module 502 may be configured to encrypt the first encrypted data using the second private key to obtain first intermediate encrypted data.
[0185] A calculation operator is formed in the first intermediate encrypted data including the product of the first private key, the second private key and the elements in the sample biometric vector.
[0186] The second communication module 501 may be configured to send the first intermediate encrypted data to the terminal device, so that the terminal device may obtain the second intermediate encrypted data according to the first intermediate encrypted data, the biometric feature vector to be matched, the generator, and the first private key.
[0187] A calculation operator is formed in the second intermediate encrypted data including the product of the first private key and the elements in the to-be-matched biometric feature vector.
[0188] The second communication module 501 and the second encryption module 502 can be used to interact and process with the terminal device based on the second intermediate encrypted data, the first encrypted data, the first private key and the second private key, so that the terminal device eliminates the first private key in the processed data and obtains the second encrypted data.
[0189] In some examples, the second intermediate encrypted data includes first intermediate encrypted sub-data and second intermediate encrypted sub-data.
[0190] The first intermediate encrypted sub-data is obtained by the terminal device based on the first intermediate encrypted data and the biometric feature vector to be matched. The first intermediate encrypted sub-data forms a calculation operator that includes the first private key, the second private key, and the product of the elements in the sample biometric feature vector and the elements in the biometric feature vector to be matched.
[0191] The second intermediate encrypted sub-data is obtained by the terminal device according to the first private key, the generator and the biometric feature vector to be matched. The second intermediate encrypted sub-data forms a calculation operator including the product of the first private key and the elements in the biometric feature vector to be matched.
[0192] In some examples, the second communication module 501 may be used to receive second intermediate encrypted data sent by a terminal device.
[0193] The second encryption module 502 may be configured to obtain third intermediate encrypted data based on the second intermediate encrypted data, the first encrypted data, and the second private key.
[0194] A calculation operator including a product of the first private key, the second private key, and the target Euclidean distance is formed in the third intermediate encrypted data.
[0195] The second communication module 501 may be configured to send the third intermediate encrypted data to the terminal device, so that the terminal device uses the first private key to eliminate the first private key in the third intermediate encrypted data to obtain the second encrypted data.
[0196] In some embodiments, the matching module 503 can be used to: obtain a matching data set based on the second private key, a generator and a preset Euclidean distance matching threshold, wherein the maximum value of the elements in the matching data set is obtained based on the second private key and the preset Euclidean distance matching threshold; when the second encrypted data belongs to the matching data set, determine that the matching result includes a successful match; when the second encrypted data does not belong to the matching data set, determine that the matching result includes a failed match.
[0197] In some examples, multiples of elements in the to-be-matched biometric vector, elements in the sample biometric vector, and a preset Euclidean distance matching threshold are integerized.
[0198] The matching module 503 may be configured to: respectively calculate the product of the second private key and the square of the preset Euclidean distance matching threshold from 0 to an integer; and obtain a matching data set based on the product of the second private key and the square of the preset Euclidean distance matching threshold from 0 to an integer and a generator.
[0199] In some examples, the matching module 503 can also be used to: calculate K target hash values based on the second encrypted data according to K and the hash function; determine that the second encrypted data belongs to the matching data set when the values of the corresponding positions of the K target hash values in the pre-established Bloom filter lookup table are all 1; determine that the second encrypted data does not belong to the matching data set when at least one of the values of the corresponding positions of the K target hash values in the Bloom filter lookup table is 0.
[0200] The K target hash values are calculated based on the second encrypted data using K hash functions, and the values in the Bloom filter lookup table are calculated based on the elements in the matching data set using K hash functions, where K is a positive integer.
[0201] In some embodiments, the server 500 may also include a lookup table generation module, which can be used to: use K hash functions to calculate each element in the matching data set to obtain K hash values corresponding to each element; map the K hash values corresponding to each element to K positions in a binary array whose values are all 0, and update the values of the K positions corresponding to each element to 1, and determine the updated binary array as a Bloom filter lookup table.
[0202] The fifth aspect of the present application also provides a terminal device. Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the fifth aspect of this application. Figure 8 As shown, the terminal device 600 includes a memory 601 , a processor 602 , and a computer program stored in the memory 601 and executable on the processor 602 .
[0203] In some examples, the processor 602 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0204] The memory 601 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the biometric matching method according to the embodiment of the first aspect of the present application.
[0205] The processor 602 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 601, so as to implement the biometric matching method in the embodiment of the first aspect.
[0206] In some examples, the terminal device 600 may further include a communication interface 603 and a bus 604. Figure 8 As shown, the memory 601 , the processor 602 , and the communication interface 603 are connected via a bus 604 and communicate with each other.
[0207] The communication interface 603 is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. Input devices and / or output devices can also be connected through the communication interface 603.
[0208] The bus 604 includes hardware, software, or both, and couples the components of the terminal device 600 to each other. By way of example, and not limitation, the bus 604 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 604 may include one or more buses. Although embodiments herein describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
[0209] In the sixth aspect, the present application also provides a server. Figure 9 This is a schematic diagram of the structure of a server provided in an embodiment of the sixth aspect of this application. Figure 9 As shown, the server 700 includes a memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .
[0210] In some examples, the processor 702 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0211] The memory 701 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the biometric matching method according to the embodiment of the second aspect of the present application.
[0212] The processor 702 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 701, so as to implement the biometric matching method in the embodiment of the second aspect.
[0213] In some examples, the terminal device 700 may further include a communication interface 703 and a bus 704. Figure 9 As shown, the memory 701 , the processor 702 , and the communication interface 703 are connected via a bus 704 and communicate with each other.
[0214] The communication interface 703 is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. Input devices and / or output devices can also be connected through the communication interface 703.
[0215] The bus 704 includes hardware, software, or both, and couples the components of the server 700 to each other. By way of example, and not limitation, the bus 704 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of the above. Where appropriate, the bus 704 may include one or more buses. Although embodiments herein describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
[0216] The seventh aspect of this application provides a biometric matching system, which may include the terminal device and server in the above-mentioned embodiments. The terminal device can execute the biometric matching method in the above-mentioned first aspect embodiment, and the server can execute the biometric matching method in the above-mentioned second aspect embodiment. For specific contents, please refer to the relevant descriptions in the above-mentioned embodiments, which will not be repeated here.
[0217] In an eighth aspect, the present application further provides a computer-readable storage medium having computer program instructions stored thereon. When executed by a processor, the computer program instructions can implement the biometric matching method in the embodiment of the first aspect or the biometric matching method in the embodiment of the second aspect, and can achieve the same technical effects. To avoid repetition, they are not described here. The computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., but is not limited here.
[0218] The embodiments of the present application may also provide a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device can execute the biometric matching method in the embodiment of the first aspect or the biometric matching method in the embodiment of the second aspect. For specific details, please refer to the relevant descriptions in the above embodiments, and the same technical effects can be achieved. To avoid repetition, they will not be repeated here.
[0219] It should be clear that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For terminal device embodiments, server embodiments, system embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can be referred to the description part of the method embodiment. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of this application. In addition, for the sake of brevity, a detailed description of known method technologies is omitted here.
[0220] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. This processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.
[0221] Those skilled in the art should understand that the above embodiments are illustrative rather than restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, the specification and the claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other devices or steps; the quantifier "one" does not exclude a plurality; the terms "first" and "second" are used to identify names rather than to indicate any specific order. Any figure marks in the claims should not be understood as limiting the scope of protection. The functions of multiple parts appearing in the claims can be implemented by a separate hardware or software module. The fact that certain technical features appear in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A biometric matching method, characterized in that: Applied to a terminal device, the method includes: Performing multiple interactions and processing with the server based on a first private key, the obtained biometric feature vector to be matched, a preset generator, a second private key, and first encrypted data to obtain second encrypted data, wherein the first private key is the private key of the terminal device, and the second private key is the private key of the server. The first encrypted data is obtained by the terminal device in advance by encrypting the sample biometric feature vector using the generator and the first private key and sending it to the server. A calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector; The second encrypted data is sent to the server, so that the server uses the second encrypted data, the generator, the second private key, and a preset Euclidean distance matching threshold to obtain a matching result between the to-be-matched biometric feature vector and the sample biometric feature vector.
2. The method according to claim 1, characterized in that The method performs multiple interactions and processes with the server based on the first private key, the obtained biometric feature vector to be matched, the preset generator, the second private key, and the first encrypted data to obtain the second encrypted data, including: receiving first intermediate encrypted data sent by the server, the first intermediate encrypted data being obtained by the server encrypting the first encrypted data using the second private key, the first intermediate encrypted data forming a calculation operator including a product of the first private key, the second private key, and an element in the sample biometric feature vector; obtaining, based on the first intermediate encrypted data, the biometric feature vector to be matched, the generator, and the first private key, second intermediate encrypted data, wherein a calculation operator including a product of the first private key, the second private key, and an element in the biometric feature vector to be matched is formed in the second intermediate encrypted data; Interact and process with the server based on the second intermediate encrypted data, the first encrypted data, the first private key, and the second private key, eliminate the first private key in the processed data, and obtain the second encrypted data.
3. The method according to claim 2, characterized in that The second intermediate encrypted data includes the first intermediate encrypted sub-data and the second intermediate encrypted sub-data, The obtaining of second intermediate encrypted data according to the first intermediate encrypted data, the biometric feature vector to be matched, the generator, and the first private key includes: Obtaining, based on the first intermediate encrypted data and the to-be-matched biometric feature vector, the first intermediate encrypted sub-data, a calculation operator including the product of the first private key, the second private key, and elements of the sample biometric feature vector and elements of the to-be-matched biometric feature vector; The second intermediate encrypted sub-data is obtained according to the first private key, the generator, and the biometric feature vector to be matched, wherein a calculation operator including a product of the first private key and an element in the biometric feature vector to be matched is formed in the second intermediate encrypted sub-data.
4. The method according to claim 3, characterized in that The interacting and processing with the server based on the second intermediate encrypted data, the first encrypted data, the first private key, and the second private key, eliminating the first private key in the processed data, and obtaining the second encrypted data, includes: sending the second intermediate encrypted data to the server, so that the server obtains third intermediate encrypted data based on the second intermediate encrypted data, the first encrypted data, and the second private key, wherein a calculation operator including a product of the first private key, the second private key, and the target Euclidean distance is formed in the third intermediate encrypted data; receiving the third intermediate encrypted data sent by the server; The first private key is used to eliminate the first private key in the third intermediate encrypted data to obtain the second encrypted data.
5. The method according to claim 1, wherein In a case where the second encrypted data belongs to a matching data set, the matching result includes a successful match; In the case where the second encrypted data does not belong to the matching data set, the matching result includes a matching failure; The maximum value of the elements in the matching data set is obtained based on the second private key and the preset Euclidean distance matching threshold.
6. The method according to claim 5, characterized in that The elements in the to-be-matched biometric feature vector, the elements in the sample biometric feature vector, and the preset Euclidean distance matching threshold are converted into integers. The matching data set forms a calculation operator including the product of the second private key and the square of 0 to the integerized preset Euclidean distance matching threshold.
7. The method according to claim 5, characterized in that When the values of the K target hash values at corresponding positions in the pre-established Bloom filter lookup table are all 1, the second encrypted data belongs to the matching data set; When at least one of the K target hash values in the corresponding positions in the Bloom filter lookup table has a value of 0, the second encrypted data does not belong to the matching data set; Among them, K target hash values are calculated based on the second encrypted data according to K hash functions, the values in the Bloom filter lookup table are calculated based on the elements in the matching data set according to the K hash functions, and K is a positive integer.
8. The method according to claim 1, characterized in that Before performing multiple interactions and processing with the server based on the first private key, the acquired biometric feature vector to be matched, the second private key, and the first encrypted data to obtain the second encrypted data, the method further includes: Obtaining the sample biometric feature vector; encrypting the sample biometric vector using the generator and the first private key to obtain first encrypted data, wherein the first encrypted data includes a calculation operator including a product of the first private key and an element of the sample biometric vector; The first encrypted data is sent to the server.
9. The method according to any one of claims 1 to 8, characterized in that The calculation operators include a modular exponential operator or a point multiplication operator.
10. A biometric matching method, characterized in that: Applied to a server, the method includes: Performing multiple interactions and processing with a terminal device based on a second private key, first encrypted data, the first private key, a preset generator, and a biometric feature vector to be matched obtained by the terminal device, so that the terminal device obtains second encrypted data, wherein the first private key is the private key of the terminal device, and the second private key is the private key of the server. The first encrypted data is obtained by the terminal device by pre-encrypting a sample biometric feature vector using the generator and the first private key and sending the encrypted data to the server. A calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. receiving the second encrypted data sent by the terminal device; A matching result between the to-be-matched biometric feature vector and the sample biometric feature vector is obtained by using the second encrypted data, the second private key, the generator, and a preset Euclidean distance matching threshold.
11. The method according to claim 10, characterized in that The method of performing multiple interactions and processing with the terminal device based on the second private key, the first encrypted data, the first private key, a preset generator, and the biometric feature vector to be matched obtained by the terminal device, so that the terminal device obtains the second encrypted data, includes: encrypting the first encrypted data using the second private key to obtain first intermediate encrypted data, wherein the first intermediate encrypted data includes a calculation operator including a product of the first private key, the second private key, and an element of the sample biometric feature vector; sending the first intermediate encrypted data to the terminal device, so that the terminal device obtains second intermediate encrypted data based on the first intermediate encrypted data, the biometric feature vector to be matched, the generator, and the first private key, wherein a calculation operator including a product of the first private key and an element in the biometric feature vector to be matched is formed in the second intermediate encrypted data; Interact and process with the terminal device based on the second intermediate encrypted data, the first encrypted data, the first private key and the second private key, so that the terminal device eliminates the first private key in the processed data and obtains the second encrypted data.
12. The method according to claim 11, characterized in that The second intermediate encrypted data includes the first intermediate encrypted sub-data and the second intermediate encrypted sub-data, The first intermediate encrypted sub-data is obtained by the terminal device based on the first intermediate encrypted data and the biometric feature vector to be matched, and the first intermediate encrypted sub-data forms a calculation operator including the product of the first private key, the second private key, and the elements in the sample biometric feature vector and the elements in the biometric feature vector to be matched. The second intermediate encrypted sub-data is obtained by the terminal device based on the first private key, the generator and the biometric feature vector to be matched, and a calculation operator including the product of the first private key and the elements in the biometric feature vector to be matched is formed in the second intermediate encrypted sub-data.
13. The method according to claim 12, characterized in that The interacting and processing with the terminal device based on the second intermediate encrypted data, the first encrypted data, the first private key, and the second private key, so that the terminal device eliminates the first private key in the processed data to obtain the second encrypted data, includes: receiving the second intermediate encrypted data sent by the terminal device; obtaining, based on the second intermediate encrypted data, the first encrypted data, and the second private key, third intermediate encrypted data, wherein a calculation operator including a product of the first private key, the second private key, and the target Euclidean distance is formed in the third intermediate encrypted data; The third intermediate encrypted data is sent to the terminal device, so that the terminal device uses the first private key to eliminate the first private key in the third intermediate encrypted data to obtain the second encrypted data.
14. The method according to claim 10, characterized in that Obtaining a matching result between the to-be-matched biometric feature vector and the sample biometric feature vector by using the second encrypted data, the second private key, the generator, and a preset Euclidean distance matching threshold includes: Obtaining a matching data set based on the second private key, the generator, and the preset Euclidean distance matching threshold, wherein a maximum value of elements in the matching data set is obtained based on the second private key and the preset Euclidean distance matching threshold; In a case where the second encrypted data belongs to a matching data set, determining that the matching result includes a successful match; In a case where the second encrypted data does not belong to the matching data set, determining the matching result includes a matching failure.
15. The method according to claim 14, characterized in that The elements in the to-be-matched biometric feature vector, the elements in the sample biometric feature vector, and the preset Euclidean distance matching threshold are converted into integers. The obtaining of a matching data set based on the second private key, the generator, and the preset Euclidean distance matching threshold comprises: Calculate the product of the second private key and the square of the preset Euclidean distance matching threshold from 0 to the integer respectively; The matching data set is obtained according to the product of the second private key and the square of the preset Euclidean distance matching threshold from 0 to an integer and the generator.
16. The method according to claim 14, characterized in that Also includes: Based on the second encrypted data, calculate K target hash values according to K and a hash function; When the values of the K target hash values at corresponding positions in the pre-established Bloom filter lookup table are all 1, determining that the second encrypted data belongs to the matching data set; When at least one of the K target hash values at corresponding positions in the Bloom filter lookup table has a value of 0, determining that the second encrypted data does not belong to the matching data set; Among them, K target hash values are calculated based on the second encrypted data according to K hash functions, the values in the Bloom filter lookup table are calculated based on the elements in the matching data set according to the K hash functions, and K is a positive integer.
17. The method according to claim 16, characterized in that Also includes: Using the K hash functions, calculate each element in the matching data set to obtain K hash values corresponding to each element; The K hash values corresponding to each element are mapped to K positions in a binary array whose values are all 0, and the values of the K positions corresponding to each element are updated to 1, and the updated binary array is determined as the Bloom filter lookup table.
18. The method according to any one of claims 10 to 17, characterized in that The calculation operators include a modular exponential operator or a point multiplication operator.
19. A terminal device, characterized in that: including a first communication module and a first encryption module; The first communication module and the first encryption module are configured to perform multiple interactions and processes with the server based on a first private key, an acquired biometric feature vector to be matched, a preset generator, a second private key, and first encrypted data to obtain second encrypted data, wherein the first private key is a private key of the terminal device, and the second private key is a private key of the server. The first encrypted data is obtained by the terminal device in advance by encrypting a sample biometric feature vector using the generator and the first private key and sending the encrypted data to the server. A calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. The first communication module is further configured to send the second encrypted data to the server, so that the server uses the second encrypted data, the generator, the second private key, and a preset Euclidean distance matching threshold to obtain a matching result between the biometric feature vector to be matched and the sample biometric feature vector.
20. A server, characterized in that: including a second communication module, a second encryption module and a matching module; The second communication module and the second encryption module are configured to perform multiple interactions and processes with the terminal device based on a second private key, first encrypted data, the first private key, a preset generator, and a biometric feature vector to be matched obtained by the terminal device, so that the terminal device obtains second encrypted data, wherein the first private key is the private key of the terminal device, and the second private key is the private key of the server. The first encrypted data is obtained by the terminal device in advance by encrypting a sample biometric feature vector using the generator and the first private key and sending the encrypted data to the server. A calculation operator including the second private key and a target Euclidean distance is formed in the second encrypted data, and the target Euclidean distance includes the Euclidean distance between the biometric feature vector to be matched and the sample biometric feature vector. The second communication module is further configured to receive the second encrypted data sent by the terminal device; The matching module is configured to obtain a matching result between the to-be-matched biometric feature vector and the sample biometric feature vector by using the second encrypted data, the second private key, the generator, and a preset Euclidean distance matching threshold.
21. A terminal device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the biometric matching method according to any one of claims 1 to 9 is implemented.
22. A server, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the biometric matching method according to any one of claims 10 to 18 is implemented.
23. A biometric matching system, characterized in that: Comprises the terminal device as claimed in claim 21 and the server as claimed in claim 22.
24. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the biometric matching method according to any one of claims 1 to 18.
Citation Information
Patent Citations
Hardware based authentication
WO2018178503A1
Privacy blockchain-based internet of vehicles protection method, and mobile terminal
WO2022082893A1