fact: Definition CTXT_pkg_tt: package CTXT_locs [interface] [interface #val #[ctxt]: 'word → 'ciph ; #val #[decrypt]: 'ciph → 'word ] := [package #def #[ctxt] (m: 'word): 'ciph { r <$ uniform Key_N ;; k ← kgen ;; let c := PRP k (mkciph m r) in S ← get S_loc ;; #put S_loc := setm S c tt ;; ret c } ; #def #[decrypt] (c: 'ciph): 'word { S ← get S_loc ;; #assert (c \notin domm S) ;; k ← kgen ;; ret (ciph_to_pair (PRP' k c)).1 } ].
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)