Expand description
HMAC_DRBG — SP 800-90A Rev.1 §10.1.2.
Generic over any [tessera::Digest], driving tessera::hmac; used in
practice over HMAC-SHA-256 / -384 / -512. Both the state size and the
output block equal the digest’s output length outlen.
§Parameters (SP 800-90A §10.1, Table 2)
| Hash | security_strength | outlen (octets) |
|---|---|---|
| SHA-1 | 128 | 20 |
| SHA-224 | 192 | 28 |
| SHA-256 | 256 | 32 |
| SHA-384 | 256 | 48 |
| SHA-512 | 256 | 64 |
reseed_interval = 2^48, max_number_of_bits_per_request = 2^19.
§Side-channel posture
(K, V) are secret. The construction is branch-free by shape: the
only value-dependent control flow is the provided_data.is_empty()
test of the Update (§10.1.2.2), which is on the (public) presence of
additional input, not on secret content. HMAC-SHA-2 inherits the
carry-based DPA of T2-D (see crate::drbg); no table lookup on
secret data.
Structs§
- Hmac
Drbg - HMAC_DRBG internal state (SP 800-90A §10.1.2.1):
(K, V)eachoutlenoctets, plus thereseed_counter.KandVare secret.