Local Open Scope logic.
Fixpoint HMAC_DRBG_update_round (HMAC: list byte -> list byte -> list byte) (provided_data K V: list byte) (round: nat): (list byte * list byte) :=
match round with
| O => (K, V)
| S round' =>
let (K, V) := HMAC_DRBG_update_round HMAC provided_data K V round' in
let K := HMAC (V ++ [Byte.repr (Z.of_nat round')] ++ provided_data) K in
let V := HMAC V K in
(K, V)
end.
Definition HMAC_DRBG_update_concrete (HMAC: list byte -> list byte -> list byte) (provided_data K V: list byte): (list byte * list byte) :=
let rounds := match provided_data with
| [] => 1%nat
| _ => 2%nat
end in
HMAC_DRBG_update_round HMAC provided_data K V rounds.

(* Specifications: *)
Theorem HMAC_DRBG_update_concrete_correct:
forall HMAC provided_data K V, HMAC_DRBG_update HMAC provided_data K V = HMAC_DRBG_update_concrete HMAC provided_data K V.