Question

State the value of the padding field and the value of the length field in SHA-512...

State the value of the padding field and the value of the length field in SHA-512 if the length of the message is:
(Show your calculations/Justify your answer)

2049 bits

562 bits

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In the first step of SHA-512 algorithm, we append the bits which are 128 less than the multiple of 1024.

1).

Here, for 2049, it is 1 more than multiple of 1024 which is 2048.
So, the next multiple of 1024 is : 3072.

3072 - 2049 = 1023

1023 - 128 = 895

So, we need to append 895 bits as 1 followed by 894 0s.

Then the total size will be 2049 + 895 = 2944
and then 2944 + 128 = 3072 which is multiple of 1024.

The value of length field is always 128-bit unsinged int big endian and it says the message length without padding. So, for this, it is 2049 represented as 128-bits.

So, for 2049 bits message,

padding field value = 1 followed by 894 0s and length field value = 0x00000000000000000000000000000801

-------------------------------------------------------

2).

562 bits is message size. So, next 1024 multiple is 1024 itself.

1024 - 562 = 462

462 - 128 = 334.

So, 334 is padding field length. So, 1 followed by 333 0s is the value of padding field.

length field will represent 562 in 128-bits.

So, for 562 bits message,

padding field value = 1 followed by 333 0s.
length field value = 0x00000000000000000000000000000232.

Note: I wrote next multiple of 1024, you may have studied mod 1024 concept. Both are the same, this may become simpler so I wrote like that.

I tried to make it as simple and specific as i could. But do comment if there is any query. Thank you. :)

Add a comment
Know the answer?
Add Answer to:
State the value of the padding field and the value of the length field in SHA-512...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT