← Latest papers
💻 computer science

Privacy-Preserving Keystroke Dynamics Authentication Using CKKS Homomorphic Encryption

This paper presents a privacy-preserving keystroke dynamics authentication system implemented using the CKKS homomorphic encryption scheme, which enables secure template matching via encrypted squared Euclidean distance calculations while ensuring biometric vectors remain confidential throughout the process.

Original authors: Nipun Mahaarachchi

Published 2026-07-22
📖 5 min read🧠 Deep dive

Original authors: Nipun Mahaarachchi

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to unlock a secret club, but instead of a key or a password, the bouncer checks how you type. This is called keystroke dynamics, a way of identifying people by their unique typing rhythm—how fast they press keys, how long they hold them down, and the tiny pauses between letters. It's like a digital fingerprint made of time. However, there's a catch: to check if your rhythm matches the club's records, the computer usually has to peek at your typing data in plain sight. If a hacker steals that data, they can't just change it like a password; your typing style is permanent.

To solve this, scientists use a magical trick called homomorphic encryption. Think of this as a locked, opaque box. You can put your data inside, and the computer can do math on the box without ever opening it or seeing what's inside. It's like a chef who can chop, mix, and bake ingredients while they are still sealed inside a glass jar, but the jar is made of lead so no one can see the ingredients, only revealing the final cake at the very end. This paper explores how to use this "locked box" magic specifically for typing rhythms, ensuring that your secret typing style stays hidden even while the computer checks if you are who you say you are.


The Paper's Big Idea: A Secret Typing Test in a Locked Box

The researchers, led by Nipun Mahaarachchi, built a working prototype that combines these two ideas: the unique rhythm of how you type a specific word and the "locked box" math of homomorphic encryption. They didn't invent a new type of magic box; instead, they figured out how to make the box small and light enough to be practical.

Here is how their system works, step-by-step:

1. The "Seven-Step" Dance
Most biometric systems use huge, complex data (like 3D face scans) that are heavy and hard to lock up. This team chose something tiny: the word "password." When you type this eight-letter word, the system doesn't look at the letters themselves. It only watches the time it takes to press each key. Since there are eight keys, there are seven gaps (or intervals) between them. This creates a tiny list of seven numbers.

2. The "Standardized" Rhythm
Everyone types at different speeds. One day you might be rushing; another day, you might be tired. To fix this, the system takes your typing times and "normalizes" them. It's like a dance instructor telling you, "It doesn't matter how fast you dance, just keep the same rhythm as your first practice." The system calculates the average rhythm and the usual variation from your practice sessions, then adjusts your new typing attempt to match that standard.

3. The Locked Box Match
This is where the magic happens.

  • Enrollment: You type the word a few times to teach the system your rhythm. The system turns this into a "template" (a secret recipe of your rhythm) and locks it inside a cryptographic box using a method called CKKS.
  • Login: When you try to log in later, the system locks your new typing rhythm in a second box.
  • The Math: The computer takes both locked boxes and performs a special math operation called "squared Euclidean distance." It subtracts the numbers, squares the results, and adds them up—all while the data remains encrypted inside the boxes. The computer never sees the actual numbers; it only sees the math happening on the locked containers.

4. The Final Reveal
Once the math is done, the computer has a single number: the "distance score." This number tells the system how different your new typing rhythm is from your old one.

  • If the score is low (meaning you typed very similarly), the box is opened just enough to reveal that small number, and the system says ACCEPT.
  • If the score is high (meaning the rhythm is totally different, like an impostor), the system says REJECT.

What They Found (and What They Didn't)
The authors tested this with a "proof-of-concept" (a working model to see if the idea is possible). They ran simulations with real typing data and also created fake "impostor" data to see if the system would catch them.

  • The Result: The system worked. It successfully distinguished between the real user and the fake impostor. The "locked box" math only required 20 operations (7 subtractions, 7 squarings, and 6 additions) because the data list was so short (just 7 numbers).
  • The Limitation: The paper is very clear that this is not a finished product ready for the whole world yet. It was tested on a single computer with a fixed word and a small number of test runs. The authors admit they haven't proven it works perfectly for thousands of different people or different devices yet. They also note that while the matching happens in the locked box, the raw typing data is still visible in the web browser before it gets locked up.

Why This Matters
The main takeaway is that by choosing a simple, low-dimensional feature (just 7 timing numbers), they made the "locked box" math fast and light. Usually, encrypting complex data is slow and heavy, like trying to carry a heavy safe. By using a tiny vector, they showed that you can have strong privacy without the system dragging its feet.

The authors suggest that this approach could be a stepping stone toward a future where your digital identity is protected by "post-quantum" security (security that even future super-computers can't break), but they emphasize that more testing with many users is needed before this becomes a standard way to log in. For now, it's a successful experiment showing that privacy and speed can coexist in the world of typing-based security.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →