Beyond Olm
About challenges and opportunities in Messaging Layer Security (MLS)
Part 1: Olm in detail
Fundamentals
- Key algorithms
- Key types
- Key distribution
- Key verification
Encryption & decryption
Key algorithms
- ed25519
- curve2559
- signed_curve25519
Ed25519
- 32-bit elliptic curve keys
- Bullet Two
- Bullet Three
Key types
- Device fingerprint keys
- Device identity keys
- One time keys
- Fallback keys
- Megolm encryption keys
- Megolm signing keys
Device fingerprint keys
- Ed25519
- The device fingerprint
- Signs all other keys of the device
- Public key shared across the [matrix]
Device identity keys
- Curve25519
- Used to deviate shared secrets
- Signed using the fingerprint keys
- Public key shared across the [matrix]
- Could in future be rotated
One time keys
- Signed Curve25519
- Disposable, single-use keys
- There are looooots of them
- Claimed by other users to establish Olm sessions
Fallback keys
- Signed Curve25519
- Similar to one time keys but not disposable
- Used once one-time keys are consumed
- New fallback keys regenerated once device online
Megolm encryption keys
- Random secret
- Used to derive AES-256 and HMAC-SHA-256 keys
- After each sent message, a hash derives the next key
- Future messages can be decrypted but past ones can't
Megolm signing key
- Ed25519
- Used to sign messages sent via Megolm
- Public key shared in the room along with encryption key
Olm
- Encrypt to-device messages
- Secure channel for key sharing
Megolm
- Encrypt room events
- Keys for Megolm are shared using Olm-encrypted to-device messages
Key distribution
Beyond Olm
By The one with the braid
Beyond Olm
- 1