On Wed, Apr 23, 2014 at 04:39:01AM +0000, Miod Vallat wrote:
> > > + while (n-- > 0)
> > > +         x |= a[n] ^ b[n];
> > 
> > Won't compare the bytes at [0].
> 
> Uh? It will, n gets decremented after the test but before the x |=
> statement.

Heh. you're right.  And both Ted and I were dumbasses. I have
tied the Mr. Gumby hankerchief to my head.

Although probably means that hack is really not readable enough to be
worth saving 8 bytes of stack ;)

> 
> >                                 I think switching this to be
> > timingsafe_bcmp would be better, then we only have copy.
> 
> Agreed.
> 
Yup.

Reply via email to