Home▸Cybersecurity▸Mobile App Secrets: Plain-Text Token vs PIN-Derived Key vs Hardware Keystore, PIN Entropy and KDF Brute-Force Time

Mobile App Secrets: Plain-Text Token vs PIN-Derived Key vs Hardware Keystore, PIN Entropy and KDF Brute-Force Time

A stolen phone gives an attacker a full copy of the app's flash storage. Watch the same API token stored three ways while a GPU rig guesses on a logarithmic clock from one millisecond to hundreds of billions of years: as a plain-text file (read at once), under an AES key derived from your passcode with real PBKDF2-HMAC-SHA256, and sealed in a hardware keystore whose key never leaves the secure element and whose PIN check is throttled and wipes after a few wrong tries. Set the alphabet, passcode length, KDF iterations, attacker speed, lock-out time and wipe limit, and read entropy, expected guesses and crack time. The SHA-256, HMAC and PBKDF2 code is checked against FIPS and RFC test vectors, and a real brute force recovers a toy PIN. A Blender-built scene; educational model, not security advice.

Cybersecurity3DEasy60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Mobile App Secrets: Plain-Text Token vs PIN-Derived Key vs Hardware Keystore, PIN Entropy and KDF Brute-Force Time ↗ Open standalone

Pick how a mobile app stores a sensitive token locally — as plain text in ordinary app storage, or encrypted through a hardware-backed secure keystore — then simulate an attacker who has gained full filesystem access to the device (a rooted phone, a jailbreak, or a stolen backup) and watch what they can actually recover. Plain-text storage hands over the token immediately; the keystore path leaves them holding only unusable encrypted bytes, because the decryption key itself never leaves the isolated secure hardware.

⚙ Under the hood

A stolen phone gives an attacker a full copy of the app's flash storage. Watch the same API token stored three ways while a GPU rig guesses on a logarithmic clock from one millisecond to hundreds of billions of years: as a plain-text file (read at once), under an AES key derived from your passcode with real PBKDF2-HMAC-SHA256, and sealed in a hardware keystore whose key never leaves the secure element and whose PIN check is throttled and wipes after a few wrong tries. Set the alphabet, passcode length, KDF iterations, attacker speed, lock-out time and wipe limit, and read entropy, expected guesses and crack time. The SHA-256, HMAC and PBKDF2 code is checked against FIPS and RFC test vectors, and a real brute force recovers a toy PIN. A Blender-built scene; educational model, not security advice.

Mobile SecuritySecure StorageAndroid KeystorePBKDF2Password EntropyBrute ForceKey Derivation FunctionCybersecurity

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)