Skip to main content

Crate sasl_scram

Crate sasl_scram 

Source
Expand description

Strict, sans-I/O SCRAM protocol engine.

This scaffold provides bounded transcript-preserving message parsers, canonical encoders, exact transcript assembly, explicit credential, channel-binding, policy, and secret types, and consuming SCRAM-SHA-256 client and server roles, including SHA-256-PLUS. The opt-in sha512 feature adds the widely deployed, unregistered SHA-512 extension profile. Both profiles retain explicit derivation and application continuations.

Modules§

message
Borrowed SCRAM message views that preserve exact authenticated fragments.

Structs§

AsciiProfile
A strict profile for protocols that intentionally limit credentials to printable ASCII.
AuthenticationProperties
Nonsecret mechanism properties established by complete proof verification.
AuthorizationRequest
Borrowed, proof-verified request presented to application authorization policy.
AwaitingClientFinal
Server state that accepts exactly one client-final message.
AwaitingServerFinal
A client state that accepts exactly one server-final message.
AwaitingServerFirst
A client state that accepts exactly one server-first message.
ChannelBinding
One validated channel-binding name and payload supplied by the transport.
ChannelBindingData
Owned channel-binding bytes, redacted and zeroized like other key material.
ChannelBindingName
A validated GS2 channel-binding name.
ClientAuthenticated
Terminal proof that the selected SCRAM server signature was verified.
ClientConfig
Owned configuration consumed by one SCRAM client conversation.
ClientConfigBuilder
Consuming builder for one ClientConfig.
ClientPolicy
Client-side limits and derivation policy.
ConcealmentKey
Server-side secret used to derive deterministic unknown-user verifier records.
ConcealmentProfile
Public verifier shape reproduced for deterministic unknown-user records.
CredentialRequest
Borrowed identity request for an application credential store.
IterationCount
A positive iteration count parsed from a SCRAM challenge or credential.
IterationPolicy
Credential-strength and denial-of-service bounds for derivation work.
NeedCredential
One parsed client-first message awaiting caller-owned credential lookup.
NeedIdentityPreparation
Parsed client-first state awaiting one explicit server identity profile.
NonceError
An opaque nonce-source failure.
OutboundMessage
An owned SCRAM message whose contents are explicit to access and zeroized on drop.
PendingAuthorization
Proof-verified state awaiting one application authorization decision.
PendingDerivation
One transcript-bound challenge awaiting explicit PBKDF2 derivation.
PendingServerCredential
One prepared password awaiting explicit verifier PBKDF2 derivation.
PreparedAuthenticationIdentity
Authentication identity prepared by an explicit credential profile.
PreparedAuthorizationIdentity
Authorization identity prepared by an explicit credential profile.
PreparedCredentials
Credentials prepared exactly once for one SCRAM conversation.
PreparedPassword
Password bytes that have already passed one explicit preparation profile.
ReceivedAuthenticationIdentity
Authentication identity decoded from one client-first message, before preparation.
ReceivedAuthorizationIdentity
Authorization identity decoded from one client-first message, before preparation.
ResourceLimits
Bounds for attacker-controlled message structure and decoded values.
ResourceLimitsBuilder
A consuming builder for ResourceLimits.
Rfc5802Profile
The RFC 5802 SASLprep credential profile.
Salt
Owned salt paired with a server verifier record.
SaltPolicy
Credential-strength bounds for decoded salt bytes.
SecretBytes
Owned secret bytes that are zeroized on drop.
SecretString
Owned UTF-8 secret text that is zeroized on drop.
Server
One configured namespace value consumed to begin a server conversation.
ServerAuthenticated
Terminal proof of authentication and application authorization.
ServerConfig
Owned, secret-free configuration consumed by one server conversation.
ServerConfigBuilder
Consuming builder for one ServerConfig.
ServerCredential
Binary SCRAM verifier material independent of any storage serialization.
ServerPolicy
Server-side limits and credential iteration policy.

Enums§

Algorithm
A supported, internally coherent SCRAM algorithm profile.
AttributeName
A reserved SCRAM attribute name safe to include in diagnostics.
AuthenticationError
Authentication failed after structurally valid protocol processing.
AuthorizationOutcome
Result of one explicit application authorization decision.
ChannelBindingMode
The negotiated GS2 channel-binding mode.
ChannelBindingOutcome
The channel-binding property authenticated by a successful exchange.
Client
Namespace for starting a SCRAM client conversation.
CredentialResponse
Caller-supplied lookup result that never exposes an unknown-user variant.
CryptoError
A cryptographic operation failed without exposing intermediates.
Error
The top-level library error.
PeerError
A bounded SCRAM peer-error classification.
PolicyError
An application-selected security policy rejected otherwise valid input.
PreparationError
Credential preparation failed without retaining credential contents.
ProofResult
Result of complete client-proof processing.
ProtocolError
A structural SCRAM protocol failure.
StateError
A consuming state-machine transition was invalid.

Traits§

NonceSource
A caller-owned source of unpredictable nonce bytes.