Benchmarks: LockRoot Cryptographic Performance

This document outlines the performance benchmarks gathered during the development of LockRoot. All cryptographic parameters were explicitly chosen to balance user experience against the mathematical cost required for an attacker to perform offline brute-forcing.

1. Key Derivation: Argon2id

Argon2id (RFC 9106) is the core mechanism defending the local vault against parallelized GPU cracking attempts.

Configured Parameters (V2 Vault Envelope)

  • Memory Cost: 64 MiB (65,536 KiB)
  • Time Cost (Iterations): 3
  • Parallelism: 2 Lanes
  • Hash Length: 32 bytes (256 bits)

Execution Time Benchmarks

The target baseline execution time for the key derivation function on a mobile device is 500ms to 1000ms (0.5 – 1.0 seconds).

  • Mid-Range Android (ARMv8, e.g., Snapdragon 6-series): ~600ms - 850ms
  • Modern iOS (A15 Bionic and newer): ~300ms - 450ms
  • Desktop PC (Modern x86_64, Windows/.NET): ~150ms - 250ms

The Attacker Cost

While 800ms is imperceptible to a legitimate user unlocking their vault once, the 64 MiB memory requirement severely bottlenecks an attacker. A high-end consumer GPU like the NVIDIA RTX 4090 (24 GB VRAM) can theoretically load a maximum of ~384 concurrent threads. Unlike PBKDF2, which allows millions of hashes per second, Argon2id effectively reduces the attacker’s hash rate to a few hundred hashes per second, making a 12-character master password computationally unfeasible to crack.

2. Vault Decryption Latency (AES-256-GCM)

Once the 256-bit key is derived via Argon2id, the AES-GCM decryption occurs. Because AES is hardware-accelerated across all target platforms, decryption time is negligible and scales linearly with vault size.

  • Average Vault (100 - 500 entries, ~50KB ciphertext): < 5ms
  • Large Vault (2000+ entries, ~250KB ciphertext): < 15ms

This near-instant decryption guarantees that the UI unlock latency is entirely dictated by the Argon2id security parameters.

3. Cryptographic Migration Overhead (XChaCha20 to AES-GCM)

When the mobile app detects a legacy V1 vault (XChaCha20), it performs an opportunistic in-memory migration to the V2 AES-256-GCM envelope.

  • Migration Latency: < 20ms (total time to re-encrypt a 50KB payload and serialize the new JSON envelope).

This operation occurs asynchronously post-unlock, ensuring the user experiences zero perceptible delay during the protocol upgrade process.