'How many bits of information are possible in an eight-character password if any character can be used?

In this question, do we assume that each character is just 8 bits then? In this case, is the answer just 64 bits? Sorry if this is a dumb question.



Solution 1:[1]

Any character would be hard to use in a password as some of those are not even printable (like a \07 beep). But if you assume that it really can be any (so it's more like a cryptographically random key than a password), then yes, 64 bits of entropy.

If it's case sensitive ascii letters (26+26) and numbers (10), and the length is 8, and it's all true random, then it's more like log2( (26+26+10)^8 ) ~= 47.6 bits.

Or more generally, using k different random characters for a length of n, the entropy would be log2(k^n).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gabor Lengyel