EEG-based biometric authentication binding GPG keys to brainwave patterns
EEG-based biometric authentication that binds GPG private keys to the unique electrical patterns of a user's brain using a NeuroSky TGAM1 headset. The key is never stored in plaintext — it only exists in secure memory for the duration of the session, then is wiped.
Each 1-second epoch produces 25 features: 8 band powers (δ, θ, low-α, high-α, low-β, high-β, low-γ, mid-γ), 3 Hjorth parameters (activity, mobility, complexity), 9 time-domain statistics (mean, SD, median, IQR, kurtosis, skewness, zero-crossing rate, peak-to-peak, RMS), 3 spectral features (spectral entropy, line-noise ratio, band ratios), and 1 time-frequency feature (STFT spectrogram grid).
During enrolment, a 25-dim template is binarised and XORed with a random secret. The commitment and a SHA-256 verification hash are stored on disk (not secret). During authentication, the live template is XORed with the stored commitment, and BCH/Reed-Solomon error correction recovers the original secret with approximately 35% bit-flip tolerance. The recovered secret decrypts the GPG key blob (AES-256-GCM).
A three-layer MLP (25 → 64 → 64 → 32 → 1) trained with binary cross-entropy distinguishes the enrolled user from others. The model is exported to ONNX for inference without a PyTorch dependency. On a dataset of 64,872 negative samples, the classifier achieves a 99.61% true positive rate and 99.84% true negative rate at a 60% decision threshold.