Chatroom setup
Procedure Chat Initiator Init Input:,
Global
Global
Global
Global
Call Generate Initial Paramters(
) Global
![]()
![]()
Procedure Verify Verifier Generate Init Key
Input: Failed to parse (syntax error): schnorrRandomPoint_{other
Call Verify Verifiers() Global![]()
Call Sign Session and Send(
)
Join
Procedure Join Input:, Failed to parse (syntax error): Nickname_{myId
GlobalGlobal
![]()
Call Generate Initial Paramters(Participant ID
) Global
Call Broadcast(``:3mpCat:3Join:3,
, Failed to parse (syntax error): Nickname_{myId
)
GlobalCall Receive() Global
Call Compute Session Id(
,
,
) Call Sign and Send Key Confirmation and Shares() Call Wait On Receive(``:3mpCat:3KeyConfirmationShare:3) Global
Call Receive() Call Verify Key Confirmations and Signatures(
,
) Call 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 Call Broadcast(``:3mpCat:3Join:3,, Failed to parse (syntax error): Nickname_{myId
)
Call Wait On Receive(``:3mpCat:3Join:3) Global,
Call Receive() Call Update Lists(Failed to parse (syntax error): nick_{NewParticipant
)
GlobalCall Compute Session Id(
,
,
) Call Sign and Send Key Confirmation and Shares() Call Wait On Receive(``:3mpCat:3KeyConfirmationShare:3) Global
Call Receive() Call Verify Key Confirmations and Signatures(
,
) Call Update Session Key() Call Send(
)
Farewell
Procedure Shrink on Leave Input:Remove
from
Global
Call Compute Session Id() \If{
} Call Sign and Send Key Shares() Call Wait On Receive(``:3mpCat:3KeyShare:3)
:= Receive{} Call Update Session Key(
)
Procedure Sign and Send Key Shares Input: GlobalGlobal
![]()
![]()
Call ED25519Sign(
,
|| Failed to parse (syntax error): z_{myId
)
Call Broadcast(``:3mpCat:3KeyShare:3,, Failed to parse (syntax error): keyShare_{myId
)
Send
Procedure Send Input: Message= Call NewKeyShareMessage(MetaMessage)
:= Call AES CTR Encrypt(
,
)
:= Call ED25519Sign(
,
||
)
:= Call Compute Session Digest(
) Call Broadcast(``:3mpCat:3,
,
,
,
,``:3)
Recieve
Procedure Receive Input:,
,
,
Call ED25519VerifySignature(
,
,
) Call Assert(
)
Call AES CTR Decrypt(
,
)
Call UpdateNewKeyStatus(
) Call Verify Digests(
) Return{
}
\subsection{Common functions}
Common functions used by other procedures in different stages
Procedure Generate Initial Paramters Input:![]()
Call RandomBits(256)
Call Ed25519 Scalar(
))
Return
Procedure Verify Key Confirmation and Signatures Input:,
For each
}, do \If{
} Call Halt() ' \If{Call ED25519VerifySignature(
,
,
)' Call 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
![]()
Call ED25519Sign(
,
|| Failed to parse (syntax error): z_{myId
)
Call Broadcast(``:3mpCat:3KeyConfirmationAndShare:3,, Failed to parse (syntax error): keyShare_{myId
)
Procedure Update Session Key Input:
For each
}, do
# recovered
should be equal to its original value Global
Procedure Sign Params Update Session Key Input:,
,
Call Update Session Key()
Call Sign Session and Send(
) Call Broadcast(``:3mpCat:3SignedSessionParameters:3,Failed to parse (syntax error): signature_{myId
)
Procedure ComputeSessionDigest Input:
For each
in Messages Received from
+1 till
}, do
Call SHA-512(
,
) Call LRU Cache Store Digest(
,
) Return
,
,
Global
Global
Global
Global
Call Generate Initial Paramters(
)
Global
![ephemeralPublicPointList:=[y_{{myId}},y_{{other}}]](https://learn.equalit.ie/mathupload/f/1/d/f1dc4f765afd19e840a1823381479e9f.png)
Call Sign Session and Send(
)
Global
Call Receive()
Global
Call Compute Session Id(
,
,
)
Call Sign and Send Key Confirmation and Shares()
Call Wait On Receive(``:3mpCat:3KeyConfirmationShare:3)
Global
Call Receive()
Call Verify Key Confirmations and Signatures(
,
)
Call Update Session Key()
Global 
,
Call Receive()
Call Update Lists(Failed to parse (syntax error): nick_{NewParticipant
)
Remove
Global
}
Call Sign and Send Key Shares()
Call Wait On Receive(``:3mpCat:3KeyShare:3)
:= Receive{}
Call Update Session Key(
Global
Call ED25519Sign(
,
|| Failed to parse (syntax error): z_{myId
= Call NewKeyShareMessage(MetaMessage)
:= Call AES CTR Encrypt(
,
)
:= Call ED25519Sign(
)
,
,
Call ED25519VerifySignature(
,
,
)
Call AES CTR Decrypt(
Call UpdateNewKeyStatus(
)
Return{
}
Call RandomBits(256)
Call Ed25519 Scalar(
))
Return 
}, do
\If{
}
Call Halt()
' \If{Call ED25519VerifySignature(
,
,
# ![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:=SHA-512(z_{{j,j+1}}|j\in [1...n])](https://learn.equalit.ie/mathupload/8/2/4/8242d524676f612dc8d5c136aaa71356.png)

Call Sign Session and Send(
Call SHA-512(