Chatroom setup
Procedure Chatroom Init
Input: ,
Global
Global
Global
Global Generate Initial Paramters()
Global
Procedure Verify Verifier Generate Init Key Input: , , , , Verify Verifiers() Global Sign Session and Send()
Join
Procedure Join Input: , , Global Global Generate Initial Paramters(Participant ID ) Global Broadcast(":3mpCat:3Join:3", , , ) Global Receive() Global Compute Session Id(, , ) Sign and Send Key Confirmation and Shares() Wait On Receive(":3mpCat:3KeyConfirmationShare:3") Global Receive() Verify Key Confirmations and Signatures(, ) Update Session Key()
Procedure Receive Session Digest Input: Global
Protocol for other participants already in the chat to accept the newcomer
Procedure Accept Input: newParticipant Broadcast(":3mpCat:3Join:3", , , ) Wait On Receive(":3mpCat:3Join:3") Global , Receive() Update Lists(, ) Global Compute Session Id(, , ) Sign and Send Key Confirmation and Shares() Wait On Receive(":3mpCat:3KeyConfirmationShare:3") Global Receive() Verify Key Confirmations and Signatures(, ) Update Session Key() Send()
Farewell
Procedure Shrink on Leave Input: Remove from Global Compute Session Id() If, then Sign and Send Key Shares() Wait On Receive(":3mpCat:3KeyShare:3") := Receive{} Update Session Key()
Procedure Sign and Send Key Shares Input: Global Global ED25519Sign(, || ) Broadcast(":3mpCat:3KeyShare:3", , , )
Send
Procedure Send Input: Message}{MetaMessage, message = NewKeyShareMessage(MetaMessage) := AES CTR Encrypt(,) := ED25519Sign(, || ) := Compute Session Digest() Broadcast(":3mpCat:3", , , , ,":3")
Recieve
Procedure Receive Input: , , , ED25519VerifySignature(, , ) Assert() AES CTR Decrypt(, ) UpdateNewKeyStatus() Verify Digests() Return{}
\subsection{Common functions}
Common functions used by other procedures in different stages
Procedure Generate Initial Paramters Input: RandomBits(256) Ed25519 Scalar()) Return
Procedure Verify Key Confirmation and Signatures Input: , For each }, do \If{} Halt() ' \If{ ED25519VerifySignature(, , )' Halt()
Procedure Compute Session Id Input: , Return #
Procedure Verify Signatures Input: ,,
Procedure Sign and Send Key Confirmation and Share Input: For each , do # Triple DH
Global Global
ED25519Sign(, || ) Broadcast(":3mpCat:3KeyConfirmationAndShare:3", , , , )
Procedure Update Session Key Input:
For each }, do
# recovered should be equal to its original value Global
Procedure Sign Params Update Session Key Input: , , Update Session Key() Sign Session and Send() Broadcast(":3mpCat:3SignedSessionParameters:3",)
Procedure ComputeSessionDigest Input:
For each in Messages Received from +1 till }, do
Hash(, ) LRU Cache Store Digest(, ) Return ,