Say we have
amount random entry codes of
length characters from an alphabet of size
The number of possible codes is then easily calculated as
keyspace = alphabet ^ length.
Now take an attacker who is trying to gain entry using brute force random guessing of codes. At guess rate
rate, the time in which they can all be checked (and entry is thus guaranteed) is easily calculated as
keyspace / rate.
However, what I would really like to know is, how to calculate the time required for the attacker to have a given chance of finding any valid entry code. This is a system where a valid code is all you need, there is no secondary requirement like a username (think coupons). Once again, there are
E.g., how long would it take the attacker to have a 1% chance of finding a valid code? And 10%? And 25%? Etc. Or the inverse, given a specific amount of time, what are the chances?