pub struct KoalaBearParameters;
Trait Implementations§
Source§impl BinomialExtensionData<4> for KoalaBearParameters
impl BinomialExtensionData<4> for KoalaBearParameters
Source§const EXT_GENERATOR: [KoalaBear; 4]
const EXT_GENERATOR: [KoalaBear; 4]
A generator of the extension fields multiplicative group.
const EXT_TWO_ADICITY: usize = 26usize
Source§const TWO_ADIC_EXTENSION_GENERATORS: Self::ArrayLike
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<KoalaBearParameters>; 4]; 2]
type ArrayLike = [[MontyField31<KoalaBearParameters>; 4]; 2]
ArrayLike should usually be [MontyField31; EXT_TWO_ADICITY - TWO_ADICITY].
Source§impl Clone for KoalaBearParameters
impl Clone for KoalaBearParameters
Source§fn clone(&self) -> KoalaBearParameters
fn clone(&self) -> KoalaBearParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KoalaBearParameters
impl Debug for KoalaBearParameters
Source§impl Default for KoalaBearParameters
impl Default for KoalaBearParameters
Source§fn default() -> KoalaBearParameters
fn default() -> KoalaBearParameters
Returns the “default value” for a type. Read more
Source§impl FieldParameters for KoalaBearParameters
impl FieldParameters for KoalaBearParameters
const MONTY_GEN: KoalaBear
fn exp_u64_generic<FA: FieldAlgebra>(val: FA, power: u64) -> FA
fn try_inverse<F: Field>(p1: F) -> Option<F>
const MONTY_ZERO: MontyField31<Self> = _
const MONTY_ONE: MontyField31<Self> = _
const MONTY_TWO: MontyField31<Self> = _
const MONTY_NEG_ONE: MontyField31<Self> = _
const HALF_P_PLUS_1: u32 = _
Source§impl Hash for KoalaBearParameters
impl Hash for KoalaBearParameters
Source§impl InternalLayerBaseParameters<KoalaBearParameters, 16> for KoalaBearInternalLayerParameters
impl InternalLayerBaseParameters<KoalaBearParameters, 16> for KoalaBearInternalLayerParameters
Source§fn internal_layer_mat_mul(
state: &mut [MontyField31<KoalaBearParameters>; 16],
sum: MontyField31<KoalaBearParameters>,
)
fn internal_layer_mat_mul( state: &mut [MontyField31<KoalaBearParameters>; 16], sum: MontyField31<KoalaBearParameters>, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0]
as it is handled separately.
const INTERNAL_DIAG_MONTY: [MontyField31<KoalaBearParameters>; 16] = INTERNAL_DIAG_MONTY_16
type ArrayLike = [MontyField31<KoalaBearParameters>; 15]
Source§fn generic_internal_linear_layer<FA>(state: &mut [FA; 16])
fn generic_internal_linear_layer<FA>(state: &mut [FA; 16])
Perform the internal matrix multiplication for any Abstract field
which implements multiplication by MontyField31 elements.
Source§impl InternalLayerBaseParameters<KoalaBearParameters, 24> for KoalaBearInternalLayerParameters
impl InternalLayerBaseParameters<KoalaBearParameters, 24> for KoalaBearInternalLayerParameters
Source§fn internal_layer_mat_mul(
state: &mut [MontyField31<KoalaBearParameters>; 24],
sum: MontyField31<KoalaBearParameters>,
)
fn internal_layer_mat_mul( state: &mut [MontyField31<KoalaBearParameters>; 24], sum: MontyField31<KoalaBearParameters>, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0]
as it is handled separately.
const INTERNAL_DIAG_MONTY: [MontyField31<KoalaBearParameters>; 24] = INTERNAL_DIAG_MONTY_24
type ArrayLike = [MontyField31<KoalaBearParameters>; 23]
Source§fn generic_internal_linear_layer<FA>(state: &mut [FA; 24])
fn generic_internal_linear_layer<FA>(state: &mut [FA; 24])
Perform the internal matrix multiplication for any Abstract field
which implements multiplication by MontyField31 elements.
Source§impl MontyParameters for KoalaBearParameters
impl MontyParameters for KoalaBearParameters
Source§const PRIME: u32 = 2_130_706_433u32
const PRIME: u32 = 2_130_706_433u32
The KoalaBear prime: 2^31 - 2^24 + 1 This is a 31-bit prime with the highest possible two adicity if we additionally demand that the cube map (x -> x^3) is an automorphism of the multiplicative group. It’s not unique, as there is one other option with equal 2 adicity: 2^30 + 2^27 + 2^24 + 1. There is also one 29-bit prime with higher two adicity which might be appropriate for some applications: 2^29 - 2^26 + 1.
const MONTY_BITS: u32 = 32u32
const MONTY_MU: u32 = 2_164_260_865u32
const MONTY_MASK: u32 = _
Source§impl PartialEq for KoalaBearParameters
impl PartialEq for KoalaBearParameters
Source§impl TwoAdicData for KoalaBearParameters
impl TwoAdicData for KoalaBearParameters
Source§const TWO_ADICITY: usize = 24usize
const TWO_ADICITY: usize = 24usize
Largest n such that 2^n divides p - 1.
Source§const TWO_ADIC_GENERATORS: Self::ArrayLike
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 INV_ROOTS_8: Self::ArrayLike
const INV_ROOTS_8: Self::ArrayLike
Precomputation of the inverses of ROOTS_8.
Source§const INV_ROOTS_16: Self::ArrayLike
const INV_ROOTS_16: Self::ArrayLike
Precomputation of the inverses of ROOTS_16.
Source§type ArrayLike = &'static [MontyField31<KoalaBearParameters>]
type ArrayLike = &'static [MontyField31<KoalaBearParameters>]
ArrayLike should usually be
&'static [MontyField31]
.Source§const ODD_FACTOR: i32 = _
const ODD_FACTOR: i32 = _
The odd constant r such that p = r * 2^n + 1
impl Copy for KoalaBearParameters
impl Eq for KoalaBearParameters
impl InternalLayerParameters<KoalaBearParameters, 16> for KoalaBearInternalLayerParameters
impl InternalLayerParameters<KoalaBearParameters, 24> for KoalaBearInternalLayerParameters
impl PackedMontyParameters for KoalaBearParameters
impl StructuralPartialEq for KoalaBearParameters
Auto Trait Implementations§
impl Freeze for KoalaBearParameters
impl RefUnwindSafe for KoalaBearParameters
impl Send for KoalaBearParameters
impl Sync for KoalaBearParameters
impl Unpin for KoalaBearParameters
impl UnwindSafe for KoalaBearParameters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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