Double Ratchet Algorithm
In cryptography, the Double Ratchet Algorithm (previously referred to as the Axolotl Ratchet[1][2]) is a key management algorithm that was developed by Trevor Perrin and Moxie Marlinspike in 2013. It can be used as part of a cryptographic protocol to provide end-to-end encryption for instant messaging. After an initial key exchange it manages the ongoing renewal and maintenance of short-lived session keys. It combines a cryptographic so-called "ratchet" based on the Diffie–Hellman key exchange (DH) and a ratchet based on a key derivation function (KDF), such as a hash function, and is therefore called a double ratchet.
The algorithm provides forward secrecy for messages, and implicit renegotiation of forward keys; properties for which the protocol is named.[3]
History
The Double Ratchet Algorithm was developed by Trevor Perrin and Moxie Marlinspike (Open Whisper Systems) in 2013 and introduced as part of the Signal Protocol in February 2014. The Double Ratchet Algorithm's design is based on the DH ratchet that was introduced by Off-the-Record Messaging (OTR) and combines it with a symmetric-key ratchet modeled after the Silent Circle Instant Messaging Protocol (SCIMP). The ratchet was initially named after the critically endangered aquatic salamander axolotl, which has extraordinary self-healing capabilities.[4] In March 2016, the developers renamed the Axolotl Ratchet as the Double Ratchet Algorithm to better differentiate between the ratchet and the full protocol,[2] because some had used the name Axolotl when referring to the Signal Protocol.[5][2]
Overview
The Double Ratchet Algorithm features properties that have been commonly available in end-to-end encryption systems for a long time: encryption of contents on the entire way of transport as well as authentication of the remote peer and protection against manipulation of messages. As a hybrid of DH and KDF ratchets, it combines several desired features of both principles. From OTR messaging it takes the properties of forward secrecy and automatically reestablishing secrecy in case of compromise of a session key, forward secrecy with a compromise of the secret persistent main key, and plausible deniability for the authorship of messages. Additionally, it enables session key renewal without interaction with the remote peer by using secondary KDF ratchets. An additional key-derivation step is taken to enable retaining session keys for out-of-order messages without endangering the following keys.
It is said[by whom?] to detect reordering, deletion, and replay of sent messages, and improve forward secrecy properties against passive eavesdropping in comparison to OTR messaging.
Combined with public key infrastructure for the retention of pregenerated one-time keys (prekeys), it allows for the initialization of messaging sessions without the presence of the remote peer (asynchronous communication). The usage of triple Diffie–Hellman key exchange (3-DH) as initial key exchange method improves the deniability properties. An example of this is the Signal Protocol, which combines the Double Ratchet Algorithm, prekeys, and a 3-DH handshake.[6] The protocol provides confidentiality, integrity, authentication, participant consistency, destination validation, forward secrecy, backward secrecy (aka future secrecy), causality preservation, message unlinkability, message repudiation, participation repudiation, and asynchronicity.[7] It does not provide anonymity preservation, and requires servers for the relaying of messages and storing of public key material.[7]
Functioning
A client attempts to renew session key material interactively with the remote peer using a Diffie-Hellman (DH) ratchet. If this is impossible, the clients renew the session key independently using a hash ratchet. With every message, a client advances one of two hash ratchets—one for sending and one for receiving. These two hash ratchets get seeded with a common secret from a DH ratchet. At the same time it tries to use every opportunity to provide the remote peer with a new public DH value and advance the DH ratchet whenever a new DH value from the remote peer arrives. As soon as a new common secret is established, a new hash ratchet gets initialized.
As cryptographic primitives, the Double Ratchet Algorithm uses
- for the DH ratchet
- Elliptic curve Diffie-Hellman (ECDH) with Curve25519,
- for message authentication codes (MAC, authentication)
- Keyed-hash message authentication code (HMAC) based on SHA-256,
- for symmetric encryption
- the Advanced Encryption Standard (AES), partially in cipher block chaining mode (CBC) with padding as per PKCS #5 and partially in counter mode (CTR) without padding,
- for the hash ratchet
- HMAC.[8]
Applications
The following is a list of applications that use the Double Ratchet Algorithm or a custom implementation of it:
- ChatSecure[lower-alpha 1]
- Conversations[lower-alpha 1]
- Cryptocat[lower-alpha 1][9]
- Facebook Messenger[lower-alpha 2][lower-alpha 3][10]
- G Data Secure Chat[lower-alpha 3][11][12]
- Gajim[lower-alpha 1]
- GNOME Fractal[lower-alpha 4]
- Google Allo[lower-alpha 5][lower-alpha 3][13]
- Google Messages[lower-alpha 6][lower-alpha 3][14]
- Haven[lower-alpha 3][15][16]
- Pond[17]
- Element[lower-alpha 4][18]
- Signal[lower-alpha 3]
- Silent Phone[lower-alpha 7][19]
- Skype[lower-alpha 8][lower-alpha 3][20]
- Viber[lower-alpha 9][21]
- WhatsApp[lower-alpha 3][22]
- Wire[lower-alpha 10][23]
Notes
- ↑ 1.0 1.1 1.2 1.3 Via the OMEMO protocol
- ↑ Only in "secret conversations"
- ↑ 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Via the Signal Protocol
- ↑ 4.0 4.1 Via the Matrix protocol
- ↑ Only in "incognito mode"
- ↑ Only in one-to-one RCS chats
- ↑ Via the Zina protocol
- ↑ Only in "private conversations"
- ↑ Viber "uses the same concepts of the "double ratchet" protocol used in Open Whisper Systems Signal application"
- ↑ Via the Proteus protocol
References
- ↑ Perrin, Trevor (30 March 2016). "Compare Revisions". https://github.com/trevp/double_ratchet/wiki/Home/_compare/6fa4a516b01327d736df1f52014d8b561a18189a...ab41721f9ed7ca0bdac3e24ce9fc573750e0614d.
- ↑ 2.0 2.1 2.2 Marlinspike, Moxie (30 March 2016). "Signal on the outside, Signal on the inside". Open Whisper Systems. https://whispersystems.org/blog/signal-inside-and-out/.
- ↑ Cohn-Gordon, K.; Cremers, C.; Garratt, L. (2016). "On Post-compromise Security". 2016 IEEE 29th Computer Security Foundations Symposium (CSF). pp. 164–178. doi:10.1109/CSF.2016.19. ISBN 978-1-5090-2607-4. https://ora.ox.ac.uk/objects/uuid:241da365-1c73-4b6a-826c-f122c4c1e1b8.
- ↑ Ksenia Ermoshina, Francesca Musiani. "Standardising by running code": the Signal protocol and de facto standardisation in end-to-end encrypted messaging. Internet histories, 2019, pp.1-21. �10.1080/24701475.2019.1654697�. �halshs-02319701�
- ↑ Cohn-Gordon et al. 2016, p. 1
- ↑ Unger et al. 2015, p. 241
- ↑ 7.0 7.1 Unger et al. 2015, p. 239
- ↑ Frosch et al. 2014
- ↑ "Security". Cryptocat. https://crypto.cat/security.html.
- ↑ Greenberg, Andy (4 October 2016). "You Can All Finally Encrypt Facebook Messenger, So Do It". Wired (Condé Nast). https://www.wired.com/2016/10/facebook-completely-encrypted-messenger-update-now/. Retrieved 5 October 2016.
- ↑ Seals, Tara (17 September 2015). "G DATA Adds Encryption for Secure Mobile Chat". Infosecurity Magazine. Reed Exhibitions Ltd.. http://www.infosecurity-magazine.com/news/g-data-adds-encryption-for-secure/.
- ↑ "SecureChat". G Data. https://github.com/GDATASoftwareAG/SecureChat.
- ↑ Greenberg, Andy (18 May 2016). "With Allo and Duo, Google Finally Encrypts Conversations End-to-End". Wired (Condé Nast). https://www.wired.com/2016/05/allo-duo-google-finally-encrypts-conversations-end-end/. Retrieved 14 July 2016.
- ↑ Amadeo, Ron (2021-06-16). "Google enables end-to-end encryption for Android's default SMS/RCS app" (in en-us). https://arstechnica.com/gadgets/2021/06/google-enables-end-to-end-encryption-for-androids-default-sms-rcs-app/.
- ↑ "Haven Attributions". Guardian Project. https://github.com/guardianproject/haven#attributions.
- ↑ Lee, Micah (22 December 2017). "Snowden's New App Uses Your Smartphone To Physically Guard Your Laptop". First Look Media. https://theintercept.com/2017/12/22/snowdens-new-app-uses-your-smartphone-to-physically-guard-your-laptop/.
- ↑ Langley, Adam (9 November 2013). "Wire in new ratchet system". https://github.com/agl/pond/commit/338395668fbb8a7819c0fccf54dccaa4d7f0ae9e.
- ↑ Butcher, Mike (19 September 2016). "Riot wants to be like Slack, but with the flexibility of an underlying open source platform". AOL Inc.. https://techcrunch.com/2016/09/19/riot-wants-to-be-like-slack-but-with-the-flexibility-of-an-underlying-open-source-platform/.
- ↑ "Silent Circle/libzina". Silent Circle. https://github.com/SilentCircle/libzina/.
- ↑ Lund, Joshua (11 January 2018). "Signal partners with Microsoft to bring end-to-end encryption to Skype". Open Whisper Systems. https://signal.org/blog/skype-partnership/.
- ↑ "Viber Encryption Overview". Viber. 25 July 2018. https://www.viber.com/app/uploads/viber-encryption-overview.pdf.
- ↑ Metz, Cade (5 April 2016). "Forget Apple vs. the FBI: WhatsApp Just Switched on Encryption for a Billion People". Wired (Condé Nast). https://www.wired.com/2016/04/forget-apple-vs-fbi-whatsapp-just-switched-encryption-billion-people/. Retrieved 5 April 2016.
- ↑ "Wire Security Whitepaper". Wire Swiss GmbH. 17 August 2018. https://wire-docs.wire.com/download/Wire+Security+Whitepaper.pdf.
Literature
- Cohn-Gordon, Katriel; Cremers, Cas; Dowling, Benjamin; Garratt, Luke; Stebila, Douglas (25 October 2016). "A Formal Security Analysis of the Signal Messaging Protocol". International Association for Cryptologic Research (IACR). https://eprint.iacr.org/2016/1013.pdf.
- Frosch, Tilman; Mainka, Christian; Bader, Christoph; Bergsma, Florian; Schwenk, Jörg; Holz, Thorsten (2014). "How Secure is TextSecure?". International Association for Cryptologic Research (IACR). https://eprint.iacr.org/2014/904.pdf.
- Unger, Nik; Dechand, Sergej; Bonneau, Joseph; Fahl, Sascha; Perl, Henning; Goldberg, Ian Avrum; Smith, Matthew (2015). "SoK: Secure Messaging". Proceedings of the 2015 IEEE Symposium on Security and Privacy. IEEE Computer Society's Technical Committee on Security and Privacy. pp. 232–249. doi:10.1109/SP.2015.22. http://ieee-security.org/TC/SP2015/papers-archived/6949a232.pdf.
External links
- Specification by Open Whisper Systems
- "Advanced cryptographic ratcheting", abstract description by Moxie Marlinspike
- Olm: C++ implementation under the Apache 2.0 license
- Vodozemac: Rust implementation of the Olm variation, under the Apache 2.0 license
Original source: https://en.wikipedia.org/wiki/Double Ratchet Algorithm.
Read more |