Tag space (12-bit slice): red = already guessed
log10 forgery probability vs tag bits

Truncated HMAC Tag Length: Guess Grid and Forgery Probability (2D)

An API gateway checks a truncated HMAC tag of t bits on every signed request. A blind guess hits with probability 2^-t, so the odds of a forgery depend on how many guesses the gateway lets through: its rate limit, its lockout after k failures with a cooldown, the key lifetime and the number of keys. Change them to see forgery probability, the attempts per lifetime, the tag length needed for a risk target and the guess grid being swept. Defensive and educational. A Blender-built gateway, lock arm and tag grid, with numerical checks built in.

Made with 🟠 Blender