p3_baby_bear

Struct BabyBearParameters

Source
pub struct BabyBearParameters;

Trait Implementations§

Source§

impl BarrettParameters for BabyBearParameters

Source§

const N: usize = 40usize

Source§

const PRIME_I128: i128 = _

Source§

const PSEUDO_INV: i64 = _

Source§

const MASK: i64 = -1_024i64

Source§

impl BinomialExtensionData<4> for BabyBearParameters

Source§

const W: BabyBear = _

W is a value such that (x^DEG - WN) is irreducible.
Source§

const DTH_ROOT: BabyBear = _

DTH_ROOT = W^((p - 1)/DEG)
Source§

const EXT_GENERATOR: [BabyBear; 4] = _

A generator of the extension fields multiplicative group.
Source§

const EXT_TWO_ADICITY: usize = 29usize

Source§

const TWO_ADIC_EXTENSION_GENERATORS: Self::ArrayLike = _

A list of generators of 2-adic subgroups not contained in the base field.
Source§

type ArrayLike = [[MontyField31<BabyBearParameters>; 4]; 2]

ArrayLike should usually be [MontyField31; EXT_TWO_ADICITY - TWO_ADICITY].
Source§

impl BinomialExtensionData<5> for BabyBearParameters

Source§

const W: BabyBear = _

W is a value such that (x^DEG - WN) is irreducible.
Source§

const DTH_ROOT: BabyBear = _

DTH_ROOT = W^((p - 1)/DEG)
Source§

const EXT_GENERATOR: [BabyBear; 5] = _

A generator of the extension fields multiplicative group.
Source§

const EXT_TWO_ADICITY: usize = 27usize

Source§

const TWO_ADIC_EXTENSION_GENERATORS: Self::ArrayLike = _

A list of generators of 2-adic subgroups not contained in the base field.
Source§

type ArrayLike = [[MontyField31<BabyBearParameters>; 5]; 0]

ArrayLike should usually be [MontyField31; EXT_TWO_ADICITY - TWO_ADICITY].
Source§

impl Clone for BabyBearParameters

Source§

fn clone(&self) -> BabyBearParameters

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BabyBearParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BabyBearParameters

Source§

fn default() -> BabyBearParameters

Returns the “default value” for a type. Read more
Source§

impl FieldParameters for BabyBearParameters

Source§

impl Hash for BabyBearParameters

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl InternalLayerBaseParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters

Source§

fn internal_layer_mat_mul( state: &mut [MontyField31<BabyBearParameters>; 16], sum: MontyField31<BabyBearParameters>, )

Perform the internal matrix multiplication: s -> (1 + Diag(V))s. We ignore state[0] as it is handled separately.

Source§

const INTERNAL_DIAG_MONTY: [BabyBear; 16] = INTERNAL_DIAG_MONTY_16

Source§

type ArrayLike = [MontyField31<BabyBearParameters>; 15]

Source§

fn generic_internal_linear_layer<AF>(state: &mut [AF; 16])
where AF: AbstractField + Mul<BabyBear, Output = AF>,

Perform the internal matrix multiplication for any Abstract field which implements multiplication by MontyField31 elements.
Source§

impl InternalLayerBaseParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters

Source§

fn internal_layer_mat_mul( state: &mut [MontyField31<BabyBearParameters>; 24], sum: MontyField31<BabyBearParameters>, )

Perform the internal matrix multiplication: s -> (1 + Diag(V))s. We ignore state[0] as it is handled separately.

Source§

const INTERNAL_DIAG_MONTY: [BabyBear; 24] = INTERNAL_DIAG_MONTY_24

Source§

type ArrayLike = [MontyField31<BabyBearParameters>; 23]

Source§

fn generic_internal_linear_layer<AF>(state: &mut [AF; 24])
where AF: AbstractField + Mul<BabyBear, Output = AF>,

Perform the internal matrix multiplication for any Abstract field which implements multiplication by MontyField31 elements.
Source§

impl MontyParameters for BabyBearParameters

Source§

const PRIME: u32 = 2_013_265_921u32

The Baby Bear prime: 2^31 - 2^27 + 1. This is the unique 31-bit prime with the highest possible 2 adicity (27).

Source§

const MONTY_BITS: u32 = 32u32

Source§

const MONTY_MU: u32 = 2_281_701_377u32

Source§

const MONTY_MASK: u32 = _

Source§

impl MontyParametersNeon for BabyBearParameters

Source§

impl PartialEq for BabyBearParameters

Source§

fn eq(&self, other: &BabyBearParameters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TwoAdicData for BabyBearParameters

Source§

const TWO_ADICITY: usize = 27usize

Largest n such that 2^n divides p - 1.
Source§

const TWO_ADIC_GENERATORS: Self::ArrayLike = _

A list of generators of 2-adic subgroups. The i’th element must be a 2^i root of unity and the i’th element squared must be the i-1’th element.
Source§

const ROOTS_8: Self::ArrayLike = _

Precomputation of the first 3 8th-roots of unity. Read more
Source§

const INV_ROOTS_8: Self::ArrayLike = _

Precomputation of the inverses of ROOTS_8.
Source§

const ROOTS_16: Self::ArrayLike = _

Precomputation of the first 7 16th-roots of unity. Read more
Source§

const INV_ROOTS_16: Self::ArrayLike = _

Precomputation of the inverses of ROOTS_16.
Source§

type ArrayLike = &'static [MontyField31<BabyBearParameters>]

ArrayLike should usually be &'static [MontyField31].
Source§

const ODD_FACTOR: i32 = _

The odd constant r such that p = r * 2^n + 1
Source§

impl Copy for BabyBearParameters

Source§

impl Eq for BabyBearParameters

Source§

impl InternalLayerParameters<BabyBearParameters, 16> for BabyBearInternalLayerParameters

Source§

impl InternalLayerParameters<BabyBearParameters, 24> for BabyBearInternalLayerParameters

Source§

impl PackedMontyParameters for BabyBearParameters

Source§

impl StructuralPartialEq for BabyBearParameters

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more