On L, 2017-11-11 at 00:10 +0000, Jorge Almeida wrote: > Well, most programmers probably won't care about this stuff anyway, > and people who deal with cryptography tend to be more cautious than > average. But I'm not really making a case for safe versions of known > functions. After all, the usual functions do fine for most > applications. memset() would be enough to clear RAM with sensitive > data if we had a pragma (or equivalent) to convince the compiler to > not ignore it (I mean a pragma to invoke on a particular function > definition when the programmer feels that a black box behaviour is > undesirable). Of course, solving the problem of the compiler copying > stuff around might be harder nut to crack.
Sounds like you want explicit_bzero from libbsd?