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

Scyther.Message

Contents

Description

The actual messages being sent and received over the network are always ground. Here we develop a representation of the denotations of actual messages that may occur during a security proof. This involves symbolically instantiated variables and symbolically inverted keys.

Synopsis

Messages

newtype TID Source

A logical variable for a thread identifier. Note that these are the only free logical variables being used during proofs. Depending on their context they are either universally or existentially quantified.

Constructors

TID 

Fields

getTID :: Int
 

newtype LocalId Source

A local identifier.

Constructors

LocalId 

Fields

getLocalId :: (Id, TID)
 

newtype Fresh Source

A fresh message.

Constructors

Fresh 

Fields

getFresh :: LocalId
 

newtype AVar Source

An agent variable.

Constructors

AVar 

Fields

getAVar :: LocalId
 

newtype MVar Source

A message variable.

Constructors

MVar 

Fields

getMVar :: LocalId
 

newtype AgentId Source

An agent name identifier

Constructors

AgentId 

Fields

agentId :: Int
 

data Message Source

Denotations of messages as they occurr during reasoning. Note that we do not model agents, as in the proofs that we want to do no actual agent reference will be needed.

Note: This is no free algebra due to the nested equalities on thread identifiers and the key-inversion function. However, there is still a most general unifier. The easiest way to understand these messages is to map them to the corresponding Isabelle proof states.

Constructors

MConst Id

A global constant.

MFresh Fresh

A freshly generated message.

MAVar AVar

A symbolically instantiated agent variable.

MMVar MVar

A symbolically instantiated message variable;

MAgent AgentId

Some agent name MVar (LocalId (Id "v", TID 1)) corresponds to s(|MV ''v'' tid1|).

MHash Message

Hashing

MTup Message Message

Pairing

MEnc Message Message

Encryption or signing depending on the key (the second argument)

MSymK Message Message

A long-term uni-directional symmetric key

MShrK Message Message

A long-term bi-directional symmetric key.

MAsymPK Message

A long-term asymmetric public key.

MAsymSK Message

A long-term asymmetric private key.

MInvKey Message

An application of the key inversion function.

Queries

lidId :: LocalId -> IdSource

Identifier of a local id.

lidTID :: LocalId -> TIDSource

Thread identifier of a local id.

avarTID :: AVar -> TIDSource

The thread corresponding to an agent variable

mvarTID :: MVar -> TIDSource

The thread corresponding to an message variable

msgFMV :: Message -> [MVar]Source

Free message variables of a message.

msgFresh :: Message -> [Fresh]Source

Fresh messages of a message.

msgAgentIds :: Message -> [AgentId]Source

Agent identifiers of a message.

msgTIDs :: Message -> [TID]Source

Thread identifiers of a message.

trivial :: Message -> BoolSource

A message is trivial iff it is a tuple or it is guaranteed to be in the initial intruder knowledge (i.e., global constants and agent variables).

PRE: Message must be normalized.

submessages :: Message -> Set MessageSource

The submessages of message.

messageparts :: Message -> Set MessageSource

The accessible submessages of message.

Construction/Transformation

inst :: TID -> Pattern -> MessageSource

Instantiate a pattern to a message. Variables are instantiated symbolically. The resulting message is guaranteed to be normalized w.r.t normMsg.

normMsg :: Message -> MessageSource

Normalize a message; i.e., apply key-inversion if possible and swap shared key arguments, if required.

splitNonTrivial :: Message -> [Message]Source

Splits a message into the list of non-trivial messages accessible using projection only.

Postcondition: All messages in the list are non-trivial.

Output