MpOTR/algorithm dump
Contents
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
Global Global Call Generate Initial Paramters(Participant ID ) Global Call Broadcast(``:3mpCat:3Join:3, , Failed to parse (syntax error): Nickname_{myId
)
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()
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
)
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() 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: Global Global 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
Global Global
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 ,