| author | paulson | 
| Tue, 13 Jul 2010 17:19:08 +0100 | |
| changeset 37809 | 6c87cdad912d | 
| parent 35416 | d8d7d1b785af | 
| child 37936 | 1e4c5015a72e | 
| permissions | -rw-r--r-- | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 1 | (* Title: HOL/Auth/ZhouGollmann | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 2 | ID: $Id$ | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 3 | Author: Giampaolo Bella and L C Paulson, Cambridge Univ Computer Lab | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 4 | Copyright 2003 University of Cambridge | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 5 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 6 | The protocol of | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 7 | Jianying Zhou and Dieter Gollmann, | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 8 | A Fair Non-Repudiation Protocol, | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 9 | Security and Privacy 1996 (Oakland) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 10 | 55-61 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 11 | *) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 12 | |
| 16417 | 13 | theory ZhouGollmann imports Public begin | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 14 | |
| 20768 | 15 | abbreviation | 
| 21404 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 wenzelm parents: 
20768diff
changeset | 16 | TTP :: agent where "TTP == Server" | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 17 | |
| 21404 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 wenzelm parents: 
20768diff
changeset | 18 | abbreviation f_sub :: nat where "f_sub == 5" | 
| 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 wenzelm parents: 
20768diff
changeset | 19 | abbreviation f_nro :: nat where "f_nro == 2" | 
| 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 wenzelm parents: 
20768diff
changeset | 20 | abbreviation f_nrr :: nat where "f_nrr == 3" | 
| 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 wenzelm parents: 
20768diff
changeset | 21 | abbreviation f_con :: nat where "f_con == 4" | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 22 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 23 | |
| 35416 
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
 haftmann parents: 
32960diff
changeset | 24 | definition broken :: "agent set" where | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 25 |     --{*the compromised honest agents; TTP is included as it's not allowed to
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 26 | use the protocol*} | 
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 27 |    "broken == bad - {Spy}"
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 28 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 29 | declare broken_def [simp] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 30 | |
| 23746 | 31 | inductive_set zg :: "event list set" | 
| 32 | where | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 33 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 34 | Nil: "[] \<in> zg" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 35 | |
| 23746 | 36 | | Fake: "[| evsf \<in> zg; X \<in> synth (analz (spies evsf)) |] | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 37 | ==> Says Spy B X # evsf \<in> zg" | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 38 | |
| 23746 | 39 | | Reception: "[| evsr \<in> zg; Says A B X \<in> set evsr |] ==> Gets B X # evsr \<in> zg" | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 40 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 41 | (*L is fresh for honest agents. | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 42 | We don't require K to be fresh because we don't bother to prove secrecy! | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 43 | We just assume that the protocol's objective is to deliver K fairly, | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 44 | rather than to keep M secret.*) | 
| 23746 | 45 | | ZG1: "[| evs1 \<in> zg; Nonce L \<notin> used evs1; C = Crypt K (Number m); | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 46 | K \<in> symKeys; | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 47 |            NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, C|}|]
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 48 |        ==> Says A B {|Number f_nro, Agent B, Nonce L, C, NRO|} # evs1 \<in> zg"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 49 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 50 | (*B must check that NRO is A's signature to learn the sender's name*) | 
| 23746 | 51 | | ZG2: "[| evs2 \<in> zg; | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 52 |            Gets B {|Number f_nro, Agent B, Nonce L, C, NRO|} \<in> set evs2;
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 53 |            NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, C|};
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 54 |            NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, C|}|]
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 55 |        ==> Says B A {|Number f_nrr, Agent A, Nonce L, NRR|} # evs2  \<in>  zg"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 56 | |
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 57 | (*A must check that NRR is B's signature to learn the sender's name; | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 58 | without spy, the matching label would be enough*) | 
| 23746 | 59 | | ZG3: "[| evs3 \<in> zg; C = Crypt K M; K \<in> symKeys; | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 60 |            Says A B {|Number f_nro, Agent B, Nonce L, C, NRO|} \<in> set evs3;
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 61 |            Gets A {|Number f_nrr, Agent A, Nonce L, NRR|} \<in> set evs3;
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 62 |            NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, C|};
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 63 |            sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|}|]
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 64 |        ==> Says A TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|}
 | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 65 | # evs3 \<in> zg" | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 66 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 67 | (*TTP checks that sub_K is A's signature to learn who issued K, then | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 68 | gives credentials to A and B. The Notes event models the availability of | 
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 69 | the credentials, but the act of fetching them is not modelled. We also | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 70 | give con_K to the Spy. This makes the threat model more dangerous, while | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 71 |    also allowing lemma @{text Crypt_used_imp_spies} to omit the condition
 | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 72 |    @{term "K \<noteq> priK TTP"}. *)
 | 
| 23746 | 73 | | ZG4: "[| evs4 \<in> zg; K \<in> symKeys; | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 74 |            Gets TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|}
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 75 | \<in> set evs4; | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 76 |            sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 77 |            con_K = Crypt (priK TTP) {|Number f_con, Agent A, Agent B,
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 78 | Nonce L, Key K|}|] | 
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 79 | ==> Says TTP Spy con_K | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 80 | # | 
| 32960 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 81 |            Notes TTP {|Number f_con, Agent A, Agent B, Nonce L, Key K, con_K|}
 | 
| 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 wenzelm parents: 
23746diff
changeset | 82 | # evs4 \<in> zg" | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 83 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 84 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 85 | declare Says_imp_knows_Spy [THEN analz.Inj, dest] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 86 | declare Fake_parts_insert_in_Un [dest] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 87 | declare analz_into_parts [dest] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 88 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 89 | declare symKey_neq_priEK [simp] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 90 | declare symKey_neq_priEK [THEN not_sym, simp] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 91 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 92 | |
| 14146 | 93 | text{*A "possibility property": there are traces that reach the end*}
 | 
| 94 | lemma "[|A \<noteq> B; TTP \<noteq> A; TTP \<noteq> B; K \<in> symKeys|] ==> | |
| 95 | \<exists>L. \<exists>evs \<in> zg. | |
| 96 |            Notes TTP {|Number f_con, Agent A, Agent B, Nonce L, Key K,
 | |
| 97 |                Crypt (priK TTP) {|Number f_con, Agent A, Agent B, Nonce L, Key K|} |}
 | |
| 98 | \<in> set evs" | |
| 99 | apply (intro exI bexI) | |
| 100 | apply (rule_tac [2] zg.Nil | |
| 101 | [THEN zg.ZG1, THEN zg.Reception [of _ A B], | |
| 102 | THEN zg.ZG2, THEN zg.Reception [of _ B A], | |
| 103 | THEN zg.ZG3, THEN zg.Reception [of _ A TTP], | |
| 104 | THEN zg.ZG4]) | |
| 105 | apply (possibility, auto) | |
| 106 | done | |
| 107 | ||
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 108 | subsection {*Basic Lemmas*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 109 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 110 | lemma Gets_imp_Says: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 111 | "[| Gets B X \<in> set evs; evs \<in> zg |] ==> \<exists>A. Says A B X \<in> set evs" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 112 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 113 | apply (erule zg.induct, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 114 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 115 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 116 | lemma Gets_imp_knows_Spy: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 117 | "[| Gets B X \<in> set evs; evs \<in> zg |] ==> X \<in> spies evs" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 118 | by (blast dest!: Gets_imp_Says Says_imp_knows_Spy) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 119 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 120 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 121 | text{*Lets us replace proofs about @{term "used evs"} by simpler proofs 
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 122 | about @{term "parts (spies evs)"}.*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 123 | lemma Crypt_used_imp_spies: | 
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 124 | "[| Crypt K X \<in> used evs; evs \<in> zg |] | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 125 | ==> Crypt K X \<in> parts (spies evs)" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 126 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 127 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 128 | apply (simp_all add: parts_insert_knows_A) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 129 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 130 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 131 | lemma Notes_TTP_imp_Gets: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 132 |      "[|Notes TTP {|Number f_con, Agent A, Agent B, Nonce L, Key K, con_K |}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 133 | \<in> set evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 134 |         sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 135 | evs \<in> zg|] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 136 |     ==> Gets TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|} \<in> set evs"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 137 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 138 | apply (erule zg.induct, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 139 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 140 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 141 | text{*For reasoning about C, which is encrypted in message ZG2*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 142 | lemma ZG2_msg_in_parts_spies: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 143 |      "[|Gets B {|F, B', L, C, X|} \<in> set evs; evs \<in> zg|]
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 144 | ==> C \<in> parts (spies evs)" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 145 | by (blast dest: Gets_imp_Says) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 146 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 147 | (*classical regularity lemma on priK*) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 148 | lemma Spy_see_priK [simp]: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 149 | "evs \<in> zg ==> (Key (priK A) \<in> parts (spies evs)) = (A \<in> bad)" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 150 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 151 | apply (frule_tac [5] ZG2_msg_in_parts_spies, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 152 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 153 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 154 | text{*So that blast can use it too*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 155 | declare Spy_see_priK [THEN [2] rev_iffD1, dest!] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 156 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 157 | lemma Spy_analz_priK [simp]: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 158 | "evs \<in> zg ==> (Key (priK A) \<in> analz (spies evs)) = (A \<in> bad)" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 159 | by auto | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 160 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 161 | |
| 14741 | 162 | subsection{*About NRO: Validity for @{term B}*}
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 163 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 164 | text{*Below we prove that if @{term NRO} exists then @{term A} definitely
 | 
| 14741 | 165 | sent it, provided @{term A} is not broken.*}
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 166 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 167 | text{*Strong conclusion for a good agent*}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 168 | lemma NRO_validity_good: | 
| 14741 | 169 |      "[|NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, C|};
 | 
| 170 | NRO \<in> parts (spies evs); | |
| 171 | A \<notin> bad; evs \<in> zg |] | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 172 |      ==> Says A B {|Number f_nro, Agent B, Nonce L, C, NRO|} \<in> set evs"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 173 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 174 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 175 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 176 | apply (frule_tac [5] ZG2_msg_in_parts_spies, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 177 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 178 | |
| 14741 | 179 | lemma NRO_sender: | 
| 180 |      "[|Says A' B {|n, b, l, C, Crypt (priK A) X|} \<in> set evs; evs \<in> zg|]
 | |
| 181 |     ==> A' \<in> {A,Spy}"
 | |
| 182 | apply (erule rev_mp) | |
| 183 | apply (erule zg.induct, simp_all) | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 184 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 185 | |
| 14741 | 186 | text{*Holds also for @{term "A = Spy"}!*}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 187 | theorem NRO_validity: | 
| 15047 | 188 |      "[|Gets B {|Number f_nro, Agent B, Nonce L, C, NRO|} \<in> set evs;
 | 
| 14741 | 189 |         NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, C|};
 | 
| 190 | A \<notin> broken; evs \<in> zg |] | |
| 191 |      ==> Says A B {|Number f_nro, Agent B, Nonce L, C, NRO|} \<in> set evs"
 | |
| 15047 | 192 | apply (drule Gets_imp_Says, assumption) | 
| 14741 | 193 | apply clarify | 
| 194 | apply (frule NRO_sender, auto) | |
| 15047 | 195 | txt{*We are left with the case where the sender is @{term Spy} and not
 | 
| 196 |   equal to @{term A}, because @{term "A \<notin> bad"}. 
 | |
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 197 |   Thus theorem @{text NRO_validity_good} applies.*}
 | 
| 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 198 | apply (blast dest: NRO_validity_good [OF refl]) | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 199 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 200 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 201 | |
| 14741 | 202 | subsection{*About NRR: Validity for @{term A}*}
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 203 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 204 | text{*Below we prove that if @{term NRR} exists then @{term B} definitely
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 205 | sent it, provided @{term B} is not broken.*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 206 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 207 | text{*Strong conclusion for a good agent*}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 208 | lemma NRR_validity_good: | 
| 14741 | 209 |      "[|NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, C|};
 | 
| 210 | NRR \<in> parts (spies evs); | |
| 211 | B \<notin> bad; evs \<in> zg |] | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 212 |      ==> Says B A {|Number f_nrr, Agent A, Nonce L, NRR|} \<in> set evs"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 213 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 214 | apply (erule rev_mp) | 
| 14741 | 215 | apply (erule zg.induct) | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 216 | apply (frule_tac [5] ZG2_msg_in_parts_spies, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 217 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 218 | |
| 14741 | 219 | lemma NRR_sender: | 
| 220 |      "[|Says B' A {|n, a, l, Crypt (priK B) X|} \<in> set evs; evs \<in> zg|]
 | |
| 221 |     ==> B' \<in> {B,Spy}"
 | |
| 222 | apply (erule rev_mp) | |
| 223 | apply (erule zg.induct, simp_all) | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 224 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 225 | |
| 14741 | 226 | text{*Holds also for @{term "B = Spy"}!*}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 227 | theorem NRR_validity: | 
| 14741 | 228 |      "[|Says B' A {|Number f_nrr, Agent A, Nonce L, NRR|} \<in> set evs;
 | 
| 229 |         NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, C|};
 | |
| 230 | B \<notin> broken; evs \<in> zg|] | |
| 231 |     ==> Says B A {|Number f_nrr, Agent A, Nonce L, NRR|} \<in> set evs"
 | |
| 232 | apply clarify | |
| 233 | apply (frule NRR_sender, auto) | |
| 234 | txt{*We are left with the case where @{term "B' = Spy"} and  @{term "B' \<noteq> B"},
 | |
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 235 |   i.e. @{term "B \<notin> bad"}, when we can apply @{text NRR_validity_good}.*}
 | 
| 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 236 | apply (blast dest: NRR_validity_good [OF refl]) | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 237 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 238 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 239 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 240 | subsection{*Proofs About @{term sub_K}*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 241 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 242 | text{*Below we prove that if @{term sub_K} exists then @{term A} definitely
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 243 | sent it, provided @{term A} is not broken.  *}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 244 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 245 | text{*Strong conclusion for a good agent*}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 246 | lemma sub_K_validity_good: | 
| 14741 | 247 |      "[|sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 248 | sub_K \<in> parts (spies evs); | |
| 249 | A \<notin> bad; evs \<in> zg |] | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 250 |      ==> Says A TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|} \<in> set evs"
 | 
| 14741 | 251 | apply clarify | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 252 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 253 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 254 | apply (frule_tac [5] ZG2_msg_in_parts_spies, simp_all) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 255 | txt{*Fake*} 
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 256 | apply (blast dest!: Fake_parts_sing_imp_Un) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 257 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 258 | |
| 14741 | 259 | lemma sub_K_sender: | 
| 260 |      "[|Says A' TTP {|n, b, l, k, Crypt (priK A) X|} \<in> set evs;  evs \<in> zg|]
 | |
| 261 |     ==> A' \<in> {A,Spy}"
 | |
| 262 | apply (erule rev_mp) | |
| 263 | apply (erule zg.induct, simp_all) | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 264 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 265 | |
| 14741 | 266 | text{*Holds also for @{term "A = Spy"}!*}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 267 | theorem sub_K_validity: | 
| 15047 | 268 |      "[|Gets TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|} \<in> set evs;
 | 
| 14741 | 269 |         sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 270 | A \<notin> broken; evs \<in> zg |] | |
| 271 |      ==> Says A TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|} \<in> set evs"
 | |
| 15047 | 272 | apply (drule Gets_imp_Says, assumption) | 
| 14741 | 273 | apply clarify | 
| 274 | apply (frule sub_K_sender, auto) | |
| 15047 | 275 | txt{*We are left with the case where the sender is @{term Spy} and not
 | 
| 276 |   equal to @{term A}, because @{term "A \<notin> bad"}. 
 | |
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 277 |   Thus theorem @{text sub_K_validity_good} applies.*}
 | 
| 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 278 | apply (blast dest: sub_K_validity_good [OF refl]) | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 279 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 280 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 281 | |
| 14741 | 282 | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 283 | subsection{*Proofs About @{term con_K}*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 284 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 285 | text{*Below we prove that if @{term con_K} exists, then @{term TTP} has it,
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 286 | and therefore @{term A} and @{term B}) can get it too.  Moreover, we know
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 287 | that @{term A} sent @{term sub_K}*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 288 | |
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 289 | lemma con_K_validity: | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 290 | "[|con_K \<in> used evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 291 | con_K = Crypt (priK TTP) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 292 |                   {|Number f_con, Agent A, Agent B, Nonce L, Key K|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 293 | evs \<in> zg |] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 294 |     ==> Notes TTP {|Number f_con, Agent A, Agent B, Nonce L, Key K, con_K|}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 295 | \<in> set evs" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 296 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 297 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 298 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 299 | apply (frule_tac [5] ZG2_msg_in_parts_spies, simp_all) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 300 | txt{*Fake*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 301 | apply (blast dest!: Fake_parts_sing_imp_Un) | 
| 14741 | 302 | txt{*ZG2*} 
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 303 | apply (blast dest: parts_cut) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 304 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 305 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 306 | text{*If @{term TTP} holds @{term con_K} then @{term A} sent
 | 
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 307 |  @{term sub_K}.  We assume that @{term A} is not broken.  Importantly, nothing
 | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 308 |   needs to be assumed about the form of @{term con_K}!*}
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 309 | lemma Notes_TTP_imp_Says_A: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 310 |      "[|Notes TTP {|Number f_con, Agent A, Agent B, Nonce L, Key K, con_K|}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 311 | \<in> set evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 312 |         sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 313 | A \<notin> broken; evs \<in> zg|] | 
| 14741 | 314 |      ==> Says A TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|} \<in> set evs"
 | 
| 315 | apply clarify | |
| 316 | apply (erule rev_mp) | |
| 317 | apply (erule zg.induct) | |
| 318 | apply (frule_tac [5] ZG2_msg_in_parts_spies, simp_all) | |
| 319 | txt{*ZG4*}
 | |
| 15047 | 320 | apply clarify | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 321 | apply (rule sub_K_validity, auto) | 
| 14741 | 322 | done | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 323 | |
| 14736 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 324 | text{*If @{term con_K} exists, then @{term A} sent @{term sub_K}.  We again
 | 
| 
7104394df99a
broken no longer includes TTP, and other minor changes
 paulson parents: 
14207diff
changeset | 325 |    assume that @{term A} is not broken. *}
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 326 | theorem B_sub_K_validity: | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 327 | "[|con_K \<in> used evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 328 |         con_K = Crypt (priK TTP) {|Number f_con, Agent A, Agent B,
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 329 | Nonce L, Key K|}; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 330 |         sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 14741 | 331 | A \<notin> broken; evs \<in> zg|] | 
| 332 |      ==> Says A TTP {|Number f_sub, Agent B, Nonce L, Key K, sub_K|} \<in> set evs"
 | |
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 333 | by (blast dest: con_K_validity Notes_TTP_imp_Says_A) | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 334 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 335 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 336 | subsection{*Proving fairness*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 337 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 338 | text{*Cannot prove that, if @{term B} has NRO, then  @{term A} has her NRR.
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 339 | It would appear that @{term B} has a small advantage, though it is
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 340 | useless to win disputes: @{term B} needs to present @{term con_K} as well.*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 341 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 342 | text{*Strange: unicity of the label protects @{term A}?*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 343 | lemma A_unicity: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 344 |      "[|NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, Crypt K M|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 345 | NRO \<in> parts (spies evs); | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 346 |         Says A B {|Number f_nro, Agent B, Nonce L, Crypt K M', NRO'|}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 347 | \<in> set evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 348 | A \<notin> bad; evs \<in> zg |] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 349 | ==> M'=M" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 350 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 351 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 352 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 353 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 354 | apply (frule_tac [5] ZG2_msg_in_parts_spies, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 355 | txt{*ZG1: freshness*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 356 | apply (blast dest: parts.Body) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 357 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 358 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 359 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 360 | text{*Fairness lemma: if @{term sub_K} exists, then @{term A} holds 
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 361 | NRR. Relies on unicity of labels.*} | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 362 | lemma sub_K_implies_NRR: | 
| 14741 | 363 |      "[| NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, Crypt K M|};
 | 
| 364 |          NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, Crypt K M|};
 | |
| 365 | sub_K \<in> parts (spies evs); | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 366 | NRO \<in> parts (spies evs); | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 367 |          sub_K = Crypt (priK A) {|Number f_sub, Agent B, Nonce L, Key K|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 368 | A \<notin> bad; evs \<in> zg |] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 369 |      ==> Gets A {|Number f_nrr, Agent A, Nonce L, NRR|} \<in> set evs"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 370 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 371 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 372 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 373 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 374 | apply (frule_tac [5] ZG2_msg_in_parts_spies, simp_all) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 375 | txt{*Fake*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 376 | apply blast | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 377 | txt{*ZG1: freshness*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 378 | apply (blast dest: parts.Body) | 
| 14741 | 379 | txt{*ZG3*} 
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 380 | apply (blast dest: A_unicity [OF refl]) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 381 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 382 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 383 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 384 | lemma Crypt_used_imp_L_used: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 385 |      "[| Crypt (priK TTP) {|F, A, B, L, K|} \<in> used evs; evs \<in> zg |]
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 386 | ==> L \<in> used evs" | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 387 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 388 | apply (erule zg.induct, auto) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 389 | txt{*Fake*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 390 | apply (blast dest!: Fake_parts_sing_imp_Un) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 391 | txt{*ZG2: freshness*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 392 | apply (blast dest: parts.Body) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 393 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 394 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 395 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 396 | text{*Fairness for @{term A}: if @{term con_K} and @{term NRO} exist, 
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 397 | then @{term A} holds NRR.  @{term A} must be uncompromised, but there is no
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 398 | assumption about @{term B}.*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 399 | theorem A_fairness_NRO: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 400 | "[|con_K \<in> used evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 401 | NRO \<in> parts (spies evs); | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 402 | con_K = Crypt (priK TTP) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 403 |                       {|Number f_con, Agent A, Agent B, Nonce L, Key K|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 404 |         NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, Crypt K M|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 405 |         NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, Crypt K M|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 406 | A \<notin> bad; evs \<in> zg |] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 407 |     ==> Gets A {|Number f_nrr, Agent A, Nonce L, NRR|} \<in> set evs"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 408 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 409 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 410 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 411 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 412 | apply (frule_tac [5] ZG2_msg_in_parts_spies, simp_all) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 413 |    txt{*Fake*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 414 | apply (simp add: parts_insert_knows_A) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 415 | apply (blast dest: Fake_parts_sing_imp_Un) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 416 |   txt{*ZG1*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 417 | apply (blast dest: Crypt_used_imp_L_used) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 418 |  txt{*ZG2*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 419 | apply (blast dest: parts_cut) | 
| 14741 | 420 | txt{*ZG4*} 
 | 
| 421 | apply (blast intro: sub_K_implies_NRR [OF refl] | |
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 422 | dest: Gets_imp_knows_Spy [THEN parts.Inj]) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 423 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 424 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 425 | text{*Fairness for @{term B}: NRR exists at all, then @{term B} holds NRO.
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 426 | @{term B} must be uncompromised, but there is no assumption about @{term
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 427 | A}. *} | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 428 | theorem B_fairness_NRR: | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 429 | "[|NRR \<in> used evs; | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 430 |         NRR = Crypt (priK B) {|Number f_nrr, Agent A, Nonce L, C|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 431 |         NRO = Crypt (priK A) {|Number f_nro, Agent B, Nonce L, C|};
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 432 | B \<notin> bad; evs \<in> zg |] | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 433 |     ==> Gets B {|Number f_nro, Agent B, Nonce L, C, NRO|} \<in> set evs"
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 434 | apply clarify | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 435 | apply (erule rev_mp) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 436 | apply (erule zg.induct) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 437 | apply (frule_tac [5] ZG2_msg_in_parts_spies, simp_all) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 438 | txt{*Fake*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 439 | apply (blast dest!: Fake_parts_sing_imp_Un) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 440 | txt{*ZG2*}
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 441 | apply (blast dest: parts_cut) | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 442 | done | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 443 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 444 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 445 | text{*If @{term con_K} exists at all, then @{term B} can get it, by @{text
 | 
| 15068 
58d216b32199
minor tweaks to go with the new version of the Accountability paper
 paulson parents: 
15047diff
changeset | 446 | con_K_validity}.  Cannot conclude that also NRO is available to @{term B},
 | 
| 14145 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 447 | because if @{term A} were unfair, @{term A} could build message 3 without
 | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 448 | building message 1, which contains NRO. *} | 
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 449 | |
| 
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
 paulson parents: diff
changeset | 450 | end |