# key length considerations

Learning about cryptosystems and basic cryptology and I have a sort of vague understanding of key sizes/key space and think I may have done something wrong in my calculations, can someone please explain how to properly calculate key space/length I would greatly appreciate it, thanks!

1. Assume a password consisting of 8 letters, where each letter is encoded by the ASCII scheme (7 bits per character, i.e., 128 possible characters). What is the size of the key space which can be constructed by such passwords? 128!
2. What is the corresponding key length in bits? 56 bits
3. Assume that most users use only the 26 lowercase letters from the alphabet instead of the full 7 bits of the ASCII-encoding. What is the corresponding key length in bits in this case? 28 bits
4. At least how many characters are required for a password in order to generate a key length of 128 bits in case of letters consisting of a. 7-bit characters? 19 char b. 26 lowercase letters from the alphabet? 32 char
• Hint for the first 1. 8 letters 7 bits makes 56 bit key size and that has $2^{56}$ keyspace. Apr 7 '21 at 19:58

1. No 128! would be the number of permutations. But that is not what we are doing, we 128 is already the number of possibilities to combine 7 bits $$2^7$$ if you have 8 of these then you get: $$128^8$$ or alternatively bitwise $$2^{56}$$
3. no, 26 letters. need $$\log_2(26)$$ bits or just over 4.7 bits per letter. Assuming compact representation and after rounding it 8 independent letters need 38 bits.