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

refactor(poseidon-cipher): simplify nonce validation using Num2Bits #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0x471
Copy link

@0x471 0x471 commented Jan 18, 2025

re #16

Description

  • Removed the explicit two128 variable declaration (var two128 = 2 ** 128)
  • Replaced the nonce validation using LessThan component with a simpler Num2Bits(128)(nonce) check
  • Changed ength * two128 to length << 128 in the initial state calculation for better consistency with bit operations

Related Issue(s)

Fixes #16

Other information

Checklist

  • I have read and understand the contributor guidelines and code of conduct.
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn style without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Important

We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical mistake, please feel free to message the team.

@0x471 0x471 requested a review from ctrlc03 as a code owner January 18, 2025 19:41
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.

better nonce constraint
1 participant