Configurable Number of Iterations for PBKDF2 Password Storage Schemes

Overview

This design document describes the implementation of configurable number of iteration (rounds) for PBKDF2 password hashing schemes in 389 Directory Server. The feature adds the ability to customize the computational cost of password hashing through a new attribute nsslapd-pwdPBKDF2NumIterations and associated configuration mechanisms.

Background

PBKDF2 (Password-Based Key Derivation Function 2) is a key stretching algorithm that makes password hashing more resistant to brute-force attacks by applying a cryptographic hash function repeatedly. The number of iterations directly affects the computational cost and security level of the password hashing process. As computing power increases over time, the ability to adjust iteration counts becomes crucial for maintaining security against evolving threats.

Technical Design

Schema Changes

  1. New Attribute
    attributeTypes: ( 2.16.840.1.113730.3.1.2400
        NAME 'nsslapd-pwdPBKDF2NumIterations'
        DESC '389 Directory Server defined attribute type'
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
        SINGLE-VALUE )
  2. New ObjectClass
    objectClasses: ( 2.16.840.1.113730.3.2.340
        NAME 'pwdPBKDF2PluginConfig'
        DESC 'PBKDF2 Password Storage Plugin configuration'
        SUP top
        MAY ( nsslapd-pwdPBKDF2NumIterations ) )

    The objectClass is given to (and intended for) cn=PBKDF2-*,cn=Password Storage Schemes,cn=plugins,cn=config entries.

Implementation Details

Default and Limits

These defaults and limits ensure a baseline security level and guard against extreme performance degradation.

Rust Implementation

Configuration Management

Testing Plan

Conclusion

The ability to configure PBKDF2 iteration counts enhances the overall security posture of the 389 Directory Server by allowing administrators to scale password hashing complexity in line with evolving computational capabilities.

Last modified on 23 April 2025