src/HOL/Auth/WooLam.thy
author paulson
Mon Jul 14 12:47:21 1997 +0200 (1997-07-14)
changeset 3519 ab0a9fbed4c0
parent 3481 256f38c01b98
child 3659 eddedfe2f3f8
permissions -rw-r--r--
Changing "lost" from a parameter of protocol definitions to a constant.

Advantages: no "lost" argument everywhere; fewer Vars in subgoals;
less need for specially instantiated rules
Disadvantage: can no longer prove "Agent_not_see_encrypted_key", but this
theorem was never used, and its original proof was also broken
the introduction of the "Notes" constructor.
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@3519
    19
consts  woolam  :: event list set
paulson@2283
    20
inductive woolam
paulson@2274
    21
  intrs 
paulson@2274
    22
         (*Initial trace is empty*)
paulson@2283
    23
    Nil  "[]: woolam"
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@2283
    28
    Fake "[| evs: woolam;  B ~= Spy;  
paulson@3519
    29
             X: synth (analz (sees Spy evs)) |]
paulson@2283
    30
          ==> Says Spy B X  # evs : woolam"
paulson@2274
    31
paulson@2274
    32
         (*Alice initiates a protocol run*)
paulson@2283
    33
    WL1  "[| evs: woolam;  A ~= B |]
paulson@2283
    34
          ==> Says A B (Agent A) # evs : woolam"
paulson@2274
    35
paulson@2274
    36
         (*Bob responds to Alice's message with a challenge.*)
paulson@2516
    37
    WL2  "[| evs: woolam;  A ~= B;  
nipkow@3465
    38
             Says A' B (Agent A) : set evs |]
paulson@2516
    39
          ==> Says B A (Nonce NB) # evs : woolam"
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@3481
    44
    WL3  "[| evs: woolam;
nipkow@3465
    45
             Says A  B (Agent A)  : set evs;
nipkow@3465
    46
             Says B' A (Nonce NB) : set evs |]
paulson@2283
    47
          ==> Says A B (Crypt (shrK A) (Nonce NB)) # evs : woolam"
paulson@2274
    48
paulson@3470
    49
         (*Bob forwards Alice's response to the Server.  NOTE: usually
paulson@3470
    50
           the messages are shown in chronological order, for clarity.
paulson@3470
    51
           But here, exchanging the two events would cause the lemma
paulson@3470
    52
           WL4_analz_sees_Spy to pick up the wrong assumption!*)
paulson@2283
    53
    WL4  "[| evs: woolam;  B ~= Server;  
nipkow@3465
    54
             Says A'  B X         : set evs;
nipkow@3465
    55
             Says A'' B (Agent A) : set evs |]
paulson@2283
    56
          ==> Says B Server {|Agent A, Agent B, X|} # evs : woolam"
paulson@2274
    57
paulson@2274
    58
         (*Server decrypts Alice's response for Bob.*)
paulson@2283
    59
    WL5  "[| evs: woolam;  B ~= Server;
paulson@2283
    60
             Says B' Server {|Agent A, Agent B, Crypt (shrK A) (Nonce NB)|}
nipkow@3465
    61
               : set evs |]
paulson@2283
    62
          ==> Says Server B (Crypt (shrK B) {|Agent A, Nonce NB|})
paulson@2283
    63
                 # evs : woolam"
paulson@2274
    64
paulson@2274
    65
end