Skip to content

Commit a866ba5

Browse files
davidbenagl
authored andcommitted
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 <[email protected]>
1 parent ef0183c commit a866ba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crypto/evp/p_ed25519_asn1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int ed25519_priv_encode(CBB *out, const EVP_PKEY *pkey) {
196196

197197
static int ed25519_size(const EVP_PKEY *pkey) { return 64; }
198198

199-
static int ed25519_bits(const EVP_PKEY *pkey) { return 256; }
199+
static int ed25519_bits(const EVP_PKEY *pkey) { return 253; }
200200

201201
const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = {
202202
EVP_PKEY_ED25519,

0 commit comments

Comments
 (0)