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

Possible improvements forCryptographicSponge #129

Open
autquis opened this issue Jan 15, 2024 · 2 comments
Open

Possible improvements forCryptographicSponge #129

autquis opened this issue Jan 15, 2024 · 2 comments

Comments

@autquis
Copy link
Contributor

autquis commented Jan 15, 2024

Regarding CryptographicSponge (and Absorb):

  • Currently, the sponge does not have a method for absorbing with a domain separator (or label; I am not sure what the correct term is). I think it would be better to have two methods; one absorbs without a label, and the other absorbs with a label included.

  • To absorb group elements, one has to implement Absorb for the group. It would be nicer if we have the implementation of Absorb for all groups (by probably only serializing them). Furthermore, it is only possible to squeeze bits, bytes, and field elements (slow), so, to squeeze a group element, one has to squeeze bytes and then map to a group element.

@Pratyush
Copy link
Member

Pratyush commented Jan 16, 2024

Is the option to squeeze a group element actually used anywhere? I have never seen a protocol rely on this.

I agree with the option to absorb with a domain separator.

@mmagician
Copy link
Member

I think for our use case it's enough to be able to absorb group elements.

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