ImI’m very interested how SHA-256 handles messages, but iI’ve got 3 questions.(As I have already read in some answers before, sha 256 is not directly performed on the message but on an array, thanks for that)
(As I have already read in some answers before, SHA-256 is not directly performed on the message but on an array, thanks for that.)
In my understanding after padding the message to a multiple of 512 bit length, we put the message into a
64 entry message schedule array w[0..63] of 32-bit words
. So is this an array with 64 elements, each allowed to be 32 bits long?copy chunk into first 16 words w[0..15] of the message schedule array
But then i ask myself, if we have a message that is, for example 4096 bits long and we only fill the first 16 elements of the array with the original message what happens to the other (4096-16*32 = 3584) 3584 bits of the message?
In my understanding after padding the message to a multiple of 512 bit length, we put the message into as0 := (w[i-15] rightrotate 7) xor (w[i-15] rightrotate 18) xor (w[i-15] rightshift 3)
What are the rightrotate and rightshift operators doing to the elements in the array?
64 entry message schedule array w[0..63] of 32-bit words
ThanksIs this an array with 64 elements, each allowed to be 32 bits long?
-
copy chunk into first 16 words w[0..15] of the message schedule array
But then I ask myself, if we have a message that is, for example 4096 bits long and we only fill the answers already givenfirst 16 elements of the array with the original message, what happens to the other (4096-16*32 = 3584) 3584 bits of the message? 3. > s0 := (w[i-15] rightrotate 7) xor (w[i-15] rightrotate 18) xor (w[i-15] rightshift 3)
What are the rightrotate
and rightshift
operators doing to the elements in the previous questionarray?