Name: js151677 Date: 05/24/2004
A DESCRIPTION OF THE REQUEST :
I studied the performances of the SHA1 MessageDigestSPI SPI, and it is MUCH too slow. Lots of optimizations are possible, up to the point to make the digest TWICE faster!
JUSTIFICATION :
The SHA-1 (FIPS PUB 180-1 or 180-2, whose specification is published by NIST) is a very common standard secure hash which is part of the SHS (Secure Hash Standard) in U.S. It is also part of various protocols using it natively (HTTP, authentication protocols, secured signatures...)
It is also used to certify the content of files in archives (where it also competes with MD5), in a more secure way than just CRC32 or Adler32 used in ZIP/JAR archives.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It is needed for signing JARs. Its performance is critical to accelerate the verification of potentially very large files.
So optimization for performance (but still with correctness) is needed.
The two classes are a freely reusable implementation and test for SHA-1, whose performance (for large files) is more than TWICE the implementation in the JCE (tested on Java 1.5 RC 1 on Windows XP).
I am the author of these classes developped independantly of other open-source or commercial implementations that I tested but don't have the level of performance I have made here.
Onte: In the past I could have access to the current JCE sources, but today they don't seem to be accessible, or I did not find it.
ACTUAL -
The JCE implementation of SHA1 (also MD5, SHA-224, SHA256, SHA-384, SHA-256 on which I am working) is still too slow.
CUSTOMER SUBMITTED WORKAROUND :
This is not a bug, just a RFE for performance.
(Incident Review ID: 270795)
======================================================================