src/HOL/Auth/Event.thy
changeset 1933 8b24773de6db
parent 1930 cdf9bcd53749
child 1942 6c9c1a42a869
     1.1 --- a/src/HOL/Auth/Event.thy	Wed Aug 21 11:43:37 1996 +0200
     1.2 +++ b/src/HOL/Auth/Event.thy	Wed Aug 21 13:22:23 1996 +0200
     1.3 @@ -82,9 +82,6 @@
     1.4    isSym_newK "isSymKey (newK evs)"
     1.5  
     1.6  
     1.7 -(*NS3 DOESN'T ALLOW INTERLEAVING -- that is, it only responds to the
     1.8 -  MOST RECENT message.*)
     1.9 -
    1.10  (*Needham-Schroeder Shared-Key protocol (from BAN paper, page 247)*)
    1.11  consts  traces   :: "event list set"
    1.12  inductive traces
    1.13 @@ -105,7 +102,8 @@
    1.14  
    1.15           (*Server's response to Alice's message.
    1.16             !! It may respond more than once to A's request !!
    1.17 -	   We can't trust the sender field, hence the A' in it.*)
    1.18 +	   Server doesn't know who the true sender is, hence the A' in
    1.19 +               the sender field.*)
    1.20      NS2  "[| evs: traces;  A ~= B;  A ~= Server;
    1.21               (Says A' Server {|Agent A, Agent B, Nonce NA|}) : set_of_list evs
    1.22            |] ==> (Says Server A 
    1.23 @@ -123,8 +121,18 @@
    1.24               (Says A Server {|Agent A, Agent B, Nonce NA|}) : set_of_list evs
    1.25            |] ==> (Says A B X) # evs : traces"
    1.26  
    1.27 +         (*Bob's nonce exchange.  He does not know who the message came
    1.28 +           from, but responds to A because she is mentioned inside.*)
    1.29      NS4  "[| evs: traces;  A ~= B;  
    1.30               (Says A' B (Crypt {|Key K, Agent A|} (serverKey B))) 
    1.31                 : set_of_list evs
    1.32            |] ==> (Says B A (Crypt (Nonce (newN evs)) K)) # evs : traces"
    1.33 +
    1.34 +         (*Alice responds with (Suc N), if she has seen the key before.*)
    1.35 +    NS5  "[| evs: traces;  A ~= B;  
    1.36 +             (Says B' A (Crypt (Nonce N) K)) : set_of_list evs;
    1.37 +             (Says S  A (Crypt {|Nonce NA, Agent B, Key K, X|} (serverKey A))) 
    1.38 +               : set_of_list evs
    1.39 +          |] ==> (Says A B (Crypt (Nonce (Suc N)) K)) # evs : traces"
    1.40 +
    1.41  end