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

Pr 2 #3

Draft
wants to merge 13 commits into
base: pr_1
Choose a base branch
from
Draft

Pr 2 #3

wants to merge 13 commits into from

Conversation

Al-Kindi-0
Copy link
Owner

Implementing Rescue prime, with optimizations, in the 64bit prime field in Montgomery form.

@Al-Kindi-0 Al-Kindi-0 requested a review from bobbinth June 28, 2022 22:21
Copy link
Collaborator

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you! A few comments:

  1. I think this is not based on the latest version of the codebase which is currently in Winterfell. You should probably update your fork to the latest version and then rebase this (and the other PR) from that.
  2. Let's move mds_multiply_freq() and all associated functions/constants into a separate module - e.g., mds_freq.rs. I think this code deserves its own module.
  3. Let's also have the fully defined MDS matrix exposed as a constant (this will be needed once you rebase from latest changes).
  4. Let's add some tests to make sure naive MDS matrix multiplication (using fully defined MDS matrix) gives the same results as the one using mds_multiply_freq(). These tests could also go into mds_freq.rs file.

crypto/src/hash/rescue/rp64_256/mod.rs Outdated Show resolved Hide resolved
@Al-Kindi-0
Copy link
Owner Author

Thank you for the feedback!

  1. I did that for both. Let me know if that works.
  2. Done. Let me know if the documentation is enough and if some of the functions defined there should not be.
  3. Did that instead of the old one. Where are these used exactly? I am still getting the "unused" warning.
  4. Added a simple one so let me know if it should be changed.

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.

4 participants