src/HOL/Auth/WooLam.thy
author paulson
Thu Nov 28 15:56:04 1996 +0100 (1996-11-28)
changeset 2274 1b1b46adc9b3
child 2283 68829cf138fc
permissions -rw-r--r--
Addition of Woo-Lam protocol
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@2274
    19
consts  woolam   :: "agent set => event list set"
paulson@2274
    20
inductive "woolam lost"
paulson@2274
    21
  intrs 
paulson@2274
    22
         (*Initial trace is empty*)
paulson@2274
    23
    Nil  "[]: woolam lost"
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@2274
    28
    Fake "[| evs: woolam lost;  B ~= Spy;  
paulson@2274
    29
             X: synth (analz (sees lost Spy evs)) |]
paulson@2274
    30
          ==> Says Spy B X  # evs : woolam lost"
paulson@2274
    31
paulson@2274
    32
         (*Alice initiates a protocol run*)
paulson@2274
    33
    WL1  "[| evs: woolam lost;  A ~= B |]
paulson@2274
    34
          ==> Says A B (Agent A) # evs : woolam lost"
paulson@2274
    35
paulson@2274
    36
         (*Bob responds to Alice's message with a challenge.*)
paulson@2274
    37
    WL2  "[| evs: woolam lost;  A ~= B;
paulson@2274
    38
             Says A' B (Agent A) : set_of_list evs |]
paulson@2274
    39
          ==> Says B A (Nonce (newN evs)) # evs : woolam lost"
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@2274
    44
    WL3  "[| evs: woolam lost;  A ~= B;
paulson@2274
    45
             Says B' A (Nonce NB) : set_of_list evs;
paulson@2274
    46
             Says A  B (Agent A)  : set_of_list evs |]
paulson@2274
    47
          ==> Says A B (Crypt (Nonce NB) (shrK A)) # evs : woolam lost"
paulson@2274
    48
paulson@2274
    49
         (*Bob forwards Alice's response to the Server.*)
paulson@2274
    50
    WL4  "[| evs: woolam lost;  B ~= Server;  
paulson@2274
    51
             Says A'  B X         : set_of_list evs;
paulson@2274
    52
             Says A'' B (Agent A) : set_of_list evs |]
paulson@2274
    53
          ==> Says B Server {|Agent A, Agent B, X|} # evs : woolam lost"
paulson@2274
    54
paulson@2274
    55
         (*Server decrypts Alice's response for Bob.*)
paulson@2274
    56
    WL5  "[| evs: woolam lost;  B ~= Server;
paulson@2274
    57
             Says B' Server {|Agent A, Agent B, Crypt (Nonce NB) (shrK A)|}
paulson@2274
    58
               : set_of_list evs |]
paulson@2274
    59
          ==> Says Server B (Crypt {|Agent A, Nonce NB|} (shrK B))
paulson@2274
    60
                 # evs : woolam lost"
paulson@2274
    61
paulson@2274
    62
end