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

elliptic-curve: add Order trait #603

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Commits on Apr 21, 2021

  1. elliptic-curve: add Order trait

    Adds a trait which notably does *not* depend on the `arithmetic` feature
    which allows associating a constant for the curve's order with a
    particular curve type.
    
    Since it stores the curve type as a constant, it's not possible to use
    `GenericArray`, so instead it has each curve specify a `Limbs` type
    which is used as the type for an `ORDER` constant.
    
    The longer-term goal will be to merge this with the `Curve` trait,
    ensuring that every curve implementation has a known order regardless of
    whether it provides an arithmetic backend or not.
    
    This can be used as the foundation for making certain functionality
    generic across curve implementations at a baseline, such as checking if
    scalars are in-range, and as such can simplify things which are
    presently conditionally defined based on the presence or absence of an
    arithmetic backend.
    tarcieri committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    d5cfe37 View commit details
    Browse the repository at this point in the history