From edb4c796e01ec6c02f89c65f7dce6605bd561d80 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 8 Dec 2016 16:00:11 -0500 Subject: [PATCH] Add yet another way to spell 32. For folks who prefer the named length constants, the current ones aren't sufficient because the shared key isn't the private key or a public value. Well, it does have the same type as a public value, but it looks silly to write: uint8_t secret_key[X25519_PUBLIC_VALUE_LEN]; Change-Id: I391db8ee73e2b4305d0ddd22f6d99f6abbc6b45b Reviewed-on: https://boringssl-review.googlesource.com/12680 Commit-Queue: David Benjamin Reviewed-by: Adam Langley --- include/openssl/curve25519.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/openssl/curve25519.h b/include/openssl/curve25519.h index 19f9daa4..1bbb69a9 100644 --- a/include/openssl/curve25519.h +++ b/include/openssl/curve25519.h @@ -35,6 +35,7 @@ extern "C" { #define X25519_PRIVATE_KEY_LEN 32 #define X25519_PUBLIC_VALUE_LEN 32 +#define X25519_SHARED_KEY_LEN 32 /* X25519_keypair sets |out_public_value| and |out_private_key| to a freshly * generated, public–private key pair. */