Open ValarDragon opened 6 years ago
Wow, we seriously have md4 in there. Don't bother adding support to that.
@ValarDragon are you implementing those interfaces for all the mentioned packages? I'd like to join :grin:.
I have it all implemented (even md4 since I had that done before I saw FiloSottile's comment), I'll push a change for code-review later today, I just need to make the test error messages more verbose. However I think there are some optimizations that can be done for the way I'm marshaling sha3. I think the only use case for marshaling it is when its in the absorbing state, not when its squeezing. (Even the tests for cloning don't cover the case where the state is squeezing) Currently I'm storing a byte for this case, but I'm not sure its needed. (Also, in the case that its in the squeezing state, I actually have to store an additional byte. Right now I am only storing that byte when its needed)
Change https://golang.org/cl/104576 mentions this issue: sha3,md4,ripemd160: implement BinaryMarshaler, BinaryUnmarshaler
Is there anything else that needs to be done for this proposal on gerrit? (Asking because there haven't been any comments in gerrit, and its been awhile)
What's the reason for this not being merged
Change https://go.dev/cl/616635 mentions this issue: sha3: add MarshalBinary, AppendBinary, and UnmarshalBinary
This is the same idea as #24548, make these hash functions in crypto implement encoding.BinaryMarshaler and BinaryUnmarshaler to allow for state reuse. The password hashes aren't listed here, since they should be using a unique salt per hash, and therefore they wouldn't benefit from state reuse. (Also it seems that the password hashes don't implement hash.Hash)