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 <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2016-12-08 16:00:11 -05:00 committed by Adam Langley
parent 3977f30317
commit edb4c796e0

View File

@ -35,6 +35,7 @@ extern "C" {
#define X25519_PRIVATE_KEY_LEN 32 #define X25519_PRIVATE_KEY_LEN 32
#define X25519_PUBLIC_VALUE_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 /* X25519_keypair sets |out_public_value| and |out_private_key| to a freshly
* generated, publicprivate key pair. */ * generated, publicprivate key pair. */