Changes

MpOTR/algorithm dump

43 bytes added, 9 years ago
/* Common functions used by other procedures in different stages */
'''if''' <math>keyConfirmationList[participant][myId] \neq Hash(k_{myId,participant} , U_{myId} )</math>''', then'''
<span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''Halt</span>'''()
'''else''' '''if''' <span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''ED25519VerifySignature</span>'''(''', then'''{<math>ephemeralPublicKeyList[particicpant]</math>, <math>sessionId ||keyShares[myId]</math>, <math>originAuthSignature</math>} ) = Fail}''', then'''
<span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''Halt</span>'''()
{{algorithm-end}}
 
{{algorithm-begin|name=Compute Session Id}}
{{algorithm-begin|name=Sign and Send Key Confirmation and Share}}
Input: <math>schnorrRandomPointList</math>
'''for each''' <math>participant \in participantList</math>, '''do'''
<math>k_{myId, participant} := Hash(x_{myId}LP_{participant} |lp_{myId}y_{participant} | x_{myId}y_{participant})</math> # Triple DH
<math>kc_{myId} := kc_{myId} | Hash(k_{myId,participant}, U_{participant})</math>
<span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''Broadcast</span>'''(":3mpCat:3KeyConfirmationAndShare:3", <math>myId</math>, <math>keyShare_{myId}</math>, <math>originAuthSignature</math>, <math>kc_{myId}</math>)
{{algorithm-end}}
 
{{algorithm-begin|name=Update Session Key}}
Input: <math>keyShareList</math>
<math>i := myId</math> '''for each''' <math>{j \in [i,...,i+n-1]}</math>, '''do''' <math>z_{j,j+1} := z_{j-1,j} \oplus keyShareListe[j+1]</math> # recovered <math>z_{i-1,i}</math> should be equal to its original value '''global''' <math>sessionKey := Hash(z_{j,j+1} | j \in [1...n])</math>
{{algorithm-end}}
{{algorithm-begin|name=Sign Params Update Session Key}}
Input: <math>toBeSigned</math>, <math>signatureList</math>, <math>keyShareList</math> <span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''Update Session Key</span>'''() <math>toBeSigned := Hash(sessionId, ||Hash(verifierList, ephemeralPublicPointList, keyShareList)))</math> <math>signature_{myId} := </math><span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''Sign Session and Send</span>'''(<math>toBeSigned</math>) <span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''Broadcast</span>'''(":3mpCat:3SignedSessionParameters:3",<math>signature_{myId}</math>)
{{algorithm-end}}
{{algorithm-begin|name=ComputeSessionDigest}}
Input: <math>lastMessage</math>
'''for each''' <math>message</math> in Messages Received from <math>lastDigestedMessage</math>+1 till <math>lastMessage</math>, '''do''' <math>sesionDigest := Hass(sessionDigest, message)</math> <span style="font-family: serif; font-size: larger; font-variant:small-caps;">'''LRU Cache Store Digest</span>'''(<math>sessionDigest</math>, <math>message</math>) '''return''' <math>sessionDigest</math>,<math>lastMessageId</math>
{{algorithm-end}}