Fix to SHA1 for 16 bit environments

New Message Reply About this list Date view Thread view Subject view Author view

James H. Brown (jbrown@burgoyne.com)
Mon, 20 Jul 1998 11:43:18 -0600


-- Summary --
I have made a fix to Steve Reid's SHA1.C public domain implementation of
Secure Hash Algorythm-1 / FIPS PUB 180-1. This change remains 100% public
domain.

-- Details --
In 16 bit environments hash values for files larger than 8191 (8K -1) were
not calculated correctly because the 'len' parameter to SHA1Update was
declared as 'unsigned int' but was assumed to be at least 32 bits in size.
This bug was clearly demonstrated because the code correctly hashed the
first two test vectors (both < 8192) but failed to correctly hash the third
test vector (>= 8192) specified in FIPS PUB 180-1.

I changed the parameter declaration and the declaration of the two local
variables, 'i' and 'j', from 'unsigned int' to 'unsigned long'. This
corrected the problem.

-- Action --
I have a new version of the source with an extensive comments describing all
the changes (I also fixed a few compiler warnings generated by Borland C).
I would like to make this code available at all of the
/pub/security/hash/sha/ directories if someone will please contact me
directly via e-mail to point me at the best place to put it.

- James
jbrown@burgoyne.com <mailto:jbrown@burgoyne.com>


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Fri Aug 21 1998 - 17:20:40 ADT