Double Ratchet Algorithm: Difference between revisions

Content deleted Content added
Etoombs (talk | contribs)
Functioning: De-awkwarding the prose a little.
Etoombs (talk | contribs)
m Functioning: hyphen—not N dash
Line 26:
| caption2 = Diagram of the working principle
}}
A client attempts to renew session key material interactively with the remote peer using a Diffie–HellmanDiffie-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–HellmanDiffie-Hellman (ECDH) with [[Curve25519]],
; for [[message authentication code]]s (MAC, authentication): [[Hash-based message authentication code|Keyed-hash message authentication code]] (HMAC) based on [[SHA-256]],
; for symmetric encryption: the [[Advanced Encryption Standard]] (AES), partially in cipher block chaining [[block cipher mode of operation|mode]] (CBC) with [[padding (cryptography)|padding]] as per [[PKCS]] #5 and partially in counter mode (CTR) without padding,