Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sha1

A from-scratch implementation of the SHA-1 hash algorithm in Rust, following RFC 3174 (US Secure Hash Algorithm 1, SHA1).

What it does

Computes the SHA-1 digest of a hardcoded input (b"mukul") and prints it as a hex string. The implementation covers:

  • Message padding (pad_sha1) per RFC 3174 section 4
  • Message schedule expansion into 80 32-bit words (create_words)
  • The four rounds of nonlinear functions f(t, b, c, d) (section 5)
  • The round constants k(t) (section 5)
  • The main compression loop over 80 rounds, producing the final 160-bit digest

Usage

cargo run

Reference

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages