diff options
author | Matt Caswell <matt@openssl.org> | 2017-11-15 16:39:33 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-02-20 12:59:29 +0000 |
commit | b6e388ba9ab548356c7fb612144637a43e644ed2 (patch) | |
tree | a581ffc7fc355cfc287b8c1e4467bf61e25df617 /crypto/ec/curve448/scalar.c | |
parent | f8385b0fc0215b378b61891582b0579659d0b9f4 (diff) |
Remove the decaf_bzero function and replace with OPENSSL_cleanse()
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)
Diffstat (limited to 'crypto/ec/curve448/scalar.c')
-rw-r--r-- | crypto/ec/curve448/scalar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ec/curve448/scalar.c b/crypto/ec/curve448/scalar.c index 6f9c371e79..5bc7b24cc6 100644 --- a/crypto/ec/curve448/scalar.c +++ b/crypto/ec/curve448/scalar.c @@ -11,6 +11,8 @@ * @warning This file was automatically generated in Python. * Please do not edit it. */ +#include <openssl/crypto.h> + #include "word.h" #include "constant_time.h" #include "point_448.h" @@ -169,7 +171,7 @@ decaf_error_t API_NS(scalar_invert) ( /* Demontgomerize */ sc_montmul(out,out,API_NS(scalar_one)); - decaf_bzero(precmp, sizeof(precmp)); + OPENSSL_cleanse(precmp, sizeof(precmp)); return decaf_succeed_if(~API_NS(scalar_eq)(out,API_NS(scalar_zero))); } @@ -259,7 +261,7 @@ decaf_error_t API_NS(scalar_decode)( void API_NS(scalar_destroy) ( scalar_t scalar ) { - decaf_bzero(scalar, sizeof(scalar_t)); + OPENSSL_cleanse(scalar, sizeof(scalar_t)); } void API_NS(scalar_decode_long)( |