Claims
- 1. A cryptographic processing system, comprising:
a cipher circuit to perform encryption processing for a plurality of data packets; and a hash circuit coupled to receive at least a portion of the plurality of data packets for hash processing after encryption processing by the cipher circuit, wherein the hash circuit comprises:
(i) a first hash channel and a second hash channel each operable to perform the hash processing; and (ii) a common hash memory coupled to receive the portion of the plurality of data packets, wherein the common hash memory comprises at least two storage areas each selectively coupled to provide data to the first hash channel or the second hash channel for the hash processing.
- 2. The processing system of claim 1 further comprising:
a first controller coupled to control the hash processing in the first hash channel; and a second controller coupled to control the hash processing in the second hash channel independently from the hash processing in the first hash channel.
- 3. The processing system of claim 1 wherein the first hash channel and the second hash channel are each operable to perform the hash processing using at least two different hash algorithms.
- 4. The processing system of claim 3 wherein the two different hash algorithms are a secure hash algorithm and a message digest algorithm.
- 5. The processing system of claim 4 wherein the secure hash algorithm is the SHA1 algorithm and the message digest algorithm is the MD5 algorithm.
- 6. The processing system of claim 3 wherein:
the two storage areas comprise a first storage area and a second storage area for storing data; and the common hash memory is operable to receive and store data from the cipher circuit into the second storage area while data stored in the first storage area is being hashed.
- 7. The processing system of claim 6 wherein the data stored in the first storage area and the data stored in the second storage area each form a portion of a data packet being processed in a data processing channel of the processing system.
- 8. A hash circuit comprising:
a common hash memory to receive input data, wherein the common hash memory comprises at least a first storage area and a second storage area; a first hash channel to perform hash processing and coupled to receive the input data from the first or second storage areas for hash processing; and a second hash channel to perform hash processing and coupled to receive the input data from the first or second storage areas for hash processing.
- 9. The hash circuit of claim 8 wherein the first hash channel and the second hash channel are each operable to perform hash processing using at least two different hash algorithms.
- 10. The hash circuit of claim 9 wherein the first hash channel comprises two five-input adders.
- 11. The hash circuit of claim 10 wherein the second hash channel comprises two five-input adders.
- 12. The hash circuit of claim 8 wherein the first hash channel comprises:
a first algorithm circuit to implement a first hash algorithm; a second algorithm circuit to implement a second hash algorithm; and the first algorithm circuit and the second algorithm circuit share four temporary variable storage registers ha, hb, hc, and hd.
- 13. The hash circuit of claim 8 wherein the first hash channel comprises:
a first adder to implement a first hash algorithm; a second adder to implement a second hash algorithm; and a padding circuit, coupled between the common hash memory and the first adder, operable to selectively add padding to portions of the input data received from the common hash memory prior to providing to the first adder.
- 14. The hash circuit of claim 13 wherein the padding circuit is further coupled between the common hash memory and the second adder and is further operable to selectively add padding to portions of the input data received from the common hash memory prior to providing to the second adder.
- 15. The hash circuit of claim 14 wherein:
the padding circuit is a first padding circuit to provide data used to compute a first round of the first hash algorithm; and the first hash channel further comprises a second padding circuit, coupled between the common hash memory and the first adder, operable to selectively add padding to portions of the input data provided to compute a second round of the first hash algorithm.
- 16. The hash circuit of claim 15 wherein the first hash channel performs the first hash algorithm substantially at a rate of two rounds per clock cycle.
- 17. The hash circuit of claim 15 wherein the first hash algorithm is a secure hash algorithm.
- 18. The hash circuit of claim 14 wherein the padding circuit is further operable to selectively add an input data stream length to the portions of the input data.
- 19. The hash circuit of claim 14 wherein the padding circuit is further operable to selectively add a previously-calculated HMAC digest to the portions of the input data.
- 20. The hash circuit of claim 8 wherein:
the hash processing in the first hash channel comprises computations using a hash algorithm; data is read from the first storage area for a first set of rounds of the hash algorithm; and data is solely read from and solely written to the second storage area for a second set of rounds of the hash algorithm.
- 21. The hash circuit of claim 20 wherein:
the hash algorithm is the SHA1 algorithm; the first set of rounds includes SHA1 rounds number 1-16; and the second set of rounds includes SHA1 rounds number 17-80.
- 22. The hash circuit of claim 20 wherein:
the hash algorithm is a first hash algorithm; the hash processing in the second hash channel comprises computations using a second hash algorithm different from the first hash algorithm; and data is solely read from the first storage area for computations using the second hash algorithm.
- 23. The hash circuit of claim 22 wherein:
the first hash algorithm is the SHA1 algorithm; the first set of rounds includes SHA1 rounds number 1-16; the second set of rounds includes SHA1 rounds number 17-80; the second hash algorithm is the MD5 algorithm; and the data read from the first storage area comprises sub-blocks Wj.
- 24. The hash circuit of claim 23 wherein data is read from the first storage area for all standard rounds of the MD5 algorithm.
- 25. The hash circuit of claim 22 wherein the first and second hash channels are operating in tandem to perform hashing operations on a common data packet.
- 26. The hash circuit of claim 25 wherein:
the first hash algorithm is the SHA1 algorithm; the second hash algorithm is the MD5 algorithm; and the hash circuit is implementing a pseudo-random function security protocol.
- 27. The hash circuit of claim 26 wherein the pseudo-random function security protocol is the PRF mode of the Transport Layer Security (TLS) standard.
- 28. The hash circuit of claim 27 wherein the hash circuit performs repeated hash processing of the input data in the first storage area.
- 29. The hash circuit of claim 8 wherein:
the hash processing in the first hash channel comprises computations using a hash algorithm; data is read from the first storage area for a plurality of rounds of the hash algorithm; and data is written to the second storage area for the plurality of rounds.
- 30. The hash circuit of claim 8 wherein the first hash channel comprises:
a first adder corresponding to a first hash algorithm; and a second adder corresponding to a second hash algorithm.
- 31. The hash circuit of claim 30 wherein:
the second hash algorithm is the MD5 algorithm; the second adder implements a processing pipeline using an earlier clock cycle and a current clock cycle; and the earlier clock cycle precedes the current clock cycle in time.
- 32. The hash circuit of claim 31 wherein the second adder is adapted to:
receive a read data input in the earlier clock cycle; compute a Ti function value in the earlier clock cycle; and compute a non-linear function value in the current clock cycle.
- 33. The hash circuit of claim 32 wherein the second adder is further adapted to:
receive a temporary variable hd or ha input in the earlier clock cycle; and receive a temporary variable hb input in the current clock cycle.
- 34. The hash circuit of claim 33 wherein the second adder comprises a register to latch a sum corresponding to the read data input, the Ti function value, and the temporary variable hd or ha input.
- 35. The hash circuit of claim 33 wherein the second adder comprises:
a first carry save adder to receive the read data input, the Ti function value, and the temporary variable hd or ha input; a second carry save adder to receive the non-linear function value and coupled to an output of the first carry save adder; and a register coupled between the first and second carry save adders.
- 36. The hash circuit of claim 30 wherein:
the first hash algorithm is the SHA1 algorithm; and the first adder computes a first round and a second round of the SHA1 algorithm substantially in parallel.
- 37. The hash circuit of claim 36 wherein for the first round, the first 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.
- 38. The hash circuit of claim 37 wherein for the second round, the first 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.
- 39. The hash circuit of claim 38 wherein:
the first 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.
- 40. The hash circuit of claim 39 wherein for the first round, the first 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.
- 41. The hash circuit of claim 40 wherein for the second round, the first 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.
- 42. The hash circuit of claim 41 wherein the first 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.
- 43. The hash circuit of claim 42 wherein the first adder comprises 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.
- 44. The hash circuit of claim 41 wherein the first adder, for processing in the first round, comprises:
a first carry save adder to receive the non-linear function value, the Kt function value, and the temporary variable he or hc input; a second carry save adder to receive the read data input and an output from the first carry save adder; a third carry save adder to receive the 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.
- 45. The hash circuit of claim 44 wherein the register is a first register and the first adder, for processing in the second round, further comprises:
a fourth carry save adder to receive the Kt function value, the temporary variable hd or shifted temporary variable hb input, and the read data input; a fifth carry save adder to receive the non-linear function value and coupled to receive an output of the fourth carry save adder; a sixth carry save adder coupled to receive the 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.
- 46. The hash circuit of claim 30 wherein:
the first hash algorithm is the SHA1 algorithm; the second hash algorithm is the MD5 algorithm; the first adder is operable to receive inputs ha, hb, hc, hd, and he from temporary storage locations ha, hb, hc, hd, and he and to provide outputs sha1_temp1 and sha1_temp2 corresponding to results from computations for first and second consecutive rounds of the SHA1 algorithm; and the second adder is operable to receive the inputs ha, hb, hc, and hd from the temporary storage locations ha, hb, hc, and hd and to provide an output md5_temp corresponding to a round of the MD5 algorithm.
- 47. The hash circuit of claim 46 wherein the temporary storage locations ha, hb, hc, hd, and he each comprise a register.
- 48. The hash circuit of claim 46 wherein, at the end of each clock cycle, the hash circuit is operable to:
selectively update the temporary storage location ha with input hd or output sha1_temp2; and selectively update the temporary storage location hb with input md5_temp or sha1_temp1.
- 49. The hash circuit of claim 48 wherein the selectively updating the temporary storage location ha is responsive to whether the first adder or the second adder is performing the hash processing for the first hash channel.
- 50. The hash circuit of claim 49 wherein the selectively updating the temporary storage location hb is responsive to whether the first adder or the second adder is performing the hash processing for the first hash channel.
- 51. A hash circuit comprising:
a common hash memory to receive input data, wherein the common hash memory comprises at least a first storage area and a second storage area; a hash channel to perform hash processing and coupled to selectively receive the input data from the first or second storage areas for hash processing; and wherein the common hash memory is operable to receive and store additional input data in the second storage area while data stored in the first storage area is being hashed by the hash channel.
- 52. The hash circuit of claim 51 wherein:
the common hash memory further comprises a third storage area; the common hash memory is operable to selectively receive the input data in a repeating sequential order into the first, second, and third storage areas.
- 53. The hash circuit of claim 52 wherein the repeating sequential order is a round-robin order.
- 54. The hash circuit of claim 52 wherein the hash circuit selectively provides the input data received in one of the first, second, or third storage areas to the hash channel to begin hash processing when the storage area is full or an end-of-packet state exists for the input data.
- 55. The hash circuit of claim 54 wherein each of the first, second, and third storage areas has a size of 64 bytes.
- 56. The hash circuit of claim 51 wherein:
the hash processing comprises computations using a hash algorithm; data is read from the first storage area for a first set of rounds of the hash algorithm; and data is solely read from and solely written to the second storage area for a second set of rounds of the hash algorithm.
- 57. The hash circuit of claim 56 wherein:
the hash algorithm is the SHA1 algorithm; the first set of rounds includes SHA1 rounds number 1-16; and the second set of rounds includes SHA1 rounds number 17-80.
- 58. The hash circuit of claim 51 further comprising a padding circuit, coupled between the common hash memory and the hash channel, to selectively pad portions of the input data substantially in real-time as provided to the hash channel.
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 |