Home GnuPG

wipememory: use memset for non-constant length or large buffer wipes

Description

wipememory: use memset for non-constant length or large buffer wipes

* src/g10lib.h (CONSTANT_P): New.
(_gcry_wipememory2): New prototype.
(wipememory2): Use _gcry_wipememory2 if _len not constant expression or
lenght is larger than 64 bytes.
(FASTWIPE_T, FASTWIPE_MULT, fast_wipememory2_unaligned_head): Remove.
(fast_wipememory2): Always handle buffer as unaligned.
* src/misc.c (__gcry_burn_stack): Move memset_ptr variable to...
(memset_ptr): ... here. New.
(_gcry_wipememory2): New.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 5 2018, 7:42 PM
Parents
rC0068d41d9304: Change buf_cpy and buf_xor* functions to use buf_put/buf_get helpers
Branches
Unknown
Tags
Unknown