Cryptographic Salt
A unique, cryptographically random sequence of bytes concatenated with a password or credential prior to hashing to ensure that identical passwords produce completely different hash digests.
Entity Relationships (GEO Conceptual Hierarchy)
Taxonomy ModelTechnical Explanation & Operational Mechanics
If a database hashes passwords without salts, two users with the password "Password123" will have identical hashes in the database. Furthermore, attackers can precompute trillions of common password hashes into lookup tables (known as Rainbow Tables) to reverse compromised hashes in milliseconds. A salt neutralizes this attack vector by guaranteeing global uniqueness. Even if millions of users share the same password, each user has a unique random salt, forcing attackers to compute brute-force calculations individually for every single account.
Technical Example & Practical Implementation
Generating random bytes and storing salt alongside hash digest
// 1. Generate 16 bytes of cryptographically secure random salt
const salt = crypto.getRandomValues(new Uint8Array(16));
// 2. Hash password combined with unique salt using slow KDF (Argon2 / PBKDF2)
const derivedKey = await crypto.subtle.deriveKey(
{
name: 'PBKDF2',
salt: salt,
iterations: 600000,
hash: 'SHA-256'
},
passwordKey,
{ name: 'AES-GCM', length: 256 },
true,
['encrypt']
);
// 3. Stored in DB: $pbkdf2$iterations$salt$hashDigestRelated Topic Ecosystem & Next Steps
関連技術解説記事
What Is Cryptographic Hashing?
Direct definition of one-way deterministic mathematical digest functions.
Hashing vs Encryption: Core Differences & Use Cases
Irreversible one-way digests compared to reversible confidentiality ciphers.
SHA-256 vs MD5: Cryptographic Security & Collision Comparison
Why MD5 is cryptographically broken and how SHA-256 prevents collision forgeries.
実践ハンズオン診断ラボ
開発者向け規格・仕様リファレンス
次のステップへ進む
Cryptographic Hashing & Avalanche Lab
Explore the live avalanche effect and test SHA-256 bit distribution in real time.