-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add Sha3 SHAKE* #311
Comments
The currently released rust-multihash version, is kind of "catch all" for all sorts of hash function. Current master has already split things into smaller pieces. In theory it should be possible to implement other hash functions outside of this crate an integrate it in your own custom code table. If anyone wants to give it a try, that would be great. If there are then issues, I'm happy to help. |
I can give that a try, but would that mean I need to also assign a code for Sha3 SHAKE128 and Sha3 SHAKE256? What would that do for interoperability if there are multiple implementations... with potentially different codes? Also, if I do need to pick a code, should I just keep going with the Sha3 sequence ( |
Code assignment should happen in the |
@thomaseizinger absolutely of course. Plus, they already exist! |
Then all that is needed is an implementation :) In the simplest case, you can construct a Note that we have heavily restructured this repository to make the base data structure nearly dependency free. This is not released yet but hopefully soon. |
Sounds amazing! The goods news is for Shake, no additional dependencies are required we already have |
Would you like to see it in |
That is what I was originally thinking, yes. But perhaps it's unnecessary. Here's what I've been able to do outside the library without any changes: https://github.com/DougAnderson444/shake-multihash The Shake derive macro I wrote is pretty close to Maybe just leave it for now, if the crowds want it integrated badly it's straightforward to upgrade. |
@DougAnderson444 oh wow, this is nice! I actually would prefer keeping it outside of It's so great to see the library being used as imagined. Thanks! |
@DougAnderson444 Relating to https://github.com/DougAnderson444/shake-multihash/blob/9cbd3b09272f5053d241afa9ea775692048f5bfe/src/lib.rs#L19-L20, in case you didn't know, this also works: pub const SHAKE_128_HASH_CODE: u64 = 0x18; |
I think we can close this then? :) |
Yep! Thanks for the feedback gents, this helped a lot. |
References
Rust-multihash almost got it here: #6
JS-multiformats has it here: https://github.com/multiformats/js-sha3/tree/ab7efd0fb1da9458c80977c5252cf941e7fe62eb#usage
Crates.io has it available here: https://docs.rs/sha3/0.10.8/sha3/
Drivers
Needed for BLS12-381 hash-to-curve and interop with JS implementers.
The text was updated successfully, but these errors were encountered: