I have been reviewing the documentation for SHA256 and I believe the last two words (64 bits) for each chunk are not used in creating the message schedule.
Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array:
for i from 16 to 63 s0 := (w[i-15] rightrotate 7) xor (w[i-15] rightrotate 18) xor (w[i-15] rightshift 3) s1 := (w[i-2] rightrotate 17) xor (w[i-2] rightrotate 19) xor (w[i-2] rightshift 10) w[i] := w[i-16] + s0 + w[i-7] + s1
Notice how w[i-1] and w[i] are not used? These two words would be the length for a 1 chunk hash but for actual data that is longer then 512 bits the last 64 bits are ignored. This would result in the same hash for two (or more) messages. Am I missing something or am I correct?