A method and apparatus for network security authentication based on homomorphic encryption

By combining homomorphic encryption and random number matrices, the replay attack problem in the biometric transmission process is solved, achieving efficient and secure identity verification and reducing the storage overhead of third-party verification platforms.

CN117294414BActive Publication Date: 2026-07-17COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
Filing Date
2022-06-17
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In existing technologies, biometric features are vulnerable to replay attacks during transmission and verification, and third-party verification platforms have high storage costs, making it difficult to effectively resist network attacks and protect user privacy.

Method used

By employing homomorphic encryption technology combined with a random number matrix, the client encrypts the biometric matrix and the random number matrix before transmission and decrypts them using a public key and a private key. The verification platform performs Hamming distance calculations to prevent replay attacks and reduce storage overhead.

Benefits of technology

It effectively prevents replay attacks, protects biometric privacy, reduces storage overhead on the verification platform, and improves verification efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117294414B_ABST
    Figure CN117294414B_ABST
Patent Text Reader

Abstract

This invention, in the field of encryption technology, addresses the technical problem of effectively resisting replay attacks by providing a network security authentication method and apparatus based on homomorphic encryption. After the client sends an authentication request, the verification platform generates a random number matrix and sends it to the client. The client performs a dot product operation on the encrypted biometric matrix and the encrypted random number vector to obtain a unique new matrix. The client sends the new matrix along with a randomly generated public key to the verification platform. The platform then homomorphically encrypts all pre-stored biometric matrix templates using the public key to obtain encrypted biometric matrix templates. Hamming distance calculations are then performed on the homomorphically encrypted matrix M_enc and each of the encrypted biometric matrix templates, and the minimum encrypted Hamming distance D is selected. H,min Returned to the client, using the private key to the minimum encrypted Hamming distance D H,min Homomorphic decryption yields the plaintext Hamming distance d. H By comparing the Hamming distance d in plaintext H Use thresholds to obtain authentication results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of encryption technology, specifically relating to a network security authentication method based on homomorphic encryption. Background Technology

[0002] With the development and application of big data, biometric identification technology has developed rapidly and is beginning to be widely used in new verification technologies. There are many types of biometrics, including fingerprints, facial features, irises, and DNA. Compared with traditional passwords, these biometrics are much more difficult to forge. It is understood that the false recognition rate of different types of biometrics is less than 2%, with fingerprint recognition having a false recognition rate of only 0.8%, and iris recognition having a false recognition rate of only about one in a million.

[0003] However, compared to the low false recognition rate of biometrics, their greater uniqueness and privacy mean that if they are illegally attacked during data transmission or computation, resulting in data leakage, the losses to users would far exceed those caused by traditional passwords. Furthermore, since some companies lack the capability to verify user biometrics, they need to outsource this verification process to third-party verification platforms. However, due to the sensitivity of biometrics, it is not convenient to directly transmit biometric data in plaintext to the verification platform to avoid even greater losses.

[0004] Chinese patent (CN111181712A) discloses a homomorphic encryption biometric authentication method. This invention uses homomorphic encryption to encrypt the user's iris biometrics on the client side, transmits the encrypted ciphertext to the server, and the server calculates the Hamming distance between the ciphertext biometrics and the original ciphertext biometrics. The result is then used for decryption, and the verification request is determined based on the decryption result.

[0005] The cyberspace environment is becoming increasingly complex, with the forms and frequency of cyberattacks constantly increasing. To ensure that third-party verification platforms are not vulnerable to replay attacks from abnormal traffic when receiving encrypted biometric vectors from clients, a defense mechanism can be implemented by adding random numbers to the encrypted data. Both the sender and receiver remember the random numbers used previously; if the encrypted data contains previously used random numbers, it is considered a replay attack. However, since it is necessary to additionally store the used random numbers, the overhead of storage and retrieval becomes significant if the recording period is long. Summary of the Invention

[0006] The purpose of this invention is to solve the problems existing in the prior art and provide a network security authentication method based on homomorphic encryption, which solves the technical problem of how to effectively resist replay attacks and can reduce the storage overhead of the authentication platform.

[0007] This invention is achieved through the following technical solution: a network security authentication method based on homomorphic encryption, comprising the following steps:

[0008] After receiving the verification request sent by the client, return a random number matrix. The random number matrix Compared with the biometric matrix to be identified in the client They have the same dimensions and number of rows;

[0009] Receive a randomly generated public key sent by the client and a random number matrix. New matrix generated by combining homomorphic encryption algorithm The new matrix ,in, Representing the biometric matrix Homomorphic encryption matrix, Represents a random number matrix The homomorphic encryption matrix;

[0010] Based on the random number matrix For the new matrix Perform recovery operations to obtain the biometric matrix. Homomorphic encryption matrix ;

[0011] The public key is used to homomorphically encrypt all pre-stored biometric matrix templates to obtain encrypted biometric matrix templates; the biometric matrix templates refer to plaintext biometric matrices, and the correspondence between plaintext biometrics and user identity is unknown;

[0012] Homomorphic encryption matrix Hamming distances were calculated one by one with each of the encrypted biometric matrix templates to obtain several encrypted Hamming distances.

[0013] Select the smallest encrypted Hamming distance from the aforementioned encrypted Hamming distances. The result is returned to the client, enabling the client to use the private key paired with the public key to achieve the minimum cryptographic Hamming distance. Homomorphic decryption yields the plaintext Hamming distance. And by comparing the Hamming distance in plaintext Use thresholds to obtain authentication results.

[0014] Furthermore, the random number matrix Each element in the array is a decimal between 0 and 1.

[0015] Furthermore, based on the formula For the new matrix Perform row recovery operations to obtain the homomorphic encryption matrix. , Homomorphic encryption matrix The elements in For the new matrix The elements in Homomorphic encryption matrix The elements in.

[0016] Furthermore, the biometric matrix is 1-th order matrix, , The row vectors in the biometric matrix of the same user correspond to the biometric vectors of the same biometric feature.

[0017] Furthermore, biometric matrices of different users are used for identity verification through parallel computation.

[0018] The present invention also provides a network security authentication device based on homomorphic encryption, characterized in that it includes a biometric vector extraction module, a feature vector packaging module, an encryption module, a decryption module and a verification module;

[0019] The biofeature vector extraction module is used to identify biofeatures and extract biofeature vectors;

[0020] The feature vector packaging module is used to package the extracted biometric feature vectors of the same user into a biometric feature matrix. ;

[0021] The verification module is used to send a verification request to the verification platform and display the verification result;

[0022] The encryption module is used to receive the random number matrix returned by the verification platform after receiving the verification request. , random number matrix Generate a new matrix by combining homomorphic encryption algorithms and the new matrix The newly generated public key is sent to the verification platform; ,in, Representing the biometric matrix Homomorphic encryption matrix, Represents a random number matrix Homomorphic encryption matrix; random number matrix With the biometric matrix to be identified They have the same dimensions and number of rows;

[0023] The decryption module receives the encrypted calculation result from the verification platform, performs homomorphic decryption on the encrypted calculation result using a private key paired with the public key to obtain the plaintext Hamming distance, and sends it to the verification module. This allows the verification module to compare the plaintext Hamming distance with a threshold to obtain the verification result. The encrypted calculation result refers to the result obtained by applying a new matrix... The homomorphic encryption matrix obtained by performing the recovery operation The minimum encrypted Hamming distance among the encrypted Hamming distances of each encrypted feature matrix module. .

[0024] Compared with the prior art, the beneficial effects of the present invention include:

[0025] 1. This invention combines homomorphic encryption technology with a random number matrix. On the one hand, homomorphic encryption technology protects the user's biometric features from being leaked by network attacks or illegal snooping by cloud computing platforms when they are transmitted to a third-party verification platform and when verification calculations are performed on the third-party verification platform. On the other hand, by introducing a random number matrix with the same dimension as the biometric feature vector, the client performs a dot product between the encrypted random number matrix and the encrypted biometric feature matrix before transmitting the data to the verification platform. As a result, the verification platform can obtain a unique biometric feature ciphertext matrix, preventing illegal replay attacks.

[0026] 2. In this invention, both the public and private keys are randomly generated. Therefore, the public and private keys generated for each verification are different. Furthermore, each generated public key is used not only to encrypt the biometric matrix but also to encrypt the biometric matrix template. Thus, the calculated ciphertext Hamming distance requires decryption using the corresponding randomly generated private key. Therefore, when a previously stolen encrypted biometric matrix is ​​replayed to the verification platform to calculate the encrypted Hamming distance, decryption with the currently generated private key will inevitably fail to yield the correct Hamming distance, resulting in verification failure and rendering the replay attack unsuccessful.

[0027] 3. Batch Processing of Biometric Features: During the extraction of user biometric features, depending on the extraction algorithm, each user may generate dozens to hundreds of different binary vectors. This invention improves the efficiency of the verification process by packaging the extracted user feature vectors into a matrix and performing joint operations on all vectors. Furthermore, parallel verification of the biometric features of different users makes it easier to distinguish between them.

[0028] 4. Random number matrix Each element in the matrix is ​​a decimal between 0 and 1, which ensures that if the same person sends authentication requests multiple times in a row, the feature matrix received by the cloud server will be different, thus preventing unauthorized users from impersonating users and launching repeated replay attacks.

[0029] 5. This invention eliminates the need to store previously used random numbers or random number matrices in the verification platform, which greatly reduces storage overhead. Attached Figure Description

[0030] Figure 1 A business process diagram for identity verification between the client and the verification platform. Detailed Implementation

[0031] Considering that current biometric vector extraction algorithms extract dozens to hundreds of feature vectors from a single user's biometric vector, homomorphically encrypting each one and calculating its Hamming distance would significantly reduce the efficiency of identity verification. Therefore, this invention packages a single user's biometric vector into a single biometric matrix (for a single user, multiple unrelated but identical feature vectors can be extracted, and these feature vectors are packaged and processed in matrix form), and performs unified identity verification on the biometric matrix. Furthermore, using the feature matrix for storage allows the verification platform's server to logically store data continuously, resulting in stronger storage logic and improved efficiency in retrieving the feature matrix.

[0032] To more clearly illustrate the technical solution of the present invention, the interaction process between the client (i.e., the verification device) and the verification platform will be used as an example for specific explanation. The present invention will be further described in detail below with reference to the accompanying drawings.

[0033] like Figure 1 As shown, a network security authentication method based on homomorphic encryption includes the following steps:

[0034] The client obtains the user's biometric matrix through the biometric vector extraction module. , For matrix The Each row represents a sample, and the row number indicates the number of samples. Each column represents a 1-dimensional feature, and the number of columns is... The dimension representing the feature, each feature dimension is represented by... To express.

[0035] To prevent the verification platform from being subjected to malicious replay attacks, in the biometric matrix Before being transmitted to the verification platform, a biometric matrix is ​​introduced. Random number matrix with the same dimension and number of rows random number matrix The verification platform generates and sends a random number matrix to the client after receiving the verification request from the verification module. Each element in All are decimals between 0 and 1, representing the biometric matrix. and random number matrix Using CKKS for homomorphic encryption, we obtain:

[0036]

[0037]

[0038] The encryption module will encrypt the resulting matrix. With matrix Multiplying the corresponding components yields a new matrix encrypted with a random number matrix. ,in .

[0039] The new matrix obtained by the operation The randomly generated public key is transmitted to the verification platform, which then receives the new matrix. Then, based on the random number matrix previously provided to the client... Generate a homomorphic encryption matrix with the public key (The verification platform has always retained the homomorphic encryption matrix) (Until verification is complete), then according to the formula For the new matrix Perform row recovery operations to obtain the homomorphic encryption matrix. .in, Homomorphic encryption matrix The elements in For the new matrix The elements in Homomorphic encryption matrix The elements in.

[0040] The verification platform receives and recovers the encrypted biometric matrix. Subsequently, the verification platform encrypts all biometric matrix templates stored on its server using the public key sent by the client. These biometric matrix templates refer to plaintext biometric matrices, and the correspondence between plaintext biometrics and user identities is unknown. This results in a series of encrypted biometric matrix templates:

[0041]

[0042] The encrypted feature matrix template and the encrypted biometric feature matrix are then compared. Several encrypted Hamming distances are obtained by calculating the Hamming distance between each of them; because the verification platform does not know the biometric matrix. It needs to be calculated one by one to determine which encrypted biometric matrix template it should correspond to.

[0043] Although the plaintext biometric matrix is ​​stored on the verification platform's server, the platform cannot determine which user is performing the identity verification during the verification process because the correspondence between the plaintext biometrics and the user's identity is unknown. However, it can ensure that the verification passes smoothly.

[0044] Select the smallest encrypted Hamming distance from the aforementioned encrypted Hamming distances. Return to the client;

[0045] The client's decryption module uses the private key paired with the public key to achieve the minimum cryptographic Hamming distance. Homomorphic decryption yields the plaintext Hamming distance. ;

[0046] The verification module compares the plaintext Hamming distance. Using a threshold to obtain authentication results, plaintext Hamming distance If the result is less than or equal to the threshold, the verification passes; otherwise, the verification fails, and the result is returned to the client's display screen or language module for presentation.

[0047] The CKKS homomorphic encryption method used in this specific implementation introduces random noise, and multiple encryptions of the same plaintext can yield multiple different ciphertext results, thereby further improving security.

[0048] The homomorphic encryption / decryption method of this specific embodiment will be described in detail below.

[0049] Key generation: Define a parameter Indicates safety parameters, This represents the upper limit of depth.

[0050] Choose a power of 2 Define pattern , making and Meets security level , For a special modulus (in the CKKS homomorphic encryption method, The base modulus takes values ​​that are powers of 2. The prime numbers randomly selected from the vicinity do not involve homomorphic encryption operations; As a special modulus, in every homomorphic multiplication, the multiplication must satisfy the condition that the multiplication is in the special modulus. Inside), , All are powers of 2 In this specific implementation, a prime number is randomly selected from the vicinity. .

[0051] In a standard normal distribution In the process, three coordinates are randomly selected. One coordinate is used as part of the private key for decryption; one is used as part of the error to add additional noise; and one is used as part of the public key for encryption. These three points will be reselected in each encryption process.

[0052] From the standard normal distribution Randomly select a point , Randomly select a point , For a polynomial integer ring with modulus Q, from the standard normal distribution Randomly select a point private key That is Calculate the public key ,in, ;

[0053] Encryption: Take a point from the standard normal distribution From the standard normal distribution Two points are randomly selected from the middle. , For plaintext polynomials , Represent a real number and output the ciphertext. .

[0054] Decrypt: Enter ciphertext and private key Then output the plaintext according to the following formula. .

[0055] In this specific implementation, biometric matrices of different users are used for identity verification through parallel computation. Specifically, the client performs parallel encryption of biometric matrices of different users (combined with the same random number matrix), and the verification platform performs parallel verification of the encrypted biometric matrices of different users.

[0056] The above technical solution is only one embodiment of the present invention. For those skilled in the art, based on the principles disclosed in the present invention, it is easy to make various types of improvements or modifications, and not limited to the technical solutions described in the above specific embodiments of the present invention. Therefore, the foregoing description is only a preferred option and is not restrictive.

Claims

1. A network security authentication method based on homomorphic encryption, characterized in that, Includes the following steps: After receiving the verification request sent by the client, return a random number matrix. The random number matrix Compared with the biometric matrix to be identified in the client They have the same dimensions and number of rows; Receive a randomly generated public key sent by the client and a random number matrix. New matrix generated by combining homomorphic encryption algorithm The new matrix ,in, Representing the biometric matrix Homomorphic encryption matrix, Represents a random number matrix The homomorphic encryption matrix, the encrypted matrix With matrix Multiplying the corresponding components yields a new matrix encrypted with a random number matrix. ,in ; Based on the homomorphic encryption matrix For the new matrix Perform recovery operations to obtain the biometric matrix. Homomorphic encryption matrix According to the formula For the new matrix Perform row recovery operations to obtain the homomorphic encryption matrix. , Homomorphic encryption matrix The elements in For the new matrix The elements in Homomorphic encryption matrix Elements in; The public key is used to homomorphically encrypt all pre-stored biometric matrix templates to obtain encrypted biometric matrix templates; the biometric matrix templates refer to plaintext biometric matrices, and the correspondence between plaintext biometrics and user identity is unknown; Homomorphic encryption matrix Hamming distances were calculated one by one with each of the encrypted biometric matrix templates to obtain several encrypted Hamming distances. Select the smallest encrypted Hamming distance from the aforementioned encrypted Hamming distances. The result is returned to the client, enabling the client to use the private key paired with the public key to achieve the minimum cryptographic Hamming distance. Homomorphic decryption yields the plaintext Hamming distance. And by comparing the Hamming distance in plaintext Use thresholds to obtain authentication results.

2. The network security authentication method based on homomorphic encryption according to claim 1, characterized in that: random number matrix Each element in the array is a decimal between 0 and 1.

3. The network security authentication method based on homomorphic encryption according to claim 1, characterized in that: The biometric matrix is 1-th order matrix, , The row vectors in the biometric matrix of the same user correspond to the biometric vectors of the same biometric feature.

4. The network security authentication method based on homomorphic encryption according to claim 1, characterized in that: The biometric matrices of different users are used for identity verification through parallel computation.

5. A network security authentication device based on homomorphic encryption, characterized in that: It includes a biometric vector extraction module, a feature vector packaging module, an encryption module, a decryption module, and a verification module; The biofeature vector extraction module is used to identify biofeatures and extract biofeature vectors; The feature vector packaging module is used to package the extracted biometric feature vectors of the same user into a biometric feature matrix. ; The verification module is used to send a verification request to the verification platform and display the verification result; The encryption module is used to receive the random number matrix returned by the verification platform after receiving the verification request. , random number matrix Generate a new matrix by combining homomorphic encryption algorithms and the new matrix The newly generated public key is sent to the verification platform; ,in, Representing the biometric matrix Homomorphic encryption matrix, Represents a random number matrix Homomorphic encryption matrix; random number matrix With the biometric matrix to be identified They have the same dimensions and number of rows; The decryption module receives the encrypted calculation result from the verification platform, performs homomorphic decryption on the encrypted calculation result using a private key paired with the public key to obtain the plaintext Hamming distance, and sends it to the verification module. This allows the verification module to compare the plaintext Hamming distance with a threshold to obtain the verification result. The encrypted calculation result refers to the result obtained by applying a new matrix... The homomorphic encryption matrix obtained by performing the recovery operation The minimum encrypted Hamming distance among the encrypted Hamming distances of each encrypted feature matrix module. .

6. The network security authentication device based on homomorphic encryption according to claim 5, characterized in that: Private key used for homomorphic encryption ; Public key used for homomorphic decryption ; In the formula, , To obtain from the standard normal distribution A coordinate point is randomly selected from the data. To obtain from the standard normal distribution A coordinate point is randomly selected from the data. For a polynomial integer ring with modulus Q A coordinate point randomly selected from the data; Modulus Make and Meets security level , For special moduli, , All are powers of 2 A prime number randomly selected from the vicinity. This represents the upper limit of depth.

7. The network security authentication device based on homomorphic encryption according to claim 5, characterized in that: The general formula for homomorphic encryption is as follows: The general formula for homomorphic decryption is as follows: ; In the formula, For plain text, , It is a ciphertext. It follows a standard normal distribution. A coordinate point is randomly selected from the data. and To obtain from the standard normal distribution Two coordinate points are randomly selected from the data.

8. The network security authentication device based on homomorphic encryption according to claim 5, characterized in that: powers of 2 .