fact: Definition CCA_EVAL_TAG_pkg_tt: package CCA_EVAL_TAG_locs [interface #val #[gettag]: 'word → 'word ; #val #[checktag]: 'word × 'word → 'bool ] [interface #val #[eavesdrop]: 'word × 'word → 'word × 'word ; #val #[decrypt]: 'word × 'word → 'option 'word ] := [package #def #[eavesdrop] ('(ml, mr): 'word × 'word): 'word × 'word { #import {sig #[gettag]: 'word → 'word } as gettag ;; S ← get S_loc ;; ke ← kgen ek_loc ;; let c := enc ke ml in t ← gettag c ;; #put S_loc := setm S (c, t) tt ;; ret (c, t) } ; #def #[decrypt] ('(c, t): 'word × 'word): 'option 'word { #import {sig #[checktag]: 'word × 'word → 'bool } as checktag ;; S ← get S_loc ;; if ((c, t) \in domm S) then ret None else r ← checktag (c, t) ;; if (~~ r) 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)