You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is incorrect: "SHA2-512 truncated" and SHA512/256 are two distinct things:
"SHA2-512 truncated" means to do the SHA2-512 hash, which produces a 64-byte hash, and manually truncate off the second half;
SHA512/256 is a different hash algorithm (also part of the SHA2 family) that natively produces a 32-byte hash.
According to the proto definition, the intention is to use SHA512/256, meaning the function sha2_512_truncated is misnamed. It should be renamed to sha2_512_256. However, the implementation is correct.
In host_functions.rs:
Then, in ops.rs, this function is used to do the SHA512/256 hash:
This is incorrect: "SHA2-512 truncated" and SHA512/256 are two distinct things:
According to the proto definition, the intention is to use SHA512/256, meaning the function
sha2_512_truncated
is misnamed. It should be renamed tosha2_512_256
. However, the implementation is correct.Issue caught by @Rhaki
The text was updated successfully, but these errors were encountered: