-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional hashing functions #168
Comments
Note that the implementation is generic over the underlying hash function. However, I am loathe to support a hash function zoo in any sort of official capacity (beyond enabling the possibility for those who choose to do so). More choice in cryptographic algorithms increases implementation complexity and harms interoperability. To the extent the existing implementation is generic over the underlying hash function, the main use case is to support hardware cryptographic accelerators for SHA-256 (as one of our main use cases is embedded) as opposed to using the software implementation in the Length extension attacks against Veriform are largely mitigated through its current use of nested/structured hashing. The one place where there's even a potential for length extension attacks to occur is in toplevel messages, and to me the best solution to that is to place toplevel messages into self-delimiting envelopes which include a length prefix at the beginning of the message, then computing a digest that includes the length delimiter. Not only does this fix the length extension attack potential, but self-delimiting messages are generally convenient and it's exceedingly common to wrap Protobuf messages this way already. That said, I do like |
You're not wrong, but that seems contradictory to officially supporting multiple languages:
So long as a specification exists, it can be implemented in any language. |
I would suggest implementations in other languages are similarly parameterized around the underlying hash function. Eventually it'd be good to pick an alternative to SHA-256 as a failsafe (or potential performance optimization), but initially I think it'd be better if all implementations use SHA-256. |
Additional hashing algorithms should be added to implementations.
sha-256d
keccak-256
sha3-256
The text was updated successfully, but these errors were encountered: