Graph
Key Stretching

🏋️Key Stretching

NEW

Also known as: Password Stretching

A technique that increases the cost of password guessing by applying repeated or memory-hard hashing to slow brute-force attacks.

DESCRIPTION

Key stretching strengthens low-entropy secrets such as passwords by increasing the computational (and often memory) cost of verification. Implementations include PBKDF2 (iterated hashing), bcrypt (adaptive cost), scrypt (memory-hard), and Argon2 (PHC winner). Salts are mandatory to prevent precomputation attacks, and peppers can add defense-in-depth. Choose parameters to match threat models and hardware (e.g., GPU-resistant memory hardness). Follow NIST and OWASP guidance and monitor for drift in attack capabilities.

ALTERNATIVE DEFINITIONS

OWASP

Key stretching increases the effort required to brute-force passwords by using algorithms like PBKDF2, bcrypt, scrypt, or Argon2 with appropriate parameters.

Emphasizes recommended algorithms and parameterization; paraphrased due to offline generation.

Source

IETF RFC 8018

PKCS #5 (PBKDF2) specifies a password-based key derivation function that applies iteration to increase computational cost.

Defines PBKDF2 as a standard key-stretching method; paraphrased due to offline generation.

Source

NIST SP 800-63B

NIST recommends salted, slow password hashing and, where possible, memory-hard functions to resist large-scale guessing attacks.

Regulatory guidance for verifiers; paraphrased due to offline generation.

Source

bcrypt Salt Pepper Rate Limiting Credential Stuffing Password Hashing Memory-Hard Function

COMPETING TERMS

Password-Based Key Derivation Function 2 scrypt Argon2

KNOWLEDGE AREAS

Data Security Software Engineering Data Privacy & Compliance

TARGET AUDIENCE

Security Architect Cybersecurity Engineer Software Developer DevOps Engineer IT Auditor Chief Information Security Officer Data Privacy Officer

EXTERNAL SOURCES

  • Wikipedia - Key stretching
  • OWASP - Best practices for password storage.
  • IETF - PBKDF2 standard definition.
  • PHC - Argon2 specification and resources.
  • NIST - Digital identity guidance for verifiers.

TOP QUESTIONS

Why is key stretching essential for password security?

It raises the cost of each guess, slowing brute-force and credential stuffing, thereby improving resistance against offline attacks.

Category: Relevancy

How do I choose between PBKDF2, bcrypt, scrypt, and Argon2 for key stretching?

Argon2id is generally recommended for memory hardness and GPU resistance; PBKDF2 is widely standardized; scrypt offers memory hardness; bcrypt is mature but not memory-hard.

Category: Recommendation

What parameters are crucial in key stretching?

Iterations/time cost, memory cost, and parallelism should be tuned to balance security and performance, and periodically increased over time.

Category: Requirements

Do salts and peppers replace key stretching?

No. Salts prevent precomputation attacks; peppers add defense-in-depth. Key stretching is still necessary to slow guessing.

Category: Misunderstanding

What is a common mistake with key stretching?

Using raw fast hashes (e.g., SHA-256) for passwords without sufficient iteration or memory-hardening drastically weakens security.

Category: Mistakes

How often should parameters be updated?

Regularly reassess and increase costs as hardware improves; consider rehashing on login when parameters are outdated.

Category: Management

Is key stretching enough by itself?

No. Combine with MFA, rate limiting, breach monitoring, and secure secret handling for layered defense.

Category: Risks

What standards reference key stretching?

IETF RFC 8018 (PBKDF2) and NIST SP 800-63B provide requirements and guidance for verifiers.

Category: Standards

What hot topic surrounds key stretching today?

Adopting memory-hard Argon2id with balanced parameters against GPU/ASIC attackers is a key focus.

Category: Topic