]> git.codecow.com Git - Monocypher.git/commitdiff
Minor bits & fixes
authorLoup Vaillant <loup@loup-vaillant.fr>
Tue, 17 Mar 2020 07:40:37 +0000 (08:40 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Tue, 17 Mar 2020 07:40:37 +0000 (08:40 +0100)
src/monocypher.c
tests/gen/elligator-inverse.py
tests/test.c

index f618a63a10ab0330bde71971d1c4225c87bd1908..a6ac92b6d1a9dd8977dc9834e77077b6b2b54579 100644 (file)
@@ -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
index 361c0852135f3ecf837deb0a6fe1fb4471412e65..18f8118eefdd88e0c2200e4a4bb37cdfd9ae218d 100755 (executable)
@@ -51,7 +51,6 @@
 # with this software.  If not, see
 # <https://creativecommons.org/publicdomain/zero/1.0/>
 
-from elligator import fe
 from elligator import can_curve_to_hash
 from elligator import curve_to_hash
 from elligator import fast_curve_to_hash
index 154b80ebbcdd2628bfb017eabf6a06410cc8ab97..707609cce421ba9bc45016a068bb25232704fce9 100644 (file)
@@ -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)) {