Project QRE Blog

Updates, Research, and Technical Deep Dives

Paranoid Mode: The Cryptography of Human Entropy

In cryptography, the AES-256-GCM protocol is considered mathematically impenetrable. Assuming your implementation is correct (with proper AAD bindings and zeroization), the only theoretical way an adversary can compromise an AES-256 encrypted file is if the key or the nonce is predictable.

To prevent predictability, modern operating systems rely on Cryptographically Secure Pseudo-Random Number Generators (CSPRNGs) like /dev/urandom or BCryptGenRandom. These systems harvest environmental noise to generate the seeds used for encryption keys.

But what if you are a journalist, an activist, or an enterprise facing a state-level adversary? What if the hardware RNG instructions baked into modern CPUs (like Intel's RDRAND) contain a hidden mathematical backdoor mandated by a three-letter agency?

To mitigate this ultimate threat model, Project QRE has completely re-engineered Paranoid Mode.

The Problem with Legacy "Mouse Wiggle" Cryptography

In the early 2000s, software like TrueCrypt popularized the idea of having the user move their mouse randomly to generate "entropy" before generating encryption keys. While the concept was sound for the hardware of that era, many modern implementations suffer from critical cryptographic flaws that actually reduce security.

During a recent cryptographic audit of QRE, we identified and eliminated three common pitfalls associated with manual entropy generation:

  1. The Coordinate Trap: Humans are terrible at randomness. We draw predictable shapes—circles, straight lines, or figure-eights. If a system relies purely on X * Y pixel coordinates, the resulting entropy pool is small and easily guessable by modern cracking rigs.
  2. The Modulo Bias: A classic programming error occurs when developers normalize data to a byte range using value % 255. This mathematical mistake ensures the byte 255 (or 0xFF) is never generated, instantly degrading the total theoretical entropy of the key.
  3. RNG Replacement (The Fatal Flaw): The most dangerous mistake an app can make is completely replacing the OS CSPRNG with user input. If an unenthusiastic user barely wiggles the mouse, the resulting AES key will have disastrously low entropy, making it weaker than standard encryption.

The Fix: Hybrid Entropy Mixing

With the latest release of QRE Privacy Toolkit, we have rebuilt Paranoid Mode to act as an additive cryptographic safeguard. It no longer relies on predictable pixel math, and it never replaces your system's hardware RNG.

1. Harvesting Timing Jitter

Instead of tracking where you move the mouse, the QRE UI now tracks exactly when you move it. We capture the microsecond performance.now() delta between individual physical inputs. The exact nanosecond difference between your brain commanding your hand to move, and the USB polling rate firing, is chaotic biological noise that cannot be mathematically modeled.

2. XOR Mixing on the Backend

When locking a file, the QRE Rust backend generates a 32-byte seed. Instead of choosing between the user's input or the OS, it utilizes both.

let mut combined_seed = [0u8; 32];
OsRng.fill_bytes(&mut combined_seed); // Secure OS Hardware RNG

if let Some(user_seed) = entropy_seed {
    for i in 0..32 {
        combined_seed[i] ^= user_seed[i]; // Bitwise XOR mix
    }
}
let mut rng = ChaCha20Rng::from_seed(combined_seed);

By applying a bitwise XOR (^) between the hardware OsRng and the biological user_seed, we achieve a cryptographic win-win:

  • If the user performs a lazy, predictable mouse wiggle, the underlying OS entropy guarantees the key remains perfectly secure.
  • If the OS or CPU hardware RNG has been secretly backdoored to produce predictable patterns, the chaotic timing jitter of the user's physical hand completely scrambles that pattern, rendering the backdoor useless.

3. Per-File Deterministic Seeding

Finally, when encrypting batches of hundreds of files simultaneously, QRE hashes the gathered physical entropy alongside the specific iteration index of the current file. This guarantees that even if the base entropy pool is identical for the batch, every single file receives a cryptographically distinct starting state, preventing Key and Nonce reuse across the AES-GCM streams.

Is it Security Theater?

For 99% of people, the standard encryption mode—powered by modern OS-level CSPRNGs and the zeroize crate for memory wiping—is virtually unbreakable.

But for the 1% operating in highly adversarial environments, or users running instances in constrained Virtual Machines susceptible to entropy starvation, QRE’s new Paranoid Mode provides a mathematically sound, auditable layer of physical unpredictability.

It is no longer just a UI gimmick; it is a true hybrid entropy engine.