Expand description
SCRAM-SHA-256 client (RFC 5802 / RFC 7677), used for PostgreSQL password authentication.
Channel binding (SCRAM-SHA-256-PLUS) is not implemented; the GS2 header
advertises no channel binding (n,,).
The server is unauthenticated when sslmode is require, so every value
taken from the server is treated as hostile: iteration counts and salt
lengths are bounded and the nonce is validated before any key derivation
runs.
The password is prepared with SASLprep (RFC 4013) before key derivation, so
it matches the form PostgreSQL stored the verifier for. See [saslprep]
for the implemented profile.
Structs§
- Scram
Client - A SCRAM-SHA-256 exchange in progress.
Constants§
- DEFAULT_
MAX_ SCRAM_ ITERATIONS - Default highest accepted PBKDF2 iteration count.
- MAX_
SALT_ LEN - Highest accepted salt length, in bytes.
- MAX_
SERVER_ FIRST_ LEN - Highest accepted length for a server-first or server-final message.