Enum ark_ff::fields::SqrtPrecomputation
source · #[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.