Secure Face Matching Using Fully Homomorphic Encryption

Vishnu Naresh Boddeti

Introduction

Face recognition systems have become ubiquitous, yet they pose significant privacy risks. These systems typically store "templates"—high-dimensional feature vectors extracted from face images. While these templates are not raw photos, they are far from anonymous. Research indicates that attackers with access to these templates can reconstruct recognizable face images or infer sensitive attributes like age, gender, and ethnicity.

Standard encryption methods like AES protect data at rest, but templates must be decrypted for comparison, creating a window of vulnerability. This paper, authored by Vishnu Naresh Boddeti, addresses this by proposing a framework for secure face matching using Fully Homomorphic Encryption (FHE). The goal is to perform the mathematical operations required for matching—specifically dot products for cosine similarity—directly on encrypted data, ensuring cleartext features are never exposed to the server.

System architecture for secure face matching between a client device and an encrypted database.

Methodology

The core of the proposed solution is the Fan-Vercauteren (FV) scheme, a type of FHE that allows additions and multiplications on ciphertexts. To overcome the significant computational overhead typically associated with FHE, the author introduces three key optimizations:

  1. Batching via Chinese Remainder Theorem (CRT): Instead of encrypting each dimension of a face vector individually, the entire vector is "packed" into a single encrypted polynomial. This enables SIMD-style (Single Instruction, Multiple Data) operations, where one homomorphic multiplication processes all dimensions simultaneously.
  2. Cyclic Rotations: Because the data is packed, the server cannot access individual elements to sum them. The system uses homomorphic cyclic rotations and additions to sum elements within the encrypted block to compute the dot product.
  3. Quantization and Dimensionality Reduction: Real-valued features are mapped to integers, and Principal Component Analysis (PCA) is used to reduce vector sizes, further trimming the computational load.
Efficient encrypted inner product computation using batching and homomorphic rotations.

Evaluation and Results

The framework was evaluated using templates from state-of-the-art models, FaceNet (128-D) and SphereFace (512-D), across standard benchmarks including LFW, IJB-A, IJB-B, and CASIA-WebFace. The results demonstrate that secure face matching is practically viable:

  • Speed: Matching a 512-dimensional SphereFace template takes just 0.01 seconds using the batching scheme, compared to 0.6 seconds for a naive implementation.
  • Memory Efficiency: Batching reduced the encrypted template size from 16.5 MB to just 16 KB.
  • Accuracy: On the LFW dataset, the FHE-secured version achieved 99.11% accuracy, identical to the unencrypted model.
  • Security: The system supports 128-bit to 192-bit security levels under an "honest-but-curious" model, providing mathematical guarantees that the server learns nothing about the face templates.

Discussion and Future Work

A key insight of this work is that FHE's overhead can be effectively amortized by treating the face template as a single unit rather than a collection of numbers. Furthermore, the study shows that high precision is not required; quantizing features to 0.0025 precision maintains full accuracy.

While 0.01 seconds per match is a significant achievement, it remains roughly 1,000x slower than unencrypted matching. This makes the current system ideal for 1:1 verification (e.g., device unlocking) but challenging for large-scale 1:N identification. Future work will explore hardware acceleration via GPUs or FPGAs and encrypted indexing structures to improve scalability for massive databases.

Summary updated

BibTeX
@misc{boddeti2018secure,
  author = {Vishnu Naresh Boddeti},
  title = {{Secure Face Matching Using Fully Homomorphic Encryption}},
  year = {2018},
  eprint = {1805.00577},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.00577},
}
Figure