Back to Projects
CompletedFinal mark: 87%

Keystroke Dynamics Authentication

Final year dissertation project developing a continuous user authentication system using behavioural biometrics and keystroke dynamics, with machine learning-based validation under multiple test scenarios.

Pythonscikit-learnFirebaseGitHub
GitHubDemo: Coming Soon

Project Overview

Problem: Traditional authentication methods such as passwords verify identity only at login and do not continuously confirm that the current user is still authorised.

Why I built it: This was my final year dissertation project to investigate whether keystroke dynamics could support continuous user authentication through machine learning and real-time behavioural analysis.

Intended for: Academic evaluators, security researchers and developers interested in behavioural biometrics, continuous authentication and applied machine learning.

Key Features

Final year dissertation

Academic research project submitted as part of BSc (Hons) Computer Security at LJMU.

Behavioural biometrics

Uses keystroke timing patterns as a behavioural signal for user identification.

Continuous authentication

Designed to validate user identity during active sessions rather than only at login.

Keystroke metrics collection

Collects and processes keystroke metrics including flight times and bi-gram counts for feature extraction.

SVM and One-Class SVM modelling

Implements Support Vector Machine models for authentication, including dedicated modules such as theSVM.py, onewithSVM.py and SVM.py.

Session and task management

Includes session handling, task coordination and authentication management across live test scenarios.

Technologies

Python
scikit-learn
Firebase
GitHub

Screenshots

User interface — replace with /images/projects/keystroke-dynamics/user-interface.png
SVM testing output — replace with /images/projects/keystroke-dynamics/svm-testing.png
Session management view — replace with /images/projects/keystroke-dynamics/session-manager.png

Technical Challenges

Feature extraction from keystroke data

Challenge
Raw keystroke data needed to be converted into meaningful features such as bi-gram counts and flight times before model training.
Solution
Built dedicated preprocessing and metrics scripts (including bigramcounts.py and flighttimestat.py) to prepare data for the SVM pipeline.
What I learned
How feature engineering quality directly affects behavioural biometric model performance.

Continuous authentication workflow

Challenge
The system needed to manage live sessions, collect data during use and apply authentication checks without disrupting usability.
Solution
Integrated sessionManager.py, authenticationManager.py and userInterface.py to coordinate continuous authentication testing.
What I learned
Continuous authentication requires careful session design as well as accurate modelling.

Model training and live testing

Challenge
The SVM model had to be trained, serialized and validated in separate testing environments.
Solution
Separated model training (modelTraining) from live continuous authentication testing (forLiveCUA_Test), including a serialized svm11.pkl model for deployment.
What I learned
Clear separation between training pipelines and live testing improves reliability and evaluation.

Future Improvements

  • Deep learning techniques for improved pattern recognition
  • Multi-factor authentication integration
  • Expanded evaluation across larger user datasets
  • Improved real-time performance monitoring
  • Enhanced privacy controls for stored behavioural data

GitHub

Programming language
Python
Licence
MIT