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
  • 1
    $\begingroup$ Hint for the first 1. 8 letters 7 bits makes 56 bit key size and that has $2^{56}$ keyspace. $\endgroup$
    – kelalaka
    Apr 7 '21 at 19:58

As there is some minimal attempt in solving I will answer at least in part.

  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}$

  2. yes

  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.

  4. I'll leave something for you still.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.