The first answer here does a good job explaining how the SHA-256 function requires more than one input (an initial one is specified by to the SHA-256 specs). As far as I understand it, the "midstate" value is the initial hash of the first half of the data, used to later serve as an input into the double-hash of the second half of the data.
Is this correct?
And here is an explanation of what the "hash1" value actually is and means, but what is it used for?
b=SHA(a=SHA(data))
, a = "initial hash" and b = "second half"? So,a
is the midstate?a
inb=SHA(a=SHA(data))
ifdata
is longer than one SHA256 block (64 bytes). Isn't the Bitcoin block header 80 bytes?