Patent ID: 7181009

Claim:
A method for generating a message digest, comprising: selecting a first hashing procedure or a second hashing procedure for a message comprising a plurality of words; receiving the words at a hash engine comprising a function module and an adder; performing the following for each step of a first number of steps to yield a first chaining variable if the first hashing procedure is selected: applying a first function to a first subset of words at the function module to yield a first function output; combining a second subset of words and the first function output at the adder to yield a first sum; determining a rotation amount in accordance with a first entry; rotating the first sum according to the rotation amount at a rotator; and generating a plurality of next words in accordance with the first sum; performing the following for each step of a second number of steps to yield a second chaining variable if the second hashing procedure is selected: applying a second function to a third subset of words at the function module to yield a second function output; combining a fourth subset of words and the second function output at the adder to yield a second sum; rotating the second sum by a zero amount at the rotator; and generating a plurality of next words in accordance with the second sum; if the first hashing procedure is selected, generating a first message digest for the message to ensure data integrity, the message generated using the first chaining variable; and if the second hashing procedure is selected, generating a second message digest for the message to ensure data integrity, the message generated using the second chaining variable; repeating at a message array: storing a fifth subset of words; selecting a sixth subset of words from the fifth subset of words; performing an exclusive-or operation on the sixth subset of words at an exclusive-or gate to generate a derived word; and storing the derived word by writing over a word of the fifth subset of words.