src/HOL/Auth/WooLam.thy
author paulson
Fri Jan 17 12:49:31 1997 +0100 (1997-01-17)
changeset 2516 4d68fbe6378b
parent 2451 ce85a2aafc7a
child 3465 e85c24717cad
permissions -rw-r--r--
Now with Andy Gordon's treatment of freshness to replace newN/K
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@2283
    19
consts  lost    :: agent set        (*No need for it to be a variable*)
paulson@2283
    20
	woolam  :: event list set
paulson@2283
    21
inductive woolam
paulson@2274
    22
  intrs 
paulson@2274
    23
         (*Initial trace is empty*)
paulson@2283
    24
    Nil  "[]: woolam"
paulson@2274
    25
paulson@2274
    26
         (*The spy MAY say anything he CAN say.  We do not expect him to
paulson@2274
    27
           invent new nonces here, but he can also use NS1.  Common to
paulson@2274
    28
           all similar protocols.*)
paulson@2283
    29
    Fake "[| evs: woolam;  B ~= Spy;  
paulson@2274
    30
             X: synth (analz (sees lost Spy evs)) |]
paulson@2283
    31
          ==> Says Spy B X  # evs : woolam"
paulson@2274
    32
paulson@2274
    33
         (*Alice initiates a protocol run*)
paulson@2283
    34
    WL1  "[| evs: woolam;  A ~= B |]
paulson@2283
    35
          ==> Says A B (Agent A) # evs : woolam"
paulson@2274
    36
paulson@2274
    37
         (*Bob responds to Alice's message with a challenge.*)
paulson@2516
    38
    WL2  "[| evs: woolam;  A ~= B;  
paulson@2274
    39
             Says A' B (Agent A) : set_of_list evs |]
paulson@2516
    40
          ==> Says B A (Nonce NB) # evs : woolam"
paulson@2274
    41
paulson@2274
    42
         (*Alice responds to Bob's challenge by encrypting NB with her key.
paulson@2274
    43
           B is *not* properly determined -- Alice essentially broadcasts
paulson@2274
    44
           her reply.*)
paulson@2283
    45
    WL3  "[| evs: woolam;  A ~= B;
paulson@2516
    46
             Says A  B (Agent A)  : set_of_list evs;
paulson@2516
    47
             Says B' A (Nonce NB) : set_of_list evs |]
paulson@2283
    48
          ==> Says A B (Crypt (shrK A) (Nonce NB)) # evs : woolam"
paulson@2274
    49
paulson@2274
    50
         (*Bob forwards Alice's response to the Server.*)
paulson@2283
    51
    WL4  "[| evs: woolam;  B ~= Server;  
paulson@2274
    52
             Says A'  B X         : set_of_list evs;
paulson@2274
    53
             Says A'' B (Agent A) : set_of_list evs |]
paulson@2283
    54
          ==> Says B Server {|Agent A, Agent B, X|} # evs : woolam"
paulson@2274
    55
paulson@2274
    56
         (*Server decrypts Alice's response for Bob.*)
paulson@2283
    57
    WL5  "[| evs: woolam;  B ~= Server;
paulson@2283
    58
             Says B' Server {|Agent A, Agent B, Crypt (shrK A) (Nonce NB)|}
paulson@2274
    59
               : set_of_list evs |]
paulson@2283
    60
          ==> Says Server B (Crypt (shrK B) {|Agent A, Nonce NB|})
paulson@2283
    61
                 # evs : woolam"
paulson@2274
    62
paulson@2274
    63
end