3 ms·
log(num_options)/log(2) So for a 8 character digits-only value, num_options is 10^8, so log(power(10, 8))/log(2) = 30 bits. This means both 30 bits needed to s
by lucb1e 11y ago
log(num_options)/log(2)
So for a 8 character digits-only value, num_options is 10^8, so log(power(10, 8))/log(2) = 30 bits. This means both 30 bits needed to store the value and 30 bits of security. It also works for octal or hexadecimal: just replace log(2) with log(n), like log(16) for hexadecimal.
- Freaky 11y agoYou have your arguments swapped. 30 bits for 8^10, 26.6 for 10^8. https://www.google.co.uk/search?q=log2(10%5E8) https://www.google.co.uk/search?q=log2(10%5E8)