src/HOL/Auth/WooLam.thy
author paulson
Thu, 28 Nov 1996 15:56:04 +0100
changeset 2274 1b1b46adc9b3
child 2283 68829cf138fc
permissions -rw-r--r--
Addition of Woo-Lam protocol
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2274
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     1
(*  Title:      HOL/Auth/WooLam
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     2
    ID:         $Id$
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     4
    Copyright   1996  University of Cambridge
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     5
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     6
Inductive relation "woolam" for the Woo-Lam protocol.
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     7
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     8
Simplified version from page 11 of
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
     9
  Abadi and Needham.  Prudent Engineering Practice for Cryptographic Protocols.
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    10
  IEEE Trans. S.E. 22(1), 1996, pages 6-15.
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    11
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    12
Note: this differs from the Woo-Lam protocol discussed by Lowe in his paper
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    13
  Some New Attacks upon Security Protocols.
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    14
  Computer Security Foundations Workshop, 1996.
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    15
*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    16
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    17
WooLam = Shared + 
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    18
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    19
consts  woolam   :: "agent set => event list set"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    20
inductive "woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    21
  intrs 
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    22
         (*Initial trace is empty*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    23
    Nil  "[]: woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    24
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    25
         (*The spy MAY say anything he CAN say.  We do not expect him to
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    26
           invent new nonces here, but he can also use NS1.  Common to
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    27
           all similar protocols.*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    28
    Fake "[| evs: woolam lost;  B ~= Spy;  
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    29
             X: synth (analz (sees lost Spy evs)) |]
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    30
          ==> Says Spy B X  # evs : woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    31
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    32
         (*Alice initiates a protocol run*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    33
    WL1  "[| evs: woolam lost;  A ~= B |]
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    34
          ==> Says A B (Agent A) # evs : woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    35
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    36
         (*Bob responds to Alice's message with a challenge.*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    37
    WL2  "[| evs: woolam lost;  A ~= B;
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    38
             Says A' B (Agent A) : set_of_list evs |]
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    39
          ==> Says B A (Nonce (newN evs)) # evs : woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    40
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    41
         (*Alice responds to Bob's challenge by encrypting NB with her key.
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    42
           B is *not* properly determined -- Alice essentially broadcasts
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    43
           her reply.*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    44
    WL3  "[| evs: woolam lost;  A ~= B;
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    45
             Says B' A (Nonce NB) : set_of_list evs;
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    46
             Says A  B (Agent A)  : set_of_list evs |]
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    47
          ==> Says A B (Crypt (Nonce NB) (shrK A)) # evs : woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    48
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    49
         (*Bob forwards Alice's response to the Server.*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    50
    WL4  "[| evs: woolam lost;  B ~= Server;  
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    51
             Says A'  B X         : set_of_list evs;
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    52
             Says A'' B (Agent A) : set_of_list evs |]
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    53
          ==> Says B Server {|Agent A, Agent B, X|} # evs : woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    54
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    55
         (*Server decrypts Alice's response for Bob.*)
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    56
    WL5  "[| evs: woolam lost;  B ~= Server;
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    57
             Says B' Server {|Agent A, Agent B, Crypt (Nonce NB) (shrK A)|}
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    58
               : set_of_list evs |]
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    59
          ==> Says Server B (Crypt {|Agent A, Nonce NB|} (shrK B))
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    60
                 # evs : woolam lost"
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    61
1b1b46adc9b3 Addition of Woo-Lam protocol
paulson
parents:
diff changeset
    62
end