# MCQ | Hash Function Technique

Here, we have a **set of multiple-choice questions and answers (quiz) on Hash Function Technique**.

Submitted by Monika Sharma, on March 23, 2020

**1) Basically, in SHA-512, the message is divided into blocks of size ___ bits for the hash computation.**

- 1024
- 512
- 256
- 1248

**Answer:** a. 1024

**Explanation:**

As we study, the message is divided into blocks of size 1024 bits, and the output produced is a 512-bit message digest and uses the 512-bit buffer till 80 rounds.

**2) When a hash function is used to provide message authentication, the hash function value is called to as:**

- Message Field
- Message Digest
- Message Score
- Message Leap

**Answer:** b. Message Digest

**Explanation:**

We know that the hash function providing message authentication is referred to as massage digest in cryptography.

**3) Which of the following are used to create a message digest by the network security protocols?**

- RSA
- SHA-1
- DES
- MD5

**Answer:** b. and c. SHA-1 and MD5

**Explanation:**

**RSA**: Basically, it is an algorithm used to encrypt and decrypt messages.**SHA 1**: Secure Hash Algorithm 1 is a cryptographic hash function in cryptography. It produces a 160 bit (20 bytes) hash value in cryptography.**DES**: Data Encryption Standard is a symmetric key algorithm for encryption of electronic data in cryptography.**MD5**: It is a widely used cryptographic hash function that produces a 128-bit hash value in cryptography.

**4) What is the output of the N 1024-bit blocks from the Nth stage in this?**

- 512 bits
- 1024 bits
- N x 1024bits
- N x 512 bits

**Answer:** a. 512 bits

**Explanation:**

We know that when we use SHA 512 we take 1024 bit plaintext into this algorithm and get the output as 512 bit which is fixed.

**5) What is the output of a cryptographic hash function means?**

- A variable set of bits
- A fixed set of bits, derived from one-way mathematical operations
- An output which may be easily discovered by an adversary
- Outputs of such functions are of no importance

**Answer:** b. A fixed set of bits, derived from one-way mathematical operations

**Explanation:**

The output of a cryptographic hash function means as a fixed set of bits, derived from one-way mathematical operations.

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.