Inspiration
Biometric authentication has an interesting privacy problem: to verify someone's identity, systems generally need access to some representation of their biometric data.
Even if raw EEG recordings are discarded, the generated biometric embeddings are still sensitive. If someone obtains those templates, they could potentially misuse them.
I wanted to explore a different approach: what if biometric templates could remain encrypted even while being used for identity verification?
This led me to combine EEG-based biometric authentication with Fully Homomorphic Encryption (FHE).
What it does
This project explores privacy-preserving EEG biometric verification using encrypted identity templates.
The system uses an ArcFace-inspired EEG encoder to transform brainwave recordings into compact, normalized identity embeddings.
Instead of storing and comparing biometric templates entirely in plaintext, the embeddings are encrypted using CKKS homomorphic encryption through TenSEAL.
The system can perform similarity arithmetic on encrypted biometric representations without first exposing the underlying templates.
The current prototype focuses on encrypted template comparison, rather than fully homomorphic neural network inference.
How we built it
I started with an existing EEG biometric encoder trained using SSVEP recordings.
The encoder produces a compact 32-dimensional normalized embedding from an eight-channel EEG input.
I then integrated a CKKS encryption workflow using TenSEAL.
The pipeline consists of:
- EEG recordings are processed by the trained neural network.
- The encoder generates a normalized biometric embedding.
- The embedding is encrypted using CKKS.
- Homomorphic operations are used to calculate similarity between encrypted representations.
- The resulting similarity score is decrypted locally by the verification API.
I experimented with different CKKS polynomial modulus degrees, encryption parameters, scaling and multiplication operations to understand the practical constraints of encrypted biometric computation.
Challenges we ran into
The biggest challenge was the computational overhead introduced by encryption.
Unlike ordinary floating-point arithmetic, CKKS introduces approximate numerical computation, scaling requirements and ciphertext noise.
Multiplication and rescaling require careful parameter selection. Some configurations also resulted in scale-related errors.
Another important challenge was deciding what actually needed encryption. Encrypting neural network weights, performing encrypted neural inference and encrypting biometric templates are three different problems.
I focused this implementation on encrypted biometric templates and similarity computation rather than claiming to have implemented fully encrypted model inference.
Accomplishments that we're proud of
- Built an EEG biometric encoder producing compact 32-dimensional identity representations.
- Integrated CKKS homomorphic encryption using TenSEAL.
- Implemented an encrypted-template similarity computation workflow.
- Explored different polynomial modulus degrees and CKKS parameter configurations.
- Connected encrypted biometric computation to a local verification API.
- Demonstrated how biometric similarity operations can be performed without directly exposing the underlying templates during computation.
The most important accomplishment was bringing together EEG biometrics and practical homomorphic encryption in one experimental system.
What we learned
I learned that privacy-preserving computation involves much more than simply encrypting data before storing it.
Encryption parameters, numerical precision, multiplicative depth, ciphertext noise and computational overhead all influence whether a system is practical.
I also learned to distinguish between protecting biometric templates at rest, performing operations on encrypted templates and running an entire neural network on encrypted inputs.
These are different levels of privacy protection, each with its own engineering challenges.
What's next for engram
I want to investigate whether this architecture can be extended towards more complete privacy-preserving biometric verification.
Some directions include encrypted threshold comparisons, reducing ciphertext computation overhead, exploring alternative CKKS configurations and eventually investigating encrypted neural inference.
The longer-term vision is to make biometric identity representations portable and usable across different applications without requiring those applications to have access to the user's underlying biometric templates.
This is an ongoing independent research project exploring the intersection of neuroscience, biometrics and privacy-preserving cryptography.
Built With
- arcface
- biometrics
- deep-learning
- eeg
- fastapi
- fhe
- machine-learning
- neuroscience
- numpy
- python
- pytorch
- scipy
- signal-processing
Log in or sign up for Devpost to join the conversation.