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

Abstract the sponge construction used in SHA3 #140

Open
3 tasks
marsella opened this issue Sep 17, 2024 · 0 comments
Open
3 tasks

Abstract the sponge construction used in SHA3 #140

marsella opened this issue Sep 17, 2024 · 0 comments
Labels
CNSA 2.0 improvement Addresses fixes or changes to existing specs

Comments

@marsella
Copy link
Contributor

The SHA3 spec describes a generic sponge construction, which produces arbitrary-length output when given three components: a function on fixed-length strings, a rate parameter, and a padding rule. As of #137, the Cryptol implementation of SHA3 does not implement a generic sponge construction; it inlines the three components right into the generic algorithm.

It would be better to have a module or a submodule that defines the sponge construction in therms of the three components, and then to instantiate it with the Keccak-specific components. This would more closely match the spec and it would also give us a nice reusable component in case we want to implement, say, Poseidon someday.

  • Separate the sponge construction from the Keccak-specific elements in keccak.cry. Might have to fiddle around with submodule vs entirely separate module.
  • Update Keccak to instantiate the sponge construction.
  • Separate the documentation on the Keccak function from the sponge stuff and update to make it clear how the parts relate and how sponge is reusable.
@marsella marsella added CNSA 2.0 improvement Addresses fixes or changes to existing specs labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CNSA 2.0 improvement Addresses fixes or changes to existing specs
Projects
None yet
Development

No branches or pull requests

1 participant