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

Add ConstantTimeSelect trait #454

Merged
merged 2 commits into from
Dec 17, 2023
Merged

Add ConstantTimeSelect trait #454

merged 2 commits into from
Dec 17, 2023

Commits on Dec 17, 2023

  1. Add ConstantTimeSelect trait

    We can't impl `subtle::ConditionallySelectable` for `Boxed*` types due
    to a bound on `Copy`.
    
    I've proposed various ways to try to fix this upstream, e.g.
    dalek-cryptography/subtle#118, from which the `ConstantTimeSelect` trait
    has been extracted. It provides the same API as
    `ConditionallySelectable` but without the `Copy` bound.
    
    A blanket impl of `ConstantTimeSelect` for all `ConditionallySelectable`
    types means that all stack allocated types can continue to use
    `ConditionallySelectable` and will receive an impl of
    `ConstantTimeSelect` as well.
    
    A bound on `ConstantTimeSelect` has been added to the `Integer` trait as
    well, allowing it to be used on all `*Uint` types in this crate with
    `Integer` as the trait abstraction.
    tarcieri committed Dec 17, 2023
    Configuration menu
    Copy the full SHA
    f928edd View commit details
    Browse the repository at this point in the history
  2. clippy

    tarcieri committed Dec 17, 2023
    Configuration menu
    Copy the full SHA
    ae89807 View commit details
    Browse the repository at this point in the history