The tests are configured in the file config.json
.
TODO: Describe the header and test vectors
The configuration file can specify a number of scripts
. Each script describes a particular scenario of a group's evolution, specified as a sequence of actions (e.g. sending a proposal).
Each action is performed by an actor (e.g. alice). At each point in time, each actor has at most one MLS client who participates in at most one MLS session. A client and a session for an actor are created in one of two ways:
- When the actor executes the
createGroup
action, a client with a session is created. - When the actor executes the
createKeyPackage
action, a client without a session is created. When later the actor executes the joinGroup action, a session for the client is created.
Note: Creating a new client / session silently overwrites the first one.
Each action must specify two values: action
indicating the action type (e.g. removeProposal
) and actor
identifying the actor performing the action. Some actions require additional values, e.g., the leaf index of a removed member or a pointer to a packet generated as a result of a previous action. A pointers to the outcome of a previous action is always its index in the sequence of all actions in the given script.
The outputs of all actions are logged in the transcript. They can be either packets packets sent to the delivery service (logged as hex-encoded bytes) or values outputted to the user (stored as strings). The transcript is printed to STDOUT.
The following actions are supported.
action |
Values specified by the action in addition to actor and action |
Output values stored in the transcript | Description |
---|---|---|---|
createGroup |
- | - | A new client for the actor and a new group with themselves in it are created. |
createKeyPackage |
- | keyPackage : packet |
A new client for the actor and a new key package for them are created. |
addProposal |
keyPackage : int |
proposal : packet |
The actor ’s current client sends a proposal that adds a member with the key package created during the createKeyPackage action with index keyPackage . |
removeProposal |
removed : string |
proposal : packet |
The actor ’s current client sends a proposal that removes the actor indicated in removed . |
updateProposal |
- | proposal : packet |
The actor ’s current client sends an update. |
commit |
byReference : []int |
commit : packet, welcome : packet |
The actor ’s current client first processes the proposals created during actions identified by the indices in the list byReference and then they send a commit. The byReference list MUST NOT include proposals from actor (those should be committed automatically). |
handleCommit |
commit : int, byReference : []int |
stateUpdate (see below) |
The actor ’s current client first processes the proposals created during actions with indices specified in byReference . Then it processes the commit created during the commit action with index commit which includes them by reference. The byReference list MUST NOT include proposals created by actor . The commit MUST NOT have been created by actor . |
handlePendingCommit |
- | stateUpdate (see below) |
The actor ’s current client accepts the commit it sent. |
joinGroup |
welcome : int |
[TODO] | The actor ’s current client joins the group using the welcome message created during the commit action index welcome . This creates a new session. |
protect |
applicationData : string |
ciphertext : packet |
The actor ’s current client encrypts given data, given as b64 encoded bytes. |
unprotect |
ciphertext : int |
applicationData : hex encoded bytes |
The actor ’s current client decrypts the ciphertext created during the protect action with index ciphertext . The message MUST NOT have been generated by the actor. |
A stateUpdate
outputted after processing a commit is a list consisting of zero or more of the following items. Here i
is always an integer used to make keys unique.
- Key
added[i]
, valueleafIndex
denotes that a member was added and now has givenleafIndex
. - Key
updated[i]
, valueleafIndex
denotes that an update from a member with givenleafIndex
was applied. - Key
removedIndex[i]
, valueleafIndex
followed by keyremovedLeaf[i]
, valueleafNode
denotes that a member who had givenleafIndex
was removed and his leaf node (no longer in the tree) used to beleafNode
(represented as TLS-serialized hex-encoded bytes). - Key
psks[i]
, valuepskId
denotes that a PSK with givenpskId
was mixed into the key schedule. The valuepskId
includes all data fromPreSharedKeyID
exceptnonce
. It is TLS-serialized and hex-encoded.