#[non_exhaustive]pub enum SqrtPrecomputation<F: Field> {
TonelliShanks {
two_adicity: u32,
quadratic_nonresidue_to_trace: F,
trace_of_modulus_minus_one_div_two: &'static [u64],
},
Case3Mod4 {
modulus_plus_one_div_four: &'static [u64],
},
}
Expand description
Precomputation that makes computing square roots faster A particular variant should only be instantiated if the modulus satisfies the corresponding condition.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TonelliShanks
Fields
§
quadratic_nonresidue_to_trace: F
Case3Mod4
To be used when the modulus is 3 mod 4.
Implementations§
Auto Trait Implementations§
impl<F> Freeze for SqrtPrecomputation<F>where
F: Freeze,
impl<F> RefUnwindSafe for SqrtPrecomputation<F>where
F: RefUnwindSafe,
impl<F> Send for SqrtPrecomputation<F>
impl<F> Sync for SqrtPrecomputation<F>
impl<F> Unpin for SqrtPrecomputation<F>where
F: Unpin,
impl<F> UnwindSafe for SqrtPrecomputation<F>where
F: UnwindSafe,
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