elliptic_curve::scalar

Trait IsHigh

Source
pub trait IsHigh {
    // Required method
    fn is_high(&self) -> Choice;
}
Expand description

Is this scalar greater than n / 2?

§Returns

  • For scalars 0 through n / 2: Choice::from(0)
  • For scalars (n / 2) + 1 through n - 1: Choice::from(1)

Required Methods§

Source

fn is_high(&self) -> Choice

Is this scalar greater than or equal to n / 2?

Implementors§

Source§

impl<C> IsHigh for NonZeroScalar<C>
where C: CurveArithmetic,

Source§

impl<C> IsHigh for ScalarPrimitive<C>
where C: Curve,