src/HOL/Auth/OtwayRees.ML
author paulson
Mon Sep 30 11:10:22 1996 +0200 (1996-09-30)
changeset 2045 ae1030e66745
parent 2032 1bbf1bdcaf56
child 2048 bb54fbba0071
permissions -rw-r--r--
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
to Shared.ML
paulson@1941
     1
(*  Title:      HOL/Auth/OtwayRees
paulson@1941
     2
    ID:         $Id$
paulson@1941
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@1941
     4
    Copyright   1996  University of Cambridge
paulson@1941
     5
paulson@1941
     6
Inductive relation "otway" for the Otway-Rees protocol.
paulson@1941
     7
paulson@2014
     8
Version that encrypts Nonce NB
paulson@2014
     9
paulson@1941
    10
From page 244 of
paulson@1941
    11
  Burrows, Abadi and Needham.  A Logic of Authentication.
paulson@1941
    12
  Proc. Royal Soc. 426 (1989)
paulson@1941
    13
*)
paulson@1941
    14
paulson@2014
    15
paulson@1941
    16
open OtwayRees;
paulson@1941
    17
paulson@1941
    18
proof_timing:=true;
paulson@1941
    19
HOL_quantifiers := false;
paulson@1941
    20
paulson@1996
    21
paulson@2014
    22
(*Weak liveness: there are traces that reach the end*)
paulson@1996
    23
goal thy 
paulson@1996
    24
 "!!A B. [| A ~= B; A ~= Server; B ~= Server |]   \
paulson@2032
    25
\        ==> EX K. EX NA. EX evs: otway lost.          \
paulson@2014
    26
\               Says B A {|Nonce NA, Crypt {|Nonce NA, Key K|} (shrK A)|} \
paulson@2014
    27
\                 : set_of_list evs";
paulson@1996
    28
by (REPEAT (resolve_tac [exI,bexI] 1));
paulson@2032
    29
by (rtac (otway.Nil RS otway.OR1 RS otway.OR2 RS otway.OR3 RS otway.OR4) 2);
paulson@1996
    30
by (ALLGOALS (simp_tac (!simpset setsolver safe_solver)));
paulson@1996
    31
by (REPEAT_FIRST (resolve_tac [refl, conjI]));
paulson@1996
    32
by (ALLGOALS (fast_tac (!claset addss (!simpset setsolver safe_solver))));
paulson@2014
    33
result();
paulson@1996
    34
paulson@1996
    35
paulson@1941
    36
(**** Inductive proofs about otway ****)
paulson@1941
    37
paulson@2032
    38
goal thy "!!evs. lost' <= lost ==> otway lost' <= otway lost";
paulson@2032
    39
by (rtac subsetI 1);
paulson@2032
    40
by (etac otway.induct 1);
paulson@2032
    41
by (REPEAT_FIRST
paulson@2032
    42
    (best_tac (!claset addIs (impOfSubs (sees_mono RS analz_mono RS synth_mono)
paulson@2032
    43
                              :: otway.intrs))));
paulson@2032
    44
qed "otway_mono";
paulson@2032
    45
paulson@2032
    46
(*The Spy can see more than anybody else, except for their initial state*)
paulson@1941
    47
goal thy 
paulson@2032
    48
 "!!evs. evs : otway lost ==> \
paulson@2032
    49
\     sees lost A evs <= initState lost A Un sees lost Spy evs";
paulson@2032
    50
by (etac otway.induct 1);
paulson@1941
    51
by (ALLGOALS (fast_tac (!claset addDs [sees_Says_subset_insert RS subsetD] 
paulson@2032
    52
                                addss (!simpset))));
paulson@2032
    53
qed "sees_agent_subset_sees_Spy";
paulson@2032
    54
paulson@2032
    55
(*The Spy can see more than anybody else who's lost their key!*)
paulson@2032
    56
goal thy 
paulson@2032
    57
 "!!evs. evs : otway lost ==> \
paulson@2032
    58
\        A: lost --> A ~= Server --> sees lost A evs <= sees lost Spy evs";
paulson@2032
    59
by (etac otway.induct 1);
paulson@2032
    60
by (agent.induct_tac "A" 1);
paulson@2032
    61
by (auto_tac (!claset addDs [sees_Says_subset_insert RS subsetD], (!simpset)));
paulson@2032
    62
qed_spec_mp "sees_lost_agent_subset_sees_Spy";
paulson@1941
    63
paulson@1941
    64
paulson@1941
    65
(*Nobody sends themselves messages*)
paulson@2032
    66
goal thy "!!evs. evs : otway lost ==> ALL A X. Says A A X ~: set_of_list evs";
paulson@2032
    67
by (etac otway.induct 1);
paulson@1941
    68
by (Auto_tac());
paulson@1941
    69
qed_spec_mp "not_Says_to_self";
paulson@1941
    70
Addsimps [not_Says_to_self];
paulson@1941
    71
AddSEs   [not_Says_to_self RSN (2, rev_notE)];
paulson@1941
    72
paulson@1941
    73
paulson@1941
    74
(** For reasoning about the encrypted portion of messages **)
paulson@1941
    75
paulson@1996
    76
goal thy "!!evs. Says A' B {|N, Agent A, Agent B, X|} : set_of_list evs ==> \
paulson@2032
    77
\                X : analz (sees lost Spy evs)";
paulson@2032
    78
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj]) 1);
paulson@2032
    79
qed "OR2_analz_sees_Spy";
paulson@1941
    80
paulson@1996
    81
goal thy "!!evs. Says S B {|N, X, X'|} : set_of_list evs ==> \
paulson@2032
    82
\                X : analz (sees lost Spy evs)";
paulson@2032
    83
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj]) 1);
paulson@2032
    84
qed "OR4_analz_sees_Spy";
paulson@1941
    85
paulson@1996
    86
goal thy "!!evs. Says B' A {|N, Crypt {|N,K|} K'|} : set_of_list evs ==> \
paulson@2032
    87
\                K : parts (sees lost Spy evs)";
paulson@1941
    88
by (fast_tac (!claset addSEs partsEs
paulson@2032
    89
                      addSDs [Says_imp_sees_Spy RS parts.Inj]) 1);
paulson@2032
    90
qed "Reveal_parts_sees_Spy";
paulson@1941
    91
paulson@1941
    92
(*OR2_analz... and OR4_analz... let us treat those cases using the same 
paulson@1964
    93
  argument as for the Fake case.  This is possible for most, but not all,
paulson@1964
    94
  proofs: Fake does not invent new nonces (as in OR2), and of course Fake
paulson@2032
    95
  messages originate from the Spy. *)
paulson@1964
    96
paulson@2032
    97
bind_thm ("OR2_parts_sees_Spy",
paulson@2032
    98
          OR2_analz_sees_Spy RS (impOfSubs analz_subset_parts));
paulson@2032
    99
bind_thm ("OR4_parts_sees_Spy",
paulson@2032
   100
          OR4_analz_sees_Spy RS (impOfSubs analz_subset_parts));
paulson@2032
   101
paulson@2032
   102
(*We instantiate the variable to "lost".  Leaving it as a Var makes proofs
paulson@2032
   103
  harder to complete, since simplification does less for us.*)
paulson@2014
   104
val parts_Fake_tac = 
paulson@2032
   105
    let val tac = forw_inst_tac [("lost","lost")] 
paulson@2032
   106
    in  tac OR2_parts_sees_Spy 4 THEN 
paulson@2032
   107
        tac OR4_parts_sees_Spy 6 THEN
paulson@2032
   108
        tac Reveal_parts_sees_Spy 7
paulson@2032
   109
    end;
paulson@1941
   110
paulson@1941
   111
paulson@2032
   112
(** Theorems of the form X ~: parts (sees lost Spy evs) imply that NOBODY
paulson@2014
   113
    sends messages containing X! **)
paulson@1941
   114
paulson@2032
   115
(*Spy never sees lost another agent's shared key! (unless it is leaked at start)*)
paulson@1941
   116
goal thy 
paulson@2032
   117
 "!!evs. [| evs : otway lost;  A ~: lost |]    \
paulson@2032
   118
\        ==> Key (shrK A) ~: parts (sees lost Spy evs)";
paulson@2032
   119
by (etac otway.induct 1);
paulson@2014
   120
by parts_Fake_tac;
paulson@1941
   121
by (Auto_tac());
paulson@1941
   122
(*Deals with Fake message*)
paulson@1941
   123
by (best_tac (!claset addDs [impOfSubs analz_subset_parts,
paulson@2032
   124
                             impOfSubs Fake_parts_insert]) 1);
paulson@2032
   125
qed "Spy_not_see_shrK";
paulson@1941
   126
paulson@2032
   127
bind_thm ("Spy_not_analz_shrK",
paulson@2032
   128
          [analz_subset_parts, Spy_not_see_shrK] MRS contra_subsetD);
paulson@1941
   129
paulson@2032
   130
Addsimps [Spy_not_see_shrK, Spy_not_analz_shrK];
paulson@1941
   131
paulson@1964
   132
(*We go to some trouble to preserve R in the 3rd and 4th subgoals
paulson@1964
   133
  As usual fast_tac cannot be used because it uses the equalities too soon*)
paulson@1941
   134
val major::prems = 
paulson@2032
   135
goal thy  "[| Key (shrK A) : parts (sees lost Spy evs);       \
paulson@2032
   136
\             evs : otway lost;                                 \
paulson@2032
   137
\             A:lost ==> R                                  \
paulson@1941
   138
\           |] ==> R";
paulson@2032
   139
by (rtac ccontr 1);
paulson@2032
   140
by (rtac ([major, Spy_not_see_shrK] MRS rev_notE) 1);
paulson@1941
   141
by (swap_res_tac prems 2);
paulson@1967
   142
by (ALLGOALS (fast_tac (!claset addIs prems)));
paulson@2032
   143
qed "Spy_see_shrK_E";
paulson@1941
   144
paulson@2032
   145
bind_thm ("Spy_analz_shrK_E", 
paulson@2032
   146
          analz_subset_parts RS subsetD RS Spy_see_shrK_E);
paulson@1941
   147
paulson@2032
   148
AddSEs [Spy_see_shrK_E, Spy_analz_shrK_E];
paulson@1941
   149
paulson@1941
   150
paulson@1941
   151
(*** Future keys can't be seen or used! ***)
paulson@1941
   152
paulson@1941
   153
(*Nobody can have SEEN keys that will be generated in the future.
paulson@1941
   154
  This has to be proved anew for each protocol description,
paulson@1941
   155
  but should go by similar reasoning every time.  Hardest case is the
paulson@1941
   156
  standard Fake rule.  
paulson@2014
   157
      The Union over C is essential for the induction! *)
paulson@2032
   158
goal thy "!!evs. evs : otway lost ==> \
paulson@1941
   159
\                length evs <= length evs' --> \
paulson@2032
   160
\                          Key (newK evs') ~: (UN C. parts (sees lost C evs))";
paulson@2032
   161
by (etac otway.induct 1);
paulson@2014
   162
by parts_Fake_tac;
paulson@1941
   163
(*auto_tac does not work here, as it performs safe_tac first*)
paulson@1941
   164
by (ALLGOALS Asm_simp_tac);
paulson@1941
   165
by (REPEAT_FIRST (best_tac (!claset addDs [impOfSubs analz_subset_parts,
paulson@2032
   166
                                           impOfSubs parts_insert_subset_Un,
paulson@2032
   167
                                           Suc_leD]
paulson@2032
   168
                                    addss (!simpset))));
paulson@1941
   169
val lemma = result();
paulson@1941
   170
paulson@1941
   171
(*Variant needed for the main theorem below*)
paulson@1941
   172
goal thy 
paulson@2032
   173
 "!!evs. [| evs : otway lost;  length evs <= length evs' |]    \
paulson@2032
   174
\        ==> Key (newK evs') ~: parts (sees lost C evs)";
paulson@1941
   175
by (fast_tac (!claset addDs [lemma]) 1);
paulson@1941
   176
qed "new_keys_not_seen";
paulson@1941
   177
Addsimps [new_keys_not_seen];
paulson@1941
   178
paulson@1941
   179
(*Another variant: old messages must contain old keys!*)
paulson@1941
   180
goal thy 
paulson@1941
   181
 "!!evs. [| Says A B X : set_of_list evs;  \
paulson@1941
   182
\           Key (newK evt) : parts {X};    \
paulson@2032
   183
\           evs : otway lost                 \
paulson@1941
   184
\        |] ==> length evt < length evs";
paulson@2032
   185
by (rtac ccontr 1);
paulson@2032
   186
by (dtac leI 1);
paulson@2032
   187
by (fast_tac (!claset addSDs [new_keys_not_seen, Says_imp_sees_Spy]
paulson@2014
   188
                      addIs  [impOfSubs parts_mono]) 1);
paulson@1941
   189
qed "Says_imp_old_keys";
paulson@1941
   190
paulson@1941
   191
paulson@2014
   192
(*** Future nonces can't be seen or used! [proofs resemble those above] ***)
paulson@2014
   193
paulson@2032
   194
goal thy "!!evs. evs : otway lost ==> \
paulson@2014
   195
\                length evs <= length evt --> \
paulson@2032
   196
\                Nonce (newN evt) ~: (UN C. parts (sees lost C evs))";
paulson@2032
   197
by (etac otway.induct 1);
paulson@2014
   198
(*auto_tac does not work here, as it performs safe_tac first*)
paulson@2032
   199
by (ALLGOALS (asm_simp_tac (!simpset addsimps [parts_insert2]
paulson@2014
   200
                                     addcongs [disj_cong])));
paulson@2014
   201
by (REPEAT_FIRST (fast_tac (!claset 
paulson@2032
   202
                              addSEs partsEs
paulson@2032
   203
                              addSDs  [Says_imp_sees_Spy RS parts.Inj]
paulson@2032
   204
                              addDs  [impOfSubs analz_subset_parts,
paulson@2032
   205
                                      impOfSubs parts_insert_subset_Un,
paulson@2032
   206
                                      Suc_leD]
paulson@2032
   207
                              addss (!simpset))));
paulson@2014
   208
val lemma = result();
paulson@2014
   209
paulson@2014
   210
(*Variant needed for the main theorem below*)
paulson@2014
   211
goal thy 
paulson@2032
   212
 "!!evs. [| evs : otway lost;  length evs <= length evs' |]    \
paulson@2032
   213
\        ==> Nonce (newN evs') ~: parts (sees lost C evs)";
paulson@2014
   214
by (fast_tac (!claset addDs [lemma]) 1);
paulson@2014
   215
qed "new_nonces_not_seen";
paulson@2014
   216
Addsimps [new_nonces_not_seen];
paulson@2014
   217
paulson@2014
   218
(*Another variant: old messages must contain old nonces!*)
paulson@2014
   219
goal thy 
paulson@2014
   220
 "!!evs. [| Says A B X : set_of_list evs;  \
paulson@2014
   221
\           Nonce (newN evt) : parts {X};    \
paulson@2032
   222
\           evs : otway lost                 \
paulson@2014
   223
\        |] ==> length evt < length evs";
paulson@2032
   224
by (rtac ccontr 1);
paulson@2032
   225
by (dtac leI 1);
paulson@2032
   226
by (fast_tac (!claset addSDs [new_nonces_not_seen, Says_imp_sees_Spy]
paulson@2032
   227
                      addIs  [impOfSubs parts_mono]) 1);
paulson@2014
   228
qed "Says_imp_old_nonces";
paulson@2014
   229
paulson@2014
   230
paulson@1941
   231
(*Nobody can have USED keys that will be generated in the future.
paulson@1941
   232
  ...very like new_keys_not_seen*)
paulson@2032
   233
goal thy "!!evs. evs : otway lost ==> \
paulson@1941
   234
\                length evs <= length evs' --> \
paulson@2032
   235
\                newK evs' ~: keysFor (UN C. parts (sees lost C evs))";
paulson@2032
   236
by (etac otway.induct 1);
paulson@2014
   237
by parts_Fake_tac;
paulson@1941
   238
by (ALLGOALS Asm_simp_tac);
paulson@1941
   239
(*OR1 and OR3*)
paulson@1941
   240
by (EVERY (map (fast_tac (!claset addDs [Suc_leD] addss (!simpset))) [4,2]));
paulson@1941
   241
(*Fake, OR2, OR4: these messages send unknown (X) components*)
paulson@1941
   242
by (EVERY 
paulson@1941
   243
    (map
paulson@1941
   244
     (best_tac
paulson@1996
   245
      (!claset addDs [impOfSubs (analz_subset_parts RS keysFor_mono),
paulson@2032
   246
                      impOfSubs (parts_insert_subset_Un RS keysFor_mono),
paulson@2032
   247
                      Suc_leD]
paulson@2032
   248
               addEs [new_keys_not_seen RS not_parts_not_analz RSN(2,rev_notE)]
paulson@2032
   249
               addss (!simpset)))
paulson@1941
   250
     [3,2,1]));
paulson@2014
   251
(*Reveal: dummy message*)
paulson@1996
   252
by (best_tac (!claset addEs  [new_keys_not_seen RSN(2,rev_notE)]
paulson@2032
   253
                      addIs  [less_SucI, impOfSubs keysFor_mono]
paulson@2032
   254
                      addss (!simpset addsimps [le_def])) 1);
paulson@1941
   255
val lemma = result();
paulson@1941
   256
paulson@1941
   257
goal thy 
paulson@2032
   258
 "!!evs. [| evs : otway lost;  length evs <= length evs' |]    \
paulson@2032
   259
\        ==> newK evs' ~: keysFor (parts (sees lost C evs))";
paulson@1941
   260
by (fast_tac (!claset addSDs [lemma] addss (!simpset)) 1);
paulson@1941
   261
qed "new_keys_not_used";
paulson@1941
   262
paulson@1941
   263
bind_thm ("new_keys_not_analzd",
paulson@2032
   264
          [analz_subset_parts RS keysFor_mono,
paulson@2032
   265
           new_keys_not_used] MRS contra_subsetD);
paulson@1941
   266
paulson@1941
   267
Addsimps [new_keys_not_used, new_keys_not_analzd];
paulson@1941
   268
paulson@1941
   269
paulson@1941
   270
(** Lemmas concerning the form of items passed in messages **)
paulson@1941
   271
paulson@1941
   272
paulson@1941
   273
(****
paulson@1941
   274
 The following is to prove theorems of the form
paulson@1941
   275
paulson@2032
   276
          Key K : analz (insert (Key (newK evt)) (sees lost Spy evs)) ==>
paulson@2032
   277
          Key K : analz (sees lost Spy evs)
paulson@1941
   278
paulson@1941
   279
 A more general formula must be proved inductively.
paulson@1941
   280
paulson@1941
   281
****)
paulson@1941
   282
paulson@1941
   283
paulson@1941
   284
(*NOT useful in this form, but it says that session keys are not used
paulson@1941
   285
  to encrypt messages containing other keys, in the actual protocol.
paulson@1941
   286
  We require that agents should behave like this subsequently also.*)
paulson@1941
   287
goal thy 
paulson@2032
   288
 "!!evs. evs : otway lost ==> \
paulson@2032
   289
\        (Crypt X (newK evt)) : parts (sees lost Spy evs) & \
paulson@2032
   290
\        Key K : parts {X} --> Key K : parts (sees lost Spy evs)";
paulson@2032
   291
by (etac otway.induct 1);
paulson@2014
   292
by parts_Fake_tac;
paulson@2032
   293
by (ALLGOALS Asm_simp_tac);
paulson@1941
   294
(*Deals with Faked messages*)
paulson@1941
   295
by (best_tac (!claset addSEs partsEs
paulson@2032
   296
                      addDs [impOfSubs parts_insert_subset_Un]
paulson@1964
   297
                      addss (!simpset)) 2);
paulson@2014
   298
(*Base case and Reveal*)
paulson@1964
   299
by (Auto_tac());
paulson@1941
   300
result();
paulson@1941
   301
paulson@1941
   302
paulson@1941
   303
(** Session keys are not used to encrypt other session keys **)
paulson@1941
   304
paulson@2014
   305
(*Describes the form of Key K when the following message is sent.  The use of
paulson@2014
   306
  "parts" strengthens the induction hyp for proving the Fake case.  The
paulson@2014
   307
  assumptions on A are needed to prevent its being a Faked message.  (Based
paulson@2014
   308
  on NS_Shared/Says_S_message_form) *)
paulson@2014
   309
goal thy
paulson@2032
   310
 "!!evs. evs: otway lost ==>                                           \
paulson@2032
   311
\          Crypt {|N, Key K|} (shrK A) : parts (sees lost Spy evs) & \
paulson@2032
   312
\          A ~: lost -->                                           \
paulson@2032
   313
\        (EX evt: otway lost. K = newK evt)";
paulson@2032
   314
by (etac otway.induct 1);
paulson@2014
   315
by parts_Fake_tac;
paulson@2032
   316
by (ALLGOALS Asm_simp_tac);
paulson@2014
   317
(*Deals with Fake message*)
paulson@2014
   318
by (best_tac (!claset addDs [impOfSubs analz_subset_parts,
paulson@2032
   319
                             impOfSubs Fake_parts_insert]) 2);
paulson@2032
   320
by (Auto_tac());
paulson@2014
   321
val lemma = result() RS mp;
paulson@2014
   322
paulson@2014
   323
paulson@2014
   324
(*EITHER describes the form of Key K when the following message is sent, 
paulson@2014
   325
  OR     reduces it to the Fake case.*)
paulson@2014
   326
goal thy 
paulson@2014
   327
 "!!evs. [| Says B' A {|N, Crypt {|N, Key K|} (shrK A)|} : set_of_list evs;  \
paulson@2032
   328
\           evs : otway lost |]                      \
paulson@2045
   329
\        ==> (EX evt: otway lost. K = newK evt)          \
paulson@2045
   330
\          | Key K : analz (sees lost Spy evs)";
paulson@2032
   331
by (excluded_middle_tac "A : lost" 1);
paulson@2032
   332
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj]
paulson@2032
   333
                      addss (!simpset)) 2);
paulson@2014
   334
by (forward_tac [lemma] 1);
paulson@2014
   335
by (fast_tac (!claset addEs  partsEs
paulson@2032
   336
                      addSDs [Says_imp_sees_Spy RS parts.Inj]) 1);
paulson@2014
   337
by (Fast_tac 1);
paulson@2014
   338
qed "Reveal_message_form";
paulson@2014
   339
paulson@2014
   340
paulson@2014
   341
(*The equality makes the induction hypothesis easier to apply*)
paulson@1941
   342
goal thy  
paulson@2032
   343
 "!!evs. evs : otway lost ==> \
paulson@2032
   344
\  ALL K E. (Key K : analz (Key``(newK``E) Un (sees lost Spy evs))) = \
paulson@2032
   345
\           (K : newK``E | Key K : analz (sees lost Spy evs))";
paulson@2032
   346
by (etac otway.induct 1);
paulson@2032
   347
by (dtac OR2_analz_sees_Spy 4);
paulson@2032
   348
by (dtac OR4_analz_sees_Spy 6);
paulson@2032
   349
by (dtac Reveal_message_form 7);
paulson@2045
   350
by (REPEAT_FIRST (ares_tac [allI, analz_image_newK_lemma]));
paulson@2014
   351
by (REPEAT ((eresolve_tac [bexE, disjE] ORELSE' hyp_subst_tac) 7));
paulson@2014
   352
by (ALLGOALS (*Takes 28 secs*)
paulson@1941
   353
    (asm_simp_tac 
paulson@1941
   354
     (!simpset addsimps ([insert_Key_singleton, insert_Key_image, pushKey_newK]
paulson@2032
   355
                         @ pushes)
paulson@1941
   356
               setloop split_tac [expand_if])));
paulson@2014
   357
(** LEVEL 7 **)
paulson@2014
   358
(*Reveal case 2, OR4, OR2, Fake*) 
paulson@2032
   359
by (EVERY (map spy_analz_tac [7,5,3,2]));
paulson@2014
   360
(*Reveal case 1, OR3, Base*)
paulson@2014
   361
by (Auto_tac());
paulson@1941
   362
qed_spec_mp "analz_image_newK";
paulson@1941
   363
paulson@1941
   364
paulson@1941
   365
goal thy
paulson@2032
   366
 "!!evs. evs : otway lost ==>                               \
paulson@2032
   367
\        Key K : analz (insert (Key (newK evt)) (sees lost Spy evs)) = \
paulson@2032
   368
\        (K = newK evt | Key K : analz (sees lost Spy evs))";
paulson@1941
   369
by (asm_simp_tac (HOL_ss addsimps [pushKey_newK, analz_image_newK, 
paulson@2032
   370
                                   insert_Key_singleton]) 1);
paulson@1941
   371
by (Fast_tac 1);
paulson@1941
   372
qed "analz_insert_Key_newK";
paulson@1941
   373
paulson@1941
   374
paulson@2026
   375
(*** The Key K uniquely identifies the Server's  message. **)
paulson@2014
   376
paulson@2014
   377
fun ex_strip_tac i = REPEAT (ares_tac [exI, conjI] i) THEN assume_tac (i+1);
paulson@2014
   378
paulson@2014
   379
goal thy 
paulson@2032
   380
 "!!evs. evs : otway lost ==>                      \
paulson@2014
   381
\      EX A' B' NA' NB'. ALL A B NA NB.                    \
paulson@2014
   382
\       Says Server B \
paulson@2014
   383
\            {|NA, Crypt {|NA, K|} (shrK A),                      \
paulson@2014
   384
\                  Crypt {|NB, K|} (shrK B)|} : set_of_list evs --> \
paulson@2014
   385
\       A=A' & B=B' & NA=NA' & NB=NB'";
paulson@2032
   386
by (etac otway.induct 1);
paulson@2014
   387
by (ALLGOALS (asm_simp_tac (!simpset addsimps [all_conj_distrib])));
paulson@2014
   388
by (Step_tac 1);
paulson@2014
   389
(*Remaining cases: OR3 and OR4*)
paulson@2014
   390
by (ex_strip_tac 2);
paulson@2014
   391
by (Fast_tac 2);
paulson@2014
   392
by (excluded_middle_tac "K = Key(newK evsa)" 1);
paulson@2014
   393
by (Asm_simp_tac 1);
paulson@2014
   394
by (REPEAT (ares_tac [refl,exI,impI,conjI] 1));
paulson@2014
   395
(*...we assume X is a very new message, and handle this case by contradiction*)
paulson@2014
   396
by (fast_tac (!claset addEs [Says_imp_old_keys RS less_irrefl]
paulson@2032
   397
                      delrules [conjI]    (*prevent split-up into 4 subgoals*)
paulson@2032
   398
                      addss (!simpset addsimps [parts_insertI])) 1);
paulson@2014
   399
val lemma = result();
paulson@2014
   400
paulson@2014
   401
goal thy 
paulson@2014
   402
 "!!evs. [| Says Server B                                          \
paulson@2014
   403
\              {|NA, Crypt {|NA, K|} (shrK A),                     \
paulson@2014
   404
\                    Crypt {|NB, K|} (shrK B)|}                    \
paulson@2014
   405
\            : set_of_list evs;                                    \ 
paulson@2014
   406
\           Says Server B'                                         \
paulson@2014
   407
\              {|NA', Crypt {|NA', K|} (shrK A'),                  \
paulson@2014
   408
\                     Crypt {|NB', K|} (shrK B')|}                 \
paulson@2014
   409
\            : set_of_list evs;                                    \
paulson@2032
   410
\           evs : otway lost |]                                         \
paulson@2014
   411
\        ==> A=A' & B=B' & NA=NA' & NB=NB'";
paulson@2032
   412
by (dtac lemma 1);
paulson@2014
   413
by (REPEAT (etac exE 1));
paulson@2014
   414
(*Duplicate the assumption*)
paulson@2014
   415
by (forw_inst_tac [("psi", "ALL C.?P(C)")] asm_rl 1);
paulson@2014
   416
by (fast_tac (!claset addSDs [spec]) 1);
paulson@2014
   417
qed "unique_session_keys";
paulson@2014
   418
paulson@2014
   419
paulson@2014
   420
paulson@2014
   421
(**** Towards proving stronger authenticity properties ****)
paulson@2014
   422
paulson@2014
   423
(*Only OR1 can have caused such a part of a message to appear.*)
paulson@2014
   424
goal thy 
paulson@2032
   425
 "!!evs. [| A ~: lost;  evs : otway lost |]               \
paulson@2014
   426
\        ==> Crypt {|NA, Agent A, Agent B|} (shrK A)        \
paulson@2032
   427
\             : parts (sees lost Spy evs) -->                  \
paulson@2014
   428
\            Says A B {|NA, Agent A, Agent B,               \
paulson@2014
   429
\                       Crypt {|NA, Agent A, Agent B|} (shrK A)|}  \
paulson@2014
   430
\             : set_of_list evs";
paulson@2032
   431
by (etac otway.induct 1);
paulson@2014
   432
by parts_Fake_tac;
paulson@2014
   433
by (ALLGOALS Asm_simp_tac);
paulson@2014
   434
(*Fake*)
paulson@2014
   435
by (best_tac (!claset addSDs [impOfSubs analz_subset_parts,
paulson@2032
   436
                              impOfSubs Fake_parts_insert]) 2);
paulson@2014
   437
by (Auto_tac());
paulson@2014
   438
qed_spec_mp "Crypt_imp_OR1";
paulson@2014
   439
paulson@2014
   440
paulson@2014
   441
(** The Nonce NA uniquely identifies A's  message. **)
paulson@2014
   442
paulson@2014
   443
goal thy 
paulson@2032
   444
 "!!evs. [| evs : otway lost; A ~: lost |]               \
paulson@2014
   445
\ ==> EX B'. ALL B.    \
paulson@2032
   446
\        Crypt {|NA, Agent A, Agent B|} (shrK A) : parts (sees lost Spy evs) --> \
paulson@2014
   447
\        B = B'";
paulson@2032
   448
by (etac otway.induct 1);
paulson@2014
   449
by parts_Fake_tac;
paulson@2014
   450
by (ALLGOALS Asm_simp_tac);
paulson@2014
   451
(*Fake*)
paulson@2014
   452
by (best_tac (!claset addSDs [impOfSubs analz_subset_parts,
paulson@2032
   453
                              impOfSubs Fake_parts_insert]) 2);
paulson@2014
   454
(*Base case*)
paulson@2014
   455
by (fast_tac (!claset addss (!simpset)) 1);
paulson@2014
   456
by (Step_tac 1);
paulson@2026
   457
(*OR1: creation of new Nonce.  Move assertion into global context*)
paulson@2014
   458
by (excluded_middle_tac "NA = Nonce (newN evsa)" 1);
paulson@2014
   459
by (Asm_simp_tac 1);
paulson@2014
   460
by (Fast_tac 1);
paulson@2014
   461
by (best_tac (!claset addSEs partsEs
paulson@2032
   462
                      addEs  [new_nonces_not_seen RSN(2,rev_notE)]) 1);
paulson@2014
   463
val lemma = result();
paulson@2014
   464
paulson@2014
   465
goal thy 
paulson@2032
   466
 "!!evs.[| Crypt {|NA, Agent A, Agent B|} (shrK A) : parts (sees lost Spy evs); \ 
paulson@2032
   467
\          Crypt {|NA, Agent A, Agent C|} (shrK A) : parts (sees lost Spy evs); \ 
paulson@2032
   468
\          evs : otway lost;  A ~: lost |]                                         \
paulson@2014
   469
\        ==> B = C";
paulson@2032
   470
by (dtac lemma 1);
paulson@2032
   471
by (assume_tac 1);
paulson@2014
   472
by (etac exE 1);
paulson@2014
   473
(*Duplicate the assumption*)
paulson@2014
   474
by (forw_inst_tac [("psi", "ALL C.?P(C)")] asm_rl 1);
paulson@2014
   475
by (fast_tac (!claset addSDs [spec]) 1);
paulson@2014
   476
qed "unique_OR1_nonce";
paulson@2014
   477
paulson@2014
   478
paulson@2014
   479
val nonce_not_seen_now = le_refl RSN (2, new_nonces_not_seen) RSN (2,rev_notE);
paulson@2014
   480
paulson@2014
   481
(*It is impossible to re-use a nonce in both OR1 and OR2.  This holds because
paulson@2014
   482
  OR2 encrypts Nonce NB.  It prevents the attack that can occur in the
paulson@2014
   483
  over-simplified version of this protocol: see OtwayRees_Bad.*)
paulson@2014
   484
goal thy 
paulson@2032
   485
 "!!evs. [| A ~: lost;  evs : otway lost |]                            \
paulson@2014
   486
\        ==> Crypt {|NA, Agent A, Agent B|} (shrK A)             \
paulson@2032
   487
\             : parts (sees lost Spy evs) -->                       \
paulson@2014
   488
\            Crypt {|NA', NA, Agent A', Agent A|} (shrK A)       \
paulson@2032
   489
\             ~: parts (sees lost Spy evs)";
paulson@2032
   490
by (etac otway.induct 1);
paulson@2014
   491
by (ALLGOALS (asm_simp_tac (!simpset addsimps [parts_insert2])));
paulson@2014
   492
(*It is hard to generate this proof in a reasonable amount of time*)
paulson@2014
   493
by (step_tac (!claset addSEs [MPair_parts, nonce_not_seen_now]
paulson@2032
   494
                      addSDs [Says_imp_sees_Spy RS parts.Inj]) 1);
paulson@2014
   495
by (REPEAT_FIRST (fast_tac (!claset (*40 seconds??*)
paulson@2032
   496
                            addSDs  [impOfSubs analz_subset_parts,
paulson@2032
   497
                                     impOfSubs parts_insert_subset_Un]
paulson@2032
   498
                            addss  (!simpset))));
paulson@2014
   499
by (REPEAT_FIRST (fast_tac (!claset 
paulson@2032
   500
                              addSEs (partsEs@[nonce_not_seen_now])
paulson@2026
   501
                              addSDs  [impOfSubs parts_insert_subset_Un]
paulson@2014
   502
                              addss (!simpset))));
paulson@2014
   503
qed_spec_mp"no_nonce_OR1_OR2";
paulson@2014
   504
paulson@2014
   505
paulson@2014
   506
paulson@2014
   507
(*If the encrypted message appears, and A has used Nonce NA to start a run,
paulson@2014
   508
  then it originated with the Server!*)
paulson@2014
   509
goal thy 
paulson@2032
   510
 "!!evs. [| A ~: lost;  A ~= Spy;  evs : otway lost |]                     \
paulson@2032
   511
\        ==> Crypt {|Nonce NA, Key K|} (shrK A) : parts (sees lost Spy evs) --> \
paulson@2026
   512
\            Says A B {|Nonce NA, Agent A, Agent B,                          \
paulson@2026
   513
\                       Crypt {|Nonce NA, Agent A, Agent B|} (shrK A)|}      \
paulson@2026
   514
\             : set_of_list evs -->                                          \
paulson@2026
   515
\            (EX NB. Says Server B                                           \
paulson@2026
   516
\                 {|Nonce NA,                                                \
paulson@2026
   517
\                   Crypt {|Nonce NA, Key K|} (shrK A),                      \
paulson@2026
   518
\                   Crypt {|Nonce NB, Key K|} (shrK B)|}                     \
paulson@2014
   519
\                   : set_of_list evs)";
paulson@2032
   520
by (etac otway.induct 1);
paulson@2014
   521
by parts_Fake_tac;
paulson@2014
   522
by (ALLGOALS Asm_simp_tac);
paulson@2014
   523
(*Fake*)
paulson@2014
   524
by (best_tac (!claset addSDs [impOfSubs analz_subset_parts,
paulson@2032
   525
                              impOfSubs Fake_parts_insert]) 1);
paulson@2014
   526
(*OR1: it cannot be a new Nonce, contradiction.*)
paulson@2014
   527
by (fast_tac (!claset addSIs [parts_insertI]
paulson@2032
   528
                      addSEs partsEs
paulson@2032
   529
                      addEs [Says_imp_old_nonces RS less_irrefl]
paulson@2032
   530
                      addss (!simpset)) 1);
paulson@2014
   531
(*OR3 and OR4*)  (** LEVEL 5 **)
paulson@2014
   532
(*OR4*)
paulson@2014
   533
by (REPEAT (Safe_step_tac 2));
paulson@2014
   534
by (REPEAT (best_tac (!claset addSDs [parts_cut]) 3));
paulson@2014
   535
by (fast_tac (!claset addSIs [Crypt_imp_OR1]
paulson@2032
   536
                      addEs  partsEs
paulson@2032
   537
                      addDs [Says_imp_sees_Spy RS parts.Inj]) 2);
paulson@2014
   538
(*OR3*)  (** LEVEL 8 **)
paulson@2014
   539
by (ALLGOALS (asm_simp_tac (!simpset addsimps [ex_disj_distrib])));
paulson@2014
   540
by (step_tac (!claset delrules [disjCI, impCE]) 1);
paulson@2032
   541
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS parts.Inj]
paulson@2014
   542
                      addSEs [MPair_parts]
paulson@2014
   543
                      addEs  [unique_OR1_nonce]) 1);
paulson@2014
   544
by (fast_tac (!claset addSEs [MPair_parts]
paulson@2032
   545
                      addSDs [Says_imp_sees_Spy RS parts.Inj]
paulson@2014
   546
                      addEs  [no_nonce_OR1_OR2 RSN (2, rev_notE)]
paulson@2032
   547
                      delrules [conjI] (*stop split-up into 4 subgoals*)) 1);
paulson@2014
   548
qed_spec_mp "Crypt_imp_Server_msg";
paulson@2014
   549
paulson@2014
   550
paulson@2014
   551
(*Crucial property: if A receives B's OR4 message and the nonce NA agrees
paulson@2014
   552
  then the key really did come from the Server!  CANNOT prove this of the
paulson@2032
   553
  lost form of this protocol, even though we can prove
paulson@2032
   554
  Spy_not_see_encrypted_key*)
paulson@2014
   555
goal thy 
paulson@2032
   556
 "!!evs. [| A ~: lost;  A ~= Spy;  evs : otway lost |]                 \
paulson@2014
   557
\        ==> Says B' A {|Nonce NA, Crypt {|Nonce NA, Key K|} (shrK A)|}  \
paulson@2014
   558
\             : set_of_list evs -->                                      \
paulson@2014
   559
\            Says A B {|Nonce NA, Agent A, Agent B,                      \
paulson@2014
   560
\                       Crypt {|Nonce NA, Agent A, Agent B|} (shrK A)|}  \
paulson@2014
   561
\             : set_of_list evs -->                                      \
paulson@2014
   562
\            (EX NB. Says Server B                                       \
paulson@2014
   563
\                     {|Nonce NA,                                        \
paulson@2014
   564
\                       Crypt {|Nonce NA, Key K|} (shrK A),              \
paulson@2014
   565
\                       Crypt {|Nonce NB, Key K|} (shrK B)|}             \
paulson@2014
   566
\                       : set_of_list evs)";
paulson@2032
   567
by (etac otway.induct 1);
paulson@2014
   568
by (ALLGOALS (asm_simp_tac (!simpset addcongs [conj_cong])));
paulson@2014
   569
(*OR2*)
paulson@2014
   570
by (Fast_tac 3);
paulson@2014
   571
(*OR1: it cannot be a new Nonce, contradiction.*)
paulson@2014
   572
by (fast_tac (!claset addSIs [parts_insertI]
paulson@2032
   573
                      addEs [Says_imp_old_nonces RS less_irrefl]
paulson@2032
   574
                      addss (!simpset)) 2);
paulson@2014
   575
(*Fake, OR4*) (** LEVEL 4 **)
paulson@2014
   576
by (step_tac (!claset delrules [impCE]) 1);
paulson@2014
   577
by (ALLGOALS Asm_simp_tac);
paulson@2014
   578
by (Fast_tac 4);
paulson@2014
   579
by (fast_tac (!claset addSIs [Crypt_imp_OR1]
paulson@2032
   580
                      addEs  partsEs
paulson@2032
   581
                      addDs [Says_imp_sees_Spy RS parts.Inj]) 3);
paulson@2014
   582
(** LEVEL 8 **)
paulson@2014
   583
(*Still subcases of Fake and OR4*)
paulson@2014
   584
by (fast_tac (!claset addSIs [Crypt_imp_Server_msg]
paulson@2032
   585
                      addDs  [impOfSubs analz_subset_parts]) 1);
paulson@2014
   586
by (fast_tac (!claset addSIs [Crypt_imp_Server_msg]
paulson@2032
   587
                      addEs  partsEs
paulson@2032
   588
                      addDs  [Says_imp_sees_Spy RS parts.Inj]) 1);
paulson@2014
   589
val OR4_imp_Says_Server_A = 
paulson@2032
   590
    result() RSN (2, rev_mp) RS mp |> standard;
paulson@2014
   591
paulson@2014
   592
paulson@2014
   593
paulson@2014
   594
(*Describes the form of K and NA when the Server sends this message.*)
paulson@1941
   595
goal thy 
paulson@1941
   596
 "!!evs. [| Says Server B \
paulson@1941
   597
\            {|NA, Crypt {|NA, K|} (shrK A),                      \
paulson@1941
   598
\                  Crypt {|NB, K|} (shrK B)|} : set_of_list evs;  \
paulson@2032
   599
\           evs : otway lost |]                                        \
paulson@2032
   600
\        ==> (EX evt: otway lost. K = Key(newK evt)) &                  \
paulson@1941
   601
\            (EX i. NA = Nonce i)";
paulson@2032
   602
by (etac rev_mp 1);
paulson@2032
   603
by (etac otway.induct 1);
paulson@1941
   604
by (ALLGOALS (fast_tac (!claset addIs [less_SucI] addss (!simpset))));
paulson@1941
   605
qed "Says_Server_message_form";
paulson@1941
   606
paulson@1941
   607
paulson@2032
   608
(** Crucial secrecy property: Spy does not see the keys sent in msg OR3 **)
paulson@2014
   609
paulson@1941
   610
goal thy 
paulson@2032
   611
 "!!evs. [| A ~: lost;  B ~: lost;  evs : otway lost;  evt : otway lost |] \
paulson@2014
   612
\        ==> Says Server B                                             \
paulson@2014
   613
\              {|Nonce NA, Crypt {|Nonce NA, Key(newK evt)|} (shrK A), \
paulson@2014
   614
\                Crypt {|NB, Key(newK evt)|} (shrK B)|} : set_of_list evs --> \
paulson@2032
   615
\            Says A Spy {|Nonce NA, Key(newK evt)|} ~: set_of_list evs --> \
paulson@2032
   616
\            Key(newK evt) ~: analz (sees lost Spy evs)";
paulson@2032
   617
by (etac otway.induct 1);
paulson@2032
   618
by (dtac OR2_analz_sees_Spy 4);
paulson@2032
   619
by (dtac OR4_analz_sees_Spy 6);
paulson@2014
   620
by (forward_tac [Reveal_message_form] 7);
paulson@2014
   621
by (REPEAT_FIRST (eresolve_tac [asm_rl, bexE, disjE] ORELSE' hyp_subst_tac));
paulson@1964
   622
by (ALLGOALS
paulson@1941
   623
    (asm_full_simp_tac 
paulson@1941
   624
     (!simpset addsimps ([analz_subset_parts RS contra_subsetD,
paulson@2032
   625
                          analz_insert_Key_newK] @ pushes)
paulson@1941
   626
               setloop split_tac [expand_if])));
paulson@2014
   627
(** LEVEL 6 **)
paulson@1941
   628
(*OR3*)
paulson@2014
   629
by (fast_tac (!claset addSIs [parts_insertI]
paulson@2032
   630
                      addEs [Says_imp_old_keys RS less_irrefl]
paulson@2032
   631
                      addss (!simpset)) 3);
paulson@2014
   632
(*Reveal case 2, OR4, OR2, Fake*) 
paulson@2032
   633
by (REPEAT_FIRST (resolve_tac [conjI, impI] ORELSE' spy_analz_tac));
paulson@2014
   634
(*Reveal case 1*) (** LEVEL 8 **)
paulson@2032
   635
by (excluded_middle_tac "Aa : lost" 1);
paulson@2032
   636
(*But this contradicts Key(newK evt) ~: analz (sees lost Spy evsa) *)
paulson@2032
   637
by (dtac (Says_imp_sees_Spy RS analz.Inj) 2);
paulson@2014
   638
by (fast_tac (!claset addSDs [analz.Decrypt] addss (!simpset)) 2);
paulson@2032
   639
(*So now we have  Aa ~: lost *)
paulson@2032
   640
by (dtac OR4_imp_Says_Server_A 1);
paulson@2014
   641
by (REPEAT (assume_tac 1));
paulson@2014
   642
by (fast_tac (!claset addDs [unique_session_keys] addss (!simpset)) 1);
paulson@2014
   643
val lemma = result() RS mp RS mp RSN(2,rev_notE);
paulson@2014
   644
paulson@2014
   645
goal thy 
paulson@2014
   646
 "!!evs. [| Says Server B \
paulson@2014
   647
\            {|NA, Crypt {|NA, K|} (shrK A),                      \
paulson@2014
   648
\                  Crypt {|NB, K|} (shrK B)|} : set_of_list evs;  \
paulson@2032
   649
\           Says A Spy {|NA, K|} ~: set_of_list evs;            \
paulson@2032
   650
\           A ~: lost;  B ~: lost;  evs : otway lost |]                  \
paulson@2032
   651
\        ==> K ~: analz (sees lost Spy evs)";
paulson@2014
   652
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1);
paulson@2014
   653
by (fast_tac (!claset addSEs [lemma]) 1);
paulson@2032
   654
qed "Spy_not_see_encrypted_key";
paulson@2032
   655
paulson@1945
   656
paulson@2032
   657
goal thy 
paulson@2032
   658
 "!!evs. [| C ~: {A,B,Server}; \
paulson@2032
   659
\           Says Server B \
paulson@2032
   660
\            {|NA, Crypt {|NA, K|} (shrK A),                      \
paulson@2032
   661
\                  Crypt {|NB, K|} (shrK B)|} : set_of_list evs;  \
paulson@2032
   662
\           Says A Spy {|NA, K|} ~: set_of_list evs;            \
paulson@2032
   663
\           A ~: lost;  B ~: lost;  evs : otway lost |]                  \
paulson@2032
   664
\        ==> K ~: analz (sees lost C evs)";
paulson@2032
   665
by (rtac (subset_insertI RS sees_mono RS analz_mono RS contra_subsetD) 1);
paulson@2032
   666
by (rtac (sees_lost_agent_subset_sees_Spy RS analz_mono RS contra_subsetD) 1);
paulson@2032
   667
by (FIRSTGOAL (rtac Spy_not_see_encrypted_key));
paulson@2032
   668
by (REPEAT_FIRST (fast_tac (!claset addIs [otway_mono RS subsetD])));
paulson@2032
   669
qed "Agent_not_see_encrypted_key";
paulson@1945
   670
paulson@1945
   671
paulson@2026
   672
(** A session key uniquely identifies a pair of senders in the message
paulson@2026
   673
    encrypted by a good agent C. **)
paulson@1945
   674
goal thy 
paulson@2032
   675
 "!!evs. evs : otway lost ==>                                           \
paulson@2026
   676
\      EX A B. ALL C N.                                            \
paulson@2032
   677
\         C ~: lost -->                                             \
paulson@2032
   678
\         Crypt {|N, Key K|} (shrK C) : parts (sees lost Spy evs) --> \
paulson@2026
   679
\         C=A | C=B";
paulson@2032
   680
by (Simp_tac 1);        (*Miniscoping*)
paulson@2032
   681
by (etac otway.induct 1);
paulson@2032
   682
by (dres_inst_tac [("lost","lost")] OR2_analz_sees_Spy 4);
paulson@2032
   683
by (dres_inst_tac [("lost","lost")] OR4_analz_sees_Spy 6);
paulson@2032
   684
(*spy_analz_tac just does not work here: it is an entirely different proof!*)
paulson@1945
   685
by (ALLGOALS 
paulson@2026
   686
    (asm_simp_tac (!simpset addsimps [all_conj_distrib, ex_disj_distrib,
paulson@2032
   687
                                      imp_conj_distrib, parts_insert_sees,
paulson@2032
   688
                                      parts_insert2])));
paulson@1945
   689
by (REPEAT_FIRST (etac exE));
paulson@2026
   690
(*OR3: extraction of K = newK evsa to global context...*) (** LEVEL 6 **)
paulson@2026
   691
by (excluded_middle_tac "K = newK evsa" 4);
paulson@2026
   692
by (Asm_simp_tac 4);
paulson@2026
   693
by (REPEAT (ares_tac [exI] 4));
paulson@1945
   694
(*...we prove this case by contradiction: the key is too new!*)
paulson@2026
   695
by (fast_tac (!claset addSEs partsEs
paulson@2032
   696
                      addEs [Says_imp_old_keys RS less_irrefl]
paulson@2032
   697
                      addss (!simpset)) 4);
paulson@2026
   698
(*Base, Fake, OR2, OR4*)
paulson@2026
   699
by (REPEAT_FIRST ex_strip_tac);
paulson@2032
   700
by (dtac synth.Inj 4);
paulson@2032
   701
by (dtac synth.Inj 3);
paulson@2026
   702
(*Now in effect there are three Fake cases*)
paulson@2026
   703
by (REPEAT_FIRST (best_tac (!claset addDs [impOfSubs Fake_parts_insert]
paulson@2032
   704
                                    delrules [disjCI, disjE]
paulson@2032
   705
                                    addss (!simpset))));
paulson@2014
   706
qed "key_identifies_senders";
paulson@2032
   707
paulson@2032
   708