diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/curve25519/curve25519.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/curve25519/curve25519.c b/src/lib/libcrypto/curve25519/curve25519.c index f24adc1fbe..994b804af5 100644 --- a/src/lib/libcrypto/curve25519/curve25519.c +++ b/src/lib/libcrypto/curve25519/curve25519.c | |||
| @@ -4895,7 +4895,8 @@ x25519_public_from_private(uint8_t out_public_value[32], | |||
| 4895 | } | 4895 | } |
| 4896 | 4896 | ||
| 4897 | void | 4897 | void |
| 4898 | X25519_keypair(uint8_t out_public_value[32], uint8_t out_private_key[32]) | 4898 | X25519_keypair(uint8_t out_public_value[X25519_KEY_LENGTH], |
| 4899 | uint8_t out_private_key[X25519_KEY_LENGTH]) | ||
| 4899 | { | 4900 | { |
| 4900 | /* All X25519 implementations should decode scalars correctly (see | 4901 | /* All X25519 implementations should decode scalars correctly (see |
| 4901 | * https://tools.ietf.org/html/rfc7748#section-5). However, if an | 4902 | * https://tools.ietf.org/html/rfc7748#section-5). However, if an |
| @@ -4920,8 +4921,9 @@ X25519_keypair(uint8_t out_public_value[32], uint8_t out_private_key[32]) | |||
| 4920 | } | 4921 | } |
| 4921 | 4922 | ||
| 4922 | int | 4923 | int |
| 4923 | X25519(uint8_t out_shared_key[32], const uint8_t private_key[32], | 4924 | X25519(uint8_t out_shared_key[X25519_KEY_LENGTH], |
| 4924 | const uint8_t peer_public_value[32]) | 4925 | const uint8_t private_key[X25519_KEY_LENGTH], |
| 4926 | const uint8_t peer_public_value[X25519_KEY_LENGTH]) | ||
| 4925 | { | 4927 | { |
| 4926 | static const uint8_t kZeros[32] = {0}; | 4928 | static const uint8_t kZeros[32] = {0}; |
| 4927 | 4929 | ||
