Fix naming of Tonelli-Shanks

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
str4d 2021-09-21 10:44:07 +12:00 committed by GitHub
parent 9999964d17
commit 2b350118b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -138,13 +138,13 @@ pub trait FieldExt: ff::PrimeField + From<bool> + Ord + Group<Scalar = Self> {
}
}
/// Tonelli-Shank's square-root algorithm for `p mod 16 = 1`.
/// TonelliShanks' square-root algorithm for `p mod 16 = 1`.
///
/// https://eprint.iacr.org/2012/685.pdf (page 12, algorithm 5)
///
/// `tm1d2` should be set to `(t - 1) // 2`, where `t = (modulus - 1) >> F::S`.
#[cfg(not(feature = "std"))]
pub(crate) fn sqrt_tonelli_shank<F: ff::PrimeField, S: AsRef<[u64]>>(
pub(crate) fn sqrt_tonelli_shanks<F: ff::PrimeField, S: AsRef<[u64]>>(
f: &F,
tm1d2: S,
) -> CtOption<F> {

View file

@ -513,7 +513,7 @@ impl ff::Field for Fp {
}
#[cfg(not(feature = "std"))]
crate::arithmetic::sqrt_tonelli_shank(
crate::arithmetic::sqrt_tonelli_shanks(
self,
&[
0x04a6_7c8d_cc96_9876,

View file

@ -513,7 +513,7 @@ impl ff::Field for Fq {
}
#[cfg(not(feature = "std"))]
crate::arithmetic::sqrt_tonelli_shank(
crate::arithmetic::sqrt_tonelli_shanks(
self,
&[
0x04ca_546e_c623_7590,