Built to order

Keystroke Dynamics Authentication using Machine Learning

This project builds a keystroke-dynamics authentication system that verifies identity from typing rhythm — key-hold (dwell) and key-to-key (flight) times — trained and evaluated on the CMU keystroke benchmark. It ships with a complete data pipeline on the 51-subject benchmark, a reproducible evaluation with FAR/FRR curves, ROC and equal error rate, and a live web demo that measures your real keystroke timings and verifies you with the classical scaled-Manhattan detector. The biometric theory, feature design and evaluation protocol are documented for a confident viva. Suitable for B.E./B.Tech

Keystroke Dynamics Authentication using Machine Learning — project thumbnail preview
More project photos (2)

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

  1. Raw CMU keystroke records (keydown/keyup timestamps per repetition) are parsed into 31 timing features: dwell times and flight times across the password.
  2. Features are normalized per user (mean/std scaling from enrollment data only), so the model compares rhythm shape, not absolute typing speed.
  3. For each user, early repetitions form the enrollment template; later repetitions are genuine test attempts, and other users' repetitions are impostor attempts.
  4. The scaled-Manhattan detector scores an attempt by its normalized Manhattan distance to the template; a threshold decides genuine vs impostor.
  5. 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.
  6. 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.

Download abstract (PDF)

Related guides

All guides
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Illustration of Whisper speech-to-text showing sound waves flowing into a neural network and emerging as transcribed text with timestamps and speaker labels.B.E./B.Tech Computer Science and AI/ML students adding speech-to-text to projects — voice assistants, meeting transcription, accessibility tools

Whisper for Speech-to-Text in Student Projects

Whisper transcribes speech in dozens of languages with no training required. This guide covers how it works, choosing among model sizes, running it locally with faster-whisper, handling hour-long audio, timestamps and speaker diarization, multilingual quirks, and honest evaluation with word error rate.

Read guide
Get a quotation