[Cryptography] Secure erasure in C.

Tony Arcieri bascule at gmail.com
Thu Sep 8 00:26:50 EDT 2016


On Wed, Sep 7, 2016 at 1:04 PM, Ray Dillinger <bear at sonic.net> wrote:

> But every so often I need to securely delete a buffer that I
> get from somewhere else, or flatten a stack image before exiting
> a routine, and that turns out to be harder.


Take a look at the implementation of sodium_memzero() from libsodium:

https://github.com/jedisct1/libsodium/blob/master/src/libsodium/sodium/utils.c

See also memset_s():

http://en.cppreference.com/w/c/string/byte/memset

-- 
Tony Arcieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20160907/3761e1ef/attachment.html>


More information about the cryptography mailing list