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: GlobalGlobal
![]()
![]()
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
GlobalGlobal
![]()
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
,
,
Global
Global
Global
Global
)
Global
![ephemeralPublicPointList:=[y_{{myId}},y_{{other}}]](https://learn.equalit.ie/mathupload/f/1/d/f1dc4f765afd19e840a1823381479e9f.png)
,
,
,
,
)
,
Global
Global
)
Global
,
,
)
,
)
Global 
,
)
Global
Remove
Global
, then
:= Receive{}
Global
)
,
,
,
,
,
)

)
Return{
}
))
Return 
}, do
\If{
}
,
,
# ![zip([a,b],[c,d]):=[(a,c),(b,d)]](https://learn.equalit.ie/mathupload/d/a/3/da318a8a8f2f71fda08564297e83c4b3.png)
,
,
# Triple DH

)

# recovered
should be equal to its original value
Global ![sessionKey:=Hash(z_{{j,j+1}}|j\in [1...n])](https://learn.equalit.ie/mathupload/9/1/1/91146cf10f6a4009ef7e391b118ed09c.png)


)
