Skip to content

Security: greenbugx/XVault

Security

SECURITY.md

Security Policy – XVault

🔒 Security Philosophy

XVault is designed under a zero-trust, offline-first security model. The assumption is that attackers may have access to the app binary, source code, and even the device filesystem — but not the user’s biometrics or recovery secrets.

🧱 Security Architecture Overview

1. Master Vault Key (MVK)

  • Randomly generated 256-bit AES key
  • Used to encrypt all vault data
  • Never written to disk in plaintext
  • Exists only in memory during an active session

2. Android Keystore Protection

  • MVK is encrypted (“wrapped”) using a Keystore-managed AES key
  • Key is:
    • Hardware-backed (if supported)
    • Bound to biometric authentication
    • Invalidated if biometrics change

3. Biometric Authentication

  • Required to unwrap the MVK
  • Uses Android BiometricPrompt
  • Strong biometric authenticators only

4. Recovery Mechanism

  • User-defined security question & answer
  • Answer is processed via:
    • PBKDF2WithHmacSHA256
    • 100,000 iterations
    • Random salt
  • Allows MVK recovery if biometric access is lost
  • Recovery data itself is encrypted

5. Data Encryption

  • Algorithm: AES/GCM/NoPadding
  • Tag Length: 128-bit
  • Ensures confidentiality and integrity

6. Integrity & Tamper Detection

  • Vault data is verified before decryption
  • Prevents silent corruption or manipulation

7. Anti-Theft Protections

Vault access is automatically locked if:

  • Biometrics are changed
  • Device security state changes
  • App goes to background
  • Idle timeout is reached

🧠 Threat Model (What This Protects Against)

  • File system access
  • App reverse engineering
  • APK extraction
  • Device theft (without biometrics)
  • Memory scraping after vault lock

❌ Out of Scope / Not Defended Against

  • Compromised OS
  • Kernel-level malware
  • Hardware exploits
  • User willingly sharing recovery answers

📬 Reporting Security Issues

If you discover a security issue, please report it responsibly by opening a private issue or contacting the maintainer.


Security is not a feature — it’s the foundation.

There aren’t any published security advisories