decrypt101
SocialOpen ProjectsSupport me My Resumes
  • Preface
    • Motivation
    • Roadmap’s
  • Introduction to Blockchain
    • A Brief History
    • Growth of Blockchain
    • Structure of Blockchain
    • Types of Blockchain
    • Key Technologies of Blockchain
    • Features of Blockchain
    • How Blockchain Works ?
    • Implementation of Blockchain
    • Summary
  • Components of Blockchain Architecture
    • Distributed Ledger
    • Blocks
    • Transaction
    • Chain
    • Peer-to-Peer Network
    • Blockchain Layers
    • Off-Chain & On-Chain
    • Wallet
    • Mining
    • Tokens
    • Assets
    • State Channels
    • Sidechains
    • Oracles on Blockchain
    • Atomic Swaps
    • Decentralized Identity (DID)
    • Blockchain Data Storage
    • Interoperability
    • Data structures for Scaling Blockchain
    • Maximal Extractable Value (MEV)
  • Consensus Mechanisms
    • Proof of Work (PoW)
      • Implemation Using Rust
    • Proof of Stake (PoS)
    • Proof of Burn (PoB)
    • Proof of Capacity (PoC)
    • Proof of Activity (PoAc)
    • Proof of Weight (PoWe)
    • Proof of Luck (PoL)
    • Proof of Ownership (PoO)
    • Proof of Existence (PoE)
    • Proof of Believability (PoBe)
    • Proof of History (PoH)
    • Proof of Authority (PoA)
    • Proof of Elapsed Time (PoET)
  • Cryptographics
    • Encryption & Decryption
      • Symmetric Encryption
      • Asymmetric Encryption
      • Key Management and Exchange
      • Implementation
    • Cryptographic Hashing
      • Secure Hash Algorithms (SHA)
      • Message Digest Algorithms
      • Ethash
      • Blake2
      • SCrypt
      • RIPEMD-160
    • Digital Signature
      • Digital Signature Algorithms
      • Digital Signature in Blockchain
    • Zero-Knowledge Proofs (ZKPs)
      • Types of Zero-Knowledge Proof and Protocols
      • A Case Study of Polygon Platform
    • Multi-Party Computation (MPC)
    • Cryptanalysis
    • Practical Implementation
  • Decentralized Application (DApp)
    • Design and UX in Web3
  • Smart Contract
    • Development Tools
    • Solidity
    • Testing Smart Contract
    • Developing Smart Contract
    • Interacting & Deploying with Smart Contract
    • Verifying Smart Contracts
    • Upgrading Smart Contracts
    • Securing Smart Contract
    • Smart Contract Composability
    • Testnet and Mainnet
    • Blockchain Platform Using Smart Contract
    • Application of Smart Contract
    • Practical Implementation
  • Blockchain Platforms
    • Ethereum
      • Ethereum Virtual Machine (EVM)
      • ETHER and GAS
      • Ethereum transaction
      • Ethereum Accounts
      • Ethereum Stacking
      • Ethereum Network
      • Ethereum Scaling Solutions
      • Ethereum Use-Cases
      • Getting Started with Ethereum
      • Ethereum Ecosystem and Support
    • Solana
      • Solana Architecture
        • Solana Account Model
        • Solana Wallet
        • Transactions and Instructions
        • Solana Programs
        • Program Derived Address (PDA)
        • Cross Program Invocation (CPI)
        • Tokens on Solana
        • Clusters and Public RPC Endpoints
        • Transaction Confirmation & Expiration
        • Retrying Transactions
        • Versioned Transactions
        • Address Lookup Tables
        • State Compression
        • Actions and Blinks
      • Solana Developments
      • Solana Client
      • Advanced Solana
      • Solana Scaling and Performance Architecture
      • Solana Solutions and cases
      • Practical Implemenation
    • Binance Smart Chain (BSC)
      • Create a BEP20 Token
    • Hyperledger Fabric
    • Cosmos
    • Polkadot
    • Quorum
    • Polygon
    • Algorand
    • Corda
    • Avalanche
    • TRON
    • Summary
  • Decentralized Finance (DeFi)
    • DeFi Components
    • DeFi Protocols
    • DeFi Platforms
    • DeFi Risk Classification
      • Infrastructure-layer Attacks
      • Smart Contract Layer-attacks
      • Application Layer-attacks
      • DeFi Risks
    • DeFi and Blockchain
    • DeFi Impact
  • Decentralized Ecosystem and Digital Innovation
    • Layer 2 Scaling Fundamental
    • Tokenomics
    • Cryptocurrency
    • Quantative Trading
    • NFTs
    • GameFi
    • Metaverse
  • Blockchain as a Service (BaaS)
    • Building Fullstack Blockchain Platform
    • Decentralized Digital Identity
    • Build a Cryptocurrencies Exchange
    • Play-to-Earn Gaming
    • Solana Token Airdrop Manager
    • Smart Contract Development on Solana with Rust
    • Quantitative Trading Platform
    • Insurances protocols
    • Flash Loans
    • Asset Management
    • Tokenized Derivatives
    • Automated Market Makers (AMMs)
    • Staking
    • Lending and Borrowing Platforms
    • Yield Farming
    • Stablecoin System
    • Security Token Offerings (STOs)
    • Initial Coin Offerings (ICOs)
    • On-Chain Voting Systems
    • Decentralized Autonomous Organizations (DAOs)
    • NFT Marketplaces
    • Provenance Verification
    • Supply Chain Tracking
    • Commodities Tokenization
    • Real Estate Tokenization
    • Digital Certificates
    • KYC (Know Your Customer)
  • Blockchain Development Across Languages
    • Blockchain using Go(Golang)
    • Blockchain using Rust
    • Blockchain using Python
    • Blockchain using Cairo
  • Distributed Systems & Infrastructure Technology
    • Classification of Distributed Systems
    • Networked systems versus Distributed systems
    • Parallel systems vs Distributed systems
    • Distributed versus Decentralized systems
    • Processes of Distributed Systems
    • Architecture of Distributed systems
    • Infrastructure Technologies
  • Distributed System Patterns
    • Distributed Agreements Algorithms
      • HoneyBadgerBFT
    • Data Replications
    • Data Partition
    • Consistency
    • Distributed Time
    • Cluster Management
    • Communication between Nodes
    • Fault Tolerance and Resilience
      • How to design better fault tolerance systems
      • Resilience Patterns
    • Coordination systems
      • Clock synchronization
    • Security
      • Trust in distributed systems
      • Design of Principal Security
      • Security threats, policies, and mechanisms
      • Authentication and Authorizations
      • Cryptography
      • Monitoring in Security
  • Distributed System Design
    • Page 1
    • Distributed Shared Memory
    • Distributed Data Management
    • Distributed Knowledge Management
    • Distributed Ledger
  • FAQs
  • Support and Community
Powered by GitBook
On this page
  • SHA Family Overview:
  • 1. SHA-1 (Secure Hash Algorithm 1)
  • 2. SHA-2 (Secure Hash Algorithm 2)
  • 3. SHA-3 (Secure Hash Algorithm 3)
  • Differences Between SHA-2 and SHA-3
  • Security Considerations
  1. Cryptographics
  2. Cryptographic Hashing

Secure Hash Algorithms (SHA)

Secure Hash Algorithms (SHA) are a family of cryptographic hash functions designed by the National Security Agency (NSA) and published by the National Institute of Standards and Technology (NIST). These algorithms are widely used for ensuring data integrity, verifying digital signatures, and securing information across a range of applications, including blockchain technology, SSL/TLS certificates, and password hashing.

SHA Family Overview:

The SHA family consists of several versions, each with different characteristics and security levels. The most notable are SHA-1, SHA-2, and SHA-3.

1. SHA-1 (Secure Hash Algorithm 1)

  • Output Size: 160 bits (20 bytes).

  • Developed: 1993, revised in 1995.

  • Applications: Historically used in digital signatures, SSL certificates, and version control systems like Git.

  • Security Status: Deprecated due to vulnerabilities to collision attacks. In 2017, researchers successfully demonstrated a practical collision attack against SHA-1, leading to its deprecation in favor of more secure algorithms.

2. SHA-2 (Secure Hash Algorithm 2)

SHA-2 is a family of hash functions that includes several variants with different output sizes:

  • SHA-224: Produces a 224-bit hash.

  • SHA-256: Produces a 256-bit hash, widely used in security protocols like SSL/TLS, digital certificates, and blockchain (e.g., Bitcoin).

  • SHA-384: Produces a 384-bit hash, often used in applications where a larger hash size is beneficial.

  • SHA-512: Produces a 512-bit hash, offering the highest level of security in the SHA-2 family.

Key Features of SHA-2:

  • Improved Security: Designed to address the weaknesses of SHA-1, SHA-2 uses a more robust mathematical structure, making it resistant to collision and pre-image attacks.

  • Wide Adoption: SHA-256 is one of the most widely used hash functions, especially in blockchain technology and secure communications.

3. SHA-3 (Secure Hash Algorithm 3)

  • Output Sizes: Flexible; can produce outputs of 224, 256, 384, and 512 bits, similar to SHA-2.

  • Development: Standardized in 2015, SHA-3 was developed through a public competition held by NIST to find a successor to SHA-2.

  • Algorithm: Unlike SHA-1 and SHA-2, which are based on the Merkle–Damgård construction, SHA-3 uses the Keccak (pronounced "ketch-ak") algorithm, which employs a sponge construction.

  • Security: Designed to provide a secure alternative to SHA-2, especially if vulnerabilities were ever found in SHA-2, though no such vulnerabilities currently exist.

  • Flexibility: SHA-3’s sponge construction allows for variable-length output, making it suitable for a variety of cryptographic applications, including random number generation and stream ciphers.

Differences Between SHA-2 and SHA-3

  1. Internal Structure: SHA-2 uses the Merkle–Damgård construction, while SHA-3 uses the sponge construction, which offers better resistance to certain types of attacks.

  2. Performance: SHA-2 is generally faster on most hardware due to optimizations; however, SHA-3 offers additional security properties, such as higher resilience against side-channel attacks.

  3. Use Cases: SHA-2 remains the default choice in most applications, but SHA-3 is available as a robust alternative, especially for applications requiring advanced security assurances.

Security Considerations

  • SHA-1 is No Longer Secure: Due to proven collision vulnerabilities, SHA-1 is deprecated and should not be used in any security-sensitive applications.

  • SHA-2 is the Current Standard: With no known vulnerabilities, SHA-2 remains widely trusted for securing data.

  • SHA-3 Offers Extra Security: Though SHA-2 is currently secure, SHA-3 provides a secure fallback with a different cryptographic design.

Secure Hash Algorithms are essential for protecting data integrity, ensuring secure communication, and verifying digital identities. While SHA-1 has been deprecated due to security flaws, SHA-2 remains robust and widely used, with SHA-3 offering an additional layer of security for future-proof cryptographic needs.

PreviousCryptographic HashingNextMessage Digest Algorithms

Last updated 8 months ago