# TopoCryptoEEG: End-to-End Encrypted Framework for Brainprint Authentication

> TopoCryptoEEG encrypts preprocessed EEG; feature extraction and matching stay in ciphertext, hiding client-visible embeddings used by FLEA's linear solve. On HGD and BCICIV-2a, single-window CPU inference is >18× faster than the fastest encrypted EEG baseline on average; GPU runs near 14 ms.

- arXiv: https://arxiv.org/abs/2611.31801
- Authors: Qingyu Zeng, Lei Sun, Shuai Zhang, Xiuqing Mao, Ting Zhang, Min Zhao, Wenle Dong
- Published: 2026-11-26
- Topic: Inference & systems
- Visual carousel: https://instaxiv.com/p/2611.31801
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Could 33 scores expose a brainprint template?

**33** queries to reach rank 32 in the tested attack

## Move the trust boundary

![Figure 1](https://cdn.instaxiv.com/figures/2611.31801/figure1.webp)

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. (Figure 1)

## 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

$$
\begin{gathered}\Delta=-2q\,V\,\amber{\mathbf{e}^{T}}\\\amber{\mathbf{e}^{T}}=-\frac{1}{2q}\,V^{-1}\,\Delta\end{gathered}
$$

Here q is windows per request. After query-norm terms are removed, reference subtraction leaves d equations; full-rank V makes them invertible.

- $\Delta$: Reference-subtracted score differences
- $V$: Known mean-query differences
- $\mathbf{e}^{T}$: Registered target template

## The full-rank condition appears in tests

**Theorem:** 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.

**FLEA experiment:** 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

![Figure 3](https://cdn.instaxiv.com/figures/2611.31801/figure3.webp)

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). (Figure 3)

## 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

![Figure 4](https://cdn.instaxiv.com/figures/2611.31801/figure4.webp)

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). (Figure 4)

## 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

| Method | HGD latency (s) | BCICIV-2a latency (s) |
| --- | --- | --- |
| EER baseline | 27.00 | 28.58 |
| **TopoCryptoEEG q=1 (>18× avg.)** | **1.616** | **1.431** |

_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

**One window (q=1):** 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).

**Three consecutive (q=3):** 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

**CPU, q=3:** Mean online time per claim: 1,578 ± 396 ms (HGD), 2,043 ± 18 ms (BCICIV-2a).

**GPU, q=3:** 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.

## Key takeaways

- 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?

## Links

- arXiv: https://arxiv.org/abs/2611.31801
- PDF: https://arxiv.org/pdf/2611.31801

## Citation

```bibtex
@article{zeng2026topocryptoeeg,
  title   = {TopoCryptoEEG: End-to-End Encrypted Framework for Brainprint Authentication},
  author  = {Zeng, Qingyu and Sun, Lei and Zhang, Shuai and Mao, Xiuqing and Zhang, Ting and Zhao, Min and Dong, Wenle},
  journal = {arXiv preprint arXiv:2611.31801},
  year    = {2026},
  url     = {https://arxiv.org/abs/2611.31801}
}
```
