projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb47aae
)
RT 4393: Call EC_GROUP_order_bits in priv2opt.
author
David Benjamin
<davidben@google.com>
Mon, 7 Mar 2016 14:57:58 +0000
(09:57 -0500)
committer
Emilia Kasper
<emilia@openssl.org>
Tue, 29 Mar 2016 18:03:48 +0000
(20:03 +0200)
The private key is a scalar and should be sized by the order, not the
degree. See RFC 5915.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
crypto/ec/ec_key.c
patch
|
blob
|
history
diff --git
a/crypto/ec/ec_key.c
b/crypto/ec/ec_key.c
index d24115463024d1ffebb51ae07e99392217477d3e..f7948ccab2aa4fbcd5419f44f3de46b64cdb7a9e 100644
(file)
--- 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)