RCIG_Coordination_Repo icon indicating copy to clipboard operation
RCIG_Coordination_Repo copied to clipboard

Awesome Rust Cryptography: Should Double Ratchet algorithms be added to the Transport Encryption Libraries section

Open potto216 opened this issue 1 year ago • 6 comments

Should Double Ratchet algorithms and other secure message exchange algorithms be added to the Transport Encryption Libraries section? Besides the Signal Rust code for the Double Ratchet algorithms the two most active crates I've found are:

  1. double-ratchet-signal v0.1.3
  2. double-ratchet-rs v0.4.6 Neither appear to have been audited.

Thanks, Paul

potto216 avatar Sep 20 '24 10:09 potto216

I'd think of them more like E2EE messaging libraries. We don't have a section for that but there are many things we could potentially put under there if we did.

tarcieri avatar Sep 20 '24 16:09 tarcieri

I also think messaging libraries would be a valuable section, especially for investigating solutions for low data rate wireless messaging systems where post quantum algorithms' larger data requirements may require a suite of options.

What would the next step be? Work with others on defining the section?

potto216 avatar Sep 20 '24 21:09 potto216

If you want to add a messaging section, it might be helpful to enumerate other mature messaging-related libraries, like OpenMLS

tarcieri avatar Oct 19 '24 18:10 tarcieri

Okay great, I'll work on that this week and submit a PR with edits to https://github.com/The-DevX-Initiative/RCIG_Coordination_Repo/blob/main/Awesome_Rust_Cryptography.md unless there is a different procedure.

potto216 avatar Oct 19 '24 19:10 potto216

@tarcieri what are your thoughts on the following?

Secure Messaging Protocols

This section is for secure messaging protocols that share the common properties of transferring messages in a framework with end-to-end encryption (E2EE) perfect forward secrecy, and post-compromise security. The algorithms I would include (assuming I can find the Rust implementations) are:

  • Signal protocol: Used in applications such as WhatsApp, Signal. The protocol uses the Double Ratchet algorithm for confidentiality and integrity along with perfect forward secrecy, and post-compromise security. Also supports authentication with Extended Triple Diffie-Hellman handshake.

  • Off-the-Record (OTR): an early secure messaging protocols that provides encryption, authentication, deniability, and forward secrecy. It was widely used in instant messaging clients before protocols like Signal.

  • Messaging Layer Security (MLS) RFC 9420: designed for secure group messaging with forward secrecy, post-compromise security, and deniable authentication.

  • Matrix’s Olm/Megolm: a decentralized secure messaging protocol used by Matrix. Olm is used for one-to-one messaging, while Megolm handles group messaging.

  • Matter protocol: Although this is for IoT devices it is a secure application layer message protocol that supports encryption, authentication, and privacy.

I would not include connectionless VPN protocols like [WireGuard] (https://www.wireguard.com/protocol/) or underlying protocols like Noise.

I'm not sure about secure protocol pairs like the Constrained Application Protocol CoAP using Datagram Transport Layer Security [DTLS] (https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security) for end-to-end security. It is message like with its RESTFul interface but CoAP requires an underlying protocol to be secure.

potto216 avatar Oct 20 '24 13:10 potto216

This resource is a list of Rust crates/libraries that implement protocols, not just a generic overview of protocols.

So it should be e.g. OpenMLS and mls-rs, not just information about MLS as a protocol

tarcieri avatar Oct 20 '24 13:10 tarcieri

Thanks. Below is what I propose adding the Awesome Rust page. The entries are tied to active crates. MLS is included even though it is already listed under the Transport Encryption Libraries.

Secure Messaging Protocols

This section is for secure messaging protocols that transfer messages with end-to-end encryption (E2EE) and may use perfect forward secrecy and post-compromise security.

  • OpenMLS: Messaging Layer Security (MLS) protocol designed for secure group messaging with forward secrecy, post-compromise security, and deniable authentication RFC 9420.
  • Matter protocol: A secure application layer message protocol for devices, particularly home automation devices, that supports encryption, authentication, and privacy.
  • vodozemac is an implementation of Olm (Double Ratchet) and Megolm cryptographic ratchets used in message based protocols.

potto216 avatar Nov 09 '24 18:11 potto216

@potto216 sure, looks good. Maybe mention mls-rs too?

tarcieri avatar Nov 09 '24 20:11 tarcieri

@tarcieri -- updated. What is the next step if there are no other edits I should make?

Secure Messaging Protocols

This section is for secure messaging protocols that transfer messages with end-to-end encryption (E2EE) and may use perfect forward secrecy and post-compromise security.

  • OpenMLS: IETF Messaging Layer Security (MLS) protocol designed for secure group messaging with forward secrecy, post-compromise security, and deniable authentication RFC 9420.
  • mls-rs: IETF MLS protocol library that has been validated for conformance to the RFC 9420 specification but has not yet received a full security audit by a 3rd party.
  • Matter protocol: A secure application layer message protocol for devices, particularly home automation devices, that supports encryption, authentication, and privacy.
  • vodozemac is an implementation of Olm (Double Ratchet) and Megolm cryptographic ratchets used in message based protocols. This crate has received one security audit by Least Authority, with no significant findings.

potto216 avatar Nov 10 '24 21:11 potto216

Looks good. Can you open a PR to modify Awesome_Rust_Cryptography.md?

tarcieri avatar Nov 12 '24 20:11 tarcieri

@tarcieri do I need to make any changes to the PR or request a reviewer?

potto216 avatar Dec 28 '24 16:12 potto216

@potto216 I have a very large backlog of PRs to review. Please give me some time.

tarcieri avatar Jan 03 '25 18:01 tarcieri