Claims
- 1. A hash circuit comprising:
a hash memory for receiving input data, wherein the hash memory is accessed using a plurality of address locations; a hash channel, coupled to receive the input data from the hash memory, to hash the input data using a hash algorithm, wherein the hash channel is adapted to implement the hash algorithm in first and second rounds operating substantially in parallel; and wherein the hash circuit performs a first read access of the hash memory to provide a first data unit for processing in the first round of the hash algorithm and a second read access of the hash memory to provide a second data unit for processing in the second round of the hash algorithm.
- 2. The hash circuit of claim 1 wherein the hash algorithm is a secure hash algorithm.
- 3. The hash circuit of claim 1 wherein the first data unit is a first 32-bit word and the second data unit is a second 32-bit word.
- 4. The hash circuit of claim 1 wherein:
the hash circuit reads the first data unit from only even address locations of the plurality of address locations; and the hash circuit reads the second data unit from only odd address locations of the plurality of address locations.
- 5. The hash circuit of claim 4 wherein:
the first read access further comprises reading and logically combining additional data units for processing in the first round of the hash algorithm; and the second read access further comprises reading and logically combining additional data units for processing in the second round of the hash algorithm.
- 6. The hash circuit of claim 5 wherein:
the logically combining of the additional data units from the first read access comprises the XOR'ing of a first set of 32-bit words; and the logically combining of the additional data units from the second read access comprises the XOR'ing of a second set of 32-bit words.
- 7. A hash circuit comprising:
a hash memory to receive input data for hash processing; a padding circuit, coupled to receive data from the hash memory, to selectively add padding to portions of the input data in preparation for the hash processing; a hash channel, coupled to receive data from the padding circuit, to perform the hash processing; and wherein the padding is added substantially as the portions of the input data are read from the hash memory and provided to the hash channel.
- 8. The hash circuit of claim 7 wherein:
the hash processing comprises the SHA1 algorithm; the hash processing is begun prior to adding padding to portions of the input data; and the padding provides a 64-byte block of padded data in compliance with the SHA1 standard algorithm.
- 9. The hash circuit of claim 7 wherein the padding circuit is further operable to selectively add an input data stream length to the portions of the input data.
- 10. The hash circuit of claim 9 wherein the padding circuit is further operable to selectively add a previously-calculated HMAC digest to the portions of the input data.
- 11. The hash circuit of claim 7 wherein the padding circuit comprises a plurality of multiplexers and is operable to receive an input data size, determined substantially at or before the time of writing the input data into the hash memory, for use in multiplexing of the padding to the portions of the input data.
- 12. A hash circuit comprising:
an adder adapted to implement the SHA1 algorithm, wherein the adder computes a first round and a second round of the SHA1 algorithm substantially in parallel; and a hash memory coupled to provide data to the adder for hash processing.
- 13. The hash circuit of claim 12 wherein for the first round, the adder is adapted to:
compute a Kt function value; compute a non-linear function value; receive a temporary variable he or hc input; receive a read data input; receive a shifted temporary variable ha input; and provide a temporary output.
- 14. The hash circuit of claim 13 wherein for the second round, the adder is adapted to:
compute a Kt function value; compute a non-linear function value; receive a temporary variable hd or shifted temporary variable hb input; receive a read data input; and couple the temporary output from the first round to be an input to the second round.
- 15. The hash circuit of claim 14 wherein:
the adder implements a processing pipeline for each of the first and second rounds using an earlier clock cycle and a current clock cycle; and the earlier clock cycle precedes the current clock cycle in time.
- 16. The hash circuit of claim 15 wherein for the first round, the adder is adapted to:
compute the Kt function value in the earlier clock cycle; compute the non-linear function value in the earlier clock cycle; receive the temporary variable he or hc input in the earlier clock cycle; receive the read data input in the earlier clock cycle; and receive the shifted temporary variable ha input in the current clock cycle.
- 17. The hash circuit of claim 16 wherein for the second round, the adder is adapted to:
compute the Kt function value in the earlier clock cycle; receive the temporary variable hd or shifted temporary variable hb input in the earlier clock cycle; receive the read data input in the earlier clock cycle; compute the non-linear function value in the current clock cycle; and couple the temporary output from the first round in the current clock cycle.
- 18. The hash circuit of claim 17 wherein the adder comprises:
a first register to latch, for the first round, a first sum corresponding to the Kt function value, the non-linear function value, the temporary variable he or hc input, and the read data input. a second register to latch, for the second round, a second sum corresponding to the Kt function value, the temporary variable hd or shifted temporary variable hb input, and the read data input.
- 19. The hash circuit of claim 12 wherein the adder, for processing in the first round, comprises:
a first carry save adder to receive a non-linear function value, a Kt function value, and a temporary variable he or hc input; a second carry save adder coupled to receive a read data input from the hash memory and an output from the first carry save adder; a third carry save adder to receive a shifted temporary variable ha input and coupled to receive an output of the second carry save adder; and a register coupled between the second and third carry save adders.
- 20. The hash circuit of claim 19 wherein the register is a first register and the adder, for processing in the second round, further comprises:
a fourth carry save adder coupled to receive a Kt function value, a temporary variable hd or shifted temporary variable hb input, and a read data input; a fifth carry save adder to receive a non-linear function value and coupled to receive an output of the fourth carry save adder; a sixth carry save adder coupled to receive a temporary output from the first round and coupled to receive an output of the fifth carry save adder; and a second register coupled between the fourth and fifth carry save adders.
RELATED APPLICATIONS
[0001] This application is a non-provisional application claiming benefit under 35 U.S.C. sec. 119(e) of U.S. Provisional Application Serial No. 60/297,876, filed Jun. 13, 2001 (titled APPARATUS AND METHOD FOR A HASH PROCESSING SYSTEM USING MULTIPLE HASH STORAGE AREAS by Satish N. Anand) and of U.S. Provisional Application Serial No. 60/340,013, filed Dec. 10, 2001 (titled APPARATUS AND METHOD FOR A HASH PROCESSING SYSTEM USING MULTIPLE HASH STORAGE AREAS by Satish N. Anand), which are each incorporated by reference herein.
Provisional Applications (2)
|
Number |
Date |
Country |
|
60297876 |
Jun 2001 |
US |
|
60340013 |
Dec 2001 |
US |