src/HOL/Auth/Public.thy
author paulson
Thu, 18 Sep 1997 13:24:04 +0200
changeset 3683 aafe719dff14
parent 3519 ab0a9fbed4c0
child 5183 89f162de39cf
permissions -rw-r--r--
Global change: lost->bad and sees Spy->spies First change just gives a more sensible name. Second change eliminates the agent parameter of "sees" to simplify definitions and theorems

(*  Title:      HOL/Auth/Public
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1996  University of Cambridge

Theory of Public Keys (common to all public-key protocols)

Private and public keys; initial states of agents
*)

Public = Event + 

consts
  pubK    :: agent => key

syntax
  priK    :: agent => key

translations  (*BEWARE! expressions like  (inj priK)  will NOT work!*)
  "priK x"  == "invKey(pubK x)"

primrec initState agent
        (*Agents know their private key and all public keys*)
  initState_Server  "initState Server     =    
 		         insert (Key (priK Server)) (Key `` range pubK)"
  initState_Friend  "initState (Friend i) =    
 		         insert (Key (priK (Friend i))) (Key `` range pubK)"
  initState_Spy     "initState Spy        =    
 		         (Key``invKey``pubK``bad) Un (Key `` range pubK)"


rules
  (*Public keys are disjoint, and never clash with private keys*)
  inj_pubK        "inj pubK"
  priK_neq_pubK   "priK A ~= pubK B"

end