{"id":30104238,"url":"https://github.com/esr-style/surakshamitra","last_synced_at":"2026-07-16T23:34:49.637Z","repository":{"id":306291569,"uuid":"1011973432","full_name":"ESR-style/SurakshaMitra","owner":"ESR-style","description":"This project implements a real-time behavioral and cognitive authentication system for mobile apps, focused on user verification through subtle patterns like typing cadence, swipe behavior, and hesitation flow. It can authenticate users accurately with as few as 7 samples.","archived":false,"fork":false,"pushed_at":"2025-12-18T06:58:04.000Z","size":569,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-21T15:24:37.787Z","etag":null,"topics":["behaviour","ml","security"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ESR-style.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,"zenodo":null}},"created_at":"2025-07-01T15:58:04.000Z","updated_at":"2025-12-18T06:58:07.000Z","dependencies_parsed_at":"2025-07-24T22:12:51.853Z","dependency_job_id":"a02cc277-0e17-454f-99d8-7284fdd0e555","html_url":"https://github.com/ESR-style/SurakshaMitra","commit_stats":null,"previous_names":["esr-style/surakshamitra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ESR-style/SurakshaMitra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESR-style%2FSurakshaMitra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESR-style%2FSurakshaMitra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESR-style%2FSurakshaMitra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESR-style%2FSurakshaMitra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ESR-style","download_url":"https://codeload.github.com/ESR-style/SurakshaMitra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ESR-style%2FSurakshaMitra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35560452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["behaviour","ml","security"],"created_at":"2025-08-09T22:32:16.689Z","updated_at":"2026-07-16T23:34:49.619Z","avatar_url":"https://github.com/ESR-style.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡️ SurakshaMitra: Advanced Cognitive-Behavioral Continuous Authentication Framework for Mobile Devices\n\n[![Expo Build](https://img.shields.io/badge/Expo-Build%20Ready-blue)](https://expo.dev/accounts/esr-style/projects/my-expo-app/builds/93d417e8-89ca-4352-9353-e038bbf83432)\n[![React Native](https://img.shields.io/badge/React%20Native-0.79.5-blue.svg)](https://reactnative.dev/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.8.3-blue.svg)](https://www.typescriptlang.org/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n\u003e *Revolutionizing mobile security through multi-layered cognitive-behavioral biometric authentication with breakthrough low-dataset machine learning models*\n\n## 🌟 Overview\n\n**SurakshaMitra** (Sanskrit: *Guardian Friend*) is a cutting-edge mobile security framework that implements **continuous authentication** through multiple sophisticated security layers. This innovative system combines physical device security, behavioral biometrics, and cognitive psychology to create an unprecedented level of mobile device protection.\n\n### 🎯 Key Innovations\n\n- **🧠 Cognitive Layer Authentication**: Leverages human psychology and reflexive responses\n- **📱 Behavioral Biometric Analysis**: Advanced keystroke dynamics and touch pattern recognition\n- **🔍 Physical Security Detection**: Comprehensive device integrity verification\n- **🤖 Breakthrough ML Model**: Siamese neural network inspired binary classification method achieving high accuracy with just **7 training samples**\n- **⚡ Continuous Authentication**: Real-time security monitoring without user friction\n\n---\n\n## 📱 Quick Start\n\n### Installation Options\n\n#### Option 1: Install Pre-built APK (Recommended)\nDownload and install the latest build:\n```\nhttps://expo.dev/accounts/esr-style/projects/my-expo-app/builds/93d417e8-89ca-4352-9353-e038bbf83432\n```\n\n#### Option 2: Local Development\n```bash\n# Clone the repository\ngit clone https://github.com/ESR-style/SurakshaMitra.git\ncd SurakshaMitra/app/my-expo-app\n\n# Install dependencies\nnpm install\n\n# Start the development server\nnpx expo start\n\n# Launch on Android\n# Press 'a' for Android emulator or USB-connected device\n```\n\n### Prerequisites\n- Node.js 18+ \n- Expo CLI\n- Android Studio (for emulator) or physical Android device\n- **Separate Backend Server** (required for authentication models)\n\n---\n\n## 🏗️ Multi-Layered Security Architecture\n\nSurakshaMitra implements a revolutionary **three-tier security framework** that continuously validates user authenticity through multiple behavioral and physical indicators.\n\n### 🔒 Layer 1: Physical Security Detection\n\nThe foundation layer performs comprehensive device integrity analysis:\n\n#### Device Integrity Verification\n- **Root Detection**: Advanced multi-vector root detection using system property analysis\n- **Emulator Detection**: Sophisticated emulator identification through hardware fingerprinting\n- **Developer Mode Monitoring**: Real-time detection of USB debugging and development settings\n- **Smart Sensor Analysis**: Accelerometer, gyroscope, and magnetometer pattern validation\n\n#### Hardware Fingerprinting\n- **User-Agent Verification**: Device model and manufacturer validation\n- **Hardware Sensor Authenticity**: Sensor noise pattern analysis to distinguish real devices\n- **System Property Inspection**: Deep analysis of Android build properties and system characteristics\n\n```typescript\n// Physical layer detection metrics\ninterface SecurityMetrics {\n  isEmulator: boolean;\n  isRooted: boolean;\n  isDeveloperMode: boolean;\n  deviceFingerprint: string;\n  sensorAuthenticity: number;\n  hardwareValidation: boolean;\n}\n```\n\n### 🧬 Layer 2: Behavioral Biometric Authentication\n\n#### Advanced Keystroke Dynamics\nOur proprietary keystroke analysis captures over **25+ behavioral metrics**:\n\n- **Temporal Patterns**:\n  - Dwell time (key press duration)\n  - Flight time (inter-key intervals)\n  - Typing rhythm and cadence\n  - Pause patterns and hesitations\n\n- **Touch Biometrics**:\n  - Pressure sensitivity analysis\n  - Touch area and finger contact patterns\n  - Coordinate precision and drift\n  - Multi-touch gesture characteristics\n\n- **Error Recovery Patterns**:\n  - Backspace usage frequency\n  - Correction timing and methodology\n  - Error pattern consistency\n  - Recovery behavior analysis\n\n#### Machine Learning Innovation\nOur **breakthrough Neural Network** model achieves:\n- ✅ **High Accuracy** with minimal training data\n- ✅ **Only 7 samples required** for user authentication\n- ✅ **Real-time inference** capabilities\n- ✅ **Adaptive learning** for improved accuracy over time\n\n```typescript\n// Behavioral metrics captured\ninterface BiometricData {\n  flightTimes: number[];\n  dwellTimes: number[];\n  pressureVariance: number;\n  touchAreaVariance: number;\n  sessionEntropy: number;\n  typingPatternVector: number[];\n  errorRecoveryMetrics: object;\n}\n```\n\n### 🧠 Layer 3: Cognitive Authentication\n\n#### Psychological Response Analysis\nLeveraging principles of **cognitive psychology** and human reflexive behavior:\n\n- **Contextual Decision Making**: Time-sensitive security questions that test natural human responses\n- **Reflex Pattern Analysis**: Measuring decision-making speed and consistency\n- **Cognitive Load Assessment**: Analyzing response patterns under different mental states\n- **Habituation Detection**: Identifying learned vs. natural response patterns\n\n#### Continuous Cognitive Monitoring\n- **Two-Factor Authentication Preferences**: User choice patterns and consistency\n- **WiFi Safety Decisions**: Network selection behavior analysis\n- **Navigation Method Preferences**: UI interaction pattern recognition\n- **First Action Tendencies**: Initial response behavior in security scenarios\n\n```typescript\n// Cognitive layer metrics\ninterface CognitiveMetrics {\n  decisionLatency: number;\n  choiceConsistency: number;\n  reflexiveResponse: boolean;\n  cognitiveLoad: number;\n  behaviorPattern: string;\n}\n```\n\n---\n\n## 🔬 Technical Implementation\n\n### Backend Architecture\n- **Separate Backend Required**: The ML models and authentication logic run on an independent server\n- **API Endpoints**: RESTful APIs for real-time authentication\n- **Model Training**: Continuous learning pipeline for user adaptation\n- **Data Security**: Encrypted communication and secure data handling\n\n### Frontend Framework\n- **React Native + Expo**: Cross-platform mobile development\n- **TypeScript**: Type-safe development\n- **Real-time Data Collection**: High-frequency sensor and input monitoring\n- **Secure Storage**: Local data encryption and secure transmission\n\n### Machine Learning Pipeline\n```\nData Collection → Feature Extraction → NN → Binary Classification → Continuous Learning\n```\n\n---\n\n## 📊 Metrics \u0026 Analytics\n\n### Captured Biometric Features\n| Category | Metrics | Count |\n|----------|---------|-------|\n| **Keystroke Dynamics** | Dwell times, flight times, rhythm patterns | 8+ |\n| **Touch Biometrics** | Pressure, area, coordinates, gestures | 7+ |\n| **Behavioral Patterns** | Error recovery, typing speed, consistency | 6+ |\n| **Cognitive Responses** | Decision timing, choice patterns, reflexes | 4+ |\n| **Device Characteristics** | Hardware fingerprint, sensor data | 5+ |\n\n### Performance Metrics\n- **Authentication Accuracy**: \u003e85% with just 7 training samples\n- **Response Time**: \u003c100ms for real-time decisions\n- **Battery Impact**: \u003c1% additional drain\n\n---\n\n### Research Collaboration\nFor academic partnerships and research collaboration opportunities, please reach out through my mail.\n\n---\n\n---\n\n## 🏆 Acknowledgments\n\n- **Siamese Neural Network Research**: Inspiration from breakthrough biometric authentication research\n- **Behavioral Biometrics Community**: Ongoing research in keystroke dynamics\n- **Mobile Security Researchers**: Contributions to device integrity detection methods\n- **Cognitive Psychology**: Integration of human behavioral patterns in security\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n### 🛡️ *\"Security through Understanding Human Behavior\"*\n\n**SurakshaMitra** - *Where Technology Meets Psychology for Ultimate Mobile Security*\n\n![Made with ❤️ in India](https://img.shields.io/badge/Made%20with%20%E2%9D%A4%EF%B8%8F%20in-India-orange)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesr-style%2Fsurakshamitra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesr-style%2Fsurakshamitra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesr-style%2Fsurakshamitra/lists"}