The branch master has been updated
       via  fe56d8e8a3665dc7e6784e0c170f790e6df8153f (commit)
      from  eb47aae5d33de3d39379c15e20cbbd12ea8a29be (commit)


- Log -----------------------------------------------------------------
commit fe56d8e8a3665dc7e6784e0c170f790e6df8153f
Author: David Benjamin <[email protected]>
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 <[email protected]>
    Reviewed-by: Emilia Käsper <[email protected]>

-----------------------------------------------------------------------

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)
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to