[tahoe-dev] pycryptopp update Re: started on pycryptopp

zooko zooko at zooko.com
Fri Nov 2 20:12:47 UTC 2007


On Nov 2, 2007, at 1:43 PM, Jim McCoy wrote:

> Bleh.  Dump cryptopp and its goofy swig wrappers and move to
> libtomcrypt.  Nice and tight, modular, and _not_ done in c++.

Hi Jim!  :-)

I like C a lot of course, but truthfully I don't trust libtomcrypt's  
quality control.  The version of SHA-256 that lives in pycrypto was  
copied from libtomcrypt some years ago, and updated at least once  
since, and there have been not one but two bugs discovered in that  
implementation which cause it to give incorrect hash values in some  
cases.

Those two bugs would have been discovered by testing the  
implementation against the NIST FIPS 180-2 test vectors.  This  
implies that, at two different points in the past, the current stable  
release of libtomcrypt had not been checked against those test vectors.

By way of contrast, Crypto++ comes with a self-test which checks  
those test vectors against its SHA-256 implementation.  Also, of  
course, Crypto++ was the first ever open source software to get FIPS  
140-2 validation.  (OpenSSL was the second, and as far as I know  
those are the only two.)

So far, I'm enjoying writing hand-rolled Python wrappers around Crypto 
++.  Weird, I know.

Regards,

Zooko




More information about the tahoe-dev mailing list