-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: x/crypto/ripemd320: add ripemd320 hashing #32087
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
Comments
Note that RIPEMD160 has been deprecated in #30141. RIPEMD320 doesn't add any extra security compared to 160, it just produces a longer hash. If you want something different from the SHA family, wouldn't some modern function like BLAKE2 be better? |
Oddly I haven't been in this situation before where I'm offering to improve a deprecated feature 😄. Please advise. The goal of this proposal is to better support ripemd for specific use cases, such as legacy software conversions. Unless users have a specific use case for ripemd, they should choose a better hash. Use cases could be designing for a target hash length over security (e.g. sha and ripemd in bitcoin) or legacy-app conversion (especially php). For whatever reason, Ripemd 160 and 320 were heavily used in the php community, and as users migrate legacy applications they are left looking to reimplement these algorithms on their own. Choosing a better hash isn't always feasible if older hashes are in the data transformation path, and there are many use cases where choosing hash length is more important than how secure it is (e.g. ddos prevention, proof of work, perf optimization). I'm not familiar with BLAKE2, but I do like that is has support for multiple bit lengths already:
|
The fact that the ripemd160 implementation in x/crypto was deprecated (as @MaxSem noted) makes it very unlikely that new code that implements ripemd320 will be accepted into the package, I'm afraid.
Note that this goal can also be served by putting your ripemd320 implementation in a package outside x/crypto. cc @FiloSottile for a final decision, but I very much doubt this proposal will be accepted. |
Yup, I prefer not to add things to x/crypto that we aren't ready to recommend as the current best modern choice. It's definitely something that should exist in the ecosystem though! I recommend making it a stand-alone module rather than an x/crypto fork, so it's easy to use as a dependency. |
I've provided a home for future outdated algos, as there are some more I'd like to translate. Thank you for the feedback. |
Summary: Golang has the x/crypto/ripemd160 hashing implementation but not the ripemd320 implementation. Having already done most of the work implementing ripemd320 in Go, I would like to bring it in to x/crypto alongside its smaller counterpart.
Details:
The text was updated successfully, but these errors were encountered: