scyther-proof-0.3.0: Automatic generation of Isabelle/HOL correctness proofs for security protocols.

Scyther.Protocol

Contents

Description

Security protocol represented as a set of roles which are sequences of send and receive steps.

Synopsis

Types

newtype Id Source

An identifier.

Constructors

Id 

Fields

getId :: String
 

Instances

data Pattern Source

A message pattern.

Constructors

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

newtype Label Source

A label of a role step.

Constructors

Label 

Fields

getLabel :: String
 

data RoleStep Source

A role step.

Constructors

Send Label Pattern

A send step.

Recv Label Pattern

A receive step.

data Role Source

A role of a protocol. Its name has no operational meaning, but is carried along to allow for human readable printing.

Constructors

Role 

data Protocol Source

A protocol. As for roles, its name has no operational meaning, but is carried along to allow for human readable printing.

Constructors

Protocol 

Fields

protoName :: String
 
protoRoles :: [Role]
 

type RoleStepOrder = [((RoleStep, Role), (RoleStep, Role))]Source

An order relation on role steps of a role.

Queries

Patterns

patFMV :: Pattern -> Set IdSource

Free message variables of a pattern.

patFAV :: Pattern -> Set IdSource

Free agent variables of a pattern.

subpatterns :: Pattern -> Set PatternSource

Pattern subterms.

patternparts :: Pattern -> Set PatternSource

Accessible pattern subterms.

splitpatterns :: Pattern -> Set PatternSource

Splitting top-level pairs.

Role Steps

stepPat :: RoleStep -> PatternSource

Pattern of of a role step

stepLabel :: RoleStep -> StringSource

The string label of a role step.

stepFMV :: RoleStep -> Set IdSource

Frees message variables of a role step.

stepFAV :: RoleStep -> Set IdSource

Frees agent variables of a role step.

Roles

roleFMV :: Role -> Set IdSource

Free message variables of a role.

roleFAV :: Role -> Set IdSource

Free agent variables of a role.

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.

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.

sptRole :: Role -> DocSource

Pretty print a role in SP theory format.

sptProtocol :: Protocol -> DocSource

Pretty print a protocol in SP theory format.