Skip to content
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

sha3: add cShake #182

Closed
niluxv opened this issue Jul 10, 2020 · 2 comments
Closed

sha3: add cShake #182

niluxv opened this issue Jul 10, 2020 · 2 comments

Comments

@niluxv
Copy link

niluxv commented Jul 10, 2020

Add cShake, as described in [1] to the sha3 crate (it is a standard way to input a diversifier to shake separate from the normal input).

[1]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf

@tarcieri tarcieri changed the title [sha3] Add cShake sha3: add cShake Feb 9, 2021
@tarcieri
Copy link
Member

tarcieri commented Feb 9, 2021

@newpavlov do you think we should track this in #1?

@newpavlov
Copy link
Member

I thought it will be implemented as small helper functions on top of the existing Shake types, but reading the specification a bit more carefully, I guess we can consider it as an additional algorithm. There is an annoying property that if n and s are empty, then cShake is equal to the usual Shake which uses 0x1f suffix for padding, otherwise in addition to prepending to data encoded parameter strings it also uses 0x04 suffix. So assuming that we want to keep streaming capabilities, we will have to keep the padding variant in hasher states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants