src/HOL/Auth/KerberosV.thy
author wenzelm
Tue, 10 Jul 2007 23:29:43 +0200
changeset 23719 ccd9cb15c062
parent 21404 eb85850d3eb7
child 23746 a455e69c31cc
permissions -rwxr-xr-x
more markup for inner and outer syntax; added enclose;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     1
(*  ID:         $Id$
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     2
    Author:     Giampaolo Bella, Catania University
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     3
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     4
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     5
header{*The Kerberos Protocol, Version V*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     6
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     7
theory KerberosV imports Public begin
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     8
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     9
text{*The "u" prefix indicates theorems referring to an updated version of the protocol. The "r" suffix indicates theorems where the confidentiality assumptions are relaxed by the corresponding arguments.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    10
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    11
abbreviation
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    12
  Kas :: agent where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    13
  "Kas == Server"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    14
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    15
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    16
  Tgs :: agent where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    17
  "Tgs == Friend 0"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    18
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    19
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    20
axioms
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    21
  Tgs_not_bad [iff]: "Tgs \<notin> bad"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    22
   --{*Tgs is secure --- we already know that Kas is secure*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    23
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    24
constdefs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    25
 (* authKeys are those contained in an authTicket *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    26
    authKeys :: "event list => key set"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    27
    "authKeys evs == {authK. \<exists>A Peer Ta. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    28
        Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Peer, Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    29
                     Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key authK, Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    30
                   \<rbrace> \<in> set evs}"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    31
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    32
 (* A is the true creator of X if she has sent X and X never appeared on
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    33
    the trace before this event. Recall that traces grow from head. *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    34
  Issues :: "[agent, agent, msg, event list] => bool"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    35
             ("_ Issues _ with _ on _")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    36
   "A Issues B with X on evs ==
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    37
      \<exists>Y. Says A B Y \<in> set evs \<and> X \<in> parts {Y} \<and>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    38
      X \<notin> parts (spies (takeWhile (% z. z  \<noteq> Says A B Y) (rev evs)))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    39
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    40
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    41
consts
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    42
    (*Duration of the authentication key*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    43
    authKlife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    44
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    45
    (*Duration of the service key*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    46
    servKlife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    47
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    48
    (*Duration of an authenticator*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    49
    authlife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    50
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    51
    (*Upper bound on the time of reaction of a server*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    52
    replylife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    53
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    54
specification (authKlife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    55
  authKlife_LB [iff]: "2 \<le> authKlife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    56
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    57
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    58
specification (servKlife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    59
  servKlife_LB [iff]: "2 + authKlife \<le> servKlife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    60
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    61
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    62
specification (authlife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    63
  authlife_LB [iff]: "Suc 0 \<le> authlife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    64
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    65
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    66
specification (replylife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    67
  replylife_LB [iff]: "Suc 0 \<le> replylife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    68
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    69
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    70
abbreviation
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    71
  (*The current time is just the length of the trace!*)
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    72
  CT :: "event list=>nat" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    73
  "CT == length"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    74
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    75
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    76
  expiredAK :: "[nat, event list] => bool" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    77
  "expiredAK T evs == authKlife + T < CT evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    78
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    79
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    80
  expiredSK :: "[nat, event list] => bool" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    81
  "expiredSK T evs == servKlife + T < CT evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    82
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    83
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    84
  expiredA :: "[nat, event list] => bool" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    85
  "expiredA T evs == authlife + T < CT evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    86
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    87
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    88
  valid :: "[nat, nat] => bool"  ("valid _ wrt _") where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    89
  "valid T1 wrt T2 == T1 <= replylife + T2"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    90
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    91
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    92
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    93
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    94
(* Predicate formalising the association between authKeys and servKeys *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    95
constdefs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    96
  AKcryptSK :: "[key, key, event list] => bool"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    97
  "AKcryptSK authK servK evs ==
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    98
     \<exists>A B tt.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    99
       Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, tt\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   100
                    Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, tt\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   101
         \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   102
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   103
consts
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   104
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   105
kerbV   :: "event list set"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   106
inductive "kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   107
  intros
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   108
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   109
   Nil:  "[] \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   110
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   111
   Fake: "\<lbrakk> evsf \<in> kerbV;  X \<in> synth (analz (spies evsf)) \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   112
          \<Longrightarrow> Says Spy B X  # evsf \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   113
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   114
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   115
(*Authentication phase*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   116
   KV1:   "\<lbrakk> evs1 \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   117
          \<Longrightarrow> Says A Kas \<lbrace>Agent A, Agent Tgs, Number (CT evs1)\<rbrace> # evs1
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   118
          \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   119
   (*Unlike version IV, authTicket is not re-encrypted*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   120
   KV2:  "\<lbrakk> evs2 \<in> kerbV; Key authK \<notin> used evs2; authK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   121
            Says A' Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs2 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   122
          \<Longrightarrow> Says Kas A \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   123
          Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number (CT evs2)\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   124
        Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number (CT evs2)\<rbrace> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   125
                         \<rbrace> # evs2 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   126
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   127
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   128
(* Authorisation phase *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   129
   KV3:  "\<lbrakk> evs3 \<in> kerbV; A \<noteq> Kas; A \<noteq> Tgs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   130
            Says A Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs3;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   131
            Says Kas' A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   132
                          authTicket\<rbrace> \<in> set evs3;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   133
            valid Ta wrt T1
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   134
         \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   135
          \<Longrightarrow> Says A Tgs \<lbrace>authTicket,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   136
                           (Crypt authK \<lbrace>Agent A, Number (CT evs3)\<rbrace>),
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   137
                           Agent B\<rbrace> # evs3 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   138
   (*Unlike version IV, servTicket is not re-encrypted*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   139
   KV4:  "\<lbrakk> evs4 \<in> kerbV; Key servK \<notin> used evs4; servK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   140
            B \<noteq> Tgs;  authK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   141
            Says A' Tgs \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   142
             (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   143
				 Number Ta\<rbrace>),
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   144
             (Crypt authK \<lbrace>Agent A, Number T2\<rbrace>), Agent B\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   145
	        \<in> set evs4;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   146
            \<not> expiredAK Ta evs4;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   147
            \<not> expiredA T2 evs4;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   148
            servKlife + (CT evs4) <= authKlife + Ta
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   149
         \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   150
          \<Longrightarrow> Says Tgs A \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   151
             Crypt authK \<lbrace>Key servK, Agent B, Number (CT evs4)\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   152
   Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number (CT evs4)\<rbrace> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   153
                          \<rbrace> # evs4 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   154
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   155
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   156
(*Service phase*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   157
   KV5:  "\<lbrakk> evs5 \<in> kerbV; authK \<in> symKeys; servK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   158
            A \<noteq> Kas; A \<noteq> Tgs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   159
            Says A Tgs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   160
                \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   161
		  Agent B\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   162
              \<in> set evs5;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   163
            Says Tgs' A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   164
                          servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   165
                \<in> set evs5;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   166
            valid Ts wrt T2 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   167
          \<Longrightarrow> Says A B \<lbrace>servTicket,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   168
			 Crypt servK \<lbrace>Agent A, Number (CT evs5)\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   169
               # evs5 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   170
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   171
    KV6:  "\<lbrakk> evs6 \<in> kerbV; B \<noteq> Kas; B \<noteq> Tgs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   172
            Says A' B \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   173
              (Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>),
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   174
              (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>)\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   175
            \<in> set evs6;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   176
            \<not> expiredSK Ts evs6;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   177
            \<not> expiredA T3 evs6
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   178
         \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   179
          \<Longrightarrow> Says B A (Crypt servK (Number Ta2))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   180
               # evs6 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   181
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   182
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   183
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   184
(* Leaking an authK... *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   185
   Oops1:"\<lbrakk> evsO1 \<in> kerbV;  A \<noteq> Spy;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   186
             Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   187
                          authTicket\<rbrace>  \<in> set evsO1;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   188
              expiredAK Ta evsO1 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   189
          \<Longrightarrow> Notes Spy \<lbrace>Agent A, Agent Tgs, Number Ta, Key authK\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   190
               # evsO1 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   191
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   192
(*Leaking a servK... *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   193
   Oops2: "\<lbrakk> evsO2 \<in> kerbV;  A \<noteq> Spy;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   194
              Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   195
                           servTicket\<rbrace>  \<in> set evsO2;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   196
              expiredSK Ts evsO2 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   197
          \<Longrightarrow> Notes Spy \<lbrace>Agent A, Agent B, Number Ts, Key servK\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   198
               # evsO2 \<in> kerbV"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   199
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   200
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   201
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   202
declare Says_imp_knows_Spy [THEN parts.Inj, dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   203
declare parts.Body [dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   204
declare analz_into_parts [dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   205
declare Fake_parts_insert_in_Un [dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   206
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   207
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   208
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   209
subsection{*Lemmas about lists, for reasoning about  Issues*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   210
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   211
lemma spies_Says_rev: "spies (evs @ [Says A B X]) = insert X (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   212
apply (induct_tac "evs")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   213
apply (induct_tac [2] "a", auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   214
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   215
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   216
lemma spies_Gets_rev: "spies (evs @ [Gets A X]) = spies evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   217
apply (induct_tac "evs")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   218
apply (induct_tac [2] "a", auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   219
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   220
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   221
lemma spies_Notes_rev: "spies (evs @ [Notes A X]) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   222
          (if A:bad then insert X (spies evs) else spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   223
apply (induct_tac "evs")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   224
apply (induct_tac [2] "a", auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   225
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   226
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   227
lemma spies_evs_rev: "spies evs = spies (rev evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   228
apply (induct_tac "evs")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   229
apply (induct_tac [2] "a")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   230
apply (simp_all (no_asm_simp) add: spies_Says_rev spies_Gets_rev spies_Notes_rev)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   231
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   232
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   233
lemmas parts_spies_evs_revD2 = spies_evs_rev [THEN equalityD2, THEN parts_mono]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   234
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   235
lemma spies_takeWhile: "spies (takeWhile P evs) <=  spies evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   236
apply (induct_tac "evs")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   237
apply (induct_tac [2] "a", auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   238
txt{* Resembles @{text"used_subset_append"} in theory Event.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   239
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   240
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   241
lemmas parts_spies_takeWhile_mono = spies_takeWhile [THEN parts_mono]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   242
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   243
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   244
subsection{*Lemmas about @{term authKeys}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   245
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   246
lemma authKeys_empty: "authKeys [] = {}"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   247
apply (unfold authKeys_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   248
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   249
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   250
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   251
lemma authKeys_not_insert:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   252
 "(\<forall>A Ta akey Peer.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   253
   ev \<noteq> Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>akey, Agent Peer, Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   254
                     Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, akey, Ta\<rbrace> \<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   255
       \<Longrightarrow> authKeys (ev # evs) = authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   256
apply (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   257
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   258
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   259
lemma authKeys_insert:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   260
  "authKeys
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   261
     (Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key K, Agent Peer, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   262
         Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key K, Number Ta\<rbrace> \<rbrace> # evs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   263
       = insert K (authKeys evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   264
apply (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   265
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   266
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   267
lemma authKeys_simp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   268
   "K \<in> authKeys
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   269
    (Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key K', Agent Peer, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   270
        Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key K', Number Ta\<rbrace> \<rbrace> # evs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   271
        \<Longrightarrow> K = K' | K \<in> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   272
apply (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   273
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   274
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   275
lemma authKeysI:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   276
   "Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key K, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   277
         Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key K, Number Ta\<rbrace> \<rbrace> \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   278
        \<Longrightarrow> K \<in> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   279
apply (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   280
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   281
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   282
lemma authKeys_used: "K \<in> authKeys evs \<Longrightarrow> Key K \<in> used evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   283
apply (simp add: authKeys_def, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   284
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   285
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   286
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   287
subsection{*Forwarding Lemmas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   288
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   289
lemma Says_ticket_parts:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   290
     "Says S A \<lbrace>Crypt K \<lbrace>SesKey, B, TimeStamp\<rbrace>, Ticket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   291
               \<in> set evs \<Longrightarrow> Ticket \<in> parts (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   292
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   293
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   294
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   295
lemma Says_ticket_analz:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   296
     "Says S A \<lbrace>Crypt K \<lbrace>SesKey, B, TimeStamp\<rbrace>, Ticket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   297
               \<in> set evs \<Longrightarrow> Ticket \<in> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   298
apply (blast dest: Says_imp_knows_Spy [THEN analz.Inj, THEN analz.Snd])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   299
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   300
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   301
lemma Oops_range_spies1:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   302
     "\<lbrakk> Says Kas A \<lbrace>Crypt KeyA \<lbrace>Key authK, Peer, Ta\<rbrace>, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   303
           \<in> set evs ;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   304
         evs \<in> kerbV \<rbrakk> \<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   305
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   306
apply (erule kerbV.induct, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   307
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   308
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   309
lemma Oops_range_spies2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   310
     "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   311
           \<in> set evs ;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   312
         evs \<in> kerbV \<rbrakk> \<Longrightarrow> servK \<notin> range shrK \<and> servK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   313
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   314
apply (erule kerbV.induct, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   315
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   316
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   317
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   318
(*Spy never sees another agent's shared key! (unless it's lost at start)*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   319
lemma Spy_see_shrK [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   320
     "evs \<in> kerbV \<Longrightarrow> (Key (shrK A) \<in> parts (spies evs)) = (A \<in> bad)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   321
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   322
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   323
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   324
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   325
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   326
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   327
lemma Spy_analz_shrK [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   328
     "evs \<in> kerbV \<Longrightarrow> (Key (shrK A) \<in> analz (spies evs)) = (A \<in> bad)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   329
by auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   330
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   331
lemma Spy_see_shrK_D [dest!]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   332
     "\<lbrakk> Key (shrK A) \<in> parts (spies evs);  evs \<in> kerbV \<rbrakk> \<Longrightarrow> A:bad"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   333
by (blast dest: Spy_see_shrK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   334
lemmas Spy_analz_shrK_D = analz_subset_parts [THEN subsetD, THEN Spy_see_shrK_D, dest!]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   335
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   336
text{*Nobody can have used non-existent keys!*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   337
lemma new_keys_not_used [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   338
    "\<lbrakk>Key K \<notin> used evs; K \<in> symKeys; evs \<in> kerbV\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   339
     \<Longrightarrow> K \<notin> keysFor (parts (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   340
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   341
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   342
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   343
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   344
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   345
apply (force dest!: keysFor_parts_insert)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   346
txt{*Others*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   347
apply (force dest!: analz_shrK_Decrypt)+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   348
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   349
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   350
(*Earlier, all protocol proofs declared this theorem.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   351
  But few of them actually need it! (Another is Yahalom) *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   352
lemma new_keys_not_analzd:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   353
 "\<lbrakk>evs \<in> kerbV; K \<in> symKeys; Key K \<notin> used evs\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   354
  \<Longrightarrow> K \<notin> keysFor (analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   355
by (blast dest: new_keys_not_used intro: keysFor_mono [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   356
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   357
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   358
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   359
subsection{*Regularity Lemmas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   360
text{*These concern the form of items passed in messages*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   361
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   362
text{*Describes the form of all components sent by Kas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   363
lemma Says_Kas_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   364
     "\<lbrakk> Says Kas A \<lbrace>Crypt K \<lbrace>Key authK, Agent Peer, Ta\<rbrace>, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   365
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   366
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   367
      \<Longrightarrow> authK \<notin> range shrK \<and> authK \<in> authKeys evs \<and> authK \<in> symKeys \<and> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   368
  authTicket = (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>) \<and>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   369
             K = shrK A  \<and> Peer = Tgs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   370
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   371
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   372
apply (simp_all (no_asm) add: authKeys_def authKeys_insert)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   373
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   374
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   375
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   376
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   377
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   378
(*This lemma is essential for proving Says_Tgs_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   379
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   380
  the session key authK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   381
  supplied by Kas in the authentication ticket
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   382
  cannot be a long-term key!
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   383
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   384
  Generalised to any session keys (both authK and servK).
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   385
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   386
lemma SesKey_is_session_key:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   387
     "\<lbrakk> Crypt (shrK Tgs_B) \<lbrace>Agent A, Agent Tgs_B, Key SesKey, Number T\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   388
            \<in> parts (spies evs); Tgs_B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   389
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   390
      \<Longrightarrow> SesKey \<notin> range shrK"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   391
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   392
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   393
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   394
apply (frule_tac [5] Says_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   395
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   396
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   397
lemma authTicket_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   398
     "\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   399
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   400
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   401
      \<Longrightarrow> Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   402
                 Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   403
            \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   404
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   405
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   406
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   407
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   408
txt{*Fake, K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   409
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   410
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   411
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   412
lemma authTicket_crypt_authK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   413
     "\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   414
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   415
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   416
      \<Longrightarrow> authK \<in> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   417
apply (frule authTicket_authentic, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   418
apply (simp (no_asm) add: authKeys_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   419
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   420
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   421
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   422
text{*Describes the form of servK, servTicket and authK sent by Tgs*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   423
lemma Says_Tgs_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   424
     "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   425
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   426
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   427
   \<Longrightarrow> B \<noteq> Tgs \<and> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   428
       servK \<notin> range shrK \<and> servK \<notin> authKeys evs \<and> servK \<in> symKeys \<and>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   429
       servTicket = (Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>) \<and>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   430
       authK \<notin> range shrK \<and> authK \<in> authKeys evs \<and> authK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   431
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   432
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   433
apply (simp_all add: authKeys_insert authKeys_not_insert authKeys_empty authKeys_simp, blast, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   434
txt{*Three subcases of Message 4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   435
apply (blast dest!: authKeys_used Says_Kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   436
apply (blast dest!: SesKey_is_session_key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   437
apply (blast dest: authTicket_crypt_authK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   438
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   439
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   440
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   441
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   442
(*
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   443
lemma authTicket_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   444
lemma servTicket_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   445
lemma Says_kas_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   446
lemma Says_tgs_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   447
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   448
cannot be proved for version V, but a new proof strategy can be used in their
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   449
place. The new strategy merely says that both the authTicket and the servTicket
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   450
are in parts and in analz as soon as they appear, using lemmas Says_ticket_parts and Says_ticket_analz. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   451
The new strategy always lets the simplifier solve cases K3 and K5, saving on
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   452
long dedicated analyses, which seemed unavoidable. For this reason, lemma 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   453
servK_notin_authKeysD is no longer needed.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   454
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   455
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   456
subsection{*Authenticity theorems: confirm origin of sensitive messages*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   457
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   458
lemma authK_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   459
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Peer, Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   460
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   461
         A \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   462
      \<Longrightarrow> \<exists> AT. Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Peer, Ta\<rbrace>, AT\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   463
            \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   464
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   465
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   466
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   467
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   468
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   469
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   470
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   471
text{*If a certain encrypted message appears then it originated with Tgs*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   472
lemma servK_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   473
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   474
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   475
         Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   476
         authK \<notin> range shrK;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   477
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   478
 \<Longrightarrow> \<exists>A ST. Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>, ST\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   479
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   480
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   481
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   482
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   483
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   484
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   485
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   486
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   487
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   488
lemma servK_authentic_bis:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   489
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   490
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   491
         Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   492
         B \<noteq> Tgs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   493
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   494
 \<Longrightarrow> \<exists>A ST. Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>, ST\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   495
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   496
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   497
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   498
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   499
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   500
apply (frule_tac [5] Says_ticket_parts, simp_all, blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   501
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   502
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   503
text{*Authenticity of servK for B*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   504
lemma servTicket_authentic_Tgs:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   505
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   506
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   507
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   508
 \<Longrightarrow> \<exists>authK.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   509
       Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   510
                    Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   511
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   512
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   513
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   514
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   515
apply (frule_tac [5] Says_ticket_parts, simp_all, blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   516
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   517
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   518
text{*Anticipated here from next subsection*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   519
lemma K4_imp_K2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   520
"\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   521
      \<in> set evs;  evs \<in> kerbV\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   522
   \<Longrightarrow> \<exists>Ta. Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   523
        \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   524
           Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   525
        \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   526
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   527
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   528
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   529
apply (frule_tac [5] Says_ticket_parts, simp_all, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   530
apply (blast dest!: Says_imp_spies [THEN parts.Inj, THEN parts.Fst, THEN authTicket_authentic])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   531
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   532
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   533
text{*Anticipated here from next subsection*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   534
lemma u_K4_imp_K2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   535
"\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>  \<in> set evs; evs \<in> kerbV\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   536
   \<Longrightarrow> \<exists>Ta. Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   537
             Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   538
             \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   539
          \<and> servKlife + Ts <= authKlife + Ta"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   540
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   541
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   542
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   543
apply (frule_tac [5] Says_ticket_parts, simp_all, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   544
apply (blast dest!: Says_imp_spies [THEN parts.Inj, THEN parts.Fst, THEN authTicket_authentic])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   545
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   546
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   547
lemma servTicket_authentic_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   548
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   549
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   550
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   551
  \<Longrightarrow> \<exists>authK Ta.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   552
       Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   553
         \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   554
           Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   555
        \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   556
apply (blast dest!: servTicket_authentic_Tgs K4_imp_K2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   557
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   558
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   559
lemma u_servTicket_authentic_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   560
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   561
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   562
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   563
  \<Longrightarrow> \<exists>authK Ta.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   564
       Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   565
         \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   566
           Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   567
        \<in> set evs \<and> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   568
      servKlife + Ts <= authKlife + Ta"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   569
apply (blast dest!: servTicket_authentic_Tgs u_K4_imp_K2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   570
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   571
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   572
lemma servTicket_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   573
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   574
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   575
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   576
 \<Longrightarrow> \<exists>Ta authK.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   577
     Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   578
                  Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace> \<rbrace>  \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   579
     \<and> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   580
                  Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   581
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   582
apply (blast dest: servTicket_authentic_Tgs K4_imp_K2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   583
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   584
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   585
lemma u_servTicket_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   586
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   587
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   588
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   589
 \<Longrightarrow> \<exists>Ta authK.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   590
     Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   591
                  Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace> \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   592
     \<and> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   593
                 Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   594
       \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   595
     \<and> servKlife + Ts <= authKlife + Ta"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   596
apply (blast dest: servTicket_authentic_Tgs u_K4_imp_K2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   597
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   598
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   599
lemma u_NotexpiredSK_NotexpiredAK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   600
     "\<lbrakk> \<not> expiredSK Ts evs; servKlife + Ts <= authKlife + Ta \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   601
      \<Longrightarrow> \<not> expiredAK Ta evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   602
apply (blast dest: leI le_trans dest: leD)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   603
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   604
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   605
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   606
subsection{* Reliability: friendly agents send somthing if something else happened*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   607
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   608
lemma K3_imp_K2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   609
     "\<lbrakk> Says A Tgs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   610
             \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   611
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   612
         A \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   613
      \<Longrightarrow> \<exists>Ta AT. Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Ta\<rbrace>, 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   614
                               AT\<rbrace> \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   615
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   616
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   617
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   618
apply (frule_tac [5] Says_ticket_parts, simp_all, blast, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   619
apply (blast dest: Says_imp_spies [THEN parts.Inj, THEN parts.Fst, THEN authK_authentic])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   620
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   621
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   622
text{*Anticipated here from next subsection. An authK is encrypted by one and only one Shared key. A servK is encrypted by one and only one authK.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   623
lemma Key_unique_SesKey:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   624
     "\<lbrakk> Crypt K  \<lbrace>Key SesKey,  Agent B, T\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   625
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   626
         Crypt K' \<lbrace>Key SesKey,  Agent B', T'\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   627
           \<in> parts (spies evs);  Key SesKey \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   628
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   629
      \<Longrightarrow> K=K' \<and> B=B' \<and> T=T'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   630
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   631
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   632
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   633
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   634
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   635
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   636
txt{*Fake, K2, K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   637
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   638
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   639
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   640
text{*This inevitably has an existential form in version V*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   641
lemma Says_K5:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   642
     "\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   643
         Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   644
                                     servTicket\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   645
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   646
         A \<notin> bad; B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   647
 \<Longrightarrow> \<exists> ST. Says A B \<lbrace>ST, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   648
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   649
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   650
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   651
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   652
apply (frule_tac [5] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   653
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   654
apply (simp_all (no_asm_simp) add: all_conj_distrib)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   655
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   656
txt{*K3*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   657
apply (blast dest: authK_authentic Says_Kas_message_form Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   658
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   659
apply (force dest!: Crypt_imp_keysFor)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   660
txt{*K5*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   661
apply (blast dest: Key_unique_SesKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   662
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   663
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   664
text{*Anticipated here from next subsection*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   665
lemma unique_CryptKey:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   666
     "\<lbrakk> Crypt (shrK B)  \<lbrace>Agent A,  Agent B,  Key SesKey, T\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   667
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   668
         Crypt (shrK B') \<lbrace>Agent A', Agent B', Key SesKey, T'\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   669
           \<in> parts (spies evs);  Key SesKey \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   670
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   671
      \<Longrightarrow> A=A' & B=B' & T=T'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   672
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   673
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   674
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   675
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   676
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   677
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   678
txt{*Fake, K2, K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   679
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   680
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   681
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   682
lemma Says_K6:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   683
     "\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   684
         Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   685
                      servTicket\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   686
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   687
         A \<notin> bad; B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   688
      \<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   689
apply (frule Says_Tgs_message_form, assumption, clarify)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   690
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   691
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   692
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   693
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   694
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   695
apply (frule_tac [5] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   696
apply (simp_all (no_asm_simp))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   697
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   698
txt{*fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   699
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   700
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   701
apply (force dest!: Crypt_imp_keysFor, clarify)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   702
txt{*K6*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   703
apply (drule  Says_imp_spies [THEN parts.Inj, THEN parts.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   704
apply (drule  Says_imp_spies [THEN parts.Inj, THEN parts.Snd])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   705
apply (blast dest!: unique_CryptKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   706
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   707
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   708
text{*Needs a unicity theorem, hence moved here*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   709
lemma servK_authentic_ter:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   710
 "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   711
       \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Ta\<rbrace>, authTicket\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   712
     Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   713
       \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   714
     Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   715
     evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   716
 \<Longrightarrow> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Ts\<rbrace>, 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   717
                 Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   718
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   719
apply (frule Says_Kas_message_form, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   720
apply clarify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   721
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   722
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   723
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   724
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   725
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   726
apply (frule_tac [5] Says_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   727
txt{*K2 and K4 remain*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   728
apply (blast dest!: servK_authentic Says_Tgs_message_form authKeys_used)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   729
apply (blast dest!: unique_CryptKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   730
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   731
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   732
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   733
subsection{*Unicity Theorems*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   734
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   735
text{* The session key, if secure, uniquely identifies the Ticket
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   736
   whether authTicket or servTicket. As a matter of fact, one can read
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   737
   also Tgs in the place of B.                                     *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   738
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   739
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   740
lemma unique_authKeys:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   741
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   742
              \<lbrace>Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta\<rbrace>, X\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   743
         Says Kas A'
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   744
              \<lbrace>Crypt Ka' \<lbrace>Key authK, Agent Tgs, Ta'\<rbrace>, X'\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   745
         evs \<in> kerbV \<rbrakk> \<Longrightarrow> A=A' \<and> Ka=Ka' \<and> Ta=Ta' \<and> X=X'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   746
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   747
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   748
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   749
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   750
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   751
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   752
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   753
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   754
text{* servK uniquely identifies the message from Tgs *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   755
lemma unique_servKeys:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   756
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   757
              \<lbrace>Crypt K \<lbrace>Key servK, Agent B, Ts\<rbrace>, X\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   758
         Says Tgs A'
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   759
              \<lbrace>Crypt K' \<lbrace>Key servK, Agent B', Ts'\<rbrace>, X'\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   760
         evs \<in> kerbV \<rbrakk> \<Longrightarrow> A=A' \<and> B=B' \<and> K=K' \<and> Ts=Ts' \<and> X=X'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   761
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   762
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   763
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   764
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   765
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   766
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   767
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   768
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   769
subsection{*Lemmas About the Predicate @{term AKcryptSK}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   770
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   771
lemma not_AKcryptSK_Nil [iff]: "\<not> AKcryptSK authK servK []"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   772
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   773
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   774
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   775
lemma AKcryptSKI:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   776
 "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, tt\<rbrace>, X \<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   777
     evs \<in> kerbV \<rbrakk> \<Longrightarrow> AKcryptSK authK servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   778
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   779
apply (blast dest: Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   780
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   781
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   782
lemma AKcryptSK_Says [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   783
   "AKcryptSK authK servK (Says S A X # evs) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   784
     (S = Tgs \<and>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   785
      (\<exists>B tt. X = \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, tt\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   786
                    Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, tt\<rbrace> \<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   787
     | AKcryptSK authK servK evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   788
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   789
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   790
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   791
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   792
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   793
lemma AKcryptSK_Notes [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   794
   "AKcryptSK authK servK (Notes A X # evs) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   795
      AKcryptSK authK servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   796
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   797
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   798
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   799
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   800
(*A fresh authK cannot be associated with any other
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   801
  (with respect to a given trace). *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   802
lemma Auth_fresh_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   803
     "\<lbrakk> Key authK \<notin> used evs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   804
      \<Longrightarrow> \<not> AKcryptSK authK servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   805
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   806
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   807
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   808
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   809
apply (frule_tac [5] Says_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   810
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   811
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   812
(*A fresh servK cannot be associated with any other
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   813
  (with respect to a given trace). *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   814
lemma Serv_fresh_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   815
 "Key servK \<notin> used evs \<Longrightarrow> \<not> AKcryptSK authK servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   816
apply (unfold AKcryptSK_def, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   817
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   818
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   819
lemma authK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   820
     "\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, tk\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   821
           \<in> parts (spies evs);  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   822
      \<Longrightarrow> \<not> AKcryptSK K authK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   823
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   824
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   825
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   826
apply (frule_tac [5] Says_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   827
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   828
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   829
txt{*K2: by freshness*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   830
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   831
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   832
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   833
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   834
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   835
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   836
text{*A secure serverkey cannot have been used to encrypt others*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   837
lemma servK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   838
 "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key SK, tt\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   839
     Key SK \<notin> analz (spies evs);  SK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   840
     B \<noteq> Tgs;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   841
  \<Longrightarrow> \<not> AKcryptSK SK K evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   842
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   843
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   844
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   845
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   846
apply (frule_tac [5] Says_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   847
txt{*K4 splits into distinct subcases*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   848
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   849
txt{*servK can't have been enclosed in two certificates*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   850
 prefer 2 apply (blast dest: unique_CryptKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   851
txt{*servK is fresh and so could not have been used, by
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   852
   @{text new_keys_not_used}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   853
apply (force dest!: Crypt_imp_invKey_keysFor simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   854
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   855
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   856
text{*Long term keys are not issued as servKeys*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   857
lemma shrK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   858
     "evs \<in> kerbV \<Longrightarrow> \<not> AKcryptSK K (shrK A) evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   859
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   860
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   861
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   862
apply (frule_tac [5] Says_ticket_parts, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   863
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   864
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   865
text{*The Tgs message associates servK with authK and therefore not with any
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   866
  other key authK.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   867
lemma Says_Tgs_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   868
     "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, tt\<rbrace>, X \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   869
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   870
         authK' \<noteq> authK;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   871
      \<Longrightarrow> \<not> AKcryptSK authK' servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   872
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   873
apply (blast dest: unique_servKeys)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   874
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   875
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   876
lemma AKcryptSK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   877
     "\<lbrakk> AKcryptSK authK servK evs;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   878
      \<Longrightarrow> \<not> AKcryptSK servK K evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   879
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   880
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   881
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   882
apply (frule_tac [5] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   883
apply (simp_all, safe)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   884
txt{*K4 splits into subcases*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   885
(*apply simp_all*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   886
prefer 4 apply (blast dest!: authK_not_AKcryptSK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   887
txt{*servK is fresh and so could not have been used, by
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   888
   @{text new_keys_not_used}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   889
 prefer 2 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   890
 apply (force dest!: Crypt_imp_invKey_keysFor simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   891
txt{*Others by freshness*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   892
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   893
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   894
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   895
lemma not_different_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   896
     "\<lbrakk> AKcryptSK authK servK evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   897
        authK' \<noteq> authK;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   898
      \<Longrightarrow> \<not> AKcryptSK authK' servK evs  \<and> servK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   899
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   900
apply (blast dest: unique_servKeys Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   901
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   902
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   903
lemma AKcryptSK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   904
     "\<lbrakk> AKcryptSK authK servK evs;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   905
      \<Longrightarrow> \<not> AKcryptSK servK K evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   906
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   907
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   908
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   909
apply (frule_tac [5] Says_ticket_parts, simp_all, safe)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   910
txt{*K4 splits into subcases*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   911
apply simp_all
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   912
prefer 4 apply (blast dest!: authK_not_AKcryptSK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   913
txt{*servK is fresh and so could not have been used, by
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   914
   @{text new_keys_not_used}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   915
 prefer 2 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   916
 apply (force dest!: Crypt_imp_invKey_keysFor simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   917
txt{*Others by freshness*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   918
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   919
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   920
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   921
text{*The only session keys that can be found with the help of session keys are
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   922
  those sent by Tgs in step K4.  *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   923
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   924
text{*We take some pains to express the property
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   925
  as a logical equivalence so that the simplifier can apply it.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   926
lemma Key_analz_image_Key_lemma:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   927
     "P \<longrightarrow> (Key K \<in> analz (Key`KK Un H)) \<longrightarrow> (K:KK | Key K \<in> analz H)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   928
      \<Longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   929
      P \<longrightarrow> (Key K \<in> analz (Key`KK Un H)) = (K:KK | Key K \<in> analz H)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   930
by (blast intro: analz_mono [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   931
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   932
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   933
lemma AKcryptSK_analz_insert:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   934
     "\<lbrakk> AKcryptSK K K' evs; K \<in> symKeys; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   935
      \<Longrightarrow> Key K' \<in> analz (insert (Key K) (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   936
apply (simp add: AKcryptSK_def, clarify)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   937
apply (drule Says_imp_spies [THEN analz.Inj, THEN analz_insertI], auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   938
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   939
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   940
lemma authKeys_are_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   941
     "\<lbrakk> K \<in> authKeys evs Un range shrK;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   942
      \<Longrightarrow> \<forall>SK. \<not> AKcryptSK SK K evs \<and> K \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   943
apply (simp add: authKeys_def AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   944
apply (blast dest: Says_Kas_message_form Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   945
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   946
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   947
lemma not_authKeys_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   948
     "\<lbrakk> K \<notin> authKeys evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   949
         K \<notin> range shrK; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   950
      \<Longrightarrow> \<forall>SK. \<not> AKcryptSK K SK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   951
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   952
apply (blast dest: Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   953
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   954
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   955
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   956
subsection{*Secrecy Theorems*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   957
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   958
text{*For the Oops2 case of the next theorem*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   959
lemma Oops2_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   960
     "\<lbrakk> evs \<in> kerbV;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   961
         Says Tgs A \<lbrace>Crypt authK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   962
                     \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   963
           \<in> set evs \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   964
      \<Longrightarrow> \<not> AKcryptSK servK SK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   965
apply (blast dest: AKcryptSKI AKcryptSK_not_AKcryptSK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   966
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   967
   
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   968
text{* Big simplification law for keys SK that are not crypted by keys in KK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   969
 It helps prove three, otherwise hard, facts about keys. These facts are
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   970
 exploited as simplification laws for analz, and also "limit the damage"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   971
 in case of loss of a key to the spy. See ESORICS98.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   972
lemma Key_analz_image_Key [rule_format (no_asm)]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   973
     "evs \<in> kerbV \<Longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   974
      (\<forall>SK KK. SK \<in> symKeys & KK <= -(range shrK) \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   975
       (\<forall>K \<in> KK. \<not> AKcryptSK K SK evs)   \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   976
       (Key SK \<in> analz (Key`KK Un (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   977
       (SK \<in> KK | Key SK \<in> analz (spies evs)))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   978
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   979
apply (frule_tac [10] Oops_range_spies2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   980
apply (frule_tac [9] Oops_range_spies1)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   981
(*Used to apply Says_tgs_message form, which is no longer available. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   982
  Instead\<dots>*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   983
apply (drule_tac [7] Says_ticket_analz)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   984
(*Used to apply Says_kas_message form, which is no longer available. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   985
  Instead\<dots>*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   986
apply (drule_tac [5] Says_ticket_analz)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   987
apply (safe del: impI intro!: Key_analz_image_Key_lemma [THEN impI])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   988
txt{*Case-splits for Oops1 and message 5: the negated case simplifies using
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   989
 the induction hypothesis*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   990
apply (case_tac [9] "AKcryptSK authK SK evsO1")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   991
apply (case_tac [7] "AKcryptSK servK SK evs5")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   992
apply (simp_all del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   993
          add: analz_image_freshK_simps AKcryptSK_Says shrK_not_AKcryptSK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   994
               Oops2_not_AKcryptSK Auth_fresh_not_AKcryptSK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   995
               Serv_fresh_not_AKcryptSK Says_Tgs_AKcryptSK Spy_analz_shrK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   996
txt{*Fake*} 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   997
apply spy_analz
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   998
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   999
apply blast 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1000
txt{*Cases K3 and K5 solved by the simplifier thanks to the ticket being in 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1001
analz - this strategy is new wrt version IV*} 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1002
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1003
apply (blast dest!: authK_not_AKcryptSK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1004
txt{*Oops1*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1005
apply clarify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1006
apply simp
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1007
apply (blast dest!: AKcryptSK_analz_insert)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1008
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1009
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1010
text{* First simplification law for analz: no session keys encrypt
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1011
authentication keys or shared keys. *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1012
lemma analz_insert_freshK1:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1013
     "\<lbrakk> evs \<in> kerbV;  K \<in> authKeys evs Un range shrK;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1014
        SesKey \<notin> range shrK \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1015
      \<Longrightarrow> (Key K \<in> analz (insert (Key SesKey) (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1016
          (K = SesKey | Key K \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1017
apply (frule authKeys_are_not_AKcryptSK, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1018
apply (simp del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1019
            add: analz_image_freshK_simps add: Key_analz_image_Key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1020
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1021
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1022
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1023
text{* Second simplification law for analz: no service keys encrypt any other keys.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1024
lemma analz_insert_freshK2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1025
     "\<lbrakk> evs \<in> kerbV;  servK \<notin> (authKeys evs); servK \<notin> range shrK;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1026
        K \<in> symKeys \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1027
      \<Longrightarrow> (Key K \<in> analz (insert (Key servK) (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1028
          (K = servK | Key K \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1029
apply (frule not_authKeys_not_AKcryptSK, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1030
apply (simp del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1031
            add: analz_image_freshK_simps add: Key_analz_image_Key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1032
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1033
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1034
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1035
text{* Third simplification law for analz: only one authentication key encrypts a certain service key.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1036
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1037
lemma analz_insert_freshK3:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1038
 "\<lbrakk> AKcryptSK authK servK evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1039
    authK' \<noteq> authK; authK' \<notin> range shrK; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1040
        \<Longrightarrow> (Key servK \<in> analz (insert (Key authK') (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1041
                (servK = authK' | Key servK \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1042
apply (drule_tac authK' = authK' in not_different_AKcryptSK, blast, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1043
apply (simp del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1044
            add: analz_image_freshK_simps add: Key_analz_image_Key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1045
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1046
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1047
lemma analz_insert_freshK3_bis:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1048
 "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1049
        \<in> set evs; 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1050
     authK \<noteq> authK'; authK' \<notin> range shrK; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1051
        \<Longrightarrow> (Key servK \<in> analz (insert (Key authK') (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1052
                (servK = authK' | Key servK \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1053
apply (frule AKcryptSKI, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1054
apply (simp add: analz_insert_freshK3)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1055
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1056
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1057
text{*a weakness of the protocol*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1058
lemma authK_compromises_servK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1059
     "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1060
        \<in> set evs;  authK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1061
         Key authK \<in> analz (spies evs); evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1062
      \<Longrightarrow> Key servK \<in> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1063
apply (force dest: Says_imp_spies [THEN analz.Inj, THEN analz.Fst, THEN analz.Decrypt, THEN analz.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1064
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1065
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1066
text{*lemma @{text servK_notin_authKeysD} not needed in version V*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1067
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1068
text{*If Spy sees the Authentication Key sent in msg K2, then
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1069
    the Key has expired.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1070
lemma Confidentiality_Kas_lemma [rule_format]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1071
     "\<lbrakk> authK \<in> symKeys; A \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1072
      \<Longrightarrow> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1073
               \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1074
          Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1075
            \<in> set evs \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1076
          Key authK \<in> analz (spies evs) \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1077
          expiredAK Ta evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1078
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1079
apply (frule_tac [10] Oops_range_spies2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1080
apply (frule_tac [9] Oops_range_spies1)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1081
apply (frule_tac [7] Says_ticket_analz)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1082
apply (frule_tac [5] Says_ticket_analz)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1083
apply (safe del: impI conjI impCE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1084
apply (simp_all (no_asm_simp) add: Says_Kas_message_form less_SucI analz_insert_eq not_parts_not_analz analz_insert_freshK1 pushes)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1085
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1086
apply spy_analz
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1087
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1088
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1089
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1090
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1091
txt{*Oops1*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1092
apply (blast dest!: unique_authKeys intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1093
txt{*Oops2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1094
apply (blast dest: Says_Tgs_message_form Says_Kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1095
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1096
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1097
lemma Confidentiality_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1098
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1099
              \<lbrace>Crypt Ka \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1100
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1101
        \<not> expiredAK Ta evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1102
        A \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1103
      \<Longrightarrow> Key authK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1104
apply (blast dest: Says_Kas_message_form Confidentiality_Kas_lemma)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1105
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1106
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1107
text{*If Spy sees the Service Key sent in msg K4, then
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1108
    the Key has expired.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1109
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1110
lemma Confidentiality_lemma [rule_format]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1111
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1112
	    \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1113
	      Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1114
	   \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1115
	Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1116
        servK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1117
	A \<notin> bad;  B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1118
      \<Longrightarrow> Key servK \<in> analz (spies evs) \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1119
	  expiredSK Ts evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1120
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1121
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1122
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1123
apply (rule_tac [9] impI)+;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1124
  --{*The Oops1 case is unusual: must simplify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1125
    @{term "Authkey \<notin> analz (spies (ev#evs))"}, not letting
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1126
   @{text analz_mono_contra} weaken it to
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1127
   @{term "Authkey \<notin> analz (spies evs)"},
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1128
  for we then conclude @{term "authK \<noteq> authKa"}.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1129
apply analz_mono_contra
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1130
apply (frule_tac [10] Oops_range_spies2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1131
apply (frule_tac [9] Oops_range_spies1)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1132
apply (frule_tac [7] Says_ticket_analz)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1133
apply (frule_tac [5] Says_ticket_analz)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1134
apply (safe del: impI conjI impCE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1135
apply (simp_all add: less_SucI new_keys_not_analzd Says_Kas_message_form Says_Tgs_message_form analz_insert_eq not_parts_not_analz analz_insert_freshK1 analz_insert_freshK2 analz_insert_freshK3_bis pushes)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1136
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1137
apply spy_analz
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1138
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1139
apply (blast intro: parts_insertI less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1140
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1141
apply (blast dest: authTicket_authentic Confidentiality_Kas)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1142
txt{*Oops1*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1143
 apply (blast dest: Says_Kas_message_form Says_Tgs_message_form intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1144
txt{*Oops2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1145
  apply (blast dest: Says_imp_spies [THEN parts.Inj] Key_unique_SesKey intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1146
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1147
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1148
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1149
text{* In the real world Tgs can't check wheter authK is secure! *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1150
lemma Confidentiality_Tgs:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1151
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1152
              \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1153
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1154
         Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1155
         \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1156
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1157
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1158
apply (blast dest: Says_Tgs_message_form Confidentiality_lemma)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1159
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1160
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1161
text{* In the real world Tgs CAN check what Kas sends! *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1162
lemma Confidentiality_Tgs_bis:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1163
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1164
               \<lbrace>Crypt Ka \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1165
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1166
         Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1167
              \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1168
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1169
         \<not> expiredAK Ta evs; \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1170
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1171
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1172
apply (blast dest!: Confidentiality_Kas Confidentiality_Tgs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1173
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1174
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1175
text{*Most general form*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1176
lemmas Confidentiality_Tgs_ter = authTicket_authentic [THEN Confidentiality_Tgs_bis]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1177
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1178
lemmas Confidentiality_Auth_A = authK_authentic [THEN exE, THEN Confidentiality_Kas]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1179
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1180
text{*Needs a confidentiality guarantee, hence moved here.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1181
      Authenticity of servK for A*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1182
lemma servK_authentic_bis_r:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1183
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1184
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1185
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1186
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1187
         \<not> expiredAK Ta evs; A \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1188
 \<Longrightarrow> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1189
                 Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace> \<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1190
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1191
apply (frule authK_authentic, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1192
apply (erule exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1193
apply (drule Confidentiality_Auth_A, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1194
apply (blast, assumption, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1195
apply (blast dest:  servK_authentic_ter)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1196
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1197
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1198
lemma Confidentiality_Serv_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1199
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1200
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1201
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1202
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1203
         \<not> expiredAK Ta evs; \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1204
         A \<notin> bad;  B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1205
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1206
apply (drule authK_authentic, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1207
apply (blast dest: Confidentiality_Kas Says_Kas_message_form servK_authentic_ter Confidentiality_Tgs_bis)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1208
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1209
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1210
lemma Confidentiality_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1211
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1212
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1213
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1214
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1215
         Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1216
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1217
         \<not> expiredSK Ts evs; \<not> expiredAK Ta evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1218
         A \<notin> bad;  B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1219
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1220
apply (frule authK_authentic)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1221
apply (erule_tac [3] exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1222
apply (frule_tac [3] Confidentiality_Kas)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1223
apply (frule_tac [6] servTicket_authentic, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1224
apply (blast dest!: Confidentiality_Tgs_bis dest: Says_Kas_message_form servK_authentic unique_servKeys unique_authKeys)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1225
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1226
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1227
lemma u_Confidentiality_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1228
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1229
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1230
         \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1231
         A \<notin> bad;  B \<notin> bad;  B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1232
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1233
apply (blast dest: u_servTicket_authentic u_NotexpiredSK_NotexpiredAK Confidentiality_Tgs_bis)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1234
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1235
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1236
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1237
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1238
subsection{*Parties authentication: each party verifies "the identity of
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1239
       another party who generated some data" (quoted from Neuman and Ts'o).*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1240
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1241
text{*These guarantees don't assess whether two parties agree on
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1242
      the same session key: sending a message containing a key
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1243
      doesn't a priori state knowledge of the key.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1244
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1245
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1246
text{*These didn't have existential form in version IV*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1247
lemma B_authenticates_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1248
     "\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1249
        Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1250
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1251
        Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1252
        A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1253
  \<Longrightarrow> \<exists> ST. Says A B \<lbrace>ST, Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<rbrace> \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1254
apply (blast dest: servTicket_authentic_Tgs intro: Says_K5)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1255
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1256
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1257
text{*The second assumption tells B what kind of key servK is.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1258
lemma B_authenticates_A_r:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1259
     "\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1260
         Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1261
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1262
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1263
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1264
         Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1265
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1266
         \<not> expiredSK Ts evs; \<not> expiredAK Ta evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1267
         B \<noteq> Tgs; A \<notin> bad;  B \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1268
  \<Longrightarrow> \<exists> ST. Says A B \<lbrace>ST, Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<rbrace> \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1269
apply (blast intro: Says_K5 dest: Confidentiality_B servTicket_authentic_Tgs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1270
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1271
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1272
text{* @{text u_B_authenticates_A} would be the same as @{text B_authenticates_A} because the
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1273
 servK confidentiality assumption is yet unrelaxed*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1274
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1275
lemma u_B_authenticates_A_r:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1276
     "\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1277
         Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1278
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1279
         \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1280
         B \<noteq> Tgs; A \<notin> bad;  B \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1281
  \<Longrightarrow> \<exists> ST. Says A B \<lbrace>ST, Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<rbrace> \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1282
apply (blast intro: Says_K5 dest: u_Confidentiality_B servTicket_authentic_Tgs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1283
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1284
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1285
lemma A_authenticates_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1286
     "\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1287
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1288
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1289
         Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1290
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1291
         Key authK \<notin> analz (spies evs); Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1292
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1293
      \<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1294
apply (frule authK_authentic)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1295
apply assumption+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1296
apply (frule servK_authentic)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1297
prefer 2 apply (blast dest: authK_authentic Says_Kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1298
apply assumption+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1299
apply clarify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1300
apply (blast dest: K4_imp_K2 Key_unique_SesKey intro!: Says_K6)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1301
(*Single command proof: much slower!
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1302
apply (blast dest: authK_authentic servK_authentic Says_Kas_message_form Key_unique_SesKey K4_imp_K2 intro!: Says_K6)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1303
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1304
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1305
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1306
lemma A_authenticates_B_r:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1307
     "\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1308
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1309
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1310
         Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1311
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1312
         \<not> expiredAK Ta evs; \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1313
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1314
      \<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1315
apply (frule authK_authentic)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1316
apply (erule_tac [3] exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1317
apply (frule_tac [3] Says_Kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1318
apply (frule_tac [4] Confidentiality_Kas)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1319
apply (frule_tac [7] servK_authentic)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1320
prefer 8 apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1321
apply (erule_tac [9] exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1322
apply (erule_tac [9] exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1323
apply (frule_tac [9] K4_imp_K2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1324
apply assumption+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1325
apply (blast dest: Key_unique_SesKey intro!: Says_K6 dest: Confidentiality_Tgs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1326
)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1327
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1328
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1329
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1330
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1331
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1332
subsection{*Parties' knowledge of session keys. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1333
       An agent knows a session key if he used it to issue a cipher. These
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1334
       guarantees can be interpreted both in terms of key distribution
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1335
       and of non-injective agreement on the session key.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1336
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1337
lemma Kas_Issues_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1338
   "\<lbrakk> Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key authK, Peer, Ta\<rbrace>, authTicket\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1339
      evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1340
  \<Longrightarrow> Kas Issues A with (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1341
          on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1342
apply (simp (no_asm) add: Issues_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1343
apply (rule exI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1344
apply (rule conjI, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1345
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1346
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1347
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1348
apply (frule_tac [5] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1349
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1350
apply (simp_all (no_asm_simp) add: all_conj_distrib)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1351
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1352
apply (simp add: takeWhile_tail)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1353
apply (blast dest: authK_authentic parts_spies_takeWhile_mono [THEN subsetD] parts_spies_evs_revD2 [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1354
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1355
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1356
lemma A_authenticates_and_keydist_to_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1357
  "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Peer, Ta\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1358
     A \<notin> bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1359
 \<Longrightarrow> Kas Issues A with (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta\<rbrace>) 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1360
          on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1361
by (blast dest!: authK_authentic Kas_Issues_A)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1362
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1363
lemma Tgs_Issues_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1364
    "\<lbrakk> Says Tgs A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1365
         \<in> set evs; 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1366
       Key authK \<notin> analz (spies evs);  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1367
  \<Longrightarrow> Tgs Issues A with 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1368
          (Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>) on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1369
apply (simp (no_asm) add: Issues_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1370
apply (rule exI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1371
apply (rule conjI, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1372
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1373
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1374
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1375
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1376
apply (frule_tac [5] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1377
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1378
apply (simp_all (no_asm_simp) add: all_conj_distrib)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1379
apply (simp add: takeWhile_tail)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1380
(*Last two thms installed only to derive authK \<notin> range shrK*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1381
apply (blast dest: servK_authentic parts_spies_takeWhile_mono [THEN subsetD]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1382
      parts_spies_evs_revD2 [THEN subsetD] authTicket_authentic 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1383
      Says_Kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1384
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1385
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1386
lemma A_authenticates_and_keydist_to_Tgs:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1387
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1388
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1389
       Key authK \<notin> analz (spies evs); B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1390
  \<Longrightarrow> \<exists>A. Tgs Issues A with 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1391
          (Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>) on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1392
by (blast dest: Tgs_Issues_A servK_authentic_bis)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1393
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1394
lemma B_Issues_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1395
     "\<lbrakk> Says B A (Crypt servK (Number T3)) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1396
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1397
         A \<notin> bad;  B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1398
      \<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1399
apply (simp (no_asm) add: Issues_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1400
apply (rule exI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1401
apply (rule conjI, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1402
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1403
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1404
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1405
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1406
apply (simp_all (no_asm_simp) add: all_conj_distrib)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1407
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1408
txt{*K6 requires numerous lemmas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1409
apply (simp add: takeWhile_tail)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1410
apply (blast intro: Says_K6 dest: servTicket_authentic 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1411
        parts_spies_takeWhile_mono [THEN subsetD] 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1412
        parts_spies_evs_revD2 [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1413
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1414
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1415
lemma A_authenticates_and_keydist_to_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1416
     "\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1417
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1418
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1419
         Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1420
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1421
         Key authK \<notin> analz (spies evs); Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1422
         A \<notin> bad;  B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1423
      \<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1424
by (blast dest!: A_authenticates_B B_Issues_A)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1425
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1426
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1427
(*Must use \<le> rather than =, otherwise it cannot be proved inductively!*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1428
(*This is too strong for version V but would hold for version IV if only B 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1429
  in K6 said a fresh timestamp.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1430
lemma honest_never_says_newer_timestamp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1431
     "\<lbrakk> (CT evs) \<le> T ; Number T \<in> parts {X}; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1432
     \<Longrightarrow> \<forall> A B. A \<noteq> Spy \<longrightarrow> Says A B X \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1433
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1434
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1435
apply (simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1436
apply force
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1437
apply force
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1438
txt{*clarifying case K3*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1439
apply (rule impI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1440
apply (rule impI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1441
apply (frule Suc_leD)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1442
apply (clarify)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1443
txt{*cannot solve K3 or K5 because the spy might send CT evs as authTicket
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1444
or servTicket, which the honest agent would forward*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1445
prefer 2 apply force
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1446
prefer 4 apply force
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1447
prefer 4 apply force
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1448
txt{*cannot solve K6 unless B updates the timestamp - rather than bouncing T3*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1449
oops
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1450
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1451
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1452
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1453
text{*But can prove a less general fact conerning only authenticators!*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1454
lemma honest_never_says_newer_timestamp_in_auth:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1455
     "\<lbrakk> (CT evs) \<le> T; Number T \<in> parts {X}; A \<notin> bad; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1456
     \<Longrightarrow> Says A B \<lbrace>Y, X\<rbrace> \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1457
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1458
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1459
apply (simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1460
apply force+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1461
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1462
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1463
lemma honest_never_says_current_timestamp_in_auth:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1464
     "\<lbrakk> (CT evs) = T; Number T \<in> parts {X}; A \<notin> bad; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1465
     \<Longrightarrow> Says A B \<lbrace>Y, X\<rbrace> \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1466
apply (frule eq_imp_le)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1467
apply (blast dest: honest_never_says_newer_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1468
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1469
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1470
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1471
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1472
lemma A_Issues_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1473
     "\<lbrakk> Says A B \<lbrace>ST, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1474
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1475
         B \<noteq> Tgs; A \<notin> bad;  B \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1476
   \<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1477
apply (simp (no_asm) add: Issues_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1478
apply (rule exI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1479
apply (rule conjI, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1480
apply (simp (no_asm))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1481
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1482
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1483
apply (erule kerbV.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1484
apply (frule_tac [7] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1485
apply (frule_tac [5] Says_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1486
apply (simp_all (no_asm_simp))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1487
txt{*K5*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1488
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1489
apply (simp add: takeWhile_tail)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1490
txt{*Level 15: case study necessary because the assumption doesn't state
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1491
  the form of servTicket. The guarantee becomes stronger.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1492
prefer 2 apply (simp add: takeWhile_tail)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1493
(**This single command of version IV...
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1494
apply (blast dest: Says_imp_spies [THEN analz.Inj, THEN analz_Decrypt']
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1495
                   K3_imp_K2 K4_trustworthy'
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1496
                   parts_spies_takeWhile_mono [THEN subsetD]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1497
                   parts_spies_evs_revD2 [THEN subsetD]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1498
             intro: Says_Auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1499
...expands as follows - including extra exE because of new form of lemmas*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1500
apply (frule K3_imp_K2, assumption, assumption, erule exE, erule exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1501
apply (case_tac "Key authK \<in> analz (spies evs5)")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1502
apply (drule Says_imp_knows_Spy [THEN analz.Inj, THEN analz.Fst, THEN analz_Decrypt', THEN analz.Fst], assumption, assumption, simp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1503
apply (frule K3_imp_K2, assumption, assumption, erule exE, erule exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1504
apply (drule Says_imp_knows_Spy [THEN parts.Inj, THEN parts.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1505
apply (frule servK_authentic_ter, blast, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1506
apply (drule parts_spies_takeWhile_mono [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1507
apply (drule parts_spies_evs_revD2 [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1508
txt{* @{term Says_K5} closes the proof in version IV because it is clear which 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1509
servTicket an authenticator appears with in msg 5. In version V an authenticator can appear with any item that the spy could replace the servTicket with*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1510
apply (frule Says_K5, blast, assumption, assumption, assumption, assumption, erule exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1511
txt{*We need to state that an honest agent wouldn't send the wrong timestamp
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1512
within an authenticator, wathever it is paired with*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1513
apply (simp add: honest_never_says_current_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1514
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1515
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1516
lemma B_authenticates_and_keydist_to_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1517
     "\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1518
         Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1519
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1520
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1521
         B \<noteq> Tgs; A \<notin> bad;  B \<notin> bad;  evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1522
   \<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1523
by (blast dest: B_authenticates_A A_Issues_B)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1524
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1525
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1526
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1527
subsection{*
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1528
Novel guarantees, never studied before. Because honest agents always say
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1529
the right timestamp in authenticators, we can prove unicity guarantees based 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1530
exactly on timestamps. Classical unicity guarantees are based on nonces.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1531
Of course assuming the agent to be different from the Spy, rather than not in 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1532
bad, would suffice below. Similar guarantees must also hold of
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1533
Kerberos IV.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1534
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1535
text{*Notice that an honest agent can send the same timestamp on two
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1536
different traces of the same length, but not on the same trace!*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1537
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1538
lemma unique_timestamp_authenticator1:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1539
     "\<lbrakk> Says A Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1540
         Says A Kas' \<lbrace>Agent A, Agent Tgs', Number T1\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1541
         A \<notin>bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1542
  \<Longrightarrow> Kas=Kas' \<and> Tgs=Tgs'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1543
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1544
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1545
apply (simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1546
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1547
apply (simp_all add: honest_never_says_current_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1548
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1549
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1550
lemma unique_timestamp_authenticator2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1551
     "\<lbrakk> Says A Tgs \<lbrace>AT, Crypt AK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1552
     Says A Tgs' \<lbrace>AT', Crypt AK' \<lbrace>Agent A, Number T2\<rbrace>, Agent B'\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1553
         A \<notin>bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1554
  \<Longrightarrow> Tgs=Tgs' \<and> AT=AT' \<and> AK=AK' \<and> B=B'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1555
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1556
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1557
apply (simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1558
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1559
apply (simp_all add: honest_never_says_current_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1560
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1561
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1562
lemma unique_timestamp_authenticator3:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1563
     "\<lbrakk> Says A B \<lbrace>ST, Crypt SK \<lbrace>Agent A, Number T\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1564
         Says A B' \<lbrace>ST', Crypt SK' \<lbrace>Agent A, Number T\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1565
         A \<notin>bad; evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1566
  \<Longrightarrow> B=B' \<and> ST=ST' \<and> SK=SK'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1567
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1568
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1569
apply (simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1570
apply (auto simp add: honest_never_says_current_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1571
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1572
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1573
text{*The second part of the message is treated as an authenticator by the last
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1574
simplification step, even if it is not an authenticator!*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1575
lemma unique_timestamp_authticket:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1576
     "\<lbrakk> Says Kas A \<lbrace>X, Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key AK, T\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1577
       Says Kas A' \<lbrace>X', Crypt (shrK Tgs') \<lbrace>Agent A', Agent Tgs', Key AK', T\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1578
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1579
  \<Longrightarrow> A=A' \<and> X=X' \<and> Tgs=Tgs' \<and> AK=AK'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1580
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1581
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1582
apply (auto simp add: honest_never_says_current_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1583
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1584
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1585
text{*The second part of the message is treated as an authenticator by the last
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1586
simplification step, even if it is not an authenticator!*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1587
lemma unique_timestamp_servticket:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1588
     "\<lbrakk> Says Tgs A \<lbrace>X, Crypt (shrK B) \<lbrace>Agent A, Agent B, Key SK, T\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1589
       Says Tgs A' \<lbrace>X', Crypt (shrK B') \<lbrace>Agent A', Agent B', Key SK', T\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1590
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1591
  \<Longrightarrow> A=A' \<and> X=X' \<and> B=B' \<and> SK=SK'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1592
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1593
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1594
apply (auto simp add: honest_never_says_current_timestamp_in_auth)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1595
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1596
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1597
(*Uses assumption K6's assumption that B \<noteq> Kas, otherwise B should say
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1598
fresh timestamp*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1599
lemma Kas_never_says_newer_timestamp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1600
     "\<lbrakk> (CT evs) \<le> T; Number T \<in> parts {X}; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1601
     \<Longrightarrow> \<forall> A. Says Kas A X \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1602
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1603
apply (erule kerbV.induct, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1604
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1605
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1606
lemma Kas_never_says_current_timestamp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1607
     "\<lbrakk> (CT evs) = T; Number T \<in> parts {X}; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1608
     \<Longrightarrow> \<forall> A. Says Kas A X \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1609
apply (frule eq_imp_le)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1610
apply (blast dest: Kas_never_says_newer_timestamp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1611
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1612
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1613
lemma unique_timestamp_msg2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1614
     "\<lbrakk> Says Kas A \<lbrace>Crypt (shrK A) \<lbrace>Key AK, Agent Tgs, T\<rbrace>, AT\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1615
     Says Kas A' \<lbrace>Crypt (shrK A') \<lbrace>Key AK', Agent Tgs', T\<rbrace>, AT'\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1616
         evs \<in> kerbV \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1617
  \<Longrightarrow> A=A' \<and> AK=AK' \<and> Tgs=Tgs' \<and> AT=AT'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1618
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1619
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1620
apply (auto simp add: Kas_never_says_current_timestamp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1621
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1622
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1623
(*Uses assumption K6's assumption that B \<noteq> Tgs, otherwise B should say
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1624
fresh timestamp*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1625
lemma Tgs_never_says_newer_timestamp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1626
     "\<lbrakk> (CT evs) \<le> T; Number T \<in> parts {X}; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1627
     \<Longrightarrow> \<forall> A. Says Tgs A X \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1628
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1629
apply (erule kerbV.induct, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1630
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1631
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1632
lemma Tgs_never_says_current_timestamp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1633
     "\<lbrakk> (CT evs) = T; Number T \<in> parts {X}; evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1634
     \<Longrightarrow> \<forall> A. Says Tgs A X \<notin> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1635
apply (frule eq_imp_le)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1636
apply (blast dest: Tgs_never_says_newer_timestamp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1637
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1638
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1639
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1640
lemma unique_timestamp_msg4:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1641
     "\<lbrakk> Says Tgs A \<lbrace>Crypt (shrK A) \<lbrace>Key SK, Agent B, T\<rbrace>, ST\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1642
       Says Tgs A' \<lbrace>Crypt (shrK A') \<lbrace>Key SK', Agent B', T\<rbrace>, ST'\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1643
         evs \<in> kerbV \<rbrakk> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1644
  \<Longrightarrow> A=A' \<and> SK=SK' \<and> B=B' \<and> ST=ST'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1645
apply (erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1646
apply (erule kerbV.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1647
apply (auto simp add: Tgs_never_says_current_timestamp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1648
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1649
 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1650
end