I was recently trying to gain a better understanding of the SHA-512/256 algorithm and on this NIST example they use the word "abc" as the input. In the Block Contents, it shows the expected hexadecimal 616263
(abc), although why is it directly followed by 0x80
and 0x18
at the very end?
Block Contents:
W[ 0] = 6162638000000000
W[ 1] = 0000000000000000
W[ 2] = 0000000000000000
W[ 3] = 0000000000000000
W[ 4] = 0000000000000000
W[ 5] = 0000000000000000
W[ 6] = 0000000000000000
W[ 7] = 0000000000000000
W[ 8] = 0000000000000000
W[ 9] = 0000000000000000
W[10] = 0000000000000000
W[11] = 0000000000000000
W[12] = 0000000000000000
W[13] = 0000000000000000
W[14] = 0000000000000000
W[15] = 0000000000000018
I realize the zeros are padding, however, it's the 0x80
and 0x18
presence I'm not understanding.