diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-24 22:02:13 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-25 03:01:21 +0200 |
commit | 28d8b7eafe49450ef1bd20939334baebbea0a367 (patch) | |
tree | 5404d3b10c4141d31f23bb2e21ef0c73814308d0 /src/tools/curve25519.h | |
parent | hchacha20: keep in native endian in words (diff) | |
download | wireguard-monolithic-historical-28d8b7eafe49450ef1bd20939334baebbea0a367.tar.xz wireguard-monolithic-historical-28d8b7eafe49450ef1bd20939334baebbea0a367.zip |
crypto: make constant naming scheme consistent
Diffstat (limited to 'src/tools/curve25519.h')
-rw-r--r-- | src/tools/curve25519.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/curve25519.h b/src/tools/curve25519.h index 09ca6b9..ef0a09f 100644 --- a/src/tools/curve25519.h +++ b/src/tools/curve25519.h @@ -10,12 +10,12 @@ #include <sys/types.h> enum curve25519_lengths { - CURVE25519_POINT_SIZE = 32, + CURVE25519_KEY_SIZE = 32, }; -void curve25519(uint8_t mypublic[static CURVE25519_POINT_SIZE], const uint8_t secret[static CURVE25519_POINT_SIZE], const uint8_t basepoint[static CURVE25519_POINT_SIZE]); -void curve25519_generate_public(uint8_t pub[static CURVE25519_POINT_SIZE], const uint8_t secret[static CURVE25519_POINT_SIZE]); -static inline void curve25519_normalize_secret(uint8_t secret[static CURVE25519_POINT_SIZE]) +void curve25519(uint8_t mypublic[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE], const uint8_t basepoint[static CURVE25519_KEY_SIZE]); +void curve25519_generate_public(uint8_t pub[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE]); +static inline void curve25519_normalize_secret(uint8_t secret[static CURVE25519_KEY_SIZE]) { secret[0] &= 248; secret[31] &= 127; |