Table of Contents
Fetching ...

CipherFace: A Fully Homomorphic Encryption-Driven Framework for Secure Cloud-Based Facial Recognition

Sefik Serengil, Alper Ozpinar

TL;DR

CipherFace tackles the privacy risks of cloud-based facial recognition by performing distance computations on encrypted embeddings using fully homomorphic encryption, with decryption occurring on the on-premises side. It introduces encrypted distance protocols for both Euclidean and Cosine metrics, including $d^2 = \sum_i (\alpha_i - \beta_i)^2$ for Euclidean and $\theta = 1 - \hat{\alpha} \cdot \hat{\beta}$ for Cosine, where $\hat{\alpha}$ and $\hat{\beta}$ are normalized embeddings. The work delivers a Python-based framework leveraging DeepFace for embeddings and TenSEAL for FHE, and validates the approach across embedding sizes $128d$, $512d$, and $4096d$ with 128-bit security on the LFW dataset. Results show feasible latency with meaningful overhead that grows with embedding size and security level, supporting scalable, privacy-preserving cloud-based facial recognition and broader similarity-search tasks. Future work may further optimize encryption schemes and expand applicability to other privacy-preserving AI use cases.

Abstract

Facial recognition systems rely on embeddings to represent facial images and determine identity by verifying if the distance between embeddings is below a pre-tuned threshold. While embeddings are not reversible to original images, they still contain sensitive information, making their security critical. Traditional encryption methods like AES are limited in securely utilizing cloud computational power for distance calculations. Homomorphic Encryption, allowing calculations on encrypted data, offers a robust alternative. This paper introduces CipherFace, a homomorphic encryption-driven framework for secure cloud-based facial recognition, which we have open-sourced at http://github.com/serengil/cipherface. By leveraging FHE, CipherFace ensures the privacy of embeddings while utilizing the cloud for efficient distance computation. Furthermore, we propose a novel encrypted distance computation method for both Euclidean and Cosine distances, addressing key challenges in performing secure similarity calculations on encrypted data. We also conducted experiments with different facial recognition models, various embedding sizes, and cryptosystem configurations, demonstrating the scalability and effectiveness of CipherFace in real-world applications.

CipherFace: A Fully Homomorphic Encryption-Driven Framework for Secure Cloud-Based Facial Recognition

TL;DR

CipherFace tackles the privacy risks of cloud-based facial recognition by performing distance computations on encrypted embeddings using fully homomorphic encryption, with decryption occurring on the on-premises side. It introduces encrypted distance protocols for both Euclidean and Cosine metrics, including for Euclidean and for Cosine, where and are normalized embeddings. The work delivers a Python-based framework leveraging DeepFace for embeddings and TenSEAL for FHE, and validates the approach across embedding sizes , , and with 128-bit security on the LFW dataset. Results show feasible latency with meaningful overhead that grows with embedding size and security level, supporting scalable, privacy-preserving cloud-based facial recognition and broader similarity-search tasks. Future work may further optimize encryption schemes and expand applicability to other privacy-preserving AI use cases.

Abstract

Facial recognition systems rely on embeddings to represent facial images and determine identity by verifying if the distance between embeddings is below a pre-tuned threshold. While embeddings are not reversible to original images, they still contain sensitive information, making their security critical. Traditional encryption methods like AES are limited in securely utilizing cloud computational power for distance calculations. Homomorphic Encryption, allowing calculations on encrypted data, offers a robust alternative. This paper introduces CipherFace, a homomorphic encryption-driven framework for secure cloud-based facial recognition, which we have open-sourced at http://github.com/serengil/cipherface. By leveraging FHE, CipherFace ensures the privacy of embeddings while utilizing the cloud for efficient distance computation. Furthermore, we propose a novel encrypted distance computation method for both Euclidean and Cosine distances, addressing key challenges in performing secure similarity calculations on encrypted data. We also conducted experiments with different facial recognition models, various embedding sizes, and cryptosystem configurations, demonstrating the scalability and effectiveness of CipherFace in real-world applications.

Paper Structure

This paper contains 8 sections, 8 equations, 1 figure, 2 tables, 3 algorithms.

Figures (1)

  • Figure 1: Facial Recognition Pipeline