Face recognition anti-reconstruction method and system based on Intel SGX
By using Intel SGX technology to create a secure zone enclave in the face recognition system, the isolation program runs and encrypts the processing of face recognition data, the problem of privacy leakage and low computing efficiency in face recognition technology is solved, and efficient and secure faces are achieved Feature data protection and real-time.
Patent Information
- Application Number
- CN202411310348.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing facial recognition technology has the risk of privacy leakage and reconstruction attacks in the process of extracting and comparing facial image features, and the computing efficiency based on deep learning is low, and lacks efficient and secure confidentiality protection methods.
Using Intel SGX technology to create a security zone enclave on the server side, isolate the program through a new instruction set and access control mechanism, load face recognition code and sensitive data for encryption, ensure the confidentiality and integrity of the data and code, and use the hardware Supports trusted execution environments for encrypted storage and computing.
It provides hardware-level confidentiality and integrity protection without affecting face recognition accuracy and efficiency, improves defense capabilities against reconstruction attacks, and ensures the security and real-time nature of facial feature data.
Smart Images

Figure CN119293771A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of face recognition technology, and in particular to an Intel SGX-based face recognition anti-reconstruction method and system. Background Art
[0002] Face recognition technology is widely used in many fields such as identity authentication and security monitoring. Face recognition systems now usually use cloud services. Devices deployed at the edge extract facial features from the original face image and compare the obtained features with the corresponding data in the cloud database to achieve face recognition. However, the use of these technologies increases the risk of personal privacy leakage, especially when face image features are extracted and face image comparison is performed, face recognition sensitive data may be subject to reconstruction attacks, and attackers can restore the user's true appearance through these data.
[0003] In the existing technology, privacy protection methods based on cryptography can ensure the confidentiality of facial feature maps during the storage process. However, deep learning-based face recognition calculations in ciphertext space usually take a lot of time, and there is still a lack of efficient and secure solutions for protecting the confidentiality of facial feature maps. Summary of the invention
[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a face recognition anti-reconstruction method and system based on Intel SGX to solve the problems raised in the above background technology. The present invention uses Intel SGX technology for face recognition on the server side through a set of new instruction set extensions and access control mechanisms to achieve isolated operation between different programs, thereby ensuring the confidentiality and integrity of user key codes and data from being destroyed by malicious software.
[0005] In order to achieve the above object, the present invention implements a face recognition anti-reconstruction method based on Intel SGX through the following technical solution, including the following steps:
[0006] Step 1: On the client side, the user image information is extracted through the feature extractor, and the image uploaded by the user is preliminarily analyzed. At the same time, the required data is decrypted in the facial feature database on the server side, and loaded into the created secure zone enclave together with the face recognition running code;
[0007] Step 2: Use SGX technology to create a secure container enclave in the application, load and run the face recognition code and the required sensitive data in it, and process the sensitive data in the recognition process by entering the enclave through the Ecall function;
[0008] Step 3: Encrypt sensitive data through the SGX technology sealing mechanism and write it back to the server database securely, destroy the created security zone enclave to ensure that no sensitive data and code are retained in the memory, and use the sealing mechanism to encrypt the result and write it back to the server database securely.
[0009] Furthermore, a series of special CPU instructions provided by Intel SGX technology are used to build a trusted execution environment, and the data extracted from the original image on the client, the data required by the facial feature database on the server, and the face recognition running code are loaded into the trusted execution environment. The calculation results will be encrypted and written back to the database.
[0010] Furthermore, the trusted execution environment is based on Intel SGX technology, which divides the application into a trusted part and an untrusted part, wherein the untrusted part is a secure container of the enclave, and the enclave can access all memory ranges of the application, but the address range of the enclave cannot be accessed or modified outside the enclave.
[0011] Furthermore, the process of loading sensitive data and code into the enclave is as follows: first, page allocation is performed to copy the program code and data, and then a measurement operation is performed on the content loaded into the page to obtain a measurement value, which is compared with the integrity value in the certificate signed by the enclave owner.
[0012] Furthermore, only when the match is successful is the owner's public key in the certificate hashed and stored as a sealed identity in the enclave control structure to prevent operations such as program tampering and copying malicious code during the process of copying code and data.
[0013] Furthermore, sensitive data and code run in the enclave, and non-sensitive data and necessary untrusted function operations need to run in unprotected programs, so that the memory of the secure area is not particularly large. While reducing the attack surface of the secure area, it does not affect the accuracy of face recognition, and ultimately resists reconstruction attacks.
[0014] Furthermore, developers can perform validity checks on input parameters and return results to determine whether the memory pointed to by the pointer from the non-secure area belongs to the secure enclave.
[0015] Furthermore, the sensitive data and code stored in the enclave and the SGX data structure are stored in a special memory area supported by hardware and cannot be accessed by system software.
[0016] An anti-reconstruction system for face recognition based on Intel SGX includes a server and a client. The server stores a facial feature database, and the server performs decryption processing on the facial feature database. A trusted execution environment is built in the server based on Intel SGX technology to protect facial feature data loaded therein and perform face recognition calculations. The SGX module in the trusted execution environment is used to encrypt the facial feature data after successful face recognition. The client includes a feature extractor, and the feature extractor is used to extract user image information.
[0017] Beneficial effects of the present invention:
[0018] 1. This face recognition anti-reconstruction method and system based on Intel SGX uses face recognition services to build a confidential computing architecture and builds a trusted execution environment based on Intel SGX technology. It does not modify the structure and parameters of the neural network in the face recognition algorithm, thereby fully ensuring the accuracy of the face recognition system.
[0019] 2. The present invention is based on a hardware-based trusted execution environment, so it has obvious advantages in computing efficiency, does not bring a large time overhead to the face recognition system, and ensures the real-time performance of face recognition. Intel SGX technology deploys a hardware-isolated trusted domain, based on enclave memory access semantics, protection of application address mapping relationships and other mechanisms, to ensure the confidentiality of facial feature maps, prevent face recognition codes and data from being tampered with, and fully ensure the confidentiality and integrity of facial feature data during use.
[0020] 3. The present invention constructs a confidential computing architecture of the face recognition system through encrypted storage and a trusted execution environment. Under the premise of ensuring the efficiency of face recognition, it can provide hardware-level security protection for the confidentiality of facial feature maps during storage and calculation, and enhance the defense capability of the face recognition system against reconstruction attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a diagram of the confidential computing architecture of face authentication of the present invention;
[0022] Figure 2 The present invention relates to the interaction between the Intel SGX trusted part and the untrusted part. DETAILED DESCRIPTION
[0023] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.
[0024] See also Figure 1 to Figure 2The present invention provides the following technical solutions: a face recognition anti-reconstruction method and system based on Intel SGX. The present invention uses Intel SGX technology to implement a set of new instruction set extensions and access control mechanisms for face recognition on the server side to achieve isolated operation between different programs, thereby ensuring the confidentiality and integrity of user key codes and data from being damaged by malware. The main process includes:
[0025] Step 1: On the client side, the user image information is extracted through the feature extractor, and the image uploaded by the user is preliminarily analyzed. At the same time, the required data is decrypted in the facial feature database on the server side, and loaded into the created secure zone enclave together with the face recognition running code;
[0026] Step 2: Use SGX technology to create a secure container enclave in the application, load and run the face recognition code and the required sensitive data in it, and process the sensitive data in the recognition process by entering the enclave through the Ecall function;
[0027] Step 3: Encrypt sensitive data through the SGX technology sealing mechanism and write it back to the server database securely, destroy the created security zone enclave to ensure that no sensitive data and code are retained in the memory, and use the sealing mechanism to encrypt the result and write it back to the server database securely.
[0028] Based on the above implementation process, the following specific embodiments are provided for explanation:
[0029] Embodiment 1:
[0030] The facial feature data extracted by the client and the feature data in the cloud database are loaded into the trusted computing environment built with Intel SGX technology, and the face recognition code is run in the secure container enclave, including:
[0031] 1. Preparation stage: The client performs a preliminary analysis of the image uploaded by the user through the feature extractor. The analysis process includes feature extraction of the image uploaded by the user. The analysis scope in this embodiment is: analyze the eyes, nose, mouth and other areas in the uploaded image to obtain the feature vector, and finally obtain the required data from the facial feature database of the server, and load it into the created security zone enclave together with the face recognition running code. In the process of creating the enclave, page allocation is performed, program code and data are copied, and then the content loaded into the page is measured to obtain a measurement value, which is compared with the integrity value in the certificate signed by the enclave owner.
[0032] Only when the match is successful is the owner's public key in the certificate hashed and saved as a sealed identity in the enclave control structure to prevent tampering with the program, copying malicious code, and other operations during the process of copying code and data.
[0033] 2. Operation phase: The application uses SGX instructions to create an enclave. The processing of sensitive data during face recognition will be carried out in the enclave through the Ecall function. Since the enclave and data structure are allocated in a protected physical memory area, trusted hardware support ensures that external entities cannot access and modify this memory at any permission level and CPU mode, thereby ensuring the confidentiality and integrity of the data. The face recognition result can be passed to the application by calling the interface function Ocall function to complete the face recognition authentication.
[0034] 3. Ending stage: Instructions will be called to securely destroy the enclave to ensure that no sensitive code and data are retained in the memory, and the results will be encrypted using a sealing mechanism and securely written back to the server database.
[0035] When facing a reconstruction attack, the attacker already knows the structural information of the face recognition service. The attacker uses a well-trained face reconstruction network that can reconstruct a face image from facial features. The attacker wants to illegally access the sensitive data and code of the face recognition execution process on the server to obtain facial features. However, since the attacker cannot access the data and code inside the security zone, even through high-privilege level instructions, the physical address of the enclave cannot be tampered with and accessed, thereby protecting the privacy of facial feature data when it is called out of the database for face recognition.
[0036] Embodiment 2:
[0037] This embodiment further illustrates the present invention in conjunction with the accompanying drawings.
[0038] See Figure 1, a secure container enclave is created through Intel SGX, thereby dividing the program into a trusted part and an untrusted part. Through hardware-based memory protection, the system software (including the operating system and the virtual machine manager) cannot access and tamper with the memory of the trusted part (i.e., the enclave). The client feature extractor performs a preliminary analysis of the user's original image, and loads it into the trusted execution environment implemented by the SGX module together with the decrypted sensitive data of the facial feature database on the server side to execute the face recognition related code. During the loading process, the enclave's behavior of copying code and sensitive data to the secure area will be securely verified. Specifically, the content loaded into the page is measured to obtain a measurement value, which is compared with the integrity value in the certificate signed by the enclave owner. If the match is successful, the owner's public key in the certificate is hashed and saved as a sealed identity in the enclave control structure to prevent attacks such as copying malicious code and tampering with original data during this process.
[0039] The face recognition process is performed in the enclave. If insensitive data needs to be operated in the middle, the necessary operation can be performed in an unprotected area by calling the Ocall function. At the same time, the legality check of the input parameters is set to ensure confidentiality and efficiency. After the face recognition is completed, the sensitive data is encrypted and written back to the facial feature database, and the enclave is securely destroyed after the face recognition result is returned to ensure that no sensitive data and code are stored in the physical memory.
[0040] See Figure 2 The untrusted part of the program creates a secure enclave and calls a trusted function. The trusted function is executed in the enclave, and the execution result is returned to the calling location of the untrusted part of the program, and the code of the untrusted part continues to be executed. During the whole process, the system software is in an untrusted state, which means that regardless of the instruction permissions and CPU mode, the memory of the enclave cannot be accessed or modified outside the enclave, and the functions executed inside the enclave must be processed trusted functions.
[0041] If there are necessary operations on non-sensitive data, they can be executed in the untrusted area by calling untrusted functions and returning the results to the secure area. Developers need to check the legitimacy of the parameters to prevent data leakage or malicious code attacks.
[0042] The basic principles and main features of the present invention and the advantages of the present invention are shown and described above. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.
[0043] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A face recognition anti-reconstruction method based on Intel SGX, characterized in that: The following steps are involved: Step 1: On the client side, the user image information is extracted through the feature extractor, and the image uploaded by the user is preliminarily analyzed. At the same time, the required data is decrypted in the facial feature database on the server side, and loaded into the created secure zone enclave together with the face recognition running code; Step 2: Use SGX technology to create a secure container enclave in the application, load and run the face recognition code and the required sensitive data in it, and process the sensitive data in the recognition process by entering the enclave through the Ecall function; Step 3: Encrypt sensitive data through the SGX technology sealing mechanism and write it back to the server database securely, destroy the created security zone enclave to ensure that no sensitive data and code are retained in the memory, and use the sealing mechanism to encrypt the result and write it back to the server database securely.
2. According to claim 1, a face recognition anti-reconstruction method based on Intel SGX is characterized in that: A trusted execution environment is built using a series of special CPU instructions provided by Intel SGX technology, and the data extracted from the original image on the client, the data required by the facial feature database on the server, and the face recognition running code are loaded into the trusted execution environment. The calculation results are encrypted and written back to the database.
3. According to claim 2, a face recognition anti-reconstruction method based on Intel SGX is characterized in that: The trusted execution environment is based on Intel SGX technology, which divides the application into a trusted part and an untrusted part, where the untrusted part is the secure container of the enclave. The enclave can access all memory ranges of the application, but the address range of the enclave cannot be accessed or modified outside the enclave.
4. According to claim 3, a face recognition anti-reconstruction method based on Intel SGX is characterized in that: The process of loading sensitive data and code into the enclave is as follows: first, a page allocation is performed to copy the program code and data, and then a measurement operation is performed on the content loaded into the page to obtain a measurement value, which is compared with the integrity value in the certificate signed by the enclave owner.
5. The method for anti-reconstruction of face recognition based on Intel SGX according to claim 4, characterized in that: Only when the match is successful is the owner's public key in the certificate hashed and saved as a sealed identity in the enclave control structure to prevent tampering with the program, copying malicious code, and other operations during the process of copying code and data.
6. The face recognition anti-reconstruction method based on Intel SGX according to claim 1, characterized in that: Sensitive data and code run in the enclave, while non-sensitive data and necessary untrusted function operations need to run in unprotected programs, so that the memory of the secure area is not particularly large. While reducing the attack surface of the secure area, it does not affect the accuracy of face recognition and ultimately resists reconstruction attacks.
7. The method for anti-reconstruction of face recognition based on Intel SGX according to claim 6, characterized in that: Developers can check the legitimacy of input parameters and return results to determine whether the memory pointed to by the pointer from the non-secure area belongs to the secure enclave.
8. The method for anti-reconstruction of face recognition based on Intel SGX according to claim 3, characterized in that: The sensitive data and code stored in the enclave and the SGX data structure are stored in a special memory area supported by hardware and cannot be accessed by system software.
9. An anti-reconstruction system for face recognition based on Intel SGX, characterized in that: The invention comprises a server and a client, wherein a facial feature database is stored in the server, the server performs decryption processing on the facial feature database, and a trusted execution environment is constructed in the server based on Intel SGX technology to protect the facial feature data loaded therein and perform face recognition calculations, and the SGX module in the trusted execution environment is used to encrypt the facial feature data after face recognition is successful; the client comprises a feature extractor, and the feature extractor is used to extract user image information.
Citation Information
Patent Citations
Secure cloud storage method based on SGX
CN110138799A
Anti-fraud risk control method and device
CN110458662A
Security database system and method based on SGX technology and medium
CN112395631A
Authentication method and device, equipment and medium
CN116192483A
Biological data storage method and device, biological data identification method and device, equipment and medium
CN116502260A