utils
utils copied to clipboard
zeroize: `libc` feature?
It looks like on several operating systems, the libc crate has wrappers for secure memset/bzero primitives:
https://github.com/rust-lang/libc/pull/2156
We could potentially have an optional dependency on libc which calls into these primitives from e.g. volatile_set, while defaulting to a portable implementation. Many programs are already linking with libc anyway.
We would somewhat annoyingly have to build an abstraction across them.
IMO unless there is a practical demonstration of the asm! approach not working, I don't think we should bother with it.