[ pycrypto-Bugs-1154530 ] SHA 256 doesn't match test vectors on AMD64
"SourceForge.net" <[email protected]> Tue, 01 Mar 2005 13:14:23 -0800
| Newsgroups | gmane.comp.python.cryptography.cvs |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1154530, was opened at 2005-03-01 12:24
Message generated for change (Comment added) made by greg
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1154530&group_id=20937
Category: None
Group: None
Status: Open
Resolution: None
Priority: 6
Submitted By: Zooko O'Whielacronx (zooko)
Assigned to: Nobody/Anonymous (nobody)
Summary: SHA 256 doesn't match test vectors on AMD64
Initial Comment:
On my Macintosh PPC G4 laptop:
>>> hex(bytes_to_long(SHA256.new('abc').digest()))
'0xBA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015ADL'
On my Linux Athlon64 workstation:
>>> hex(bytes_to_long(SHA256.new('abc').digest()))
'0x551CE4769446B343295EA7F819BAE21157541986A4DE11AB46B2340EA9831F22L'
The former is correct the FIPS 180-2 test vector for
SHA-256.
I see that the implementation is by Tom St. Denis but
it is very different from the one in his current
libtomcrypt 1.0.
Perhaps we should upgrade to that version?
I tried to run test_hashes.py, but it is apparently
written for an older (?) version of sancho that the
sancho 2.0 that I just downloaded.
----------------------------------------------------------------------
Comment By: Gregory P. Smith (greg)
Date: 2005-03-01 13:14
Message:
Logged In: YES
user_id=413
this SHA256 also fails on the Alpha.
a (presumably different, i haven't looked at the code)
libtomcrypt sha256 implementation works just fine for me as
seen in this python patch that adds a hashlib module that
uses it:
https://sourceforge.net/tracker/?func=detail&aid=1121611&group_id=5470&atid=305470
----------------------------------------------------------------------
Comment By: Zooko O'Whielacronx (zooko)
Date: 2005-03-01 12:24
Message:
Logged In: YES
user_id=52562
Bumping priority, just to distinguish this one from the crowd.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1154530&group_id=20937
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click