fact: Definition CCA_EVAL_pkg_ff: package CCA_EVAL_locs [interface] [interface #val #[eavesdrop]: 'word × 'word → 'word × 'word ; #val #[decrypt]: 'word × 'word → 'option 'word ] := [package #def #[eavesdrop] ('(ml, mr): 'word × 'word): 'word × 'word { S ← get S_loc ;; ke ← kgen ek_loc ;; km ← kgen km_loc ;; let c := enc ke mr in let t := mac km c in #put S_loc := setm S (c, t) tt ;; ret (c, t) } ; #def #[decrypt] ('(c, t): 'word × 'word): 'option 'word { S ← get S_loc ;; if ((c, t) \in domm S) then ret None else km ← kgen km_loc ;; if (t != mac km c) then ret None else ke ← kgen ek_loc ;; ret (Some (dec ke c)) } ].
imports: Relational(OrderEnrichedCategory GenericRulesSimple) mathcomp(all_ssreflect all_algebra reals distr realsum ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice seq) Mon(SPropBase) Crypt(Axioms ChoiceAsOrd SubDistr Couplings UniformDistrLemmas FreeProbProg Theta_dens RulesStateProb pkg_core_definition choice_type pkg_composition pkg_rhl Package Prelude) extructures(ord fset fmap) Equations(Equations)