]> git.codecow.com Git - Monocypher.git/commitdiff
Made L an array of *signed* integers
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 20 Jan 2019 21:42:38 +0000 (22:42 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 20 Jan 2019 21:42:38 +0000 (22:42 +0100)
Was unsigned previously, causing a bunch of implementation defined
conversions.  No machine nowadays are no 2's complement, but it's still
cleaner that way.

src/monocypher.c

index 962c47c43fb7c52cc769fb0a54c5adc9020cb6d2..4e4483654e54650d7b093fb98b3e9fa816364523 100644 (file)
@@ -1361,7 +1361,7 @@ void crypto_x25519_public_key(u8       public_key[32],
 /// Ed25519 ///
 ///////////////
 
-static const  u64 L[32] = { 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
+static const  i64 L[32] = { 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
                             0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14,
                             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10};