NEW
Also known as: SHA
A family of NIST-standardized cryptographic hash functions—SHA-1, SHA-2, and SHA-3—used to compute fixed-length digests of electronic data.
DESCRIPTION
Secure Hash Algorithm refers to the NIST-defined families of hash functions for integrity and authentication. SHA-1 is deprecated due to collision attacks. SHA-2 (e.g., SHA-256, SHA-512) remains widely used for TLS, code signing, and digital signatures. SHA-3, based on the Keccak sponge construction, offers an alternative with different design principles and extendable-output variants (SHAKE). Selection depends on security policy, performance needs, and hardware support. For new designs, SHA-2 or SHA-3 is recommended over SHA-1.
ALTERNATIVE DEFINITIONS
NIST FIPS 180-4
This Standard specifies secure hash algorithms — SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 — for computing a condensed representation of electronic data.
Defines the SHA-1 and SHA-2 family and purpose; exact wording recalled from the standard.
NIST FIPS 202
FIPS 202 specifies the SHA-3 family of permutation-based hash and extendable-output functions.
Introduces SHA-3 and XOFs (SHAKE); paraphrased due to offline generation.
IETF RFC 4634
This document describes the United States Secure Hash Algorithms (SHA) and the HMAC-SHA algorithms.
Covers algorithm descriptions and test vectors; exact title statement quoted.
RELATED TERMS
SHA-1 SHA-2 SHA-3 Keccak HMAC Password-Based Key Derivation Function 2 Cryptographic Hash Function Digital Signature MAC BLAKE
COMPETING TERMS
RIPEMD-160 BLAKE2 Hash Function
RELATIONS
- Broader: Algorithm
KNOWLEDGE AREAS
Data Security Software Engineering
TARGET AUDIENCE
Security Architect Cybersecurity Engineer Software Developer DevOps Engineer Cloud Architect IT Auditor Chief Information Security Officer
EXTERNAL SOURCES
- Wikipedia - Secure Hash Algorithm
- NIST - SHA-1/SHA-2 official standard.
- NIST - SHA-3 official standard.
- NIST - Guidance on using hash algorithms.
- IETF - Technical description of SHA and HMAC-SHA.
TOP QUESTIONS
Why is SHA-1 no longer recommended within the Secure Hash Algorithm family?
Practical collision attacks have been demonstrated on SHA-1, undermining its integrity guarantees. NIST and major vendors deprecate SHA-1 for signatures and certificates.
Category: Risks
When should I choose SHA-2 versus SHA-3?
SHA-2 is widely supported and performant; SHA-3 offers an alternative design (sponge) and XOFs. Choose per policy, interoperability, and security diversity requirements.
Category: Recommendation
What are SHAKE functions in the context of Secure Hash Algorithm?
SHAKE128 and SHAKE256 are extendable-output functions defined in FIPS 202, allowing variable-length outputs for flexibility in applications.
Category: Definition
Is SHA-256 still secure for new deployments?
Yes, SHA-256 remains secure against known practical attacks and is widely recommended for integrity and digital signatures when used correctly.
Category: Relevancy
How does SHA-3 differ structurally from SHA-2?
SHA-3 (Keccak) uses a sponge construction with permutation-based state updates, unlike SHA-2’s Merkle–Damgård with Davies–Meyer compression.
Category: Distinction
Can I use SHA directly for password storage?
No. Use password hashing/key stretching functions like Argon2, scrypt, or PBKDF2 with salt; raw SHA is vulnerable to fast brute-force attacks.
Category: Mistakes
What is a common misunderstanding about Secure Hash Algorithm?
Some assume all SHA variants are interchangeable. In reality, SHA-1 is deprecated, while SHA-2 and SHA-3 have distinct security properties and use cases.
Category: Misunderstanding
How is SHA used with HMAC?
HMAC combines a hash (e.g., SHA-256) with a secret key to provide message authentication and integrity, widely used in APIs and protocols.
Category: Application
What hot topic surrounds Secure Hash Algorithm today?
Adoption of SHA-3/SHAKE for domain separation and security diversification, plus hardware acceleration and side-channel resistant implementations.
Category: Topic