On Sun, Jul 23, 2017 at 10:30 AM, Pádraig Brady <[email protected]> wrote: > On 20/07/17 14:03, Paul Eggert wrote: >> * NEWS: Document this. >> * bootstrap.conf (gnulib_modules): Add explicit_bzero. >> * gl/lib/randint.c (randint_free): >> * gl/lib/randread.c (randread_free): >> * src/blake2/blake2-impl.h (secure_zero_memory): >> * src/shred.c (dopass, do_wipefd): >> Prefer explicit_bzero to memset when erasing secrets. > >> + shred now erases buffers containing secrets via the explicit_bzero >> + function, which should be more reliable. >> + [potential bug has always been present in 'shred'] > > shred doesn't have any secrets though right? > Ah I see, it used to have secrets since it originally > read the input file to seed the random number generator. > How about the attached to remove this redundant zeroing entirely? > > Also I think I'll remove the explicit_bzero() from blake2 > as src/blake2 is copied directly from the reference implementation. > So it would be best to change there and have a one way sync.
The patch looks fine. Plan for blake2 makes sense.
