pub struct Modulus<const LIMBS: usize>(pub Odd<Uint<LIMBS>>);Expand description
The modulus used in RSA or Paillier whose properties need to be proved.
Tuple Fields§
§0: Odd<Uint<LIMBS>>Implementations§
Source§impl<const MODULUS_LIMBS: usize> Modulus<MODULUS_LIMBS>
impl<const MODULUS_LIMBS: usize> Modulus<MODULUS_LIMBS>
pub fn new<const PRIME_LIMBS: usize>(dk: &Primes<PRIME_LIMBS>) -> Self
Sourcepub fn size_for_hashing<'a>(&self) -> [u8; 2]
pub fn size_for_hashing<'a>(&self) -> [u8; 2]
Number of bytes required to represent the modulus. The number itself expressed as bytes so that it can be hashed in
Sourcepub fn is_greater_than(&self, rhs: &Uint<MODULUS_LIMBS>) -> bool
pub fn is_greater_than(&self, rhs: &Uint<MODULUS_LIMBS>) -> bool
Returns true if the modulus > rhs
Trait Implementations§
impl<const LIMBS: usize> Eq for Modulus<LIMBS>
impl<const LIMBS: usize> StructuralPartialEq for Modulus<LIMBS>
Auto Trait Implementations§
impl<const LIMBS: usize> Freeze for Modulus<LIMBS>
impl<const LIMBS: usize> RefUnwindSafe for Modulus<LIMBS>
impl<const LIMBS: usize> Send for Modulus<LIMBS>
impl<const LIMBS: usize> Sync for Modulus<LIMBS>
impl<const LIMBS: usize> Unpin for Modulus<LIMBS>
impl<const LIMBS: usize> UnwindSafe for Modulus<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
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> 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