pub trait FromUintUnchecked {
    type Uint: Integer;

    // Required method
    fn from_uint_unchecked(uint: Self::Uint) -> Self;
}
Expand description

Instantiate a scalar from an unsigned integer without checking for overflow.

Required Associated Types§

source

type Uint: Integer

Unsigned integer type (i.e. Curve::Uint)

Required Methods§

source

fn from_uint_unchecked(uint: Self::Uint) -> Self

Instantiate scalar from an unsigned integer without checking whether the value overflows the field modulus.

⚠️ WARNING!

Incorrectly used this can lead to mathematically invalid results, which can lead to potential security vulnerabilities.

Use with care!

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Uint = <C as Curve>::Uint