Salting and Key Stretching
Two complementary defences for stored passwords. A salt is a unique random value stored alongside each hash, so identical passwords produce different hashes and precomputed rainbow tables become useless. Key stretching deliberately makes each hash computation expensive -- via a work factor, memory cost and parallelism -- using algorithms designed for the purpose such as Argon2, scrypt, bcrypt or PBKDF2. Both are examined in Security+, CISSP, SSCP and secure-development domains.
Why It Matters
In practice these solve different halves of the same problem and neither substitutes for the other: salting defeats precomputation and cross-account correlation, while stretching attacks the economics of brute force by making each guess cost real time and memory. That is why a fast hash like SHA-256 is the wrong tool for passwords no matter how well salted -- commodity GPUs compute billions of SHA-256 hashes per second, so an attacker with a stolen database simply guesses faster. Argon2id is the current recommendation, with memory-hard cost specifically chosen to blunt GPU and ASIC advantage; bcrypt remains acceptable and PBKDF2 is common where FIPS validation is required. The salt does not need to be secret and is stored with the hash, which candidates often get wrong; a separately stored secret is a pepper, a different control. Work factors should be re-tuned as hardware improves and rehashed on next login. On exams, expect questions on why salting alone is insufficient.
Practice this topic
Test your knowledge of Salting and Key Stretching concepts with exam-style practice questions.
Related Cryptography terms
Encryption
The process of converting plaintext data into an unreadable format (ciphertext) using a cryptographic algorithm and key, ensuring that only authorized parties can access the original information. Encryption can be symmetric (same key for encryption and decryption, e.g., AES) or asymmetric (public/private key pair, e.g., RSA). Data can be encrypted at rest (stored data), in transit (network communication via TLS), or in use (homomorphic encryption). Encryption is mandated by regulations like GDPR, HIPAA, and PCI DSS for protecting sensitive data. It is a fundamental topic across all cybersecurity certifications.
Hashing
A one-way function that converts input data of any size into a fixed-length string of characters (hash value or digest), used primarily for data integrity verification and password storage. Unlike encryption, hashing is irreversible, you cannot recover the original data from the hash. Common algorithms include SHA-256, SHA-3, and bcrypt (for passwords). Hashing is used in digital signatures, file integrity monitoring, blockchain, and password authentication. Collision resistance (ensuring two different inputs don't produce the same hash) is a critical property tested in CISSP and Security+ cryptography domains.
Public Key Infrastructure (PKI)
A set of roles, policies, hardware, software, and procedures needed to create, manage, distribute, use, store, and revoke digital certificates and public keys. PKI enables secure electronic communication through certificate authorities (CAs) that issue and validate certificates, registration authorities (RAs), and certificate revocation lists (CRLs) or OCSP responders. PKI underpins HTTPS/TLS, email encryption (S/MIME), VPNs, code signing, and digital signatures. Understanding PKI hierarchy (root CA, intermediate CA, end-entity certificates) is essential for CISSP, Security+, and CCSP certifications.
Digital Certificate
An electronic document issued by a Certificate Authority (CA) that binds a public key to an entity's identity, enabling encrypted communication and identity verification. Certificates follow the X.509 standard and contain the subject's name, public key, issuer, validity period, and digital signature. Types include SSL/TLS certificates (for websites), code signing certificates, email certificates (S/MIME), and client certificates. Certificate validation involves checking the chain of trust, expiration date, and revocation status. Digital certificates are a core component of PKI and are tested in CISSP, Security+, and CCSP exams.
AES (Advanced Encryption Standard)
A symmetric block cipher algorithm adopted by the U.S. government as the standard for encrypting electronic data, replacing the older DES standard. AES operates on 128-bit blocks and supports key sizes of 128, 192, or 256 bits, with AES-256 being the strongest. It uses substitution-permutation network rounds (10, 12, or 14 rounds depending on key size) and is considered computationally secure against brute-force attacks. AES is used in TLS/HTTPS, disk encryption (BitLocker, FileVault), VPNs, and Wi-Fi security (WPA2/WPA3). It is the most widely tested symmetric algorithm in CISSP and Security+ exams.
TLS (Transport Layer Security)
A cryptographic protocol designed to provide secure communication over a computer network by encrypting data in transit between two parties (e.g., a web browser and server). TLS replaced its predecessor SSL and operates through a handshake process that negotiates cipher suites, authenticates the server (and optionally the client) via certificates, and establishes session keys. TLS 1.3 (the latest version) improved performance by reducing handshake round trips and removing insecure cipher suites. HTTPS is simply HTTP over TLS. Understanding TLS versions, cipher suites, and certificate validation is essential for Security+, CISSP, and web security certifications.