[Cryptography] Secure erasure in C.
huitema at huitema.net
Sat Sep 10 18:08:04 EDT 2016
-----BEGIN PGP SIGNED MESSAGE-----
On Friday, September 9, 2016 3:22 PM, Ray Dillinger wrote:
> But operating systems are written in C, so you can't get secure erasure
> in anything else unless you can get it in C. And it looks like you
> can't get it in C unless you can get it in assembly language, and you
> can't get it in assembly language unless you can get it in silicon.
Most of the issue seems to be with optimizers. Un-optimized C is a basic imperative language, meaning the compiler is supposed to translate the code literally. Optimized C works on a different principle, i.e. translate the code into something that provides the same result as what the programmer meant, for some definition of "same result". The good news is that mainstream compilers support something like "#pragma optimize(off)", allowing to turn off optimization for a specific code segment. Bracketing the erasure routine with such pragmas should ensure that it erases as intended, at least as far as C is concerned.
- -- Christian Huitema
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using gpg4o v184.108.40.20658 - http://www.gpg4o.com/
-----END PGP SIGNATURE-----
More information about the cryptography