src/HOL/Auth/OtwayRees_AN.ML
author paulson
Tue, 22 Jul 1997 11:26:02 +0200
changeset 3543 82f33248d89d
parent 3519 ab0a9fbed4c0
child 3674 65ec38fbb265
permissions -rw-r--r--
Cosmetic changes: margins, indentation, ...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     1
(*  Title:      HOL/Auth/OtwayRees
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     2
    ID:         $Id$
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     4
    Copyright   1996  University of Cambridge
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     5
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     6
Inductive relation "otway" for the Otway-Rees protocol.
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     7
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     8
Simplified version with minimal encryption but explicit messages
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
     9
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    10
From page 11 of
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    11
  Abadi and Needham.  Prudent Engineering Practice for Cryptographic Protocols.
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    12
  IEEE Trans. SE 22 (1), 1996
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    13
*)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    14
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    15
open OtwayRees_AN;
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    16
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    17
proof_timing:=true;
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    18
HOL_quantifiers := false;
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    19
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    20
2331
d6a56ff0d94e Minor renamings
paulson
parents: 2284
diff changeset
    21
(*A "possibility property": there are traces that reach the end*)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    22
goal thy 
2331
d6a56ff0d94e Minor renamings
paulson
parents: 2284
diff changeset
    23
 "!!A B. [| A ~= B; A ~= Server; B ~= Server |]                               \
3543
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
    24
\        ==> EX K. EX NA. EX evs: otway.                                      \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
    25
\             Says B A (Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|}) \
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
    26
\             : set evs";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    27
by (REPEAT (resolve_tac [exI,bexI] 1));
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    28
by (rtac (otway.Nil RS otway.OR1 RS otway.OR2 RS otway.OR3 RS otway.OR4) 2);
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
    29
by possibility_tac;
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    30
result();
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    31
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    32
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    33
(**** Inductive proofs about otway ****)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    34
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    35
(*Nobody sends themselves messages*)
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    36
goal thy "!!evs. evs : otway ==> ALL A X. Says A A X ~: set evs";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    37
by (etac otway.induct 1);
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    38
by (Auto_tac());
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    39
qed_spec_mp "not_Says_to_self";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    40
Addsimps [not_Says_to_self];
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    41
AddSEs   [not_Says_to_self RSN (2, rev_notE)];
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    42
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    43
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    44
(** For reasoning about the encrypted portion of messages **)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    45
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
    46
goal thy "!!evs. Says S' B {|X, Crypt(shrK B) X'|} : set evs ==> \
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    47
\                X : analz (sees Spy evs)";
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
    48
by (blast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj]) 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    49
qed "OR4_analz_sees_Spy";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    50
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
    51
goal thy "!!evs. Says Server B {|X, Crypt K' {|NB, a, Agent B, K|}|} \
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    52
\                  : set evs ==> K : parts (sees Spy evs)";
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
    53
by (blast_tac (!claset addSEs sees_Spy_partsEs) 1);
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    54
qed "Oops_parts_sees_Spy";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    55
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    56
(*OR4_analz_sees_Spy lets us treat those cases using the same 
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    57
  argument as for the Fake case.  This is possible for most, but not all,
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    58
  proofs, since Fake messages originate from the Spy. *)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    59
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    60
bind_thm ("OR4_parts_sees_Spy",
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    61
          OR4_analz_sees_Spy RS (impOfSubs analz_subset_parts));
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    62
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    63
(*For proving the easier theorems about X ~: parts (sees Spy evs).*)
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    64
fun parts_induct_tac i = 
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    65
    etac otway.induct i			THEN 
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    66
    forward_tac [Oops_parts_sees_Spy] (i+6) THEN
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    67
    forward_tac [OR4_parts_sees_Spy]  (i+5) THEN
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    68
    prove_simple_subgoals_tac  i;
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    69
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    70
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    71
(** Theorems of the form X ~: parts (sees Spy evs) imply that NOBODY
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    72
    sends messages containing X! **)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    73
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    74
(*Spy never sees another agent's shared key! (unless it's lost at start)*)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    75
goal thy 
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    76
 "!!evs. evs : otway ==> (Key (shrK A) : parts (sees Spy evs)) = (A : lost)";
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    77
by (parts_induct_tac 1);
3121
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
    78
by (Fake_parts_insert_tac 1);
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
    79
by (Blast_tac 1);
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    80
qed "Spy_see_shrK";
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    81
Addsimps [Spy_see_shrK];
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    82
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    83
goal thy 
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    84
 "!!evs. evs : otway ==> (Key (shrK A) : analz (sees Spy evs)) = (A : lost)";
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    85
by (auto_tac(!claset addDs [impOfSubs analz_subset_parts], !simpset));
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    86
qed "Spy_analz_shrK";
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    87
Addsimps [Spy_analz_shrK];
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    88
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    89
goal thy  "!!A. [| Key (shrK A) : parts (sees Spy evs);       \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    90
\                  evs : otway |] ==> A:lost";
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
    91
by (blast_tac (!claset addDs [Spy_see_shrK]) 1);
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    92
qed "Spy_see_shrK_D";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    93
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    94
bind_thm ("Spy_analz_shrK_D", analz_subset_parts RS subsetD RS Spy_see_shrK_D);
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
    95
AddSDs [Spy_see_shrK_D, Spy_analz_shrK_D];
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    96
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
    97
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
    98
(*Nobody can have used non-existent keys!*)
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
    99
goal thy "!!evs. evs : otway ==>          \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   100
\         Key K ~: used evs --> K ~: keysFor (parts (sees Spy evs))";
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   101
by (parts_induct_tac 1);
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   102
(*Fake*)
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   103
by (best_tac
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   104
      (!claset addIs [impOfSubs analz_subset_parts]
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   105
               addDs [impOfSubs (analz_subset_parts RS keysFor_mono),
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   106
                      impOfSubs (parts_insert_subset_Un RS keysFor_mono)]
3207
fe79ad367d77 renamed unsafe_addss to addss
oheimb
parents: 3121
diff changeset
   107
               addss (!simpset)) 1);
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   108
(*OR3*)
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   109
by (Blast_tac 1);
2160
ad4382e546fc Simplified new_keys_not_seen, etc.: replaced the
paulson
parents: 2131
diff changeset
   110
qed_spec_mp "new_keys_not_used";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   111
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   112
bind_thm ("new_keys_not_analzd",
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   113
          [analz_subset_parts RS keysFor_mono,
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   114
           new_keys_not_used] MRS contra_subsetD);
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   115
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   116
Addsimps [new_keys_not_used, new_keys_not_analzd];
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   117
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   118
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   119
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   120
(*** Proofs involving analz ***)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   121
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
   122
(*Describes the form of K and NA when the Server sends this message.*)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   123
goal thy 
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   124
 "!!evs. [| Says Server B                                           \
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   125
\              {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},    \
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   126
\                Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}   \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   127
\             : set evs;                                            \
3543
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   128
\           evs : otway |]                                          \
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   129
\        ==> K ~: range shrK & (EX i. NA = Nonce i) & (EX j. NB = Nonce j)";
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
   130
by (etac rev_mp 1);
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
   131
by (etac otway.induct 1);
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   132
by (ALLGOALS Asm_simp_tac);
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   133
by (Blast_tac 1);
2131
3106a99d30a5 Changing from the Reveal to the Oops rule
paulson
parents: 2106
diff changeset
   134
qed "Says_Server_message_form";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   135
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   136
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   137
(*For proofs involving analz.*)
3121
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
   138
val analz_sees_tac = 
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   139
    dtac OR4_analz_sees_Spy 6 THEN
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   140
    forward_tac [Says_Server_message_form] 7 THEN
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   141
    assume_tac 7 THEN
2451
ce85a2aafc7a Extensive tidying and simplification, largely stemming from
paulson
parents: 2417
diff changeset
   142
    REPEAT ((eresolve_tac [exE, conjE] ORELSE' hyp_subst_tac) 7);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   143
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   144
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   145
(****
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   146
 The following is to prove theorems of the form
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   147
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   148
  Key K : analz (insert (Key KAB) (sees Spy evs)) ==>
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   149
  Key K : analz (sees Spy evs)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   150
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   151
 A more general formula must be proved inductively.
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   152
****)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   153
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   154
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   155
(** Session keys are not used to encrypt other session keys **)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   156
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   157
(*The equality makes the induction hypothesis easier to apply*)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   158
goal thy  
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   159
 "!!evs. evs : otway ==>                                    \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   160
\  ALL K KK. KK <= Compl (range shrK) -->                   \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   161
\            (Key K : analz (Key``KK Un (sees Spy evs))) =  \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   162
\            (K : KK | Key K : analz (sees Spy evs))";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   163
by (etac otway.induct 1);
3121
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
   164
by analz_sees_tac;
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   165
by (REPEAT_FIRST (resolve_tac [allI, impI]));
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   166
by (REPEAT_FIRST (rtac analz_image_freshK_lemma ));
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   167
by (ALLGOALS (asm_simp_tac analz_image_freshK_ss));
3451
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   168
(*Fake*) 
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   169
by (spy_analz_tac 2);
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   170
(*Base*)
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   171
by (Blast_tac 1);
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   172
qed_spec_mp "analz_image_freshK";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   173
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   174
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   175
goal thy
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   176
 "!!evs. [| evs : otway;  KAB ~: range shrK |] ==>          \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   177
\        Key K : analz (insert (Key KAB) (sees Spy evs)) =  \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   178
\        (K = KAB | Key K : analz (sees Spy evs))";
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   179
by (asm_simp_tac (analz_image_freshK_ss addsimps [analz_image_freshK]) 1);
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   180
qed "analz_insert_freshK";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   181
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   182
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   183
(*** The Key K uniquely identifies the Server's  message. **)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   184
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   185
goal thy 
3543
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   186
 "!!evs. evs : otway ==>                                            \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   187
\      EX A' B' NA' NB'. ALL A B NA NB.                             \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   188
\       Says Server B                                               \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   189
\         {|Crypt (shrK A) {|NA, Agent A, Agent B, K|},             \
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
   190
\           Crypt (shrK B) {|NB, Agent A, Agent B, K|}|} : set evs  \
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   191
\       --> A=A' & B=B' & NA=NA' & NB=NB'";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   192
by (etac otway.induct 1);
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   193
by (ALLGOALS (asm_simp_tac (!simpset addsimps [all_conj_distrib])));
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   194
by (Step_tac 1);
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   195
(*Remaining cases: OR3 and OR4*)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   196
by (ex_strip_tac 2);
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   197
by (Blast_tac 2);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   198
by (expand_case_tac "K = ?y" 1);
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   199
by (REPEAT (ares_tac [refl,exI,impI,conjI] 2));
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   200
(*...we assume X is a recent message and handle this case by contradiction*)
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   201
by (blast_tac (!claset addSEs sees_Spy_partsEs
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   202
                       delrules[conjI] (*prevent splitup into 4 subgoals*)) 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   203
val lemma = result();
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   204
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   205
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   206
goal thy 
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   207
"!!evs. [| Says Server B                                           \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   208
\            {|Crypt (shrK A) {|NA, Agent A, Agent B, K|},         \
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   209
\              Crypt (shrK B) {|NB, Agent A, Agent B, K|}|}        \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   210
\           : set evs;                                             \
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   211
\          Says Server B'                                          \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   212
\            {|Crypt (shrK A') {|NA', Agent A', Agent B', K|},     \
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   213
\              Crypt (shrK B') {|NB', Agent A', Agent B', K|}|}    \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   214
\           : set evs;                                             \
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   215
\          evs : otway |]                                          \
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   216
\       ==> A=A' & B=B' & NA=NA' & NB=NB'";
2417
95f275c8476e New tactic: prove_unique_tac
paulson
parents: 2375
diff changeset
   217
by (prove_unique_tac lemma 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   218
qed "unique_session_keys";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   219
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   220
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   221
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   222
(**** Authenticity properties relating to NA ****)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   223
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   224
(*If the encrypted message appears then it originated with the Server!*)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   225
goal thy 
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   226
 "!!evs. [| A ~: lost;  evs : otway |]                 \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   227
\ ==> Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}   \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   228
\      : parts (sees Spy evs)                          \
2331
d6a56ff0d94e Minor renamings
paulson
parents: 2284
diff changeset
   229
\     --> (EX NB. Says Server B                                          \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   230
\                  {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},     \
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   231
\                    Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}    \
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
   232
\                  : set evs)";
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   233
by (parts_induct_tac 1);
3121
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
   234
by (Fake_parts_insert_tac 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   235
by (ALLGOALS (asm_simp_tac (!simpset addsimps [ex_disj_distrib])));
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   236
(*OR3*)
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   237
by (Blast_tac 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   238
qed_spec_mp "NA_Crypt_imp_Server_msg";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   239
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   240
2454
92f43ed48935 Corrected comments
paulson
parents: 2451
diff changeset
   241
(*Corollary: if A receives B's OR4 message then it originated with the Server.
92f43ed48935 Corrected comments
paulson
parents: 2451
diff changeset
   242
  Freshness may be inferred from nonce NA.*)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   243
goal thy 
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   244
 "!!evs. [| Says B' A (Crypt (shrK A) {|NA, Agent A, Agent B, Key K|})  \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   245
\            : set evs;                                                 \
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   246
\           A ~: lost;  evs : otway |]                                  \
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   247
\        ==> EX NB. Says Server B                                       \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   248
\                    {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},  \
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   249
\                      Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
   250
\                   : set evs";
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   251
by (blast_tac (!claset addSIs [NA_Crypt_imp_Server_msg]
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   252
                      addEs  sees_Spy_partsEs) 1);
2331
d6a56ff0d94e Minor renamings
paulson
parents: 2284
diff changeset
   253
qed "A_trusts_OR4";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   254
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   255
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   256
(** Crucial secrecy property: Spy does not see the keys sent in msg OR3
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   257
    Does not in itself guarantee security: an attack could violate 
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   258
    the premises, e.g. by having A=Spy **)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   259
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   260
goal thy 
3543
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   261
 "!!evs. [| A ~: lost;  B ~: lost;  evs : otway |]                 \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   262
\        ==> Says Server B                                         \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   263
\             {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},    \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   264
\               Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}   \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   265
\            : set evs -->                                         \
82f33248d89d Cosmetic changes: margins, indentation, ...
paulson
parents: 3519
diff changeset
   266
\            Says B Spy {|NA, NB, Key K|} ~: set evs -->           \
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   267
\            Key K ~: analz (sees Spy evs)";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   268
by (etac otway.induct 1);
3121
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
   269
by analz_sees_tac;
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   270
by (ALLGOALS
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   271
    (asm_simp_tac (!simpset addcongs [conj_cong] 
3451
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   272
                            addsimps [analz_insert_eq, not_parts_not_analz, 
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   273
				      analz_insert_freshK]
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   274
                            setloop split_tac [expand_if])));
3451
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   275
(*Oops*)
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   276
by (blast_tac (!claset addSDs [unique_session_keys]) 4);
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   277
(*OR4*) 
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   278
by (Blast_tac 3);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   279
(*OR3*)
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   280
by (blast_tac (!claset addSEs sees_Spy_partsEs
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   281
                       addIs [impOfSubs analz_subset_parts]) 2);
3451
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   282
(*Fake*) 
d10f100676d8 Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents: 3207
diff changeset
   283
by (spy_analz_tac 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   284
val lemma = result() RS mp RS mp RSN(2,rev_notE);
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   285
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   286
goal thy 
2516
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   287
 "!!evs. [| Says Server B                                           \
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   288
\              {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},    \
4d68fbe6378b Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents: 2454
diff changeset
   289
\                Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}   \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   290
\             : set evs;                                            \
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   291
\           Says B Spy {|NA, NB, Key K|} ~: set evs;                \
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   292
\           A ~: lost;  B ~: lost;  evs : otway |]                  \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   293
\        ==> Key K ~: analz (sees Spy evs)";
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   294
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1);
2891
d8f254ad1ab9 Calls Blast_tac
paulson
parents: 2837
diff changeset
   295
by (blast_tac (!claset addSEs [lemma]) 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   296
qed "Spy_not_see_encrypted_key";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   297
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   298
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   299
(**** Authenticity properties relating to NB ****)
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
(*If the encrypted message appears then it originated with the Server!*)
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   302
goal thy 
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   303
 "!!evs. [| B ~: lost;  evs : otway |]                                 \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   304
\    ==> Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}                \
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   305
\         : parts (sees Spy evs)                                       \
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   306
\        --> (EX NA. Says Server B                                          \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   307
\                     {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},     \
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   308
\                       Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}    \
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
   309
\                     : set evs)";
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   310
by (parts_induct_tac 1);
3121
cbb6c0c1c58a Conversion to use blast_tac (with other improvements)
paulson
parents: 3102
diff changeset
   311
by (Fake_parts_insert_tac 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   312
by (ALLGOALS (asm_simp_tac (!simpset addsimps [ex_disj_distrib])));
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   313
(*OR3*)
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   314
by (Blast_tac 1);
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   315
qed_spec_mp "NB_Crypt_imp_Server_msg";
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   316
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   317
2454
92f43ed48935 Corrected comments
paulson
parents: 2451
diff changeset
   318
(*Guarantee for B: if it gets a well-formed certificate then the Server
92f43ed48935 Corrected comments
paulson
parents: 2451
diff changeset
   319
  has sent the correct message in round 3.*)
2090
307ebbbec862 Abadi and Needham's variant of Otway-Rees
paulson
parents:
diff changeset
   320
goal thy 
3519
ab0a9fbed4c0 Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents: 3516
diff changeset
   321
 "!!evs. [| B ~: lost;  evs : otway;                                        \
2837
dee1c7f1f576 Trivial renamings (for consistency with CSFW papers)
paulson
parents: 2637
diff changeset
   322
\           Says S' B {|X, Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \
3466
30791e5a69c4 Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents: 3465
diff changeset
   323
\            : set evs |]                                                   \
2106
1a52e2c5897e Generaly tidying up
paulson
parents: 2090
diff changeset
   324
\        ==> EX NA. Says Server B                                           \
2284
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   325
\                     {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|},     \
80ebd1a213fd Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents: 2264
diff changeset
   326
\                       Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|}    \
3465
e85c24717cad set_of_list -> set
nipkow
parents: 3451
diff changeset
   327
\                     : set evs";
3102
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   328
by (blast_tac (!claset addSIs [NB_Crypt_imp_Server_msg]
4d01cdc119d2 Some blast_tac calls; more needed
paulson
parents: 2891
diff changeset
   329
                       addEs  sees_Spy_partsEs) 1);
2331
d6a56ff0d94e Minor renamings
paulson
parents: 2284
diff changeset
   330
qed "B_trusts_OR3";