-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGenericExtractability.eca
47 lines (34 loc) · 1.2 KB
/
GenericExtractability.eca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pragma Goals:printall.
require import AllCore List Distr.
require GenericZeroKnowledge.
clone include GenericZeroKnowledge. (* inherit defs. *)
(* malicious provers with rewindability interface *)
module type RewMaliciousProver = {
proc commitment(s : statement) : commitment
proc response(challenge : challenge) : response
proc getState() : sbits
proc setState(b : sbits) : unit
}.
module type Extractor(P: RewMaliciousProver) = {
proc extract(statement: statement): witness
}.
theory Extractability.
section.
declare module Extractor <: Extractor.
declare module V <: HonestVerifier.
declare module P <: RewMaliciousProver{-HV}.
lemma statistical_soundness_generic &m p f epsilon:
! in_language soundness_relation p =>
Pr[Extractor(P).extract(p) @ &m : soundness_relation p res] >=
f Pr[Soundness(P, V).run(p) @ &m : res]
=> (forall s, f s <= 0%r => s <= epsilon) =>
Pr[Soundness(P, V).run(p) @ &m : res] <= epsilon.
proof. progress.
have f1 : Pr[Extractor(P).extract(p) @ &m : soundness_relation p res] = 0%r.
have <-: Pr[Extractor(P).extract(p) @ &m : false ] = 0%r.
rewrite Pr[mu_false]. auto.
rewrite Pr[mu_eq]. smt(). auto.
smt().
qed.
end section.
end Extractability.