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

poseidon2: rounds, internal matrix for small state sizes #51

Merged
merged 4 commits into from
Jul 5, 2023

Conversation

redshiftzero
Copy link
Member

@redshiftzero redshiftzero commented Jun 26, 2023

Closes #45: in this PR we implement the round calculation for Poseidon2, and add a panic to the impacted state sizes of Poseidon1's round calculation in light of the attacks presented in https://eprint.iacr.org/2023/537.

This PR also has the start of the internal matrix calculation for Poseidon2 for #40. The remaining work here is to implement functionality that computes the minimal polynomial of a proposed internal matrix. See comment here for more explanation.

In [0] some Grobner basis attacks were presented that apply
either partially to the 384-bit and 512-bit security level and
fully to the 1024-bit security level. Instead of updating the
v1 round numbers for these higher security levels, we panic
to alert the user that the choice may not be secure.

For poseidon2, we implement the round selection including
the adjustments for the improved grobner basis attacks
in [0].

[0]: https://eprint.iacr.org/2023/537.pdf
We need to be able to compute the minimal polynomial in order
to check that a randomly generated internal matrix is a secure choice,
i.e. that it does not have arbitrarily long subspace trails.

We need to be able to compute the minimal polynomial of a matrix
and check it's irreducible. We can't yet do the former, but with
Perron's criteron for monic polynomials we can do the latter with
this commit.
@redshiftzero redshiftzero marked this pull request as ready for review July 5, 2023 16:37
@redshiftzero redshiftzero merged commit 3bb36c5 into main Jul 5, 2023
@redshiftzero redshiftzero deleted the poseidon2-rounds branch July 5, 2023 16:46
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

Successfully merging this pull request may close these issues.

update Grobner basis round calculation
1 participant