Expand description
Protocols for secure key-agreement between two members (“two party”).
Group encryption is concerned around delivering a secure message from a single sender to a whole group with potentially many receivers. To achieve this “broadcast” topology of such system we need to establish secret key material with each member of the group before. This takes places in form of a pair-wise, secure key-agreement protocol between two members of the group.
The “two party secure messaging” key-agreement protocol (2SM) is specified in the paper “Key Agreement for Decentralized Secure Group Messaging with Strong Security Guarantees” (2020).
At its core, the 2SM protocol uses Public-Key Encryption (PKE) to encrypt messages, with frequent key rotation to provide PCS and FS. Initially, each party encrypts messages using the key-bundle input for X3DH. Afterwards, to achieve PCS, each time a party sends a message, it also updates its public key. Finally, to avoid reusing public keys (which would make FS impossible), whenever a party sends a message, it also updates the other party’s public key. To do so, it sends a new secret key along with its message, then deletes its own copy, storing only the public key.
Structs§
- TwoParty
- Two-Party Secure Messaging (2SM) Key Agreement Protocol as specified in the paper “Key Agreement for Decentralized Secure Group Messaging with Strong Security Guarantees” (2020).
- TwoParty
Message - 2SM message to be sent over the network.
- TwoParty
State - State of 2SM session between two members.
- X3dh
Ciphertext - Message containing encrypted payload and X3DH session-data to be delivered from sender to receiver.
Enums§
Functions§
- x3dh_
decrypt - Decrypt message using the X3DH protocol and the secrets of the key material the sender used to encrypt the payload towards us.
- x3dh_
encrypt - Encrypt message towards a receiver using X3DH protocol with their public pre-key material.
Type Aliases§
- Long
Term TwoParty - 2SM protocol with long-term pre-keys (with a specified lifetime).
- OneTime
TwoParty - 2SM protocol with one-time pre-keys.