# How long does the password be to have n-bits entropy?

It is said that a password has n-bits entropy if its entropy corresponds to the entropy of an n-bit number, the digits of which are independently drawn under uniform distribution. How long does a password, whose letters from an alphabet {a,b,...,z} is independently chosen under uniform distribution, be at least to have n-bits entropy?

• This is a quite basic question. I'd hate to just give you the answer. I'm assuming you are familiar with shannon's entropy equation. You can apply that to compute the bits of entropy per sample. From that you can compute the number of samples to get n-bits of entropy. – mikeazo May 11 '17 at 13:59
• Excuse me for my lack of understanding and misconception. But in this case, what does "n-bit entropy" mean? Does it mean the entropy of an n-bit number? Or does it mean an entropy result that has an n-bit number? – Sam May 11 '17 at 14:56
• $n/\log_2(26)$ where $\log_2$ is the base-2 logarithm. – CodesInChaos May 11 '17 at 15:25
• An n-bit number chosen uniformly at random has n-bits of entropy. So it is asking how many characters in a password of all lower case letters would you need to have the same number of bits of entropy. – mikeazo May 11 '17 at 15:33
• The calculation by @CodesInChaos is the correct one, the result is 4.7 bits of entropy per character, so n/4.7 rounded up to an integer – Richie Frame May 12 '17 at 1:03