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

feat: Poseidon2-based CRHF and available as Merkle hash #716

Merged
merged 6 commits into from
Dec 17, 2024
Merged

Conversation

alxiong
Copy link
Contributor

@alxiong alxiong commented Dec 16, 2024

closes: #709

This PR:

Follow up with #713, This PR implements CRHF which impl the CRHF trait

  • adjust trait CRHF to allow dynamic size ::type Input (need new tag)
  • implement two flavors of Poseido2-based CRHF, one fixed input size (thus zero-padding), the other variable input size (thus bit-padding), both implements the modified CRHF trait
  • implement trait DigestAlgorithm for both CRHF so that they can be used as Merkle Tree hash candidates.

This PR does not:

Once this is merged, it's time to release a few tags (and new versions), and readjust the dependencies declaration and CHANGELOG, main README (poseidon2 available!)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (main)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added relevant changelog entries to the CHANGELOG.md of touched crates.
  • Re-reviewed Files changed in the GitHub PR explorer

@alxiong alxiong requested a review from mrain as a code owner December 16, 2024 15:11
Copy link
Contributor

@mrain mrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alxiong alxiong merged commit 8eaad8c into main Dec 17, 2024
6 checks passed
@alxiong alxiong deleted the p2-crhf branch December 17, 2024 15:51
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.

Poseidon2 CRHF and Sponge
2 participants