System Architecture

Overview

FaceVault is a secure file encryption and decryption web application that uses face recognition as a second-factor authentication mechanism. The system implements end-to-end encryption with client-side key management and biometric-based key unlocking.

System Components

1. Frontend Application

2. Face Detection and Recognition

3. Cryptographic Operations

4. Local Storage

5. Backend API Server

6. Database

7. File Storage

Data Flow

User Registration

  1. User provides credentials.
  2. Client generates RSA key pair.
  3. User enrolls face; Private key is wrapped with face-derived Key Encryption Key (KEK).
  4. Public key and wrapped private key stored on server.
  5. Face templates stored locally in IndexedDB.

File Encryption

  1. Client generates random AES key.
  2. File is encrypted with AES key.
  3. AES key is encrypted with user's public key.
  4. Encrypted file and metadata sent to server.

File Decryption

  1. Server returns encrypted file and metadata.
  2. User performs face authentication to derive KEK.
  3. KEK unwraps private key.
  4. Private key decrypts AES key.
  5. AES key decrypts file content.

Security Model

Zero-Knowledge Architecture

Key Management