Expand description
HOTP (RFC 4226) — HMAC-Based One-Time Password Algorithm
Implements the HOTP algorithm as specified in RFC 4226 for counter-based one-time password generation and validation. HOTP uses a shared secret and a monotonically increasing counter to generate OTPs.
§Security Considerations
- Secrets must be generated with a cryptographically secure RNG
- Counter values must never be reused (monotonically increasing)
- Look-ahead window should be kept small to limit brute-force surface
- Secrets should be stored encrypted at rest
Structs§
- Hotp
Config - HOTP configuration.
- Hotp
Manager - HOTP manager for generating and validating counter-based OTPs.