Skip to content

j1sk1ss/HashLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cryptographic Hash Functions Overview

This document provides a technical overview of five cryptographic hash functions: Blake2b, SHA3-256, SHA-512, Tiger192,3, and RIPEMD-160.

Table of Contents

  1. Blake2b
  2. SHA3-256
  3. SHA-512
  4. Tiger192,3
  5. RIPEMD-160

Blake2b

Output Size: 64 bytes (512 bits)
Structure: Modified HAIFA construction with internal permutation based on ChaCha stream cipher

Key Features

  • Faster than SHA-2/SHA-3 while maintaining security
  • Supports keyed hashing (MAC), salting, and personalization
  • Tree hashing mode for parallel processing
  • Simple design with 12 rounds of processing

Advantages

  • 1.5-3x faster than SHA-3 in software implementations
  • No known security vulnerabilities
  • Simple design with security proofs
  • Supports variable digest lengths (1-64 bytes)

Disadvantages

  • Not FIPS/NIST approved
  • Limited hardware acceleration support
  • Less common than SHA-2 in legacy systems

SHA3-256 (Keccak)

Output Size: 32 bytes (256 bits)
Structure: Sponge construction with KECCAK-f[1600] permutation

Key Features

  • Official NIST standard (FIPS 202)
  • Unique sponge function architecture
  • 24 rounds of θ, ρ, π, χ, ι operations
  • Resistance to length-extension attacks

Advantages

  • NIST-certified for government use
  • Efficient hardware implementation
  • Resistance to all known cryptanalytic attacks
  • Built-in domain separation via padding

Disadvantages

  • Slower than Blake2b in software
  • Higher memory requirements
  • Complex mathematical design
  • Newer than SHA-2 (less field-tested)

SHA-512

Output Size: 64 bytes (512 bits)
Structure: Merkle-Damgård construction with Davies-Meyer compression

Key Features

  • Part of SHA-2 family (FIPS 180-4)
  • 80 rounds per block
  • Uses 64-bit words with 8 working variables
  • Big-endian architecture

Advantages

  • Widely adopted and standardized
  • Extensively analyzed (20+ years)
  • Hardware acceleration support
  • Backward compatible with SHA-256

Disadvantages

  • Vulnerable to length-extension attacks
  • Slower than SHA-256 on 32-bit systems
  • Larger memory footprint
  • Not quantum-resistant

Tiger192,3

Output Size: 24 bytes (192 bits)
Structure: Merkle-Damgård with Davies-Meyer-like compression

Key Features

  • Designed for 64-bit platforms
  • 24 rounds (3 passes of 8)
  • Non-S-box design using word-based operations
  • Truncated version of Tiger hash

Advantages

  • Fast on 64-bit processors
  • Unique design resists standard attacks
  • Fixed output size (192 bits)
  • Efficient in software implementations

Disadvantages

  • Not standardized by NIST/ISO
  • Vulnerabilities found in reduced-round versions
  • Limited cryptanalysis compared to SHA
  • Rarely used in modern systems

RIPEMD-160

Output Size: 20 bytes (160 bits)
Structure: Dual-pipeline Merkle-Damgård construction

Key Features

  • Designed as drop-in replacement for MD4/MD5
  • Two parallel computation lines (5 rounds each)
  • 160-bit output for collision resistance
  • Little-endian architecture

Advantages

  • No known full collisions found
  • Faster than SHA-1 in software
  • Resistant to length-extension attacks
  • Used in Bitcoin address generation

Disadvantages

  • Limited output size (less future-proof)
  • Not FIPS/NIST approved
  • Slower than SHA-256 on modern hardware
  • Fewer security margins than SHA-3

Security Comparison

Algorithm Collision Resistance Pre-image Resistance Quantum Resistance
Blake2b 256-bit 512-bit 256-bit
SHA3-256 256-bit 256-bit 256-bit
SHA-512 256-bit 512-bit 256-bit
Tiger192,3 96-bit 192-bit 96-bit
RIPEMD-160 80-bit 160-bit 80-bit

Recommended Use Cases

  • Password Hashing: Blake2b (with salt)
  • Blockchain: SHA3-256 (Ethereum), RIPEMD-160 (Bitcoin)
  • Government Systems: SHA3-256 or SHA-512
  • Legacy Systems: SHA-512
  • Resource-constrained: Blake2b

Releases

No releases published

Packages

No packages published

Languages