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 ReduceNonZero trait #827

Merged
merged 1 commit into from Dec 3, 2021

Commits on Dec 3, 2021

  1. elliptic-curve: add ReduceNonZero trait

    Adds a trait similar to `Reduce`, but where the output of the reduction
    is ensured to be non-zero.
    
    Also impls `Reduce` and `ReduceNonZero` for `NonZeroScalar`. This means
    that end users need only concern themselves with `Reduce` as they can
    use `NonZeroScalar::<C>::from_uint_reduced` instead of the more
    cumbersome `Scalar::<C>::from_uint_reduced_non_zero`.
    
    Related: RustCrypto/elliptic-curves#432
    tarcieri committed Dec 3, 2021
    Copy the full SHA
    83874f3 View commit details
    Browse the repository at this point in the history