Class Pbkdf2Defaults
java.lang.Object
com.svenruppert.jsentinel.credential.password.pbkdf2.Pbkdf2Defaults
Phase-1a reference parameters for the PBKDF2 password hashing path.
The defaults follow the OWASP 2023 guidance for
PBKDF2-HMAC-SHA256: 600 000 iterations, 16 random bytes
of salt and a 32-byte derived key. The upper bounds are deliberately
generous so that operators can ramp iterations over time, but small
enough to keep a single verification under one second on commodity
hardware (CWE-400).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPhase-1a default iteration count.static final intPhase-1a default derived-key length in bytes.static final intPhase-1a default salt length in bytes.static final intMaximum iteration count accepted by the validator.static final intMaximum derived-key length in bytes.static final intMaximum salt length in bytes.static final intMinimum acceptable iteration count for stored hashes.static final intMinimum derived-key length in bytes.static final intMinimum salt length in bytes. -
Method Summary
Modifier and TypeMethodDescriptionDefault parameter map for new PBKDF2 envelopes.Maximum-bound parameter map.Minimum-bound parameter map.static PasswordHashPolicyConvenience: build a single-algorithm reference policy that emits PBKDF2 envelopes with the Phase-1a defaults.
-
Field Details
-
DEFAULT_ITERATIONS
public static final int DEFAULT_ITERATIONSPhase-1a default iteration count.- See Also:
-
DEFAULT_SALT_LENGTH
public static final int DEFAULT_SALT_LENGTHPhase-1a default salt length in bytes.- See Also:
-
DEFAULT_KEY_LENGTH
public static final int DEFAULT_KEY_LENGTHPhase-1a default derived-key length in bytes.- See Also:
-
MIN_ITERATIONS
public static final int MIN_ITERATIONSMinimum acceptable iteration count for stored hashes.- See Also:
-
MAX_ITERATIONS
public static final int MAX_ITERATIONSMaximum iteration count accepted by the validator.- See Also:
-
MIN_SALT_LENGTH
public static final int MIN_SALT_LENGTHMinimum salt length in bytes.- See Also:
-
MAX_SALT_LENGTH
public static final int MAX_SALT_LENGTHMaximum salt length in bytes.- See Also:
-
MIN_KEY_LENGTH
public static final int MIN_KEY_LENGTHMinimum derived-key length in bytes.- See Also:
-
MAX_KEY_LENGTH
public static final int MAX_KEY_LENGTHMaximum derived-key length in bytes.- See Also:
-
-
Method Details
-
defaultParameters
-
minimumParameters
-
maximumParameters
-
referencePolicy
Convenience: build a single-algorithm reference policy that emits PBKDF2 envelopes with the Phase-1a defaults.
-