Research Article

High Efficiency Secure Channels for a Secure Multiparty Computation Protocol Based on Signal

Algorithm 1

: The pseudocode of the multireceiver sealed sender (from the rust library code of the Signal protocol).
ENCRYPT(message, R_i):
M = Random(32)
r = KDF(label_r, M, len = 64)
K = KDF(label_K, M, len = 32)
E = DeriveKeyPair(r)
 for i in num_recipients:
  C_i = KDF(label_DH, DH(E, R_i) ||E.public ||R_i.public, len = 32) XOR M
  AT_i = KDF(label_DH_s, DH(S, R_i) ||E.public ||C_i ||S.public ||R_i.public, len = 16)
 ciphertext = AEAD_Encrypt(K, message)
 return E.public, C_i, AT_i, ciphertext
DECRYPT(E.public, C, AT, ciphertext):
 M = KDF(label_DH, DH(E, R) ||E.public ||R.public, len = 32) xor C
 r = KDF(label_r, M, len = 64)
 K = KDF(label_K, M, len = 32)
 E′ = DeriveKeyPair(r)
 if E.public ! = E′.public:
  return DecryptionError
 message = AEAD_Decrypt(K, ciphertext)//includes S.public
 AT′ = KDF(label_DH_s, DH(S, R) ||E.public ||C ||S.public ||R.public, len = 16)
 if AT ! = AT′:
  return DecryptionError
 return message