From: Loup Vaillant Date: Tue, 17 Mar 2020 07:40:37 +0000 (+0100) Subject: Minor bits & fixes X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=540149103e3f34d258557a03fdaa31deb147fee9;p=Monocypher.git Minor bits & fixes --- diff --git a/src/monocypher.c b/src/monocypher.c index f618a63..a6ac92b 100644 --- a/src/monocypher.c +++ b/src/monocypher.c @@ -2213,7 +2213,7 @@ static const fe A = {486662}; // We ignore v because we don't need it for X25519 (the Montgomery // ladder only uses u). // -// Note that e is eiter 0, 1 or -1 +// Note that e is either 0, 1 or -1 // if e = 0 u = 0 and v = 0 // if e = 1 u = w // if e = -1 u = -w - A = w * non_square * r^2 diff --git a/tests/gen/elligator-inverse.py b/tests/gen/elligator-inverse.py index 361c085..18f8118 100755 --- a/tests/gen/elligator-inverse.py +++ b/tests/gen/elligator-inverse.py @@ -51,7 +51,6 @@ # with this software. If not, see # -from elligator import fe from elligator import can_curve_to_hash from elligator import curve_to_hash from elligator import fast_curve_to_hash diff --git a/tests/test.c b/tests/test.c index 154b80e..707609c 100644 --- a/tests/test.c +++ b/tests/test.c @@ -922,7 +922,7 @@ static int p_elligator_x25519() int status = 0; int i = 0; while (i < 64) { - RANDOM_INPUT(sk1, 33); + RANDOM_INPUT(sk1, 32); RANDOM_INPUT(sk2, 32); u8 r[32]; if (crypto_elligator2_inverse(r, sk1, i)) {