Thanks for the sample program. I've checked in the fix to sha.cpp.

The cause of the bug, if anyone is curious, was that I assumed a certain 
pointer would be word-aligned, and used its least significant bit to store 
whether or not the CPU supports SSE2. It turns out that I forgot that 
pointer isn't necessarily word-aligned, so when that happens, the code would 
incorrectly use the SSE2 code path. And for some reason, the SSE2 
instructions didn't cause an exception on non-SSE2 CPUs.

--------------------------------------------------
From: "midnightmagic" <[email protected]>
Sent: Friday, July 03, 2009 1:55 PM
To: "Crypto++ Users" <[email protected]>
Subject: Re: wrong SHA-256 result with optimized assembly on i386 
([pycryptopp] #24: SHA256 failure on NetBSD with multiple segments)

>
>
> Oh, Hey Zooko. :-)
>
> I just posted my sample program in here too. I guess I should've
> included more information including a link to the pycryptopp/tahoe
> trac tickets.
>
> >
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to