The problem
Passwords can be stolen, but the rhythm of your typing is a behavioral biometric that is hard to imitate: how long you hold each key and the flight time between keys form a timing signature. Keystroke dynamics turns a typed password into a 31-dimensional timing vector and decides whether it matches the enrolled user. The CMU keystroke benchmark (Killourhy & Maxion, Carnegie Mellon) is the standard public dataset — 51 subjects typing the same password 400 times across 8 sessions. This project implements the full authentication pipeline on the benchmark, and makes the biometric tangible with a live demo — type the exact CMU password five times to enroll, then verify a new attempt while the app measures every dwell and flight time with millisecond precision and scores it with a real scaled-Manhattan distance. Because the demo measures genuine keystrokes and states exactly what the classical detector does, the student can defend the whole system in the viva.
How it works
- Raw CMU keystroke records (keydown/keyup timestamps per repetition) are parsed into 31 timing features: dwell times and flight times across the password.
- Features are normalized per user (mean/std scaling from enrollment data only), so the model compares rhythm shape, not absolute typing speed.
- For each user, early repetitions form the enrollment template; later repetitions are genuine test attempts, and other users' repetitions are impostor attempts.
- The scaled-Manhattan detector scores an attempt by its normalized Manhattan distance to the template; a threshold decides genuine vs impostor.
- The evaluation harness sweeps the threshold to build FAR/FRR curves, reads off the equal error rate, and reports zero-miss FAR — repeated per classifier.
- In the web demo, your own keystrokes are timed live, enrolled over five samples, and verified with the same scaled-Manhattan computation the notebook uses.
Tech stack:
- Python 3, NumPy, pandas, scikit-learn
- Jupyter Notebook (benchmark pipeline & evaluation)
- HTML5 + JavaScript (live timing measurement, performance.now)
- Matplotlib (FAR/FRR/ROC plots)
- CMU keystroke dynamics benchmark
Dataset & model details
- Dataset: CMU keystroke dynamics benchmark (Killourhy & Maxion, Carnegie Mellon) — 51 subjects, password ".tie5Roanl" (10 characters), 400 repetitions per subject across 8 sessions, 31 timing features per repetition (dwell + flight times).
- Task: Authentication (verification); input = one 31-D timing vector from a typed password, output = genuine/impostor decision with an anomaly score.
- Model: Classical: scaled-Manhattan detector (per-user mean/std scaling, Manhattan distance, threshold decision). Built-to-order: feed-forward neural network and one-class SVM verifiers compared against the baseline.
- Metrics: Equal error rate (EER) ≤ 8% (design target), zero-miss FAR reported (evaluated), FAR/FRR curves and ROC, enrollment 5–10 repetitions (expected), verification latency < 50 ms (expected). No error rate is claimed as measured until the evaluation harness runs for the order.
| Parameter | Value |
|---|---|
| Input format | 31-D timing vector (dwell + flight, ms) |
| Subjects | 51 typists, 400 repetitions each |
| Password | .tie5Roanl (10 chars, fixed) |
| Equal error rate | ≤ 8% (design target, not a measured claim) |
| Enrollment needed | 5–10 repetitions (expected) |
| Verification latency | < 50 ms (expected) |
| Demo timing source | performance.now() on real keystrokes |
| Metrics reported | FAR / FRR curves, ROC, EER, zero-miss FAR |
Project features
- [Live keystroke biometric demo] Enroll by typing the CMU password five times; every dwell and flight time is measured with performance.now() on your real keystrokes — no simulated data anywhere.
- [Scaled-Manhattan verifier] The classical detector from the keystroke literature: per-user mean/std normalization, Manhattan distance over the 31 timing features, adjustable decision threshold.
- [Timing inspector] Inspect any enrollment sample's dwell and flight times feature by feature, with the normalization statistics shown.
- [CMU benchmark pipeline] Full data loading, per-user enrollment/testing splits and feature extraction over all 51 subjects and 400 repetitions in a reproducible notebook.
- [FAR/FRR evaluation] False-accept and false-reject curves, ROC, equal error rate and zero-miss FAR — the standard biometric evaluation, all reproducible.
- [Stronger classifiers] Neural-net and one-class SVM verifiers compared against the scaled-Manhattan baseline, with the measured improvement documented.
- [Enrollment-size study] Verification error as a function of enrollment repetitions (5–10), answering the practical "how much typing is enough?" question.
What is included
- Complete benchmark pipeline & evaluation Jupyter notebook (FAR/FRR/ROC/EER)
- Trained verifier models (neural net + one-class SVM) with enrollment code
- Live enroll-and-verify + timing inspector + system report web demo
- FAR/FRR curves, ROC plots and enrollment-size study figures
- Project report PDF (biometric background, timing-feature theory, model comparison, methodology, results)
- PPT presentation for final review
- Viva Q&A preparation document (behavioral biometrics, dwell/flight features, FAR vs FRR, EER, impostor evaluation)
Limitations & prerequisites
- Keystroke timing drifts with fatigue, injury, keyboard changes and mood — the report discusses template aging and re-enrollment honestly.
- ≤8% EER is a design target for the evaluation run, stated honestly — the report documents the actual measured figures after the harness runs.
- The CMU password is fixed (.tie5Roanl); free-text keystroke authentication is a harder problem, documented as future scope.
- The demo enrolls with 5 samples, the practical minimum; the benchmark study shows how error falls with more enrollment repetitions.
- Behavioral biometrics are weaker than physiological ones — the report positions keystroke dynamics as a second factor, not a sole authenticator.
Frequently Asked Questions
What is keystroke dynamics?
A behavioral biometric: the rhythm of your typing. Dwell time (how long each key is held) and flight time (key-to-key intervals) are measured per keystroke, forming a timing signature that is difficult for an impostor to reproduce even with the correct password.
What is the CMU benchmark?
The standard public keystroke dataset from Killourhy & Maxion at Carnegie Mellon: 51 subjects each typed the password ".tie5Roanl" 400 times over 8 sessions, with full keydown/keyup timestamps — 31 timing features per repetition.
What is the scaled-Manhattan detector?
The classical verification algorithm: timing features are normalized by the enrolled user's mean and standard deviation, then the Manhattan distance to the template is thresholded. It is simple, fast and the standard baseline every stronger model is compared against.
What do FAR, FRR and EER mean?
False Accept Rate (impostors let in) and False Reject Rate (genuine users locked out) trade off against the decision threshold; the Equal Error Rate is the point where they are equal — the single number that summarizes a verifier.
Does the demo use real keystroke data?
Yes — every timing is measured with performance.now() on your actual keypresses in the browser. There is no simulated data anywhere in the demo.
Is this project suitable for a final-year project?
Yes — for AI/ML, Computer Science and cybersecurity-oriented programs. It demonstrates behavioral biometrics, feature engineering, classifier comparison and a genuinely interactive live demo. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning, Computer Science and Cybersecurity-oriented programs.
Components & software requirements
- Python 3, NumPy, pandas, scikit-learn
- Jupyter Notebook (benchmark pipeline & evaluation)
- HTML5 + JavaScript (live timing measurement, performance.now)
- Matplotlib (FAR/FRR/ROC plots)
- CMU keystroke dynamics benchmark
Dataset & model details
- Dataset: CMU keystroke dynamics benchmark (Killourhy & Maxion, Carnegie Mellon) — 51 subjects, password ".tie5Roanl" (10 characters), 400 repetitions per subject across 8 sessions, 31 timing features per repetition (dwell + flight times).
- Task: Authentication (verification); input = one 31-D timing vector from a typed password, output = genuine/impostor decision with an anomaly score.
- Model: Classical: scaled-Manhattan detector (per-user mean/std scaling, Manhattan distance, threshold decision). Built-to-order: feed-forward neural network and one-class SVM verifiers compared against the baseline.
- Metrics: Equal error rate (EER) ≤ 8% (design target), zero-miss FAR reported (evaluated), FAR/FRR curves and ROC, enrollment 5–10 repetitions (expected), verification latency < 50 ms (expected). No error rate is claimed as measured until the evaluation harness runs for the order.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.