(*The function occurring in the VST spec of mbedtls' random function ie no additional input*)
Definition mbedtls_generate s I n :=
match mbedtls_HMAC256_DRBG_generate_function s I n []
with ENTROPY.success (bytes, J) ss =>
match J with ((((VV, KK), RC), _), PR) =>
Some (bytes, ss, HMAC256DRBGabs KK VV RC (hmac256drbgabs_entropy_len I) PR
(hmac256drbgabs_reseed_interval I))
end
| _ => None
end.

Lemma Bridge' s I n bytes F ss (M: mbedtls_generate s I n = Some(bytes, ss, F)):
match I with HMAC256DRBGabs K V reseed_counter entropy_len prediction_resistance reseed_interval =>
reseed_counter <= reseed_interval -> prediction_resistance = false ->
match F with HMAC256DRBGabs KK VV rc _ _ _ =>
s=ss /\ rc=reseed_counter+1 /\
FunGenerate reseed_interval (V,K,reseed_counter) n = DRBG_functions.generate_algorithm_success bytes ((VV,KK), rc)
end end.