P
US7970128B2ActiveUtilityPatentIndex 61

Systems and methods for efficient generation of hash values of varying bit widths

Assignee: FREESCALE SEMICONDUCTOR INCPriority: Jul 20, 2007Filed: Jul 20, 2007Granted: Jun 28, 2011
Est. expiryJul 20, 2027(~1 yrs left)· nominal 20-yr term from priority
Inventors:TORLA MICHAEL J
H04L 9/0643H04L 9/14
61
PatentIndex Score
4
Cited by
9
References
20
Claims

Abstract

A technique for producing a hashed output of an input message according to any number of hash algorithms (e.g. SHA-256, SHA-348, SHA-512) having varying bit widths is described. At least a portion of the input message is stored in a first group of registers each having a bit width equal to a first bit width (e.g. 32 bits). If the selected hash algorithm has a larger bit width (e.g. 64 bits), a remainder of the input message is stored in a second plurality of registers each having a bit width equal to the first bit width. The hashed output is then computed according to the selected hash algorithm.

Claims

exact text as granted — not AI-modified
1. A method executable by computing hardware for producing a hashed output of an input message according to any of a plurality of hash algorithms, each of the plurality of hash algorithms having an associated bit width such that at least one of the algorithms is associated with a first bit width and at least one of the algorithms is associated with a second bit width greater than the first bit width, wherein the computing hardware comprises a first plurality of registers and a second plurality of registers, the method comprising the steps of:
 receiving, at the computing hardware, the input message and a selected one of the plurality of hash algorithms; 
 storing at least a portion of the input message in the first plurality of registers, wherein each of the first plurality of registers has a bit width equal to the first bit width; 
 if the selected one of the plurality of hash algorithms is associated with the second bit width having the second bit width greater than the first bit width, storing a remainder of the input message in the second plurality of registers, wherein each of the second plurality of registers has a bit width equal to the first bit width, and otherwise bypassing the second plurality of registers; and 
 computing, by the computing hardware, the hashed output according to the selected one of the plurality of hash algorithms by performing operations on only the first plurality of registers if the selected hash algorithm is associated with the first bit width and by performing operations on both the first and second pluralities of registers if the selected hash algorithm is associated with the second bit width that is greater than the first bit width. 
 
     
     
       2. The method of  claim 1  further comprising the step of storing the hashed output for subsequent retrieval by an external source, wherein the hashed output has the first bit width if the selected hash algorithm is associated with the first bit width, and wherein the hashed output has the second bit width that is greater than the first bit width if the selected hash algorithm is associated with the second bit width. 
     
     
       3. The method of  claim 1  wherein the computing step comprises performing a carry operation from at least one of the first plurality of registers to at least one of the second plurality of registers. 
     
     
       4. The method of  claim 1  wherein the computing step comprises performing a carry operation from at least one of the second plurality of registers to at least one of the first plurality of registers. 
     
     
       5. The method of  claim 1  wherein the first bit width is thirty-two bits. 
     
     
       6. The method of  claim 5  wherein the second bit width is sixty-four bits. 
     
     
       7. The method of  claim 6  wherein the plurality of hash algorithms comprises a SHA-256 algorithm and a SHA-512 algorithm. 
     
     
       8. The method of  claim 7  wherein the plurality of hash algorithms further comprises a SHA-318 algorithm. 
     
     
       9. The method of  claim 1  wherein the computing step comprises performing a bitwise addition between two of the first plurality of registers if the selected hash algorithm is associated with the first bit width. 
     
     
       10. The method of  claim 9  wherein the computing step further comprises performing a first bitwise addition between two of the first plurality of registers and a second bitwise addition between two of the second plurality of registers if the selected hash algorithm is associated with the second bit width. 
     
     
       11. The method of  claim 10  wherein the computing step further comprises incrementing a result of the second bitwise addition if the first bitwise addition indicates a carry out. 
     
     
       12. The method of  claim 10  wherein the computing step further comprises incrementing a result of the first bitwise addition if the second bitwise addition indicates a carry out. 
     
     
       13. The method of  claim 1  wherein the plurality of hash algorithms comprises a SHA-256 algorithm and a SHA-512 algorithm, and wherein the first bit width is thirty-two bits. 
     
     
       14. A circuit for producing a hashed digest of an input message according to any of a plurality of hash algorithms, each of the plurality of hash algorithms having an associated bit width such that at least one of the algorithms is associated with a first bit width and at least one of the algorithms is associated with a second bit width greater than the first bit width, the system comprising:
 a first plurality of message registers each having a bit width corresponding to the first bit width; 
 a second plurality of message registers having a bit width corresponding to the first bit width; 
 control logic configured to receive the input message and a selected one of the plurality of hash algorithms, to store at least a portion of the input message in the first plurality of message registers and, if the selected one of the plurality of hash algorithms is associated with the second bit width, to store a remainder of the input message in the second plurality of message registers, and to compute the hashed output according to the selected one of the plurality of hash algorithms using only the first plurality of message registers if the selected hash algorithm is associated with the first bit width and using the first and second pluralities of message registers if the selected hash algorithm is associated with the second bit width. 
 
     
     
       15. The circuit of  claim 14  further comprising first and second pluralities of digest registers, wherein each of the first and second pluralities of digest registers have a bit width corresponding to the first bit width. 
     
     
       16. The circuit of  claim 15  control logic is further configured to produce the hash output using only the first plurality of digest registers if the selected hash algorithm is associated with the first bit width, and to produce the hash output using both the first and the second plurality of digest registers if the selected hash algorithm is associated with the second bit width. 
     
     
       17. The circuit of  claim 16  wherein each of the first and second pluralities of message registers are thirty-two bit registers, wherein the first bit width is thirty-two bits, and wherein the second bit width is sixty-four bits. 
     
     
       18. The circuit of  claim 14  wherein the control logic is further configured to perform a carry operation from at least one of the second plurality of registers to at least one of the first plurality of registers during a bitwise operation of the second bit width. 
     
     
       19. A semiconductor chip comprising the circuit of  claim 14 . 
     
     
       20. A message digest hardware accelerator configured to produce a hashed digest of an input message according to any of a plurality of hash algorithms, each of the plurality of hash algorithms having an associated bit width such that a first one of the algorithms is associated with a thirty-two bit width and a second one of the algorithms is associated with a sixty-four bit width, the message digest hardware accelerator comprising:
 a first and a second plurality of thirty-two bit message registers; 
 a first and a second plurality of thirty-two bit digest registers; and 
 control circuitry configured to receive the input message and a selected one of the plurality of hash algorithms, to store at least a portion of the input message in the first plurality of message registers and to store a remainder of the input message in the second plurality of message registers if the selected one of the plurality of hash algorithms is a sixty-four bit algorithm, to compute the hashed output according to the selected one of the plurality of hash algorithms using only the first plurality of message registers and the first plurality of digest registers if the selected hash algorithm is a thirty-two bit algorithm and using the first and second pluralities of message registers and the first and second pluralities of digest registers if the selected hash algorithm is a sixty-four bit algorithm, and to process a carry resulting from an operation performed on at least one of the first pluralities of registers to at least one of the second pluralities of registers during a bitwise operation of the sixty-four bit algorithm.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.