What this is. A defender's concept model of how a phone protects app data: a screen lock with a retry policy, an OS sandbox, a hardware-backed key store (secure element), encryption of stored files, TLS on the network and an encrypted backup. It teaches threat modelling and arithmetic; it contains no cracking, scanning or exploit code and never touches real credentials.
Entropy. A secret chosen uniformly from an alphabet of size A with length L has H = L log2 A bits and AL possibilities; a random 4-digit PIN has 13.3 bits, 6 random words from a 7776-word list 77.5 bits. Guessing in random order needs on average (N+1)/2 tries.
Key stretching. A key-derivation function such as PBKDF2-HMAC-SHA256 repeats the hash I times, so each guess costs I hash operations: expected time t = 2H−1 I / R for a hash rate R. Doubling I adds one bit of work. The slider R is a hypothetical rate, not a measurement of any real system.
Lockout and hardware keys. With a secure element the key never leaves the chip and every guess must be made through the device, so the retry policy (4 free tries, then 30 s doubling to 1 h, optional wipe after 10) bounds the attacker to a few dozen tries a day; without it the only limit is the derivation cost.
Human choice. People do not pick PINs uniformly. A Zipf model (probability of the i-th most popular choice ∝ i−s) with s = 1 cuts a 4-digit PIN from 13.3 to about 9.5 bits; the model is illustrative, not real PIN statistics.
Honest simplifications. Threat outcomes are a qualitative layered model (blocked, weak or exposed) built from the numbers above; real systems have many more layers and failure modes (software bugs, side channels, social engineering, backups, updates). Times are orders of magnitude, not guarantees. Hardware key stores differ between phones.
Independent checks (run on load, same core as the 3D page; the PBKDF2 line uses your browser's WebCrypto):
| running… |