{"id":28300501,"url":"https://github.com/miyoku1226/secure-keystroke-auth","last_synced_at":"2026-03-14T01:07:47.592Z","repository":{"id":276040116,"uuid":"928013959","full_name":"miyoku1226/secure-keystroke-auth","owner":"miyoku1226","description":"This project explores keystroke dynamics as an additional security layer for passphrase-based authentication.","archived":false,"fork":false,"pushed_at":"2025-04-06T03:56:14.000Z","size":1296,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T19:48:44.725Z","etag":null,"topics":["cybersecurity","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyoku1226.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T23:06:35.000Z","updated_at":"2025-04-07T04:11:17.000Z","dependencies_parsed_at":"2025-03-28T00:36:02.688Z","dependency_job_id":null,"html_url":"https://github.com/miyoku1226/secure-keystroke-auth","commit_stats":null,"previous_names":["miyoku1226/secure-keystroke-auth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miyoku1226/secure-keystroke-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyoku1226%2Fsecure-keystroke-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyoku1226%2Fsecure-keystroke-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyoku1226%2Fsecure-keystroke-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyoku1226%2Fsecure-keystroke-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyoku1226","download_url":"https://codeload.github.com/miyoku1226/secure-keystroke-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyoku1226%2Fsecure-keystroke-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260251150,"owners_count":22980977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cybersecurity","python"],"created_at":"2025-05-23T17:24:44.149Z","updated_at":"2026-03-14T01:07:47.521Z","avatar_url":"https://github.com/miyoku1226.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure Keystroke Authentication\nSecure Keystroke Authentication is a biometric-based authentication system that leverages keystroke dynamics to enhance security. By analyzing typing patterns, such as key press durations and transition times, this project aims to provide an additional layer of authentication beyond traditional password-based methods.\n\n## Features\n- Collects keystroke timing data to create a unique user profile.\n- Trains a machine learning model (Support Vector Machine) for user authentication.\n- Detects unauthorized users based on typing behavior.\n- Lightweight and does not require additional hardware.\n\n## Technologies Used\n\n- **Python**\n- **NumPy, Pandas**\n- **Scikit-learn** – logistic regression model\n- **TensorFlow / Keras** – simple feedforward neural network\n\n## How It Works\n\n### 1. **Keystroke Timing Feature Extraction**\n- Each typing session records:\n  - **Hold time** (key down → key up)\n  - **Latency** (delay between keys)\n  - **Flight time** (key up → next key down)\n\n### 2. **Data Preprocessing**\n- Clean input data\n- Normalize timing features\n- Balance dataset if needed\n\n### 3. **Model Training**\n- Logistic Regression (scikit-learn)\n- Neural Network (TensorFlow)\n- Compare performance on accuracy \u0026 generalization\n\n### 4. **Prediction**\n- Real-time or simulated user input is passed into the model\n- Model returns a binary classification: “user” or “intruder”\n\n## Project Structure\n```\n├── collected_data.py       # Script to collect keystroke data\n├── train_model.py          # Script to train SVM model for authentication\n├── keystroke_auth.py       # Main authentication script\n├── requirements.txt        # Required dependencies\n├── README.md               # Project documentation\n└── research_paper.pdf      # Research paper detailing the project\n```\n\n## Installation\n### Clone the Repository\n```sh\n git clone https://github.com/miyoku1226/secure-keystroke-auth.git\n cd secure-keystroke-auth\n```\n\n### Install Dependencies\n```sh\npip install -r requirements.txt\n```\n\n## Usage\n### Collect Keystroke Data\nRun the script to record typing behavior for different users:\n```sh\npython collected_data.py\n```\n\n### Train the Authentication Model\nAfter collecting sufficient data, train the SVM model:\n```sh\npython train_model.py\n```\n\n### Authenticate a User\nOnce the model is trained, run the authentication process:\n```sh\npython keystroke_auth.py\n```\n\n## Example Results\n| Model      | Accuracy | False Accept Rate (FAR) | False Reject Rate (FRR) |\n|------------|----------|-----------------|-----------------|\n| SVM        | 85%      | 5%              | 10%             |\n| KNN        | 81%      | 7%              | 12%             |\n\n## Future Improvements\n- Improve accuracy by testing with a larger dataset.\n- Implement additional classification models (e.g., neural networks).\n- Develop a GUI for user-friendly interaction.\n- Test the system on different keyboard layouts and devices.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyoku1226%2Fsecure-keystroke-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyoku1226%2Fsecure-keystroke-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyoku1226%2Fsecure-keystroke-auth/lists"}