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

chore: remove use of default for points and scalars #142

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

Conversation

AaronFeickert
Copy link
Contributor

@AaronFeickert AaronFeickert commented Sep 3, 2024

The use of the Default implementation for Ristretto point and scalar types is somewhat non-idiomatic, since it isn't immediately clear what a "default" point or scalar must be. In practice, these are the identity group element and zero scalar, respectively.

This PR removes ambiguity and makes the library more future proof by removing all such uses. Instead, it uses the Identity implementation for point types and the ZERO constant for scalars.

Closes #141.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

utACK

@AaronFeickert
Copy link
Contributor Author

Any other changes needed to merge?

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.

Replace use of point and scalar defaults
3 participants