defaultSaltByteLengthForSaltedVerificationKey top-level constant
int
const defaultSaltByteLengthForSaltedVerificationKey
Default salt length for salted verification keys (32 bytes / 256 bits).
This provides a balance of security and performance:
- 32 bytes (256 bits) provides excellent protection against rainbow table attacks.
- Exceeds NIST's minimum recommendation of 16 bytes (128 bits).
- Going beyond this length is largely harmless but provides diminishing returns.
This salt is used during user registration when creating the verification key. A random salt of this length is generated automatically if not provided to User.createSaltedVerificationKey.
Implementation
const defaultSaltByteLengthForSaltedVerificationKey = 32;