summaryrefslogtreecommitdiff
path: root/src/common/crypto_curve25519.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/crypto_curve25519.h')
-rw-r--r--src/common/crypto_curve25519.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common/crypto_curve25519.h b/src/common/crypto_curve25519.h
index 547e393567..4011820949 100644
--- a/src/common/crypto_curve25519.h
+++ b/src/common/crypto_curve25519.h
@@ -14,12 +14,20 @@
/** Length of the result of a curve25519 handshake. */
#define CURVE25519_OUTPUT_LEN 32
-/** Wrapper type for a curve25519 public key */
+/** Wrapper type for a curve25519 public key.
+ *
+ * (We define a separate type for these to make it less likely that we'll
+ * mistake them for secret keys.)
+ * */
typedef struct curve25519_public_key_t {
uint8_t public_key[CURVE25519_PUBKEY_LEN];
} curve25519_public_key_t;
-/** Wrapper type for a curve25519 secret key */
+/** Wrapper type for a curve25519 secret key
+ *
+ * (We define a separate type for these to make it less likely that we'll
+ * mistake them for public keys.)
+ **/
typedef struct curve25519_secret_key_t {
uint8_t secret_key[CURVE25519_SECKEY_LEN];
} curve25519_secret_key_t;