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

Implement NonIdentity #1176

Merged
merged 1 commit into from Jan 3, 2023
Merged

Conversation

daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Dec 24, 2022

It would be nice to implement math that is generic over both projective and affine points with a common prime marker trait, see zkcrypto/group#43.
I believe in the meantime we could use Into<ProjectivePoint<C>> where C: PrimeCurve.

In the future I would like to implement the following math (which I believe are correct):

  • Multiplication between NonIdentity points.
  • Multiplication with NonZeroScalar.
  • Introduce fn add_identity(&self) -> NonIdentity.

Additionally the PublicKey type has to be adjusted to return NonIdentity when appopriate, which is a breaking change.

On a last point I would like to suggest renaming this to NonIdentityPoint, which would be more in line with NonZeroScalar.

Fixes #1170.

Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

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

Sorry for the belated review. This looks fine.

@tarcieri tarcieri merged commit 1f99a0a into RustCrypto:master Jan 3, 2023
@tarcieri tarcieri mentioned this pull request Mar 1, 2023
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.

Introduce NonIdentityPoint
2 participants