pub struct FixedMontyForm<const LIMBS: usize> { /* private fields */ }Expand description
An integer in Montgomery form represented using LIMBS limbs.
The odd modulus is set at runtime.
Implementations§
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Sourcepub const fn inv(&self) -> CtOption<Self>
👎Deprecated since 0.7.0: please use invert instead
pub const fn inv(&self) -> CtOption<Self>
invert insteadComputes self^-1 representing the multiplicative inverse of self.
i.e. self * self^-1 = 1.
If the number was invertible, the second element of the tuple is the truthy value, otherwise it is the falsy value (in which case the first element’s value is unspecified).
Sourcepub const fn invert(&self) -> CtOption<Self>
pub const fn invert(&self) -> CtOption<Self>
Computes self^-1 representing the multiplicative inverse of self.
i.e. self * self^-1 = 1.
If the number was invertible, the second element of the tuple is the truthy value, otherwise it is the falsy value (in which case the first element’s value is unspecified).
Sourcepub const fn inv_vartime(&self) -> CtOption<Self>
👎Deprecated since 0.7.0: please use invert_vartime instead
pub const fn inv_vartime(&self) -> CtOption<Self>
invert_vartime insteadComputes self^-1 representing the multiplicative inverse of self.
i.e. self * self^-1 = 1.
If the number was invertible, the second element of the tuple is the truthy value, otherwise it is the falsy value (in which case the first element’s value is unspecified).
This version is variable-time with respect to the value of self, but constant-time with
respect to self’s params.
Sourcepub const fn invert_vartime(&self) -> CtOption<Self>
pub const fn invert_vartime(&self) -> CtOption<Self>
Computes self^-1 representing the multiplicative inverse of self.
i.e. self * self^-1 = 1.
If the number was invertible, the second element of the tuple is the truthy value, otherwise it is the falsy value (in which case the first element’s value is unspecified).
This version is variable-time with respect to the value of self, but constant-time with
respect to self’s params.
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Sourcepub const fn lincomb_vartime(products: &[(&Self, &Self)]) -> Self
pub const fn lincomb_vartime(products: &[(&Self, &Self)]) -> Self
Calculate the sum of products of pairs (a, b) in products.
This method is variable time only with the value of the modulus. For a modulus with leading zeros, this method is more efficient than a naive sum of products.
This method will panic if products is empty. All terms must be associated
with equivalent MontyParams.
§Panics
- if
productsis empty.
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Sourcepub const fn jacobi_symbol(&self) -> JacobiSymbol
pub const fn jacobi_symbol(&self) -> JacobiSymbol
Compute the Jacobi symbol (self|modulus).
For a prime modulus, this corresponds to the Legendre symbol and indicates
whether self is quadratic residue.
Sourcepub const fn jacobi_symbol_vartime(&self) -> JacobiSymbol
pub const fn jacobi_symbol_vartime(&self) -> JacobiSymbol
Compute the Jacobi symbol (self|modulus).
For a prime modulus, this corresponds to the Legendre symbol and indicates
whether self is quadratic residue.
This method is variable-time with respect to the value of self.
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Sourcepub const fn pow<const RHS_LIMBS: usize>(
&self,
exponent: &Uint<RHS_LIMBS>,
) -> Self
pub const fn pow<const RHS_LIMBS: usize>( &self, exponent: &Uint<RHS_LIMBS>, ) -> Self
Raises to the exponent power.
Sourcepub const fn pow_bounded_exp<const RHS_LIMBS: usize>(
&self,
exponent: &Uint<RHS_LIMBS>,
exponent_bits: u32,
) -> Self
pub const fn pow_bounded_exp<const RHS_LIMBS: usize>( &self, exponent: &Uint<RHS_LIMBS>, exponent_bits: u32, ) -> Self
Raises to the exponent power,
with exponent_bits representing the number of (least significant) bits
to take into account for the exponent.
NOTE: exponent_bits may be leaked in the time pattern.
Sourcepub const fn pow_vartime<const RHS_LIMBS: usize>(
&self,
exponent: &Uint<RHS_LIMBS>,
) -> Self
pub const fn pow_vartime<const RHS_LIMBS: usize>( &self, exponent: &Uint<RHS_LIMBS>, ) -> Self
Raises to the exponent power.
This method is variable time in exponent.
Sourcepub fn pow_amm(&self, exponent: &Uint<LIMBS>) -> Self
pub fn pow_amm(&self, exponent: &Uint<LIMBS>) -> Self
Raises to the exponent power using Almost Montgomery Multiplication (AMM).
Sourcepub fn pow_amm_bounded_exp(
&self,
exponent: &Uint<LIMBS>,
exponent_bits: u32,
) -> Self
pub fn pow_amm_bounded_exp( &self, exponent: &Uint<LIMBS>, exponent_bits: u32, ) -> Self
Raises to the exponent power using Almost Montgomery Multiplication (AMM)
with exponent_bits representing the number of (least significant) bits
to take into account for the exponent.
NOTE: exponent_bits may be leaked in the time pattern.
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> FixedMontyForm<LIMBS>
impl<const LIMBS: usize> FixedMontyForm<LIMBS>
Sourcepub const fn new(
integer: &Uint<LIMBS>,
params: &FixedMontyParams<LIMBS>,
) -> Self
pub const fn new( integer: &Uint<LIMBS>, params: &FixedMontyParams<LIMBS>, ) -> Self
Instantiates a new MontyForm that represents this integer mod MOD.
Sourcepub const fn retrieve(&self) -> Uint<LIMBS>
pub const fn retrieve(&self) -> Uint<LIMBS>
Retrieves the integer currently encoded in this MontyForm, guaranteed to be reduced.
Sourcepub const fn zero(params: &FixedMontyParams<LIMBS>) -> Self
pub const fn zero(params: &FixedMontyParams<LIMBS>) -> Self
Instantiates a new MontyForm that represents zero.
Sourcepub const fn one(params: &FixedMontyParams<LIMBS>) -> Self
pub const fn one(params: &FixedMontyParams<LIMBS>) -> Self
Instantiates a new MontyForm that represents 1.
Sourcepub const fn params(&self) -> &FixedMontyParams<LIMBS>
pub const fn params(&self) -> &FixedMontyParams<LIMBS>
Returns the parameter struct used to initialize this object.
Sourcepub const fn as_montgomery(&self) -> &Uint<LIMBS>
pub const fn as_montgomery(&self) -> &Uint<LIMBS>
Access the MontyForm value in Montgomery form.
Sourcepub fn as_montgomery_mut(&mut self) -> &mut Uint<LIMBS>
pub fn as_montgomery_mut(&mut self) -> &mut Uint<LIMBS>
Mutably access the MontyForm value in Montgomery form.
Sourcepub const fn from_montgomery(
integer: Uint<LIMBS>,
params: &FixedMontyParams<LIMBS>,
) -> Self
pub const fn from_montgomery( integer: Uint<LIMBS>, params: &FixedMontyParams<LIMBS>, ) -> Self
Create a MontyForm from a value in Montgomery form.
Sourcepub const fn to_montgomery(&self) -> Uint<LIMBS>
pub const fn to_montgomery(&self) -> Uint<LIMBS>
Extract the value from the MontyForm in Montgomery form.
Trait Implementations§
Source§impl<const LIMBS: usize> Add<&FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Add<&FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
+ operator.Source§fn add(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn add(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
+ operation. Read moreSource§impl<const LIMBS: usize> Add<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Add<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
+ operator.Source§fn add(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn add(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
+ operation. Read moreSource§impl<const LIMBS: usize> Add<FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Add<FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
+ operator.Source§fn add(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn add(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
+ operation. Read moreSource§impl<const LIMBS: usize> Add for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Add for FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
+ operator.Source§fn add(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn add(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
+ operation. Read moreSource§impl<const LIMBS: usize> AddAssign<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> AddAssign<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
Source§fn add_assign(&mut self, rhs: &FixedMontyForm<LIMBS>)
fn add_assign(&mut self, rhs: &FixedMontyForm<LIMBS>)
+= operation. Read moreSource§impl<const LIMBS: usize> AddAssign for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> AddAssign for FixedMontyForm<LIMBS>
Source§fn add_assign(&mut self, rhs: FixedMontyForm<LIMBS>)
fn add_assign(&mut self, rhs: FixedMontyForm<LIMBS>)
+= operation. Read moreSource§impl<const LIMBS: usize> Clone for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Clone for FixedMontyForm<LIMBS>
Source§fn clone(&self) -> FixedMontyForm<LIMBS>
fn clone(&self) -> FixedMontyForm<LIMBS>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const LIMBS: usize> ConditionallySelectable for FixedMontyForm<LIMBS>
Available on crate feature subtle only.
impl<const LIMBS: usize> ConditionallySelectable for FixedMontyForm<LIMBS>
subtle only.Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl<const LIMBS: usize> ConstantTimeEq for FixedMontyForm<LIMBS>
Available on crate feature subtle only.
impl<const LIMBS: usize> ConstantTimeEq for FixedMontyForm<LIMBS>
subtle only.Source§impl<const LIMBS: usize> CtAssign for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> CtAssign for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> CtAssignSlice for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> CtAssignSlice for FixedMontyForm<LIMBS>
Source§fn ct_assign_slice(dst: &mut [Self], src: &[Self], choice: Choice)
fn ct_assign_slice(dst: &mut [Self], src: &[Self], choice: Choice)
Source§impl<const LIMBS: usize> CtEq for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> CtEq for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> CtEqSlice for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> CtEqSlice for FixedMontyForm<LIMBS>
Source§fn ct_eq_slice(a: &[Self], b: &[Self]) -> Choice
fn ct_eq_slice(a: &[Self], b: &[Self]) -> Choice
a is equal to b in constant-time.Source§fn ct_ne_slice(a: &[Self], b: &[Self]) -> Choice
fn ct_ne_slice(a: &[Self], b: &[Self]) -> Choice
a is NOT equal to b in constant-time.Source§impl<const LIMBS: usize> Debug for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Debug for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize, P: ConstMontyParams<LIMBS>> From<&ConstMontyForm<P, LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize, P: ConstMontyParams<LIMBS>> From<&ConstMontyForm<P, LIMBS>> for FixedMontyForm<LIMBS>
Source§fn from(const_monty_form: &ConstMontyForm<P, LIMBS>) -> Self
fn from(const_monty_form: &ConstMontyForm<P, LIMBS>) -> Self
Source§impl<const LIMBS: usize> From<&FixedMontyForm<LIMBS>> for BoxedMontyForm
Available on crate feature alloc only.
impl<const LIMBS: usize> From<&FixedMontyForm<LIMBS>> for BoxedMontyForm
alloc only.Source§fn from(input: &FixedMontyForm<LIMBS>) -> Self
fn from(input: &FixedMontyForm<LIMBS>) -> Self
Source§impl<const LIMBS: usize> From<FixedMontyForm<LIMBS>> for BoxedMontyForm
Available on crate feature alloc only.
impl<const LIMBS: usize> From<FixedMontyForm<LIMBS>> for BoxedMontyForm
alloc only.Source§fn from(input: FixedMontyForm<LIMBS>) -> Self
fn from(input: FixedMontyForm<LIMBS>) -> Self
Source§impl<const LIMBS: usize> Invert for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Invert for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> MontyForm for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> MontyForm for FixedMontyForm<LIMBS>
Source§type Params = MontyParams<Uint<LIMBS>>
type Params = MontyParams<Uint<LIMBS>>
Source§type Multiplier<'a> = FixedMontyMultiplier<'a, LIMBS>
type Multiplier<'a> = FixedMontyMultiplier<'a, LIMBS>
Source§fn new_params_vartime(modulus: Odd<Self::Integer>) -> Self::Params
fn new_params_vartime(modulus: Odd<Self::Integer>) -> Self::Params
modulus,
variable time in modulus.Source§fn new(value: Self::Integer, params: &Self::Params) -> Self
fn new(value: Self::Integer, params: &Self::Params) -> Self
Source§fn params(&self) -> &Self::Params
fn params(&self) -> &Self::Params
Source§fn as_montgomery(&self) -> &Self::Integer
fn as_montgomery(&self) -> &Self::Integer
Source§fn into_montgomery(self) -> Self::Integer
fn into_montgomery(self) -> Self::Integer
self and return it.Source§fn copy_montgomery_from(&mut self, other: &Self)
fn copy_montgomery_from(&mut self, other: &Self)
other into self.
NOTE: the parameters remain unchanged.Source§fn lincomb_vartime(products: &[(&Self, &Self)]) -> Self
fn lincomb_vartime(products: &[(&Self, &Self)]) -> Self
Source§fn div_by_2_assign(&mut self)
fn div_by_2_assign(&mut self)
x such that x + x = self
and writes it into self.Source§impl<const LIMBS: usize> Mul<&FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Mul<&FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
* operator.Source§fn mul(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn mul(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
* operation. Read moreSource§impl<const LIMBS: usize> Mul<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Mul<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
* operator.Source§fn mul(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn mul(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
* operation. Read moreSource§impl<const LIMBS: usize> Mul<FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Mul<FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
* operator.Source§fn mul(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn mul(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
* operation. Read moreSource§impl<const LIMBS: usize> Mul for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Mul for FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
* operator.Source§fn mul(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn mul(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
* operation. Read moreSource§impl<const LIMBS: usize> MulAssign<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> MulAssign<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
Source§fn mul_assign(&mut self, rhs: &FixedMontyForm<LIMBS>)
fn mul_assign(&mut self, rhs: &FixedMontyForm<LIMBS>)
*= operation. Read moreSource§impl<const LIMBS: usize> MulAssign for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> MulAssign for FixedMontyForm<LIMBS>
Source§fn mul_assign(&mut self, rhs: FixedMontyForm<LIMBS>)
fn mul_assign(&mut self, rhs: FixedMontyForm<LIMBS>)
*= operation. Read moreSource§impl<const LIMBS: usize, const RHS_LIMBS: usize> MultiExponentiateBoundedExp<Uint<RHS_LIMBS>, [(FixedMontyForm<LIMBS>, Uint<RHS_LIMBS>)]> for FixedMontyForm<LIMBS>
Available on crate feature alloc only.
impl<const LIMBS: usize, const RHS_LIMBS: usize> MultiExponentiateBoundedExp<Uint<RHS_LIMBS>, [(FixedMontyForm<LIMBS>, Uint<RHS_LIMBS>)]> for FixedMontyForm<LIMBS>
alloc only.Source§fn multi_exponentiate_bounded_exp(
bases_and_exponents: &[(Self, Uint<RHS_LIMBS>)],
exponent_bits: u32,
) -> Self
fn multi_exponentiate_bounded_exp( bases_and_exponents: &[(Self, Uint<RHS_LIMBS>)], exponent_bits: u32, ) -> Self
x1 ^ k1 * ... * xn ^ kn.Source§impl<const N: usize, const LIMBS: usize, const RHS_LIMBS: usize> MultiExponentiateBoundedExp<Uint<RHS_LIMBS>, [(FixedMontyForm<LIMBS>, Uint<RHS_LIMBS>); N]> for FixedMontyForm<LIMBS>
impl<const N: usize, const LIMBS: usize, const RHS_LIMBS: usize> MultiExponentiateBoundedExp<Uint<RHS_LIMBS>, [(FixedMontyForm<LIMBS>, Uint<RHS_LIMBS>); N]> for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> Neg for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Neg for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
- operator.Source§fn neg(self) -> FixedMontyForm<LIMBS>
fn neg(self) -> FixedMontyForm<LIMBS>
- operation. Read moreSource§impl<const LIMBS: usize> Neg for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Neg for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> PartialEq for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> PartialEq for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize, const RHS_LIMBS: usize> PowBoundedExp<Uint<RHS_LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize, const RHS_LIMBS: usize> PowBoundedExp<Uint<RHS_LIMBS>> for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> Retrieve for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Retrieve for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> Square for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Square for FixedMontyForm<LIMBS>
Source§impl<const LIMBS: usize> SquareAssign for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> SquareAssign for FixedMontyForm<LIMBS>
Source§fn square_assign(&mut self)
fn square_assign(&mut self)
self * self, but may be more efficient.
Writes the result in self.Source§impl<const LIMBS: usize> Sub<&FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Sub<&FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
- operator.Source§fn sub(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn sub(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
- operation. Read moreSource§impl<const LIMBS: usize> Sub<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Sub<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
- operator.Source§fn sub(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn sub(self, rhs: &FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
- operation. Read moreSource§impl<const LIMBS: usize> Sub<FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Sub<FixedMontyForm<LIMBS>> for &FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
- operator.Source§fn sub(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn sub(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
- operation. Read moreSource§impl<const LIMBS: usize> Sub for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Sub for FixedMontyForm<LIMBS>
Source§type Output = FixedMontyForm<LIMBS>
type Output = FixedMontyForm<LIMBS>
- operator.Source§fn sub(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
fn sub(self, rhs: FixedMontyForm<LIMBS>) -> FixedMontyForm<LIMBS>
- operation. Read moreSource§impl<const LIMBS: usize> SubAssign<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> SubAssign<&FixedMontyForm<LIMBS>> for FixedMontyForm<LIMBS>
Source§fn sub_assign(&mut self, rhs: &FixedMontyForm<LIMBS>)
fn sub_assign(&mut self, rhs: &FixedMontyForm<LIMBS>)
-= operation. Read moreSource§impl<const LIMBS: usize> SubAssign for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> SubAssign for FixedMontyForm<LIMBS>
Source§fn sub_assign(&mut self, rhs: FixedMontyForm<LIMBS>)
fn sub_assign(&mut self, rhs: FixedMontyForm<LIMBS>)
-= operation. Read moreSource§impl<const LIMBS: usize> Zeroize for FixedMontyForm<LIMBS>
Available on crate feature zeroize only.
impl<const LIMBS: usize> Zeroize for FixedMontyForm<LIMBS>
zeroize only.impl<const LIMBS: usize> Copy for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> CtSelectUsingCtAssign for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Eq for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> StructuralPartialEq for FixedMontyForm<LIMBS>
Auto Trait Implementations§
impl<const LIMBS: usize> Freeze for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> RefUnwindSafe for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Send for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Sync for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> Unpin for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> UnsafeUnpin for FixedMontyForm<LIMBS>
impl<const LIMBS: usize> UnwindSafe for FixedMontyForm<LIMBS>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConditionallyNegatable for T
impl<T> ConditionallyNegatable for T
Source§fn conditional_negate(&mut self, choice: Choice)
fn conditional_negate(&mut self, choice: Choice)
Source§impl<T> CtSelect for Twhere
T: CtSelectUsingCtAssign,
impl<T> CtSelect for Twhere
T: CtSelectUsingCtAssign,
Source§impl<T, const N: usize> CtSelectArray<N> for T
impl<T, const N: usize> CtSelectArray<N> for T
Source§impl<T, Exponent, BasesAndExponents> MultiExponentiate<Exponent, BasesAndExponents> for Twhere
T: MultiExponentiateBoundedExp<Exponent, BasesAndExponents>,
Exponent: Bounded,
BasesAndExponents: AsRef<[(T, Exponent)]> + ?Sized,
impl<T, Exponent, BasesAndExponents> MultiExponentiate<Exponent, BasesAndExponents> for Twhere
T: MultiExponentiateBoundedExp<Exponent, BasesAndExponents>,
Exponent: Bounded,
BasesAndExponents: AsRef<[(T, Exponent)]> + ?Sized,
Source§fn multi_exponentiate(bases_and_exponents: &BasesAndExponents) -> T
fn multi_exponentiate(bases_and_exponents: &BasesAndExponents) -> T
x1 ^ k1 * ... * xn ^ kn.