From: Niels Möller Date: Fri, 11 Jul 2014 20:56:24 +0000 (+0200) Subject: Comment on Shanks-Tonelli reference. X-Git-Tag: nettle_3.1rc1~155^2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17165610e482fb3ec9327dcf231bb83787a77fc1;p=thirdparty%2Fnettle.git Comment on Shanks-Tonelli reference. --- diff --git a/ecc-25519.c b/ecc-25519.c index 25eeed99..51414a30 100644 --- a/ecc-25519.c +++ b/ecc-25519.c @@ -60,6 +60,10 @@ ecc_25519_modp(const struct ecc_curve *ecc UNUSED, mp_limb_t *rp) + sec_add_1 (rp, rp, ECC_LIMB_SIZE - 1, 19 * cy); } +/* We'll also need square roots, see + http://www.math.vt.edu/people/brown/doc/sqrts.pdf for a description + of Shanks-Tonelli. The needed quadratic non-residue is 3. */ + const struct ecc_curve nettle_curve25519 = { 255,