Struct num_modular::Montgomery
source · [−]pub struct Montgomery<I, M>(_, _);
Expand description
A modular reducer based on Montgomery form, only supports odd modulus.
The generic type T represents the underlying integer representation for modular inverse -m^-1 mod R
,
and R=2^B
will be used as the auxiliary modulus, where B is automatically selected
based on the size of T.
Trait Implementations
sourceimpl<I: Clone, M: Clone> Clone for Montgomery<I, M>
impl<I: Clone, M: Clone> Clone for Montgomery<I, M>
sourcefn clone(&self) -> Montgomery<I, M>
fn clone(&self) -> Montgomery<I, M>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<I: Debug, M: Debug> Debug for Montgomery<I, M>
impl<I: Debug, M: Debug> Debug for Montgomery<I, M>
sourceimpl Reducer<u128> for Montgomery<u128, u128>
impl Reducer<u128> for Montgomery<u128, u128>
sourceimpl Reducer<u16> for Montgomery<u16, u16>
impl Reducer<u16> for Montgomery<u16, u16>
sourceimpl Reducer<u32> for Montgomery<u32, u32>
impl Reducer<u32> for Montgomery<u32, u32>
sourceimpl Reducer<u64> for Montgomery<u64, u64>
impl Reducer<u64> for Montgomery<u64, u64>
sourceimpl Reducer<u8> for Montgomery<u8, u8>
impl Reducer<u8> for Montgomery<u8, u8>
impl<I: Copy, M: Copy> Copy for Montgomery<I, M>
Auto Trait Implementations
impl<I, M> RefUnwindSafe for Montgomery<I, M> where
I: RefUnwindSafe,
M: RefUnwindSafe,
impl<I, M> Send for Montgomery<I, M> where
I: Send,
M: Send,
impl<I, M> Sync for Montgomery<I, M> where
I: Sync,
M: Sync,
impl<I, M> Unpin for Montgomery<I, M> where
I: Unpin,
M: Unpin,
impl<I, M> UnwindSafe for Montgomery<I, M> where
I: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more