question archive State the value of both: 1) the padding field, and 2) the length field in SHA-512 if the length of the message is a

State the value of both: 1) the padding field, and 2) the length field in SHA-512 if the length of the message is a

Subject:MathPrice:2.87 Bought7

State the value of both: 1) the padding field, and 2) the length field in SHA-512 if the length of the message is

a. 1919 bits

b. 1920 bits

C. 1921 bits

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Answer:

In SHA-512, the blocks are multiples of 1024 bits. In a block there is a message field, a padding field and a length field.

The message field contains the contents of the message.

The padding field is a variable length field used to pad bits to a block to make equal to 1024 bis.

The length field is a fixed length field of size 128 bits. It is located near the end of the block.

a.

Length of the message = 1919 bits

Bits in the first block = 1024

Remaining bits = 1919-1024 = 895 bits.

Bits required for padding in the 2nd block = 1024 - (895 + 128) = 1.

So value of padding field = 1 and value of length field = 128.

b.

Length of the message = 1920 bits

Bits in the first block = 1024

Remaining bits = 1920-1024 = 896 bits.

Bits required for padding in the 2nd block = 1024 - (896 + 128) = 0.

So value of padding field = 0 and value of length field = 128.

c.

Length of the message = 1921 bits

Bits in the first block = 1024

Remaining bits = 1920-1024 = 897 bits.

Bits required for padding in the 2nd block = 1024 - (897) = 127.

Bits required for padding in the 3rd block = 1024 - (128) = 896

So value of padding field = (127 + 896 ) = 1023 and value of length field = 128.

PFA