TopoCryptoEEG: End-to-End Encrypted Framework for Brainprint Authentication
Zeng et al. in Inference & systems
Could 33 scores expose a brainprint template?
TopoCryptoEEG: End-to-End Encrypted Framework for Brainprint Authentication
Move the trust boundary

The feature-level design extracts identity features on the client, then encrypts them. In TopoCryptoEEG, the client encrypts preprocessed EEG; CKKS homomorphic encryption lets the server extract and match in ciphertext.
Why FLEA scores can reveal a template
- 1
Known embeddings
FLEA (feature-level encrypted authentication) leaves the extractor client-side, so the client knows each plaintext query embedding.
- 2
Cancel fixed terms
Remove known query-norm terms and subtract a reference score; the registered template norm and threshold cancel.
- 3
Invert the differences
Residual scores are linear in the template; full-rank query-embedding differences uniquely determine its 32 coordinates.
The attack reduces to matrix inversion
Here q is windows per request. After query-norm terms are removed, reference subtraction leaves d equations; full-rank V makes them invertible.
- Δ
- Reference-subtracted score differences
- V
- Known mean-query differences
- eT
- Registered target template
The full-rank condition appears in tests
Exact continuous scores plus full-rank known query differences uniquely recover a d-dimensional template in d+1 requests; for d=32, that is 33.
With three windows per request, all 91 HGD and 40 BCICIV-2a source–target pairs reached rank 32 by request 33; mean relative errors were 1.850×10⁻³ and 4.080×10⁻⁴, respectively. Conditioning affected the worst cases.
Multi-Window Topology-Aware Encoding

MWTE maps multiband EEG features from each window onto scalp grids, pools and splits them into four ordered patches. In q=1, removing topology lowers AUC: 99.50%→97.48% (HGD), 96.21%→89.65% (BCICIV-2a).
TopoFuse-MLP keeps encrypted inference shallow
- 1
Local branches
Each of four ordered patches passes through two linear layers, each followed by an elementwise square.
- 2
Fuse once
A linear fusion maps four 32-value outputs to one 32-dimensional identity embedding.
- 3
Keep depth low
Fusion adds no further nonlinearity, limiting ciphertext multiplicative depth.
- 4
Score the claim
Shared weights yield encrypted squared distances; the server averages over windows and templates and subtracts the offline threshold. The client accepts a negative decrypted score.
Pack windows and patches into safe lanes

Three windows and four patches give 12 window–patch lanes; QPCP packs them into one ciphertext (12 encryptions → 1). LP-BSGS maps logical r to physical 16r; ablations cut rotations 3,219 (H0) → 243 (H2) → 57 (H3).
Where the evidence stops
Threat model
CKKS confidentiality relies on semantic security, an uncompromised client key, and no side channels; parties are semi-honest and non-colluding.
Attack scope
Hidden embeddings block FLEA's known-feature solve. Under stated sign symmetry, scores cannot fix absolute template coordinates; other score attacks are outside scope.
Test population
Test subjects are distinct from calibration but were represented in training; this is seen-identity cross-session evaluation on HGD and BCICIV-2a.
Timing boundary
Online latency excludes signal acquisition, transmission, query-patch construction, training, enrollment and threshold calibration; GPU inference used 22.26 GiB on an RTX 4090D.
Single-window encrypted inference is faster
q=1; online s/claim. EER is a related encrypted-EEG baseline, not brainprint-specific. HGD/BCICIV-2a encrypted-scheme tables.
Three windows sharpen authentication
Mean EER: TopoCryptoEEG 3.15% ± 0.56% / 9.96% ± 0.22%; CryptoFace, best encrypted baseline: 4.75% ± 0.83% / 33.48% ± 1.63% (HGD / BCICIV-2a).
TopoCryptoEEG EER fell to 1.21% ± 0.28% / 6.45% ± 0.88%; true-accept rate at 1% false accepts rose by 6.67 / 21.39 percentage points from q=1.
GPU inference brings encrypted scoring to milliseconds
Mean online time per claim: 1,578 ± 396 ms (HGD), 2,043 ± 18 ms (BCICIV-2a).
14.13 ± 0.22 ms (HGD) and 14.05 ± 0.10 ms (BCICIV-2a), 111.7×/145.4× CPU speedups. FLEA takes 13.5/12.9 ms but leaves extraction plaintext on the client.
Why it matters
- Encrypt before identity extraction: it removes the client-visible query embeddings required by this specific FLEA linear solve.
- The full co-designed pipeline measured 1–2 s per CPU claim and about 14 ms per GPU claim in these tests.
- Open question: do security and authentication accuracy extend to unseen identities, other EEG datasets, or adversaries beyond the semi-honest model?
13 slides, 3 min
6 days ago