commit | d6cf75474bc7432e1d203c2a47db60ae6bf2bd5b | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | Wed Jan 13 11:30:00 2016 +0000 |
committer | Simon Butcher <simon.butcher@arm.com> | Wed Oct 05 14:19:14 2016 +0100 |
tree | 9997a9914c2f4ac6014fcba0330339b566333f66 | |
parent | a610b4c04beb60734a8bec3f0eb228be31d20afc [diff] [blame] |
cmac: zeroize sensitive intermediate values
diff --git a/library/cmac.c b/library/cmac.c index 8f6574a..87846a6 100644 --- a/library/cmac.c +++ b/library/cmac.c
@@ -129,6 +129,8 @@ multiply_by_u( ctx->K1, L ); multiply_by_u( ctx->K2, ctx->K1 ); + mbedtls_zeroize( L, sizeof( L ) ); + return( 0 ); } @@ -336,6 +338,9 @@ { return( ret ); } + + mbedtls_zeroize( int_key, sizeof( int_key ) ); + return( mbedtls_cmac_generate( ctx, input, in_len, tag, 16 ) ); }