src/HOL/Auth/OtwayRees_AN.thy
author paulson
Fri Dec 13 11:00:44 1996 +0100 (1996-12-13)
changeset 2378 fc103154ad8f
parent 2284 80ebd1a213fd
child 2451 ce85a2aafc7a
permissions -rw-r--r--
Removed needless quotation marks
     1 (*  Title:      HOL/Auth/OtwayRees
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1996  University of Cambridge
     5 
     6 Inductive relation "otway" for the Otway-Rees protocol.
     7 
     8 Simplified version with minimal encryption but explicit messages
     9 
    10 From page 11 of
    11   Abadi and Needham.  Prudent Engineering Practice for Cryptographic Protocols.
    12   IEEE Trans. SE 22 (1), 1996
    13 *)
    14 
    15 OtwayRees_AN = Shared + 
    16 
    17 consts  otway   :: agent set => event list set
    18 inductive "otway lost"
    19   intrs 
    20          (*Initial trace is empty*)
    21     Nil  "[]: otway lost"
    22 
    23          (*The spy MAY say anything he CAN say.  We do not expect him to
    24            invent new nonces here, but he can also use NS1.  Common to
    25            all similar protocols.*)
    26     Fake "[| evs: otway lost;  B ~= Spy;  
    27              X: synth (analz (sees lost Spy evs)) |]
    28           ==> Says Spy B X  # evs : otway lost"
    29 
    30          (*Alice initiates a protocol run*)
    31     OR1  "[| evs: otway lost;  A ~= B;  B ~= Server |]
    32           ==> Says A B {|Agent A, Agent B, Nonce (newN evs)|}
    33                  # evs : otway lost"
    34 
    35          (*Bob's response to Alice's message.  Bob doesn't know who 
    36 	   the sender is, hence the A' in the sender field.*)
    37     OR2  "[| evs: otway lost;  B ~= Server;
    38              Says A' B {|Agent A, Agent B, Nonce NA|} : set_of_list evs |]
    39           ==> Says B Server {|Agent A, Agent B, Nonce NA, Nonce (newN evs)|}
    40                  # evs : otway lost"
    41 
    42          (*The Server receives Bob's message.  Then he sends a new
    43            session key to Bob with a packet for forwarding to Alice.*)
    44     OR3  "[| evs: otway lost;  B ~= Server;  A ~= B;
    45              Says B' Server {|Agent A, Agent B, Nonce NA, Nonce NB|}
    46                : set_of_list evs |]
    47           ==> Says Server B 
    48                {|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key(newK evs)|},
    49                  Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key(newK evs)|}|}
    50               # evs : otway lost"
    51 
    52          (*Bob receives the Server's (?) message and compares the Nonces with
    53 	   those in the message he previously sent the Server.*)
    54     OR4  "[| evs: otway lost;  A ~= B;
    55              Says S B {|X, 
    56                         Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|}
    57                : set_of_list evs;
    58              Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|}
    59                : set_of_list evs |]
    60           ==> Says B A X # evs : otway lost"
    61 
    62          (*This message models possible leaks of session keys.  The nonces
    63            identify the protocol run.  B is not assumed to know shrK A.*)
    64     Oops "[| evs: otway lost;  B ~= Spy;
    65              Says Server B 
    66                       {|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|}, 
    67                         Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|}
    68                : set_of_list evs |]
    69           ==> Says B Spy {|Nonce NA, Nonce NB, Key K|} # evs : otway lost"
    70 
    71 end