[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOLP8p7nMX_9_nyj0K=rQ83__YVgfzyiv1PPc0wzJTUDwZhhYA@mail.gmail.com>
Date: Thu, 27 Aug 2015 09:58:22 -0700
From: Bill Cox <waywardgeek@...il.com>
To: "discussions@...sword-hashing.net" <discussions@...sword-hashing.net>
Subject: Re: [PHC] Argon2 using memset still
On Thu, Aug 27, 2015 at 9:43 AM, Daniel Franke <dfoxfranke@...il.com> wrote:
> On 8/27/15, Bill Cox <waywardgeek@...il.com> wrote:
> > g++ has a habit of optimizing calls to memset away. I doubt that Argon2
> > succeed in it's attempts to clear memory. I copied this function from
> > Blake2:
> >
> > /* prevents compiler optimizing out memset() */
> > static inline void secure_zero_memory( void *v, size_t n )
> > {
> > volatile uint8_t *p = ( volatile uint8_t * )v;
> > while( n-- ) *p++ = 0;
> > }
>
> This is an improvement over memset, but note the comment above
> secure_wipe() in
> https://github.com/dfoxfranke/earworm/blob/master/util-ref.h.
>
True, but using secure_zero_memory is an improvement :)
I prefer to call the core hashing function a few times with small, but
exponentially increasing memory sizes. This will overwrite just about
everything, providing slightly improved garbage-collector attack resistance
without much performance loss. However, it increases complexity, and I
think I was the only one who felt the additional security against
garbage-collection attacks was worth it.
Content of type "text/html" skipped
Powered by blists - more mailing lists