MCQs City stays free thanks to ads. Please turn off your ad blocker for this site so content and features keep working.
Computer Networks
Hash Functions
Q
What is the formula for pre-images of a given hash value, where data block length = b bits and hash code = n bits?
AA. 2b-n
BB. 2b+n
CC. 2b/n
DD. 2n/b
Correct Answer:
A. A. 2b-n
Explanation:
In the hash value h = H(x), x is the preimage of the hash value. 2b-n formula finds the total number of possible collisions for a hash value. Here b > n and 2b is the total number of possible messages, 2n is the total number of possible hash values.