From 2638fde16ec746851f542d135ddae6a45a8ee291 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sun, 20 Jan 2019 22:42:38 +0100 Subject: [PATCH] Made L an array of *signed* integers 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monocypher.c b/src/monocypher.c index 962c47c..4e44836 100644 --- a/src/monocypher.c +++ b/src/monocypher.c @@ -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}; -- 2.47.3