| author | wenzelm | 
| Tue, 31 Jul 2007 00:56:31 +0200 | |
| changeset 24077 | e7ba448bc571 | 
| parent 23746 | a455e69c31cc | 
| child 35416 | d8d7d1b785af | 
| permissions | -rw-r--r-- | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
1  | 
(******************************************************************************  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
2  | 
date: march 2002  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
3  | 
author: Frederic Blanqui  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
4  | 
email: blanqui@lri.fr  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
5  | 
webpage: http://www.lri.fr/~blanqui/  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
6  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
7  | 
University of Cambridge, Computer Laboratory  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
8  | 
William Gates Building, JJ Thomson Avenue  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
9  | 
Cambridge CB3 0FD, United Kingdom  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
10  | 
******************************************************************************)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
11  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
12  | 
header{*Yahalom Protocol*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
13  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
14  | 
theory Guard_Yahalom imports Guard_Shared begin  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
15  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
16  | 
subsection{*messages used in the protocol*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
17  | 
|
| 20768 | 18  | 
abbreviation (input)  | 
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
19  | 
ya1 :: "agent => agent => nat => event" where  | 
| 20768 | 20  | 
  "ya1 A B NA == Says A B {|Agent A, Nonce NA|}"
 | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
21  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
22  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
23  | 
ya1' :: "agent => agent => agent => nat => event" where  | 
| 20768 | 24  | 
  "ya1' A' A B NA == Says A' B {|Agent A, Nonce NA|}"
 | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
25  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
26  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
27  | 
ya2 :: "agent => agent => nat => nat => event" where  | 
| 20768 | 28  | 
  "ya2 A B NA NB == Says B Server {|Agent B, Ciph B {|Agent A, Nonce NA, Nonce NB|}|}"
 | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
29  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
30  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
31  | 
ya2' :: "agent => agent => agent => nat => nat => event" where  | 
| 20768 | 32  | 
  "ya2' B' A B NA NB == Says B' Server {|Agent B, Ciph B {|Agent A, Nonce NA, Nonce NB|}|}"
 | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
33  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
34  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
35  | 
ya3 :: "agent => agent => nat => nat => key => event" where  | 
| 20768 | 36  | 
"ya3 A B NA NB K ==  | 
37  | 
    Says Server A {|Ciph A {|Agent B, Key K, Nonce NA, Nonce NB|},
 | 
|
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
38  | 
                    Ciph B {|Agent A, Key K|}|}"
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
39  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
40  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
41  | 
ya3':: "agent => msg => agent => agent => nat => nat => key => event" where  | 
| 20768 | 42  | 
"ya3' S Y A B NA NB K ==  | 
43  | 
    Says S A {|Ciph A {|Agent B, Key K, Nonce NA, Nonce NB|}, Y|}"
 | 
|
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
44  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
45  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
46  | 
ya4 :: "agent => agent => nat => nat => msg => event" where  | 
| 20768 | 47  | 
  "ya4 A B K NB Y == Says A B {|Y, Crypt K (Nonce NB)|}"
 | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
48  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
49  | 
abbreviation (input)  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
50  | 
ya4' :: "agent => agent => nat => nat => msg => event" where  | 
| 20768 | 51  | 
  "ya4' A' B K NB Y == Says A' B {|Y, Crypt K (Nonce NB)|}"
 | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
52  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
53  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
54  | 
subsection{*definition of the protocol*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
55  | 
|
| 23746 | 56  | 
inductive_set ya :: "event list set"  | 
57  | 
where  | 
|
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
58  | 
|
| 23746 | 59  | 
Nil: "[]:ya"  | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
60  | 
|
| 23746 | 61  | 
| Fake: "[| evs:ya; X:synth (analz (spies evs)) |] ==> Says Spy B X # evs:ya"  | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
62  | 
|
| 23746 | 63  | 
| YA1: "[| evs1:ya; Nonce NA ~:used evs1 |] ==> ya1 A B NA # evs1:ya"  | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
64  | 
|
| 23746 | 65  | 
| YA2: "[| evs2:ya; ya1' A' A B NA:set evs2; Nonce NB ~:used evs2 |]  | 
66  | 
==> ya2 A B NA NB # evs2:ya"  | 
|
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
67  | 
|
| 23746 | 68  | 
| YA3: "[| evs3:ya; ya2' B' A B NA NB:set evs3; Key K ~:used evs3 |]  | 
69  | 
==> ya3 A B NA NB K # evs3:ya"  | 
|
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
70  | 
|
| 23746 | 71  | 
| YA4: "[| evs4:ya; ya1 A B NA:set evs4; ya3' S Y A B NA NB K:set evs4 |]  | 
72  | 
==> ya4 A B K NB Y # evs4:ya"  | 
|
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
73  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
74  | 
subsection{*declarations for tactics*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
75  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
76  | 
declare knows_Spy_partsEs [elim]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
77  | 
declare Fake_parts_insert [THEN subsetD, dest]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
78  | 
declare initState.simps [simp del]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
79  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
80  | 
subsection{*general properties of ya*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
81  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
82  | 
lemma ya_has_no_Gets: "evs:ya ==> ALL A X. Gets A X ~:set evs"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
83  | 
by (erule ya.induct, auto)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
84  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
85  | 
lemma ya_is_Gets_correct [iff]: "Gets_correct ya"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
86  | 
by (auto simp: Gets_correct_def dest: ya_has_no_Gets)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
87  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
88  | 
lemma ya_is_one_step [iff]: "one_step ya"  | 
| 23746 | 89  | 
by (unfold one_step_def, clarify, ind_cases "ev#evs:ya" for ev evs, auto)  | 
| 
17394
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
90  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
91  | 
lemma ya_has_only_Says' [rule_format]: "evs:ya ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
92  | 
ev:set evs --> (EX A B X. ev=Says A B X)"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
93  | 
by (erule ya.induct, auto)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
94  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
95  | 
lemma ya_has_only_Says [iff]: "has_only_Says ya"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
96  | 
by (auto simp: has_only_Says_def dest: ya_has_only_Says')  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
97  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
98  | 
lemma ya_is_regular [iff]: "regular ya"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
99  | 
apply (simp only: regular_def, clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
100  | 
apply (erule ya.induct, simp_all add: initState.simps knows.simps)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
101  | 
by (auto dest: parts_sub)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
102  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
103  | 
subsection{*guardedness of KAB*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
104  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
105  | 
lemma Guard_KAB [rule_format]: "[| evs:ya; A ~:bad; B ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
106  | 
ya3 A B NA NB K:set evs --> GuardK K {shrK A,shrK B} (spies evs)" 
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
107  | 
apply (erule ya.induct)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
108  | 
(* Nil *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
109  | 
apply simp_all  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
110  | 
(* Fake *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
111  | 
apply (clarify, erule in_synth_GuardK, erule GuardK_analz, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
112  | 
(* YA1 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
113  | 
(* YA2 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
114  | 
apply safe  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
115  | 
apply (blast dest: Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
116  | 
(* YA3 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
117  | 
apply blast  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
118  | 
apply (drule_tac A=Server in Key_neq, simp+, rule No_Key, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
119  | 
apply (drule_tac A=Server in Key_neq, simp+, rule No_Key, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
120  | 
(* YA4 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
121  | 
apply (blast dest: Says_imp_spies in_GuardK_kparts)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
122  | 
by blast  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
123  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
124  | 
subsection{*session keys are not symmetric keys*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
125  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
126  | 
lemma KAB_isnt_shrK [rule_format]: "evs:ya ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
127  | 
ya3 A B NA NB K:set evs --> K ~:range shrK"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
128  | 
by (erule ya.induct, auto)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
129  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
130  | 
lemma ya3_shrK: "evs:ya ==> ya3 A B NA NB (shrK C) ~:set evs"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
131  | 
by (blast dest: KAB_isnt_shrK)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
132  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
133  | 
subsection{*ya2' implies ya1'*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
134  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
135  | 
lemma ya2'_parts_imp_ya1'_parts [rule_format]:  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
136  | 
"[| evs:ya; B ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
137  | 
      Ciph B {|Agent A, Nonce NA, Nonce NB|}:parts (spies evs) -->
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
138  | 
      {|Agent A, Nonce NA|}:spies evs"
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
139  | 
by (erule ya.induct, auto dest: Says_imp_spies intro: parts_parts)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
140  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
141  | 
lemma ya2'_imp_ya1'_parts: "[| ya2' B' A B NA NB:set evs; evs:ya; B ~:bad |]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
142  | 
==> {|Agent A, Nonce NA|}:spies evs"
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
143  | 
by (blast dest: Says_imp_spies ya2'_parts_imp_ya1'_parts)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
144  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
145  | 
subsection{*uniqueness of NB*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
146  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
147  | 
lemma NB_is_uniq_in_ya2'_parts [rule_format]: "[| evs:ya; B ~:bad; B' ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
148  | 
Ciph B {|Agent A, Nonce NA, Nonce NB|}:parts (spies evs) -->
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
149  | 
Ciph B' {|Agent A', Nonce NA', Nonce NB|}:parts (spies evs) -->
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
150  | 
A=A' & B=B' & NA=NA'"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
151  | 
apply (erule ya.induct, simp_all, clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
152  | 
apply (drule Crypt_synth_insert, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
153  | 
apply (drule Crypt_synth_insert, simp+, safe)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
154  | 
apply (drule not_used_parts_false, simp+)+  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
155  | 
by (drule Says_not_parts, simp+)+  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
156  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
157  | 
lemma NB_is_uniq_in_ya2': "[| ya2' C A B NA NB:set evs;  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
158  | 
ya2' C' A' B' NA' NB:set evs; evs:ya; B ~:bad; B' ~:bad |]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
159  | 
==> A=A' & B=B' & NA=NA'"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
160  | 
by (drule NB_is_uniq_in_ya2'_parts, auto dest: Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
161  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
162  | 
subsection{*ya3' implies ya2'*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
163  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
164  | 
lemma ya3'_parts_imp_ya2'_parts [rule_format]: "[| evs:ya; A ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
165  | 
Ciph A {|Agent B, Key K, Nonce NA, Nonce NB|}:parts (spies evs)
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
166  | 
--> Ciph B {|Agent A, Nonce NA, Nonce NB|}:parts (spies evs)"
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
167  | 
apply (erule ya.induct, simp_all)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
168  | 
apply (clarify, drule Crypt_synth_insert, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
169  | 
apply (blast intro: parts_sub, blast)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
170  | 
by (auto dest: Says_imp_spies parts_parts)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
171  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
172  | 
lemma ya3'_parts_imp_ya2' [rule_format]: "[| evs:ya; A ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
173  | 
Ciph A {|Agent B, Key K, Nonce NA, Nonce NB|}:parts (spies evs)
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
174  | 
--> (EX B'. ya2' B' A B NA NB:set evs)"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
175  | 
apply (erule ya.induct, simp_all, safe)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
176  | 
apply (drule Crypt_synth_insert, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
177  | 
apply (drule Crypt_synth_insert, simp+, blast)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
178  | 
apply blast  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
179  | 
apply blast  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
180  | 
by (auto dest: Says_imp_spies2 parts_parts)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
181  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
182  | 
lemma ya3'_imp_ya2': "[| ya3' S Y A B NA NB K:set evs; evs:ya; A ~:bad |]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
183  | 
==> (EX B'. ya2' B' A B NA NB:set evs)"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
184  | 
by (drule ya3'_parts_imp_ya2', auto dest: Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
185  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
186  | 
subsection{*ya3' implies ya3*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
187  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
188  | 
lemma ya3'_parts_imp_ya3 [rule_format]: "[| evs:ya; A ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
189  | 
Ciph A {|Agent B, Key K, Nonce NA, Nonce NB|}:parts(spies evs)
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
190  | 
--> ya3 A B NA NB K:set evs"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
191  | 
apply (erule ya.induct, simp_all, safe)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
192  | 
apply (drule Crypt_synth_insert, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
193  | 
by (blast dest: Says_imp_spies2 parts_parts)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
194  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
195  | 
lemma ya3'_imp_ya3: "[| ya3' S Y A B NA NB K:set evs; evs:ya; A ~:bad |]  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
196  | 
==> ya3 A B NA NB K:set evs"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
197  | 
by (blast dest: Says_imp_spies ya3'_parts_imp_ya3)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
198  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
199  | 
subsection{*guardedness of NB*}
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
200  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
201  | 
constdefs ya_keys :: "agent => agent => nat => nat => event list => key set"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
202  | 
"ya_keys A B NA NB evs == {shrK A,shrK B} Un {K. ya3 A B NA NB K:set evs}"
 | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
203  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
204  | 
lemma Guard_NB [rule_format]: "[| evs:ya; A ~:bad; B ~:bad |] ==>  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
205  | 
ya2 A B NA NB:set evs --> Guard NB (ya_keys A B NA NB evs) (spies evs)"  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
206  | 
apply (erule ya.induct)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
207  | 
(* Nil *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
208  | 
apply (simp_all add: ya_keys_def)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
209  | 
(* Fake *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
210  | 
apply safe  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
211  | 
apply (erule in_synth_Guard, erule Guard_analz, simp, clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
212  | 
apply (frule_tac B=B in Guard_KAB, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
213  | 
apply (drule_tac p=ya in GuardK_Key_analz, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
214  | 
apply (blast dest: KAB_isnt_shrK, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
215  | 
(* YA1 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
216  | 
apply (drule_tac n=NB in Nonce_neq, simp+, rule No_Nonce, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
217  | 
(* YA2 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
218  | 
apply blast  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
219  | 
apply (drule Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
220  | 
apply (drule_tac n=NB in Nonce_neq, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
221  | 
apply (drule_tac n'=NAa in in_Guard_kparts_neq, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
222  | 
apply (rule No_Nonce, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
223  | 
(* YA3 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
224  | 
apply (rule Guard_extand, simp, blast)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
225  | 
apply (case_tac "NAa=NB", clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
226  | 
apply (frule Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
227  | 
apply (frule in_Guard_kparts_Crypt, simp+, blast, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
228  | 
apply (frule_tac A=A and B=B and NA=NA and NB=NB and C=Ba in ya3_shrK, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
229  | 
apply (drule ya2'_imp_ya1'_parts, simp, blast, blast)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
230  | 
apply (case_tac "NBa=NB", clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
231  | 
apply (frule Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
232  | 
apply (frule in_Guard_kparts_Crypt, simp+, blast, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
233  | 
apply (frule_tac A=A and B=B and NA=NA and NB=NB and C=Ba in ya3_shrK, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
234  | 
apply (drule NB_is_uniq_in_ya2', simp+, blast, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
235  | 
apply (simp add: No_Nonce, blast)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
236  | 
(* YA4 *)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
237  | 
apply (blast dest: Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
238  | 
apply (case_tac "NBa=NB", clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
239  | 
apply (frule_tac A=S in Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
240  | 
apply (frule in_Guard_kparts_Crypt, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
241  | 
apply (blast dest: Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
242  | 
apply (case_tac "NBa=NB", clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
243  | 
apply (frule_tac A=S in Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
244  | 
apply (frule in_Guard_kparts_Crypt, simp+, blast, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
245  | 
apply (frule_tac A=A and B=B and NA=NA and NB=NB and C=Aa in ya3_shrK, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
246  | 
apply (frule ya3'_imp_ya2', simp+, blast, clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
247  | 
apply (frule_tac A=B' in Says_imp_spies)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
248  | 
apply (rotate_tac -1, frule in_Guard_kparts_Crypt, simp+, blast, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
249  | 
apply (frule_tac A=A and B=B and NA=NA and NB=NB and C=Ba in ya3_shrK, simp)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
250  | 
apply (drule NB_is_uniq_in_ya2', simp+, blast, clarify)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
251  | 
apply (drule ya3'_imp_ya3, simp+)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
252  | 
apply (simp add: Guard_Nonce)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
253  | 
apply (simp add: No_Nonce)  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
254  | 
done  | 
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
255  | 
|
| 
 
a8c9ed3f9818
renamed Guard/NS_Public, Guard/OtwayRees, Guard/Yahalom.thy to avoid clash with plain Auth versions;
 
wenzelm 
parents:  
diff
changeset
 | 
256  | 
end  |