Question

In the SHA-512 hash function, What is the value of the length field if the length...

In the SHA-512 hash function, What is the value of the length field if the length of the message is 1921 bits? Show your work.

Homework Answers

Answer #1

In SHA-512 the size of the blocks is 1024 bit. The last block must contain:

  • the rest of the data in the message (mod 1024).
  • some filling (padding)
  • the last 128 bits as length

If the message is 1921 bit length:

  1. Calculate the size of the data in the last block: 1921 mod1024=897
  2. Add the size of length field(128 bit) to the last block size(897 bit), 128+897=1025
  3. That means we need to add 1023 bits as padding to complete the block.

The answer will be:

size of padding field = 1023 bits

data of length field = 1921 as an unsigned 128-bit big endian integer 0x00000000000000000000000000000781

DIVISION

RESULT

REMAINDER (in HEX)

1921 / 16

120

1

120 / 16

7

8

7 / 16

0

7

781

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
For SHA-512, State the number of padding bits and the number of zeros in the padding...
For SHA-512, State the number of padding bits and the number of zeros in the padding if the length of message is 1919.
Derive an equation for calculating how many hashes it would take to find a hash value...
Derive an equation for calculating how many hashes it would take to find a hash value under a particular value for SHA-256. So for example, if you have some ceiling value x, f(x) should tell us the probability that a hash of a random message would be below the value x. For example, if x=1, then only a hash value of 0 would result in something under that value, for 1/(2^256). If you cannot derive the equation, then try calculating...
SHOW WORK! Draw the hash table that results using the hash function: h(k)=kmod 7 to hash...
SHOW WORK! Draw the hash table that results using the hash function: h(k)=kmod 7 to hash the keys 50, 700, 76, 85, 92, 73, 101. Assuming collisions are handled by Quadratic probing.                                                                               SHOW WORK
Suppose you are building a hash table and want the probability of collision in your has...
Suppose you are building a hash table and want the probability of collision in your has function to be less than 10-6. The output of your hash function is a sequence of bits (e.g., 1001010111 is a sequence of 10 bits). What is the minimum number of bits needed for the hash function output to achieve the desired probability of collision. You may use the approximation 103 = 210 to simplify your math if you wish.
Data structure and Algorithm A hash table of length 10 using open addressing with hash function...
Data structure and Algorithm A hash table of length 10 using open addressing with hash function h(k) = k mod 10, and linear probing has been created. 0 1 2 32 3 73 4 12 5 15 6 82 7 37 8 65 9 9 Now the item 12 needs to be deleted using “Deletion with repair’. What is the resultant hash table? A) 0 1 2 32 3 73 4 15 5 82 6 37 7 65 8 9...
For any given string x=x1x2x3⋯xm, a hash function is defined below as: (This is the entire...
For any given string x=x1x2x3⋯xm, a hash function is defined below as: (This is the entire question, i cannot update it because this is it in its entirety) h(x)=[c(x1)+c(x2)q+c(x3)q^2+⋯+c(xm)q^m-1 mod P Here, both  and P are given small prime numbers, and denote the ASCII integer of the letter xi,1≤i≤m. For any string y=y1y2⋯yn, please show that if the hash value of the hash value yiyi+1⋯yi+k is known, then the hash value of yi+1yi+2⋯yi+k+1 can be computed in constant time. Please type...
Q. What methods of Map can be implemented in O(1) time with a good hash function...
Q. What methods of Map can be implemented in O(1) time with a good hash function and a properly-sized hash table? Consider Map methods size(), isEmpty(), containsKey(),get(),put(),remove(),clear(),keySet(), and values(). What methods of Set? Use the methods listed in the Collection API slide.
data structures What properties do we want for our hash function? Select one or more: a....
data structures What properties do we want for our hash function? Select one or more: a. fast b. deterministic c. avoids clustering d. output 0 to size-1 e. uniform output distribution
3.2 Class Dictionary This class implements a dictionary using a hash table in which collisions are...
3.2 Class Dictionary This class implements a dictionary using a hash table in which collisions are resolved using separate chaining. The hash table will store objects of the class Data. You will decide on the size of the table, keeping in mind that the size of the table must be a prime number. A table of size between 5000-10000, should work well. You must design your hash function so that it produces few collisions. A bad hash function that induces...
1) Find the arc length of the graph of the function over the indicated interval. Show...
1) Find the arc length of the graph of the function over the indicated interval. Show your work.   y=ln(cosx)   ;   [ 0 , π/4] 2) Find the surface area generated by revolving the graph about the x - axis over the indicated interval. Show your work.   y=2x   ;   [ 0 , 3 ]
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT