Ok, I just jumped into crypto and now struggling with some points…

I read lots of resources, most of them mention how important the strength of the encryption key is. However, I could not find much info about that.

What if the encryption key is not generated randomly and somehow is fixed or easy to be guessed? And what if the key contains lots of zeros in it? What could be the security risks?


1 Answer 1


A usual approach to security analysis is that the attacker knows everything about the system except the secret key, and often he has access to an "oracle" to produce related data. This is also known as Kerckhoffs's principle. For example in a chosen plaintext attack he can choose some messages, hand them to the oracle which encrypts them under the secret key and gets back the ciphertexts.

Back to your question: If the key is chosen poorly (and if there is some structure, the attacker knows it), it might be possible just to brute force it and try all possible keys. Today's computers can deal with complexities of testing $\approx 2^{64}$, therefore DES is no longer safe to use. If you know the first 100 bit of a 128 bit key are all 0 bits, then you probably are even able to find the key on any modern computer larger than a mobile phone.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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