src/HOL/Auth/WooLam.thy
author paulson
Tue Nov 11 11:16:18 1997 +0100 (1997-11-11)
changeset 4198 c63639beeff1
parent 3683 aafe719dff14
child 5434 9b4bed3f394c
permissions -rw-r--r--
Fixed spelling error
paulson@2274
     1
(*  Title:      HOL/Auth/WooLam
paulson@2274
     2
    ID:         $Id$
paulson@2274
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@2274
     4
    Copyright   1996  University of Cambridge
paulson@2274
     5
paulson@2274
     6
Inductive relation "woolam" for the Woo-Lam protocol.
paulson@2274
     7
paulson@2274
     8
Simplified version from page 11 of
paulson@2274
     9
  Abadi and Needham.  Prudent Engineering Practice for Cryptographic Protocols.
paulson@2274
    10
  IEEE Trans. S.E. 22(1), 1996, pages 6-15.
paulson@2274
    11
paulson@2274
    12
Note: this differs from the Woo-Lam protocol discussed by Lowe in his paper
paulson@2274
    13
  Some New Attacks upon Security Protocols.
paulson@2274
    14
  Computer Security Foundations Workshop, 1996.
paulson@2274
    15
*)
paulson@2274
    16
paulson@2274
    17
WooLam = Shared + 
paulson@2274
    18
paulson@3519
    19
consts  woolam  :: event list set
paulson@2283
    20
inductive woolam
paulson@2274
    21
  intrs 
paulson@2274
    22
         (*Initial trace is empty*)
paulson@2283
    23
    Nil  "[]: woolam"
paulson@2274
    24
paulson@2274
    25
         (*The spy MAY say anything he CAN say.  We do not expect him to
paulson@2274
    26
           invent new nonces here, but he can also use NS1.  Common to
paulson@2274
    27
           all similar protocols.*)
paulson@2283
    28
    Fake "[| evs: woolam;  B ~= Spy;  
paulson@3683
    29
             X: synth (analz (spies evs)) |]
paulson@2283
    30
          ==> Says Spy B X  # evs : woolam"
paulson@2274
    31
paulson@2274
    32
         (*Alice initiates a protocol run*)
paulson@3659
    33
    WL1  "[| evs1: woolam;  A ~= B |]
paulson@3659
    34
          ==> Says A B (Agent A) # evs1 : woolam"
paulson@2274
    35
paulson@2274
    36
         (*Bob responds to Alice's message with a challenge.*)
paulson@3659
    37
    WL2  "[| evs2: woolam;  A ~= B;  
paulson@3659
    38
             Says A' B (Agent A) : set evs2 |]
paulson@3659
    39
          ==> Says B A (Nonce NB) # evs2 : woolam"
paulson@2274
    40
paulson@2274
    41
         (*Alice responds to Bob's challenge by encrypting NB with her key.
paulson@2274
    42
           B is *not* properly determined -- Alice essentially broadcasts
paulson@2274
    43
           her reply.*)
paulson@3659
    44
    WL3  "[| evs3: woolam;
paulson@3659
    45
             Says A  B (Agent A)  : set evs3;
paulson@3659
    46
             Says B' A (Nonce NB) : set evs3 |]
paulson@3659
    47
          ==> Says A B (Crypt (shrK A) (Nonce NB)) # evs3 : woolam"
paulson@2274
    48
paulson@3470
    49
         (*Bob forwards Alice's response to the Server.  NOTE: usually
paulson@3470
    50
           the messages are shown in chronological order, for clarity.
paulson@3470
    51
           But here, exchanging the two events would cause the lemma
paulson@3683
    52
           WL4_analz_spies to pick up the wrong assumption!*)
paulson@3659
    53
    WL4  "[| evs4: woolam;  B ~= Server;  
paulson@3659
    54
             Says A'  B X         : set evs4;
paulson@3659
    55
             Says A'' B (Agent A) : set evs4 |]
paulson@3659
    56
          ==> Says B Server {|Agent A, Agent B, X|} # evs4 : woolam"
paulson@2274
    57
paulson@2274
    58
         (*Server decrypts Alice's response for Bob.*)
paulson@3659
    59
    WL5  "[| evs5: woolam;  B ~= Server;
paulson@2283
    60
             Says B' Server {|Agent A, Agent B, Crypt (shrK A) (Nonce NB)|}
paulson@3659
    61
               : set evs5 |]
paulson@2283
    62
          ==> Says Server B (Crypt (shrK B) {|Agent A, Nonce NB|})
paulson@3659
    63
                 # evs5 : woolam"
paulson@2274
    64
paulson@2274
    65
end