Skip to content

Instantly share code, notes, and snippets.

@mherkender
Created March 15, 2012 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mherkender/2041714 to your computer and use it in GitHub Desktop.
Save mherkender/2041714 to your computer and use it in GitHub Desktop.
SHA-1 pseudocode
add some extra data to the end of the input
set the initial sha-1 values
for each 64-byte chunk do
extend the chunk to 320 bytes of data
perform first set of operations on chunk[i] (x20)
perform second set of operations on chunk[i] (x20)
perform third set of operations on chunk[i] (x20)
perform fourth set of operations on chunk[i] (x20)
end
return sha-1 values as a hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment