Skip to content

Conversation

@yelhousni
Copy link
Contributor

@yelhousni yelhousni commented Feb 9, 2024

Description

jointScalarMulGeneric is used to compute [u]P+[v]Q when the GLV endomorphism is not a available. It was implementing it naively as most of the curves of interest to us have GLV. But users might want for example to verify ECDSA with NIST curves e.g. P-256, P-384 — in which case this PR might come in handy.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Added test TestJointScalarMul4 and TestJointScalarMulEdgeCases4 (edge casess involving 0-scalars and (0,0)-points) for P-256 curve (no GLV).

How has this been benchmarked?

old: 1418482 scs
new: 1186170 scs

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yelhousni yelhousni self-assigned this Feb 9, 2024
@yelhousni yelhousni requested a review from ivokub February 9, 2024 14:13
@yelhousni yelhousni added this to the v0.9.0 milestone Feb 9, 2024
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

Perfect!

@yelhousni yelhousni merged commit 4c3ef85 into master Feb 9, 2024
@yelhousni yelhousni deleted the perf/jointScalarMulGeneric branch February 9, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants