[openssl-commits] [openssl] master update
Emilia Kasper
emilia at openssl.org
Tue Mar 29 18:04:00 UTC 2016
The branch master has been updated
via fe56d8e8a3665dc7e6784e0c170f790e6df8153f (commit)
from eb47aae5d33de3d39379c15e20cbbd12ea8a29be (commit)
- Log -----------------------------------------------------------------
commit fe56d8e8a3665dc7e6784e0c170f790e6df8153f
Author: David Benjamin <davidben at google.com>
Date: Mon Mar 7 09:57:58 2016 -0500
RT 4393: Call EC_GROUP_order_bits in priv2opt.
The private key is a scalar and should be sized by the order, not the
degree. See RFC 5915.
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Emilia Käsper <emilia at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/ec/ec_key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index d241154..f7948cc 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -607,7 +607,7 @@ size_t ec_key_simple_priv2oct(const EC_KEY *eckey,
{
size_t buf_len;
- buf_len = (EC_GROUP_get_degree(eckey->group) + 7) / 8;
+ buf_len = (EC_GROUP_order_bits(eckey->group) + 7) / 8;
if (eckey->priv_key == NULL)
return 0;
if (buf == NULL)
More information about the openssl-commits
mailing list