From b6e388ba9ab548356c7fb612144637a43e644ed2 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 15 Nov 2017 16:39:33 +0000 Subject: Remove the decaf_bzero function and replace with OPENSSL_cleanse() Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/5105) --- crypto/ec/curve448/scalar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crypto/ec/curve448/scalar.c') 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 + #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)( -- cgit v1.2.3