src/HOL/Auth/OtwayRees_AN.thy
author wenzelm
Thu, 10 Dec 2015 21:39:33 +0100
changeset 61830 4f5ab843cf5b
parent 58889 5b7a9633cfa8
child 61956 38b73f7940af
permissions -rw-r--r--
isabelle update_cartouches -c -t;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37936
1e4c5015a72e updated some headers;
wenzelm
parents: 32960
diff changeset
     1
(*  Title:      HOL/Auth/OtwayRees_AN.thy
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     3
    Copyright   1996  University of Cambridge
14207
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
     4
*)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     5
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
     6
section\<open>The Otway-Rees Protocol as Modified by Abadi and Needham\<close>
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     7
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 14238
diff changeset
     8
theory OtwayRees_AN imports Public begin
14207
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
     9
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    10
text\<open>
14207
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
    11
This simplified version has minimal encryption and explicit messages.
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    12
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    13
Note that the formalization does not even assume that nonces are fresh.
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    14
This is because the protocol does not rely on uniqueness of nonces for
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    15
security, only for freshness, and the proof script does not prove freshness
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    16
properties.
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    17
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    18
From page 11 of
14207
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
    19
  Abadi and Needham (1996).  
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
    20
  Prudent Engineering Practice for Cryptographic Protocols.
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
    21
  IEEE Trans. SE 22 (1)
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    22
\<close>
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    23
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 16417
diff changeset
    24
inductive_set otway :: "event list set"
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 16417
diff changeset
    25
  where
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    26
   Nil: \<comment>\<open>The empty trace\<close>
14238
59b02c1efd01 improved presentation
paulson
parents: 14207
diff changeset
    27
        "[] \<in> otway"
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    28
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    29
 | Fake: \<comment>\<open>The Spy may say anything he can say.  The sender field is correct,
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    30
            but agents don't use that information.\<close>
14238
59b02c1efd01 improved presentation
paulson
parents: 14207
diff changeset
    31
         "[| evsf \<in> otway;  X \<in> synth (analz (knows Spy evsf)) |]
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    32
          ==> Says Spy B X  # evsf \<in> otway"
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    33
14238
59b02c1efd01 improved presentation
paulson
parents: 14207
diff changeset
    34
        
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    35
 | Reception: \<comment>\<open>A message that has been sent can be received by the
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    36
                  intended recipient.\<close>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 32366
diff changeset
    37
              "[| evsr \<in> otway;  Says A B X \<in>set evsr |]
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    38
               ==> Gets B X # evsr \<in> otway"
6308
76f3865a2b1d Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents: 5434
diff changeset
    39
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    40
 | OR1:  \<comment>\<open>Alice initiates a protocol run\<close>
14238
59b02c1efd01 improved presentation
paulson
parents: 14207
diff changeset
    41
         "evs1 \<in> otway
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    42
          ==> Says A B {|Agent A, Agent B, Nonce NA|} # evs1 \<in> otway"
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    43
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    44
 | OR2:  \<comment>\<open>Bob's response to Alice's message.\<close>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 32366
diff changeset
    45
         "[| evs2 \<in> otway;
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    46
             Gets B {|Agent A, Agent B, Nonce NA|} \<in>set evs2 |]
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    47
          ==> Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|}
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    48
                 # evs2 \<in> otway"
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    49
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    50
 | OR3:  \<comment>\<open>The Server receives Bob's message.  Then he sends a new
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    51
           session key to Bob with a packet for forwarding to Alice.\<close>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 32366
diff changeset
    52
         "[| evs3 \<in> otway;  Key KAB \<notin> used evs3;
6308
76f3865a2b1d Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents: 5434
diff changeset
    53
             Gets Server {|Agent A, Agent B, Nonce NA, Nonce NB|}
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    54
               \<in>set evs3 |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    55
          ==> Says Server B
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    56
               {|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key KAB|},
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2451
diff changeset
    57
                 Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key KAB|}|}
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    58
              # evs3 \<in> otway"
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    59
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    60
 | OR4:  \<comment>\<open>Bob receives the Server's (?) message and compares the Nonces with
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 32366
diff changeset
    61
             those in the message he previously sent the Server.
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    62
             Need @{term "B \<noteq> Server"} because we allow messages to self.\<close>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 32366
diff changeset
    63
         "[| evs4 \<in> otway;  B \<noteq> Server;
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    64
             Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|} \<in>set evs4;
6308
76f3865a2b1d Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents: 5434
diff changeset
    65
             Gets B {|X, Crypt(shrK B){|Nonce NB,Agent A,Agent B,Key K|}|}
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    66
               \<in>set evs4 |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    67
          ==> Says B A X # evs4 \<in> otway"
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    68
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    69
 | Oops: \<comment>\<open>This message models possible leaks of session keys.  The nonces
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    70
             identify the protocol run.\<close>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 32366
diff changeset
    71
         "[| evso \<in> otway;
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    72
             Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    73
                      {|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|},
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2131
diff changeset
    74
                        Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|}
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    75
               \<in>set evso |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    76
          ==> Notes Spy {|Nonce NA, Nonce NB, Key K|} # evso \<in> otway"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    77
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    78
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    79
declare Says_imp_knows_Spy [THEN analz.Inj, dest]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    80
declare parts.Body  [dest]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    81
declare analz_into_parts [dest]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    82
declare Fake_parts_insert_in_Un  [dest]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    83
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    84
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
    85
text\<open>A "possibility property": there are traces that reach the end\<close>
14200
d8598e24f8fa Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents: 13507
diff changeset
    86
lemma "[| B \<noteq> Server; Key K \<notin> used [] |]
d8598e24f8fa Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents: 13507
diff changeset
    87
      ==> \<exists>evs \<in> otway.
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    88
           Says B A (Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|})
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    89
             \<in> set evs"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    90
apply (intro exI bexI)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    91
apply (rule_tac [2] otway.Nil
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    92
                    [THEN otway.OR1, THEN otway.Reception,
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    93
                     THEN otway.OR2, THEN otway.Reception,
14200
d8598e24f8fa Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents: 13507
diff changeset
    94
                     THEN otway.OR3, THEN otway.Reception, THEN otway.OR4])
d8598e24f8fa Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents: 13507
diff changeset
    95
apply (possibility, simp add: used_Cons) 
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    96
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    97
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    98
lemma Gets_imp_Says [dest!]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
    99
     "[| Gets B X \<in> set evs; evs \<in> otway |] ==> \<exists>A. Says A B X \<in> set evs"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   100
by (erule rev_mp, erule otway.induct, auto)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   101
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   102
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   103
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   104
text\<open>For reasoning about the encrypted portion of messages\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   105
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   106
lemma OR4_analz_knows_Spy:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   107
     "[| Gets B {|X, Crypt(shrK B) X'|} \<in> set evs;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   108
      ==> X \<in> analz (knows Spy evs)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   109
by blast
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   110
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   111
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   112
text\<open>Theorems of the form @{term "X \<notin> parts (spies evs)"} imply that
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   113
NOBODY sends messages containing X!\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   114
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   115
text\<open>Spy never sees a good agent's shared key!\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   116
lemma Spy_see_shrK [simp]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   117
     "evs \<in> otway ==> (Key (shrK A) \<in> parts (knows Spy evs)) = (A \<in> bad)"
14238
59b02c1efd01 improved presentation
paulson
parents: 14207
diff changeset
   118
by (erule otway.induct, simp_all, blast+)
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   119
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   120
lemma Spy_analz_shrK [simp]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   121
     "evs \<in> otway ==> (Key (shrK A) \<in> analz (knows Spy evs)) = (A \<in> bad)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   122
by auto
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   123
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   124
lemma Spy_see_shrK_D [dest!]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   125
     "[|Key (shrK A) \<in> parts (knows Spy evs);  evs \<in> otway|] ==> A \<in> bad"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   126
by (blast dest: Spy_see_shrK)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   127
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   128
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   129
subsection\<open>Proofs involving analz\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   130
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   131
text\<open>Describes the form of K and NA when the Server sends this message.\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   132
lemma Says_Server_message_form:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   133
     "[| Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   134
            {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   135
              Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   136
           \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   137
         evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   138
      ==> K \<notin> range shrK & (\<exists>i. NA = Nonce i) & (\<exists>j. NB = Nonce j)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   139
apply (erule rev_mp)
14207
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
   140
apply (erule otway.induct, auto)
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   141
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   142
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   143
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   144
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   145
(****
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   146
 The following is to prove theorems of the form
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   147
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   148
  Key K \<in> analz (insert (Key KAB) (knows Spy evs)) ==>
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   149
  Key K \<in> analz (knows Spy evs)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   150
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   151
 A more general formula must be proved inductively.
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   152
****)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   153
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   154
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   155
text\<open>Session keys are not used to encrypt other session keys\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   156
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   157
text\<open>The equality makes the induction hypothesis easier to apply\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   158
lemma analz_image_freshK [rule_format]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   159
 "evs \<in> otway ==>
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   160
   \<forall>K KK. KK <= -(range shrK) -->
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   161
          (Key K \<in> analz (Key`KK Un (knows Spy evs))) =
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   162
          (K \<in> KK | Key K \<in> analz (knows Spy evs))"
14207
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
   163
apply (erule otway.induct) 
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
   164
apply (frule_tac [8] Says_Server_message_form)
f20fbb141673 Conversion of all main protocols from "Shared" to "Public".
paulson
parents: 14200
diff changeset
   165
apply (drule_tac [7] OR4_analz_knows_Spy, analz_freshK, spy_analz, auto) 
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   166
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   167
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   168
lemma analz_insert_freshK:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   169
  "[| evs \<in> otway;  KAB \<notin> range shrK |] ==>
11655
923e4d0d36d5 tuned parentheses in relational expressions;
wenzelm
parents: 11251
diff changeset
   170
      (Key K \<in> analz (insert (Key KAB) (knows Spy evs))) =
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   171
      (K = KAB | Key K \<in> analz (knows Spy evs))"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   172
by (simp only: analz_image_freshK analz_image_freshK_simps)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   173
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   174
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   175
text\<open>The Key K uniquely identifies the Server's message.\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   176
lemma unique_session_keys:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   177
     "[| Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   178
          {|Crypt (shrK A) {|NA, Agent A, Agent B, K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   179
            Crypt (shrK B) {|NB, Agent A, Agent B, K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   180
         \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   181
        Says Server B'
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   182
          {|Crypt (shrK A') {|NA', Agent A', Agent B', K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   183
            Crypt (shrK B') {|NB', Agent A', Agent B', K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   184
         \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   185
        evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   186
     ==> A=A' & B=B' & NA=NA' & NB=NB'"
13507
febb8e5d2a9d tidying of Isar scripts
paulson
parents: 11655
diff changeset
   187
apply (erule rev_mp, erule rev_mp, erule otway.induct, simp_all)
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   188
apply blast+  \<comment>\<open>OR3 and OR4\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   189
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   190
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   191
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   192
subsection\<open>Authenticity properties relating to NA\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   193
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   194
text\<open>If the encrypted message appears then it originated with the Server!\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   195
lemma NA_Crypt_imp_Server_msg [rule_format]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   196
    "[| A \<notin> bad;  A \<noteq> B;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   197
     ==> Crypt (shrK A) {|NA, Agent A, Agent B, Key K|} \<in> parts (knows Spy evs)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   198
       --> (\<exists>NB. Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   199
                    {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   200
                      Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   201
                    \<in> set evs)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   202
apply (erule otway.induct, force)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   203
apply (simp_all add: ex_disj_distrib)
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   204
apply blast+  \<comment>\<open>Fake, OR3\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   205
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   206
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   207
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   208
text\<open>Corollary: if A receives B's OR4 message then it originated with the
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   209
      Server. Freshness may be inferred from nonce NA.\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   210
lemma A_trusts_OR4:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   211
     "[| Says B' A (Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}) \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   212
         A \<notin> bad;  A \<noteq> B;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   213
      ==> \<exists>NB. Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   214
                  {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   215
                    Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   216
                 \<in> set evs"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   217
by (blast intro!: NA_Crypt_imp_Server_msg)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   218
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   219
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   220
text\<open>Crucial secrecy property: Spy does not see the keys sent in msg OR3
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   221
    Does not in itself guarantee security: an attack could violate
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   222
    the premises, e.g. by having @{term "A=Spy"}\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   223
lemma secrecy_lemma:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   224
     "[| A \<notin> bad;  B \<notin> bad;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   225
      ==> Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   226
           {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   227
             Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   228
          \<in> set evs -->
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   229
          Notes Spy {|NA, NB, Key K|} \<notin> set evs -->
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   230
          Key K \<notin> analz (knows Spy evs)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   231
apply (erule otway.induct, force)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   232
apply (frule_tac [7] Says_Server_message_form)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   233
apply (drule_tac [6] OR4_analz_knows_Spy)
14238
59b02c1efd01 improved presentation
paulson
parents: 14207
diff changeset
   234
apply (simp_all add: analz_insert_eq analz_insert_freshK pushes)
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   235
apply spy_analz  \<comment>\<open>Fake\<close>
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   236
apply (blast dest: unique_session_keys)+  \<comment>\<open>OR3, OR4, Oops\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   237
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   238
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   239
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   240
lemma Spy_not_see_encrypted_key:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   241
     "[| Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   242
            {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   243
              Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   244
           \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   245
         Notes Spy {|NA, NB, Key K|} \<notin> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   246
         A \<notin> bad;  B \<notin> bad;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   247
      ==> Key K \<notin> analz (knows Spy evs)"
32366
b269b56b6a14 Demonstrations of sledgehammer in protocol proofs.
paulson
parents: 23746
diff changeset
   248
  by (metis secrecy_lemma)
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   249
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   250
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   251
text\<open>A's guarantee.  The Oops premise quantifies over NB because A cannot know
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   252
  what it is.\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   253
lemma A_gets_good_key:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   254
     "[| Says B' A (Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}) \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   255
         \<forall>NB. Notes Spy {|NA, NB, Key K|} \<notin> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   256
         A \<notin> bad;  B \<notin> bad;  A \<noteq> B;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   257
      ==> Key K \<notin> analz (knows Spy evs)"
32366
b269b56b6a14 Demonstrations of sledgehammer in protocol proofs.
paulson
parents: 23746
diff changeset
   258
  by (metis A_trusts_OR4 secrecy_lemma)
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   259
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   260
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   261
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   262
subsection\<open>Authenticity properties relating to NB\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   263
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   264
text\<open>If the encrypted message appears then it originated with the Server!\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   265
lemma NB_Crypt_imp_Server_msg [rule_format]:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   266
 "[| B \<notin> bad;  A \<noteq> B;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   267
  ==> Crypt (shrK B) {|NB, Agent A, Agent B, Key K|} \<in> parts (knows Spy evs)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   268
      --> (\<exists>NA. Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   269
                   {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   270
                     Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   271
                   \<in> set evs)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   272
apply (erule otway.induct, force, simp_all add: ex_disj_distrib)
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   273
apply blast+  \<comment>\<open>Fake, OR3\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   274
done
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   275
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   276
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   277
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   278
text\<open>Guarantee for B: if it gets a well-formed certificate then the Server
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   279
  has sent the correct message in round 3.\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   280
lemma B_trusts_OR3:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   281
     "[| Says S B {|X, Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   282
           \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   283
         B \<notin> bad;  A \<noteq> B;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   284
      ==> \<exists>NA. Says Server B
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   285
                   {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   286
                     Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   287
                   \<in> set evs"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   288
by (blast intro!: NB_Crypt_imp_Server_msg)
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   289
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   290
61830
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   291
text\<open>The obvious combination of \<open>B_trusts_OR3\<close> with 
4f5ab843cf5b isabelle update_cartouches -c -t;
wenzelm
parents: 58889
diff changeset
   292
      \<open>Spy_not_see_encrypted_key\<close>\<close>
11251
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   293
lemma B_gets_good_key:
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   294
     "[| Gets B {|X, Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   295
          \<in> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   296
         \<forall>NA. Notes Spy {|NA, NB, Key K|} \<notin> set evs;
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   297
         A \<notin> bad;  B \<notin> bad;  A \<noteq> B;  evs \<in> otway |]
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   298
      ==> Key K \<notin> analz (knows Spy evs)"
a6816d47f41d converted many HOL/Auth theories to Isar scripts
paulson
parents: 11230
diff changeset
   299
by (blast dest: B_trusts_OR3 Spy_not_see_encrypted_key)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   300
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   301
end