This pull request implements the new post-quantum safe PQXDH Key Agreement Protocol.
The PQXDH Key Agreement Protocol is a hybrid protocol building on top of the the classical X3DH Key Agreement protocol. In addition to the three to four Diffie-Hellman steps in X3DH it includes a shared secret calculated using a post-quantum key encapsulation mechanism that has IND-CCA post-quantum security.
The pull request has picked Kyber as the key encapsulation mechanism, the exact Kyber implementation can be found here.
Missing pieces
Warning: This PR is in a early draft stage, while PQXDH is implemented and a higher level Session initialized using the PQXDH Key Agreement Protocol can be established, this PR does not use an AEAD to encrypt messages itself.
The use of an AEAD is required in the PQXDH specification.
Furthermore, encoding the new message types into and from a byte-stream is missing. Generating a Kyber fallback key is not supported as of now. Finally, pickling compatibility with libolm is currently broken.
Tasks
[ ] Pick and use an AEAD to encrypt the individual messages
[ ] Support to encode/decode the new message types into a Protobuf byte-stream
[ ] Fallback key support for Kyber keys
[ ] Fuzzing of the new message types
[ ] Reinstate libolm pickling and unpickling support
The PQXDH Key Agreement Protocol
This pull request implements the new post-quantum safe PQXDH Key Agreement Protocol.
The PQXDH Key Agreement Protocol is a hybrid protocol building on top of the the classical X3DH Key Agreement protocol. In addition to the three to four Diffie-Hellman steps in X3DH it includes a shared secret calculated using a post-quantum key encapsulation mechanism that has IND-CCA post-quantum security.
The pull request has picked Kyber as the key encapsulation mechanism, the exact Kyber implementation can be found here.
Missing pieces
Warning: This PR is in a early draft stage, while PQXDH is implemented and a higher level
Session
initialized using the PQXDH Key Agreement Protocol can be established, this PR does not use an AEAD to encrypt messages itself.The use of an AEAD is required in the PQXDH specification.
Furthermore, encoding the new message types into and from a byte-stream is missing. Generating a Kyber fallback key is not supported as of now. Finally, pickling compatibility with libolm is currently broken.
Tasks