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

Polymorphic transcript function does not allow for different prefixes when absorbing different type of elements #24

Open
iquerejeta opened this issue Dec 20, 2024 · 0 comments

Comments

@iquerejeta
Copy link
Collaborator

In the previous implementation the transcript interface had a common_scalar and common_point interface. This allowed to have different prefixes when adding each type of arguments to the transcript (see here) as follows:

/// Prefix to a prover's message containing a curve point
const BLAKE2B_PREFIX_POINT: u8 = 1;

/// Prefix to a prover's message containing a scalar
const BLAKE2B_PREFIX_SCALAR: u8 = 2;

then, the hasher was initialised with

self.state.update(&[BLAKE2B_PREFIX_POINT]);

in case of a point and with

self.state.update(&[BLAKE2B_PREFIX_SCALAR]);

in case of a scalar.

Now we use the same prefix for every type of input. I believe that is fine, as the goal of these prefixes is to have a separator for every new input. However, I did want to check that I'm not missing out anything, and that it is indeed crucial that those prefixes are distinct.

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

1 participant