commit | a866ba5d704973e5678d744ebd10ffbee3e3d3a3 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Sat Jul 20 18:31:05 2019 -0400 |
committer | Adam Langley <agl@google.com> | Tue Jul 23 20:04:46 2019 +0000 |
tree | 2fd51e70d2788da5a6eed9111d6195d5317a05a2 | |
parent | ef0183c537536b19c2d7352a68cd3c2bbe5572c4 [diff] |
Make EVP_PKEY_bits return 253 for Ed25519. OpenSSL returns 253, not 256, for both X25519 and Ed25519. https://crypto.stackexchange.com/questions/62024/x25519-why-openssl-shows-253-bits Change-Id: Ia1289ed3abaecf79a178476a61af724ac351671d Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/36787 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/evp/p_ed25519_asn1.c b/crypto/evp/p_ed25519_asn1.c index bd44b3f..1f996cf 100644 --- a/crypto/evp/p_ed25519_asn1.c +++ b/crypto/evp/p_ed25519_asn1.c
@@ -196,7 +196,7 @@ static int ed25519_size(const EVP_PKEY *pkey) { return 64; } -static int ed25519_bits(const EVP_PKEY *pkey) { return 256; } +static int ed25519_bits(const EVP_PKEY *pkey) { return 253; } const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { EVP_PKEY_ED25519,