Encryption question

What does the key space and bit length changes in the encryption?

I mean… More bits = more strength, but why? What does it changes in the key created? The reason is that it would be harder to crack because the final result would be a large key?
And I didn’t understand the key space too. If i.e my password has 4 numbers from 0 - 9, wouldn’t it have 10.000 possibilities just like the padlock?

Thank you :slight_smile:

An algorithm’s key space refers to the set of all possible permutations of a key.

The more permutation then the more guesses are required.

Check you


So the more characters in the password you create, the more bits are used to generate the key?
Like your padlock-bit-length comparison, the more characters the more bits are being used? In theory, what if I only use 1 character for my password? How long would the bit length be?

Section 4: Symmetric Encryption (4:32) was the term you used but I can’t understand what you said - key derivation function?

There are different key derivation methods using which a key is generated. It generates bytes from the characters you use for creating a strong password. It utilizes what is called a pseudo-random function to create this. The basic idea is to have a password encrypted in such a way that it cannot be guessed without the decryption key.

1 Like

The strength of passwords depend on two things. First, the encryption algorithm which determine the bit size of the Cipher Key, and Second, the length of the password using which Cipher Key is generated.

So what happens is, the password which we choose, is used as a variable in a function, known as a Key Derivation Function. This KDF derives the secret key from the password using a Pseudo-Random Function.

One such example is PBKDF-2.

DK = PBKDF2(PRF, Password, Salt, c, dkLen)


  • PRF is a pseudorandom function of two parameters with output length hLen (e.g., a keyed HMAC)
  • Password is the master password from which a derived key is generated
  • Salt is a sequence of bits, known as a cryptographic salt
  • c is the number of iterations desired
  • dkLen is the desired bit-length of the derived key
  • DK is the generated derived key

Please go through the article here : https://en.wikipedia.org/wiki/PBKDF2