From: Loup Vaillant Date: Fri, 27 Mar 2020 16:07:11 +0000 (+0100) Subject: Separated arithmetic moduloL from EdDSA X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7f9cf22eb7fe775c3dbbd4305547d3c5f06d3817;p=Monocypher.git Separated arithmetic moduloL from EdDSA --- diff --git a/src/monocypher.c b/src/monocypher.c index 59496f6..01bc4b7 100644 --- a/src/monocypher.c +++ b/src/monocypher.c @@ -1487,10 +1487,9 @@ void crypto_x25519_public_key(u8 public_key[32], crypto_x25519(public_key, secret_key, base_point); } -/////////////// -/// Ed25519 /// -/////////////// - +/////////////////////////// +/// Arithmetic modulo L /// +/////////////////////////// static const u8 L[32] = { 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, @@ -1562,6 +1561,10 @@ static int is_above_L(const u8 a[32]) return 1; } +/////////////// +/// Ed25519 /// +/////////////// + // Point (group element, ge) in a twisted Edwards curve, // in extended projective coordinates. // ge : x = X/Z, y = Y/Z, T = XY/Z