Cryptography General Question:

Download Job Interview Questions and Answers PDF

How does the length of a hash value affect security?

Cryptography General Interview Question
Cryptography General Interview Question

Answer:

The essential cryptographic properties of a hash function are that it is both one-way and collision-free. The most basic attack we might mount on a hash function is to choose inputs to the hash function at random until either we find some input that will give us the target output value we are looking for (thereby contradicting the one-way property), or we find two inputs that produce the same output (thereby contradicting the collision-free property).

Suppose the hash function produces an n-bit long output. If we are trying to find some input which will produce some target output value y, then since each output is equally likely we expect to have to try 2n possible input values.

Download Cryptography General Interview Questions And Answers PDF

Previous QuestionNext Question
What is a birthday attack?What is a compression function?