Security protocol represented as a set of roles which are sequences of send and receive steps.
- newtype Id = Id {}
- data Pattern
- newtype Label = Label {}
- data RoleStep
- data Role = Role {}
- data Protocol = Protocol {
- protoName :: String
- protoRoles :: [Role]
- type RoleStepOrder = [((RoleStep, Role), (RoleStep, Role))]
- patFMV :: Pattern -> Set Id
- patFAV :: Pattern -> Set Id
- subpatterns :: Pattern -> Set Pattern
- patternparts :: Pattern -> Set Pattern
- splitpatterns :: Pattern -> Set Pattern
- stepPat :: RoleStep -> Pattern
- stepLabel :: RoleStep -> String
- stepFMV :: RoleStep -> Set Id
- stepFAV :: RoleStep -> Set Id
- roleFMV :: Role -> Set Id
- roleFAV :: Role -> Set Id
- lookupRoleStep :: String -> Role -> Maybe RoleStep
- wfRole :: Role -> [ProtoIllformedness]
- roleOrd :: Role -> RoleStepOrder
- lookupRole :: String -> Protocol -> Maybe Role
- stateLocale :: Protocol -> String
- restrictedStateLocale :: Protocol -> String
- weakAtomicityLocale :: Protocol -> String
- weakAtomicityInvariant :: Protocol -> String
- labelOrd :: Protocol -> RoleStepOrder
- protoOrd :: Protocol -> RoleStepOrder
- data ProtoIllformedness
- wfProto :: Protocol -> [ProtoIllformedness]
- sptProtoIllformedness :: ProtoIllformedness -> Doc
- isaRoleStep :: IsarConf -> Maybe Role -> RoleStep -> Doc
- sptId :: Id -> Doc
- sptLabel :: Label -> Doc
- sptPattern :: Pattern -> Doc
- sptRoleStep :: Maybe Role -> RoleStep -> Doc
- sptRole :: Role -> Doc
- sptProtocol :: Protocol -> Doc
Types
A message pattern.
PConst Id | A global constant. |
PFresh Id | A message to be freshly generated. |
PAVar Id | An agent variable. |
PMVar Id | A message variable. |
PHash Pattern | Hashing |
PTup Pattern Pattern | Pairing |
PEnc Pattern Pattern | Symmetric or asymmetric encryption (depent on the key). |
PSign Pattern Pattern | A signature to be verified with the given key. |
PSymK Pattern Pattern | A long-term unidirectional symmetric key. |
PShrK Pattern Pattern | A long-term bi-directional symmetric key. |
PAsymPK Pattern | A long-term public key. |
PAsymSK Pattern | A long-term private key |
A label of a role step.
A role step.
A role of a protocol. Its name has no operational meaning, but is carried along to allow for human readable printing.
A protocol. As for roles, its name has no operational meaning, but is carried along to allow for human readable printing.
Protocol | |
|
type RoleStepOrder = [((RoleStep, Role), (RoleStep, Role))]Source
An order relation on role steps of a role.
Queries
Patterns
subpatterns :: Pattern -> Set PatternSource
Pattern subterms.
patternparts :: Pattern -> Set PatternSource
Accessible pattern subterms.
splitpatterns :: Pattern -> Set PatternSource
Splitting top-level pairs.
Role Steps
Roles
lookupRoleStep :: String -> Role -> Maybe RoleStepSource
Find a role step in a role according to its label.
wfRole :: Role -> [ProtoIllformedness]Source
Check if a role is well-formed; i.e., all steps are distinct, no message variable is sent before it is received, and patterns do not contain long-term-keys in accessible positions.
roleOrd :: Role -> RoleStepOrderSource
The order of role steps as they are given in the role.
Protocols
lookupRole :: String -> Protocol -> Maybe RoleSource
Find a role in a protocol according to its name.
stateLocale :: Protocol -> StringSource
The name of the locale assuming a reachable state of the given protocol.
restrictedStateLocale :: Protocol -> StringSource
The name of the locale assuming a reachable state satisfying the axioms of the theory.
weakAtomicityLocale :: Protocol -> StringSource
The name of the locale assuming weak atomicity of the given protocol.
weakAtomicityInvariant :: Protocol -> StringSource
The name of the weak atomicity type invariant of the given protocol.
labelOrd :: Protocol -> RoleStepOrderSource
The order of role steps in the protocol such that every send step is occurs before every receive step having the same label.
protoOrd :: Protocol -> RoleStepOrderSource
The combination of all role orders and the label order of the protocol.
Wellformedness
wfProto :: Protocol -> [ProtoIllformedness]Source
Check if a protocol is well-formed; i.e., all roles are well-formed.
sptProtoIllformedness :: ProtoIllformedness -> DocSource
Pretty print a protocol ill-formedness.
Output
isaRoleStep :: IsarConf -> Maybe Role -> RoleStep -> DocSource
Pretty print a rolestep in ISAR format. If a role is given, then the label of the role step in this role is used to abbreviate the step name.
sptPattern :: Pattern -> DocSource
sptRoleStep :: Maybe Role -> RoleStep -> DocSource
Pretty print a rolestep. If a role is given, then the label of the role step in this role is used to abbreviate the step name.
sptProtocol :: Protocol -> DocSource
Pretty print a protocol in SP theory format.