src/HOL/Auth/Yahalom.ML
author paulson
Mon Sep 23 18:20:43 1996 +0200 (1996-09-23)
changeset 2013 4b7a432fb3ed
parent 2001 974167c1d2c4
child 2026 0df5a96bf77e
permissions -rw-r--r--
Proof of Says_imp_old_keys is now more robust
paulson@1995
     1
(*  Title:      HOL/Auth/Yahalom
paulson@1985
     2
    ID:         $Id$
paulson@1985
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@1985
     4
    Copyright   1996  University of Cambridge
paulson@1985
     5
paulson@1985
     6
Inductive relation "otway" for the Yahalom protocol.
paulson@1985
     7
paulson@1985
     8
From page 257 of
paulson@1985
     9
  Burrows, Abadi and Needham.  A Logic of Authentication.
paulson@1985
    10
  Proc. Royal Soc. 426 (1989)
paulson@1985
    11
*)
paulson@1985
    12
paulson@1995
    13
open Yahalom;
paulson@1985
    14
paulson@1985
    15
proof_timing:=true;
paulson@1985
    16
HOL_quantifiers := false;
paulson@1985
    17
paulson@1995
    18
paulson@2013
    19
(*Weak liveness: there are traces that reach the end*)
paulson@1995
    20
paulson@1995
    21
goal thy 
paulson@1995
    22
 "!!A B. [| A ~= B; A ~= Server; B ~= Server |]   \
paulson@1995
    23
\        ==> EX X NB K. EX evs: yahalom.          \
paulson@1995
    24
\               Says A B {|X, Crypt (Nonce NB) K|} : set_of_list evs";
paulson@1995
    25
by (REPEAT (resolve_tac [exI,bexI] 1));
paulson@1995
    26
br (yahalom.Nil RS yahalom.YM1 RS yahalom.YM2 RS yahalom.YM3 RS yahalom.YM4) 2;
paulson@1995
    27
by (ALLGOALS (simp_tac (!simpset setsolver safe_solver)));
paulson@1995
    28
by (ALLGOALS Fast_tac);
paulson@2013
    29
result();
paulson@1995
    30
paulson@1995
    31
paulson@1985
    32
(**** Inductive proofs about yahalom ****)
paulson@1985
    33
paulson@1985
    34
(*The Enemy can see more than anybody else, except for their initial state*)
paulson@1985
    35
goal thy 
paulson@1985
    36
 "!!evs. evs : yahalom ==> \
paulson@1985
    37
\     sees A evs <= initState A Un sees Enemy evs";
paulson@1985
    38
be yahalom.induct 1;
paulson@1985
    39
by (ALLGOALS (fast_tac (!claset addDs [sees_Says_subset_insert RS subsetD] 
paulson@1985
    40
			        addss (!simpset))));
paulson@1985
    41
qed "sees_agent_subset_sees_Enemy";
paulson@1985
    42
paulson@1985
    43
paulson@1985
    44
(*Nobody sends themselves messages*)
paulson@1985
    45
goal thy "!!evs. evs : yahalom ==> ALL A X. Says A A X ~: set_of_list evs";
paulson@1985
    46
be yahalom.induct 1;
paulson@1985
    47
by (Auto_tac());
paulson@1985
    48
qed_spec_mp "not_Says_to_self";
paulson@1985
    49
Addsimps [not_Says_to_self];
paulson@1985
    50
AddSEs   [not_Says_to_self RSN (2, rev_notE)];
paulson@1985
    51
paulson@1985
    52
paulson@1985
    53
(** For reasoning about the encrypted portion of messages **)
paulson@1985
    54
paulson@1995
    55
(*Lets us treat YM4 using a similar argument as for the Fake case.*)
paulson@1995
    56
goal thy "!!evs. Says S A {|Crypt Y (shrK A), X|} : set_of_list evs ==> \
paulson@1985
    57
\                X : analz (sees Enemy evs)";
paulson@1985
    58
by (fast_tac (!claset addSDs [Says_imp_sees_Enemy RS analz.Inj]) 1);
paulson@1985
    59
qed "YM4_analz_sees_Enemy";
paulson@1985
    60
paulson@1995
    61
goal thy "!!evs. Says S A {|Crypt {|B, K, NA, NB|} (shrK A), X|} \
paulson@1995
    62
\                  : set_of_list evs ==> \
paulson@1985
    63
\                K : parts (sees Enemy evs)";
paulson@1985
    64
by (fast_tac (!claset addSEs partsEs
paulson@1985
    65
	              addSDs [Says_imp_sees_Enemy RS parts.Inj]) 1);
paulson@1995
    66
qed "YM4_parts_sees_Enemy";
paulson@1985
    67
paulson@1985
    68
paulson@1985
    69
paulson@2013
    70
(** Theorems of the form X ~: parts (sees Enemy evs) imply that NOBODY
paulson@2013
    71
    sends messages containing X! **)
paulson@1985
    72
paulson@1985
    73
(*Enemy never sees another agent's shared key! (unless it is leaked at start)*)
paulson@1985
    74
goal thy 
paulson@2001
    75
 "!!evs. [| evs : yahalom;  A ~: bad |]    \
paulson@2001
    76
\        ==> Key (shrK A) ~: parts (sees Enemy evs)";
paulson@1985
    77
be yahalom.induct 1;
paulson@1995
    78
bd (YM4_analz_sees_Enemy RS synth.Inj) 6;
paulson@1995
    79
by (ALLGOALS Asm_simp_tac);
paulson@1995
    80
by (stac insert_commute 3);
paulson@1985
    81
by (Auto_tac());
paulson@1995
    82
(*Fake and YM4 are similar*)
paulson@1995
    83
by (ALLGOALS (best_tac (!claset addSDs [impOfSubs analz_subset_parts,
paulson@1995
    84
					impOfSubs Fake_parts_insert])));
paulson@1985
    85
qed "Enemy_not_see_shrK";
paulson@1985
    86
paulson@1985
    87
bind_thm ("Enemy_not_analz_shrK",
paulson@1985
    88
	  [analz_subset_parts, Enemy_not_see_shrK] MRS contra_subsetD);
paulson@1985
    89
paulson@1985
    90
Addsimps [Enemy_not_see_shrK, Enemy_not_analz_shrK];
paulson@1985
    91
paulson@1985
    92
(*We go to some trouble to preserve R in the 3rd and 4th subgoals
paulson@1985
    93
  As usual fast_tac cannot be used because it uses the equalities too soon*)
paulson@1985
    94
val major::prems = 
paulson@1985
    95
goal thy  "[| Key (shrK A) : parts (sees Enemy evs);       \
paulson@1995
    96
\             evs : yahalom;                               \
paulson@1985
    97
\             A:bad ==> R                                  \
paulson@1985
    98
\           |] ==> R";
paulson@1985
    99
br ccontr 1;
paulson@1985
   100
br ([major, Enemy_not_see_shrK] MRS rev_notE) 1;
paulson@1985
   101
by (swap_res_tac prems 2);
paulson@1985
   102
by (ALLGOALS (fast_tac (!claset addIs prems)));
paulson@1985
   103
qed "Enemy_see_shrK_E";
paulson@1985
   104
paulson@1985
   105
bind_thm ("Enemy_analz_shrK_E", 
paulson@1985
   106
	  analz_subset_parts RS subsetD RS Enemy_see_shrK_E);
paulson@1985
   107
paulson@1985
   108
AddSEs [Enemy_see_shrK_E, Enemy_analz_shrK_E];
paulson@1985
   109
paulson@1985
   110
paulson@1985
   111
(*** Future keys can't be seen or used! ***)
paulson@1985
   112
paulson@1985
   113
(*Nobody can have SEEN keys that will be generated in the future.
paulson@1985
   114
  This has to be proved anew for each protocol description,
paulson@1985
   115
  but should go by similar reasoning every time.  Hardest case is the
paulson@1985
   116
  standard Fake rule.  
paulson@1985
   117
      The length comparison, and Union over C, are essential for the 
paulson@1985
   118
  induction! *)
paulson@1985
   119
goal thy "!!evs. evs : yahalom ==> \
paulson@1985
   120
\                length evs <= length evs' --> \
paulson@1985
   121
\                          Key (newK evs') ~: (UN C. parts (sees C evs))";
paulson@1985
   122
be yahalom.induct 1;
paulson@1995
   123
bd (YM4_analz_sees_Enemy RS synth.Inj) 6;
paulson@1985
   124
by (REPEAT_FIRST (best_tac (!claset addDs [impOfSubs analz_subset_parts,
paulson@1995
   125
					   impOfSubs parts_insert_subset_Un,
paulson@1995
   126
					   Suc_leD]
paulson@1995
   127
			            addss (!simpset))));
paulson@1985
   128
val lemma = result();
paulson@1985
   129
paulson@1985
   130
(*Variant needed for the main theorem below*)
paulson@1985
   131
goal thy 
paulson@2001
   132
 "!!evs. [| evs : yahalom;  length evs <= length evs' |]    \
paulson@2001
   133
\        ==> Key (newK evs') ~: parts (sees C evs)";
paulson@1985
   134
by (fast_tac (!claset addDs [lemma]) 1);
paulson@1985
   135
qed "new_keys_not_seen";
paulson@1985
   136
Addsimps [new_keys_not_seen];
paulson@1985
   137
paulson@1985
   138
(*Another variant: old messages must contain old keys!*)
paulson@1985
   139
goal thy 
paulson@1985
   140
 "!!evs. [| Says A B X : set_of_list evs;  \
paulson@1985
   141
\           Key (newK evt) : parts {X};    \
paulson@1985
   142
\           evs : yahalom                 \
paulson@1985
   143
\        |] ==> length evt < length evs";
paulson@1985
   144
br ccontr 1;
paulson@2013
   145
bd leI 1;
paulson@1985
   146
by (fast_tac (!claset addSDs [new_keys_not_seen, Says_imp_sees_Enemy]
paulson@2013
   147
                      addIs  [impOfSubs parts_mono]) 1);
paulson@1985
   148
qed "Says_imp_old_keys";
paulson@1985
   149
paulson@1985
   150
paulson@1985
   151
(*Nobody can have USED keys that will be generated in the future.
paulson@1985
   152
  ...very like new_keys_not_seen*)
paulson@1985
   153
goal thy "!!evs. evs : yahalom ==> \
paulson@1985
   154
\                length evs <= length evs' --> \
paulson@1985
   155
\                newK evs' ~: keysFor (UN C. parts (sees C evs))";
paulson@1985
   156
be yahalom.induct 1;
paulson@1995
   157
by (forward_tac [YM4_parts_sees_Enemy] 6);
paulson@1995
   158
bd (YM4_analz_sees_Enemy RS synth.Inj) 6;
paulson@1995
   159
by (ALLGOALS Asm_full_simp_tac);
paulson@1995
   160
(*YM1, YM2 and YM3*)
paulson@1995
   161
by (EVERY (map (fast_tac (!claset addDs [Suc_leD] addss (!simpset))) [4,3,2]));
paulson@1995
   162
(*Fake and YM4: these messages send unknown (X) components*)
paulson@1995
   163
by (stac insert_commute 2);
paulson@1995
   164
by (Simp_tac 2);
paulson@1995
   165
(*YM4: the only way K could have been used is if it had been seen,
paulson@1995
   166
  contradicting new_keys_not_seen*)
paulson@1995
   167
by (ALLGOALS
paulson@1985
   168
     (best_tac
paulson@1995
   169
      (!claset addDs [impOfSubs (analz_subset_parts RS keysFor_mono),
paulson@1985
   170
		      impOfSubs (parts_insert_subset_Un RS keysFor_mono),
paulson@1985
   171
		      Suc_leD]
paulson@1995
   172
	       addDs [impOfSubs analz_subset_parts]
paulson@1995
   173
	       addEs [new_keys_not_seen RSN(2,rev_notE)]
paulson@1995
   174
	       addss (!simpset))));
paulson@1985
   175
val lemma = result();
paulson@1985
   176
paulson@1985
   177
goal thy 
paulson@2001
   178
 "!!evs. [| evs : yahalom;  length evs <= length evs' |]    \
paulson@2001
   179
\        ==> newK evs' ~: keysFor (parts (sees C evs))";
paulson@1985
   180
by (fast_tac (!claset addSDs [lemma] addss (!simpset)) 1);
paulson@1985
   181
qed "new_keys_not_used";
paulson@1985
   182
paulson@1985
   183
bind_thm ("new_keys_not_analzd",
paulson@1985
   184
	  [analz_subset_parts RS keysFor_mono,
paulson@1985
   185
	   new_keys_not_used] MRS contra_subsetD);
paulson@1985
   186
paulson@1985
   187
Addsimps [new_keys_not_used, new_keys_not_analzd];
paulson@1985
   188
paulson@1985
   189
paulson@1985
   190
(** Lemmas concerning the form of items passed in messages **)
paulson@1985
   191
paulson@1985
   192
paulson@1985
   193
(****
paulson@1985
   194
 The following is to prove theorems of the form
paulson@1985
   195
paulson@1985
   196
          Key K : analz (insert (Key (newK evt)) (sees Enemy evs)) ==>
paulson@1985
   197
          Key K : analz (sees Enemy evs)
paulson@1985
   198
paulson@1985
   199
 A more general formula must be proved inductively.
paulson@1985
   200
paulson@1985
   201
****)
paulson@1985
   202
paulson@1985
   203
paulson@1985
   204
(*NOT useful in this form, but it says that session keys are not used
paulson@1985
   205
  to encrypt messages containing other keys, in the actual protocol.
paulson@1985
   206
  We require that agents should behave like this subsequently also.*)
paulson@1985
   207
goal thy 
paulson@1985
   208
 "!!evs. evs : yahalom ==> \
paulson@1985
   209
\        (Crypt X (newK evt)) : parts (sees Enemy evs) & \
paulson@1985
   210
\        Key K : parts {X} --> Key K : parts (sees Enemy evs)";
paulson@1985
   211
be yahalom.induct 1;
paulson@1995
   212
bd (YM4_analz_sees_Enemy RS synth.Inj) 6;
paulson@1985
   213
by (ALLGOALS (asm_simp_tac (!simpset addsimps pushes)));
paulson@1985
   214
(*Deals with Faked messages*)
paulson@1995
   215
by (EVERY 
paulson@1995
   216
    (map (best_tac (!claset addSEs partsEs
paulson@1995
   217
			    addDs [impOfSubs analz_subset_parts,
paulson@1995
   218
				   impOfSubs parts_insert_subset_Un]
paulson@1995
   219
			    addss (!simpset)))
paulson@1995
   220
     [3,2]));
paulson@1995
   221
(*Base case*)
paulson@1985
   222
by (Auto_tac());
paulson@1985
   223
result();
paulson@1985
   224
paulson@1985
   225
paulson@1985
   226
(** Specialized rewriting for this proof **)
paulson@1985
   227
paulson@1985
   228
Delsimps [image_insert];
paulson@1985
   229
Addsimps [image_insert RS sym];
paulson@1985
   230
paulson@1985
   231
Delsimps [image_Un];
paulson@1985
   232
Addsimps [image_Un RS sym];
paulson@1985
   233
paulson@1985
   234
goal thy "insert (Key (newK x)) (sees A evs) = \
paulson@1985
   235
\         Key `` (newK``{x}) Un (sees A evs)";
paulson@1985
   236
by (Fast_tac 1);
paulson@1985
   237
val insert_Key_singleton = result();
paulson@1985
   238
paulson@1985
   239
goal thy "insert (Key (f x)) (Key``(f``E) Un C) = \
paulson@1985
   240
\         Key `` (f `` (insert x E)) Un C";
paulson@1985
   241
by (Fast_tac 1);
paulson@1985
   242
val insert_Key_image = result();
paulson@1985
   243
paulson@1985
   244
paulson@1985
   245
(*This lets us avoid analyzing the new message -- unless we have to!*)
paulson@1985
   246
(*NEEDED??*)
paulson@1985
   247
goal thy "synth (analz (sees Enemy evs)) <=   \
paulson@1985
   248
\         synth (analz (sees Enemy (Says A B X # evs)))";
paulson@1985
   249
by (Simp_tac 1);
paulson@1985
   250
br (subset_insertI RS analz_mono RS synth_mono) 1;
paulson@1985
   251
qed "synth_analz_thin";
paulson@1985
   252
paulson@1985
   253
AddIs [impOfSubs synth_analz_thin];
paulson@1985
   254
paulson@1985
   255
paulson@1985
   256
paulson@1985
   257
(** Session keys are not used to encrypt other session keys **)
paulson@1985
   258
paulson@1985
   259
(*Lemma for the trivial direction of the if-and-only-if*)
paulson@1985
   260
goal thy  
paulson@1985
   261
 "!!evs. (Key K : analz (Key``nE Un sEe)) --> \
paulson@1985
   262
\         (K : nE | Key K : analz sEe)  ==>     \
paulson@1985
   263
\        (Key K : analz (Key``nE Un sEe)) = (K : nE | Key K : analz sEe)";
paulson@1985
   264
by (fast_tac (!claset addSEs [impOfSubs analz_mono]) 1);
paulson@1985
   265
val lemma = result();
paulson@1985
   266
paulson@1985
   267
paulson@1985
   268
goal thy  
paulson@1985
   269
 "!!evs. evs : yahalom ==> \
paulson@1985
   270
\  ALL K E. (Key K : analz (Key``(newK``E) Un (sees Enemy evs))) = \
paulson@1985
   271
\           (K : newK``E | Key K : analz (sees Enemy evs))";
paulson@1985
   272
be yahalom.induct 1;
paulson@1985
   273
bd YM4_analz_sees_Enemy 6;
paulson@1985
   274
by (REPEAT_FIRST (resolve_tac [allI, lemma]));
paulson@1995
   275
by (ALLGOALS 
paulson@1985
   276
    (asm_simp_tac 
paulson@1985
   277
     (!simpset addsimps ([insert_Key_singleton, insert_Key_image, pushKey_newK]
paulson@1985
   278
			 @ pushes)
paulson@1985
   279
               setloop split_tac [expand_if])));
paulson@1985
   280
(*YM4*) 
paulson@1995
   281
by (enemy_analz_tac 4);
paulson@1985
   282
(*YM3*)
paulson@1995
   283
by (Fast_tac 3);
paulson@1995
   284
(*Fake case*)
paulson@1985
   285
by (enemy_analz_tac 2);
paulson@1985
   286
(*Base case*)
paulson@1985
   287
by (fast_tac (!claset addIs [image_eqI] addss (!simpset)) 1);
paulson@1985
   288
qed_spec_mp "analz_image_newK";
paulson@1985
   289
paulson@1985
   290
goal thy
paulson@1985
   291
 "!!evs. evs : yahalom ==>                               \
paulson@1985
   292
\        Key K : analz (insert (Key (newK evt)) (sees Enemy evs)) = \
paulson@1985
   293
\        (K = newK evt | Key K : analz (sees Enemy evs))";
paulson@1985
   294
by (asm_simp_tac (HOL_ss addsimps [pushKey_newK, analz_image_newK, 
paulson@1985
   295
				   insert_Key_singleton]) 1);
paulson@1985
   296
by (Fast_tac 1);
paulson@1985
   297
qed "analz_insert_Key_newK";
paulson@1985
   298
paulson@1985
   299
paulson@2013
   300
(*Describes the form of K when the Server sends this message.*)
paulson@1985
   301
goal thy 
paulson@1995
   302
 "!!evs. [| Says Server A                                           \
paulson@1995
   303
\            {|Crypt {|Agent B, K, NA, NB|} (shrK A),               \
paulson@1995
   304
\              Crypt {|Agent A, K|} (shrK B)|} : set_of_list evs;   \
paulson@1985
   305
\           evs : yahalom |]                                        \
paulson@2013
   306
\        ==> (EX evt:yahalom. K = Key(newK evt))";
paulson@1985
   307
be rev_mp 1;
paulson@1985
   308
be yahalom.induct 1;
paulson@2013
   309
by (ALLGOALS (fast_tac (!claset addss (!simpset))));
paulson@1985
   310
qed "Says_Server_message_form";
paulson@1985
   311
paulson@1985
   312
paulson@2013
   313
(** Crucial secrecy property: Enemy does not see the keys sent in msg YM3
paulson@2013
   314
    As with Otway-Rees, proof does not need uniqueness of session keys. **)
paulson@2013
   315
paulson@2013
   316
goal thy 
paulson@2013
   317
 "!!evs. [| A ~: bad;  B ~: bad;  evs : yahalom;  evt : yahalom |]        \
paulson@2013
   318
\        ==> Says Server A                                                \
paulson@2013
   319
\              {|Crypt {|Agent B, Key(newK evt), NA, NB|} (shrK A),       \
paulson@2013
   320
\                Crypt {|Agent A, Key(newK evt)|} (shrK B)|}              \
paulson@2013
   321
\             : set_of_list evs -->    \
paulson@2013
   322
\            Key(newK evt) ~: analz (sees Enemy evs)";
paulson@2013
   323
be yahalom.induct 1;
paulson@2013
   324
bd YM4_analz_sees_Enemy 6;
paulson@2013
   325
by (ALLGOALS
paulson@2013
   326
    (asm_simp_tac 
paulson@2013
   327
     (!simpset addsimps ([analz_subset_parts RS contra_subsetD,
paulson@2013
   328
			  analz_insert_Key_newK] @ pushes)
paulson@2013
   329
               setloop split_tac [expand_if])));
paulson@2013
   330
(*YM4*)
paulson@2013
   331
by (enemy_analz_tac 3);
paulson@2013
   332
(*YM3*)
paulson@2013
   333
by (fast_tac (!claset addIs [parts_insertI]
paulson@2013
   334
		      addEs [Says_imp_old_keys RS less_irrefl]
paulson@2013
   335
	              addss (!simpset)) 2);
paulson@2013
   336
(*Fake*) (** LEVEL 10 **)
paulson@2013
   337
by (enemy_analz_tac 1);
paulson@2013
   338
val lemma = result() RS mp RSN(2,rev_notE);
paulson@2013
   339
paulson@2013
   340
paulson@2013
   341
(*Final version: Server's message in the most abstract form*)
paulson@1985
   342
goal thy 
paulson@1985
   343
 "!!evs. [| Says Server A \
paulson@1995
   344
\            {|Crypt {|Agent B, K, NA, NB|} (shrK A),                   \
paulson@1995
   345
\              Crypt {|Agent A, K|} (shrK B)|} : set_of_list evs;       \
paulson@1995
   346
\           A ~: bad;  B ~: bad;  evs : yahalom |] ==>                  \
paulson@1985
   347
\     K ~: analz (sees Enemy evs)";
paulson@2013
   348
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1);
paulson@2013
   349
by (fast_tac (!claset addSEs [lemma]) 1);
paulson@1985
   350
qed "Enemy_not_see_encrypted_key";
paulson@2001
   351
paulson@2001
   352
paulson@2013
   353
(** Towards proofs of stronger authenticity properties **)
paulson@2013
   354
paulson@2001
   355
goal thy 
paulson@2013
   356
 "!!evs. [| Crypt {|Agent A, Key K|} (shrK B) : parts (sees Enemy evs); \
paulson@2001
   357
\           B ~: bad;  evs : yahalom |]                                 \
paulson@2001
   358
\        ==> EX NA NB. Says Server A                                    \
paulson@2013
   359
\                        {|Crypt {|Agent B, Key K,                      \
paulson@2013
   360
\                                  Nonce NA, Nonce NB|} (shrK A),       \
paulson@2013
   361
\                          Crypt {|Agent A, Key K|} (shrK B)|}          \
paulson@2013
   362
\                       : set_of_list evs";
paulson@2001
   363
be rev_mp 1;
paulson@2001
   364
be yahalom.induct 1;
paulson@2013
   365
bd (YM4_analz_sees_Enemy RS synth.Inj) 6;
paulson@2013
   366
by (ALLGOALS Asm_simp_tac);
paulson@2001
   367
(*YM3*)
paulson@2001
   368
by (Fast_tac 3);
paulson@2001
   369
(*Base case*)
paulson@2001
   370
by (fast_tac (!claset addss (!simpset)) 1);
paulson@2013
   371
(*Prepare YM4*)
paulson@2013
   372
by (stac insert_commute 2 THEN Simp_tac 2);
paulson@2013
   373
(*Fake and YM4 are similar*)
paulson@2013
   374
by (ALLGOALS (best_tac (!claset addSDs [impOfSubs analz_subset_parts,
paulson@2013
   375
					impOfSubs Fake_parts_insert])));
paulson@2013
   376
qed "Crypt_imp_Server_msg";
paulson@2001
   377
paulson@2001
   378
paulson@2001
   379
(*What can B deduce from receipt of YM4?  
paulson@2001
   380
  NOT THAT THE NONCES AGREE (in this version).  But what does the Nonce
paulson@2001
   381
	give us??*)
paulson@2001
   382
goal thy 
paulson@2001
   383
 "!!evs. [| Says A' B {|Crypt {|Agent A, Key K|} (shrK B),              \
paulson@2001
   384
\                       Crypt (Nonce NB) K|} : set_of_list evs;         \
paulson@2001
   385
\           B ~: bad;  evs : yahalom |]                                 \
paulson@2001
   386
\        ==> EX NA NB. Says Server A                                    \
paulson@2001
   387
\                     {|Crypt {|Agent B, Key K,                         \
paulson@2001
   388
\                               Nonce NA, Nonce NB|} (shrK A),          \
paulson@2001
   389
\                       Crypt {|Agent A, Key K|} (shrK B)|}             \
paulson@2001
   390
\                   : set_of_list evs";
paulson@2001
   391
be rev_mp 1;
paulson@2001
   392
be yahalom.induct 1;
paulson@2013
   393
by (dresolve_tac [YM4_analz_sees_Enemy] 6);
paulson@2001
   394
by (ALLGOALS Asm_simp_tac);
paulson@2013
   395
by (ALLGOALS (fast_tac (!claset addSDs [impOfSubs analz_subset_parts RS
paulson@2013
   396
					Crypt_imp_Server_msg])));
paulson@2001
   397
qed "YM4_imp_Says_Server_A";
paulson@2001
   398
paulson@2001
   399
paulson@2001
   400
paulson@2001
   401
goal thy 
paulson@2001
   402
 "!!evs. [| Says A' B {|Crypt {|Agent A, Key K|} (shrK B),              \
paulson@2001
   403
\                       Crypt (Nonce NB) K|} : set_of_list evs;         \
paulson@2001
   404
\           A ~: bad;  B ~: bad;  evs : yahalom |]                      \
paulson@2001
   405
\        ==> Key K ~: analz (sees Enemy evs)";
paulson@2001
   406
by (fast_tac (!claset addSDs [YM4_imp_Says_Server_A,
paulson@2001
   407
			      Enemy_not_see_encrypted_key]) 1);
paulson@2001
   408
qed "B_gets_secure_key";