diff --git a/contrib/keygen-html/src/curve25519_generate.c b/contrib/keygen-html/src/curve25519_generate.c
index c280b89..50d35de 100644
--- a/contrib/keygen-html/src/curve25519_generate.c
+++ b/contrib/keygen-html/src/curve25519_generate.c
@@ -10,7 +10,7 @@ typedef unsigned int u32;
typedef unsigned char u8;
typedef u32 __le32;
-enum { CURVE25519_POINT_SIZE = 32 };
+enum { CURVE25519_KEY_SIZE = 32 };
#ifndef __always_inline
#define __always_inline __inline __attribute__((__always_inline__))
@@ -37,7 +37,7 @@ enum { CURVE25519_POINT_SIZE = 32 };
/* We don't even attempt to deal with this in javascript. */
#define memzero_explicit(a, b)
-static __always_inline void normalize_secret(u8 secret[CURVE25519_POINT_SIZE])
+static __always_inline void normalize_secret(u8 secret[CURVE25519_KEY_SIZE])
{
secret[0] &= 248;
secret[31] &= 127;
diff --git a/src/curve25519.c b/src/curve25519.c
index e76588b..5367c06 100644
--- a/src/curve25519.c
+++ b/src/curve25519.c
@@ -58,14 +58,14 @@ static noinline void memzero_explicit(void *s, size_t count)
#include "../crypto/zinc/curve25519/curve25519-fiat32.h"
#endif
-void curve25519_generate_public(uint8_t pub[static CURVE25519_POINT_SIZE], const uint8_t secret[static CURVE25519_POINT_SIZE])
+void curve25519_generate_public(uint8_t pub[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE])
{
- static const uint8_t basepoint[CURVE25519_POINT_SIZE] = { 9 };
+ static const uint8_t basepoint[CURVE25519_KEY_SIZE] = { 9 };
curve25519(pub, secret, basepoint);
}
-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(uint8_t mypublic[static CURVE25519_KEY_SIZE], const uint8_t secret[static CURVE25519_KEY_SIZE], const uint8_t basepoint[static CURVE25519_KEY_SIZE])
{
curve25519_generic(mypublic, secret, basepoint);
}
diff --git a/src/curve25519.h b/src/curve25519.h
index 09ca6b9..ef0a09f 100644
--- a/src/curve25519.h
+++ b/src/curve25519.h
@@ -10,12 +10,12 @@
#include
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;