Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 16 Jul 2016 20:02:59 +0300
From: Solar Designer <solar@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: passwdqc code quality

On Sat, Jul 16, 2016 at 06:34:12PM +0200, Daniel Cegie??ka wrote:
> 2016-07-16 18:27 GMT+02:00 Solar Designer <solar@...nwall.com>:
> > Maybe like Colin Percival's insecure_memzero():
> >
> > https://github.com/Tarsnap/libcperciva/blob/master/util/insecure_memzero.c
> >
> > http://www.daemonology.net/blog/2014-09-04-how-to-zero-a-buffer.html
> > http://www.daemonology.net/blog/2014-09-06-zeroing-buffers-is-insufficient.html
> 
> or use some kind of explicit_bzero() from OpenBSD
> 
> #include <string.h>
> 
> static void *(*volatile explicit_memset)(void *, int, size_t) = memset;
> 
> void explicit_bzero(void *b, size_t len)
> {
>         (*explicit_memset)(b, 0, len);
> }

Yes, but this is basically a subset of what Colin does.  Colin's idea is
that since none of these tricks are guaranteed to be sufficient, he'd
use several of them at once to minimize the chances of undesired
optimization.  Unfortunately, his insecure_memzero() has measurable
performance impact when used in his SHA-256 code (recently revised to
avoid such impact), but for our uses in passwdqc it should be fine.

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.