Skip to content

Conversation

@lighter-zz
Copy link
Contributor

@lighter-zz lighter-zz commented Dec 24, 2025

  • Added detailed documentation to ECgFp5 point and scalar field code, clarifying group law, canonical encoding, and security properties.
  • Enforced canonical input checks in scalar multiplication and Montgomery multiplication, with panics on invalid input.
  • Updated tests to verify rejection of non-canonical scalars and correct handling of canonical cases.
  • Improved Schnorr signature documentation, emphasizing prime order, canonical encoding, and the absence of cofactor-related attacks.

Added detailed documentation to ECgFp5 point and scalar field code, clarifying group law, canonical encoding, and security properties. Enforced canonical input checks in scalar multiplication and Montgomery multiplication, with panics on invalid input. Updated tests to verify rejection of non-canonical scalars and correct handling of canonical cases. Improved Schnorr signature documentation, emphasizing prime order, canonical encoding, and the absence of cofactor-related attacks.
// SECURITY: Verify that 's' is canonical (< n) as required by Montgomery multiplication
if !s.IsCanonical() {
panic("MontyMul: first operand 's' must be canonical (< n)")
}
Copy link
Contributor Author

@lighter-zz lighter-zz Dec 24, 2025

Choose a reason for hiding this comment

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

algorithmic changes here

@lighterabc lighterabc merged commit 3729ab6 into main Dec 24, 2025
3 checks passed
@lighterabc lighterabc deleted the zz/review branch December 24, 2025 15:42
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.

3 participants