RTUComputer ScienceYr 2024 · Sem 62024

Q12Information Security Systems

Question

4 marks

Discuss the working principles of the SHA-1 algorithm.

Answer

A deep theoretical exposition on the SHA-1 Hashing Algorithm. Explains how it mathematically processes 512-bit message blocks through 80 aggressive compression iterations to generate an irreversible 160-bit cryptographic digest.

The Secure Hash Algorithm 1 (SHA-1) is a cryptographic hash function architecture. Its absolute mathematical goal is to take a message of any arbitrary length (up to bits) and violently compress it into a rigid, irreversible 160-bit message digest. It guarantees the Avalanche Effect: flipping a single bit in a 1-Gigabyte file will mathematically cascade and completely alter the final 160-bit hash.

The Architectural Pipeline

  • 1. Message Padding: The input message must be mathematically forced to be a multiple of 512 bits. SHA-1 appends a single 1 bit, followed by enough 0 bits, and finally appends the exact 64-bit original length of the message at the very end.
  • 2. Buffer Initialization: The architecture initializes five 32-bit hardware registers () with rigid, predefined hexadecimal mathematical constants.
  • 3. The Compression Engine (The 80 Rounds): The padded message is violently chopped into 512-bit blocks. Each block is further shattered into sixteen 32-bit words. The compression function executes exactly 80 mathematically aggressive iterations (Rounds) on each block.
  • 4. Round Operations: During each of the 80 rounds, the algorithm executes catastrophic bitwise logical operations (AND, OR, XOR, NOT) and highly non-linear Circular Left Shifts on the registers, aggressively mixing the message bits with the register states.
  • 5. The Output: After all 512-bit blocks have been sequentially violently digested by the compression engine, the final state of the five 32-bit registers is concatenated together, yielding the absolute final 160-bit mathematical hash.
Back to Paper