Computer Networks » Hash Functions
Which of the following equation is correct in case of hash function, where M = input, N = hash value, H = hash function?

A. H = m(n)
B. M = h(n)
C. N = h(m)
D. N = m(h)

Explanation: M is a block of data that is accepted by the hash function. Hash function(H) accepts the input and hash function will be performed. N is the fixed length of hash value of the block of input.

What is/are the property(s) of a good hash function in case of producing outputs for set of inputs?

A. Apparently random hash values
B. Evenly distributed hash values
C. Apparently random and evenly distributed values
D. Evenly distributed but not apparently random values

Explanation: When a huge set of input blocks are given to a hash function, a good hash function will result in unique random values with no relation between them. At the same all the hash values will be equal that is fixed length.

What is the core objective of the hash functions in producing hash values?

A. Integrity
B. Authenticity
C. Confidentiality
D. Security

Explanation: Integrity means retrieving the lost data as soon as possible. Hash functions accomplish integrity, because, even one bit is changed in the data, it will result in a change of hash value with high probability.

What is the name for hash functions that are used in security applications?

A. Secured hash function
B. Cryptographic hash function
C. Security hash function
D. Crypt-analysis hash function

Explanation: The cryptographic hash function is an algorithm, which is used in security applications. It is computationally infeasible to attack the algorithm. Because it doesn’t allow the attacker to crack either of its properties, that are collision free property and one-way property.

Which of the following application in which hash function is employed, refers hash value as message digest?

A. Message authentication
B. Virus detection
C. Digital signatures
D. One-way password file

Explanation: The application “message authentication” is used to obtain the integrity of the message. Sender sends hash value of the message along with message, then receiver performs the same hash function on the message. If both the message digests are same, means, integrity is achieved.

What is the other name for key hash function, which is used in message authentication?

A. Message administration control
B. Message authentication code
C. Message administration code
D. Message authentication control

Explanation: Message authentication code that is key hash function is mostly used in message authentication. This MAC function results a MAC value, by taking the input block of data and secret key. This MAC value is used to check whether data has changed or not.

What is Ci in the bit-by-bit XOR hash function, that is Ci = bi1 + bi2.….. + bim

A. Number of n bit blocks
B. Ith bit of the hash code
C. Ith bit in jth block
D. Xor operation

Explanation: “m” is the number of n-bit blocks in the input, bij is the ith bit in the jth block, ci is the ith bit of the hash code. Operation between the bits is exclusive OR and this operation is performed on every input block.

When can we detect a collision if the hash values are same for two inputs, that is H(x) = H(y)?

A. When x < y
B. When x > y
C. When x = y
D. When x != y

Explanation: Hash function’s primary objective is to provide integrity. No two inputs should have the same hash value, which causes the collision. Collisions are undesirable in hash functions.

What is the formula for pre-images of a given hash value, where data block length = b bits and hash code = n bits?

A. 2b-n
B. 2b+n
C. 2b/n
D. 2n/b

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.

Which of the following is not a basic property for employing hash function in practical applications?

A. Variable input size
B. Fixed output size
C. Efficiency
D. Preimage resistant

Explanation: Hash function will produce fixed lengths of outputs and accepts any size of blocks as input. It is efficient to calculate. If these three requirements need to be met to implement hash function in practical applications.