Livoa LogoLivoa

Root Key

Derived via X3DH handshake

Input to KDF chain for new keys

Symmetric Ratchet - Sending Chain


Each message derives a new Message Key (MK) from the Chain Key (CK):

CKn+1, MKn = KDF(CKn)

MKn used to encrypt message with AES-256-GCM

Ensures every message has a unique key

Symmetric Ratchet - Receiving Chain

Receiver derives same MK sequence using KDF(CK)

Decrypts messages symmetrically

Deletes used keys immediately for forward secrecy

Diffie-Hellman (DH) Ratchet


Triggered when a new DH public key is received

Computes DH(private, public) → new shared secret

New Root Key and fresh Chain Keys via KDF:

RootKey', CKs', CKr' = KDF(RootKey, DH output)

Injects fresh entropy → Post-compromise security

Encryption (Sender)

AES-256-GCM encrypts plaintext with MKn

Ciphertext and new DH public key sent to recipient

Decryption (Receiver)

Uses same MKn from KDF(CKn) to decrypt ciphertext

Updates DH Ratchet when new public key is received

Legend & Notes


• Blue: Root and KDF chains • Green: Symmetric Ratchets • Yellow: DH Ratchet (key updates) • Orange: Encryption/Decryption

• Provides forward secrecy (keys change per message) and post-compromise security (new DH exchanges refresh secrets).

part c advanced cyber

by Damil

0
0 uses