Documentation
How encryption works
A technical companion to the plain-language security guide.
This describes the Raven 0.20.1 implementation using AlgoChat protocol 1.5.0 and its TypeScript library 0.11.0. Algorithms protect different boundaries; there is no single post-quantum security level for the whole app.
Message formats
- Everyday direct chat, protocol 0x01
- X25519 key agreement and HKDF derive a key for ChaCha20-Poly1305. A separately wrapped sender copy supports sent-message recovery. Modern version 0x02 envelopes bind their header as associated data; older readable envelopes do not have every modern header protection.
- Extra lock, protocol 0x02
- A shared pair secret is mixed into an X25519-derived message key. Its counter-based schedule separates keys; it does not erase the secrets needed to recover old messages.
- Hybrid direct chat, protocols 0x04 and 0x05
- The handshake combines X25519 and ML-KEM-768 and contains a sender copy. Its current 2,366-byte form establishes the session used by subsequent ChaCha20-Poly1305 messages. A recorded handshake and a participant's long-term keys can reopen the session.
- Rooms, protocols 0x03, 0x06, and 0x07
- Public administration records establish the roster and epoch. Private key deliveries carry a random epoch key to members through Hybrid sessions. Room messages use the shared epoch key with per-sender counters and authenticated encryption.
A protocol identifier is different from an envelope version byte. Do not infer the selected protection from a release number or from the transaction's signature alone.
Keys and recovery
The phrase yields the account seed and deterministic long-term X25519 and ML-KEM keys. Your personal Extra lock code and Notes secret also derive from account secret material. A pair secret combines both people's codes; a room epoch key is random. These differences explain why restoring a phrase, moving Extra lock, and recovering room-key copies are separate operations.
Verification is layered
Authenticated encryption rejects altered ciphertext. Raven also reconstructs supported transactions, checks their ids, and verifies Ed25519 or Falcon signatures rather than trusting an indexer's sender field alone. A rekeyed account requires an authorization lookup. Failures and unsupported forms can produce Sender not verified; this is not a claim that every such message is an attack.
Compare safety numbers over another trusted channel when real-world identity matters. An account signature authenticates an account, not a person's name. A transaction being submitted or confirmed is also not proof that the recipient has opened or read the message.
Quantum resistance has a scope
Hybrid key establishment adds ML-KEM-768 alongside X25519. Falcon-1024 is used separately for optional transaction authorization. Neither removes public metadata, adds direct-chat forward secrecy, secures a stolen phrase, or establishes that the application has passed an independent security audit.
Dated application evidence
The following application details were source-reviewed on 29 October 2026 at Raven revision 23687cf8eb63a3a00c76927e6874f8833a5f094e. They are not claims of reproduced exploits or complete runtime tests. Raven's repository is private, so the file references below identify the reviewed implementation without sending public readers to inaccessible links.
- Bounded room recovery:
src/app/core/services/room.service.ts, the room search and key-copy listing methods, use at most 20 pages of 100 records per scan. This is separate from the durable direct-message history walk. Older necessary room records can fall outside that window. - Channel removal: the same file's
removeMembermethod attempts child removals after parent rotation succeeds. It does not aggregate child false results into the parent's return value. These are separate operations, not an atomic all-channel guarantee. - Local metadata:
src/app/core/services/identity-wipe.service.tsdoes not callPqSessionServiceduring Forget.src/app/core/services/pq-session.service.tsstores hybrid handshake metadata locally. Raven also keeps announcement markers. These are public transaction/session metadata, not a claim that private keys are exposed. Forget is not proof that every metadata copy, backup, process-memory copy, or blockchain record was erased.
The public protocol evidence describes cryptographic formats and limits, while these application-level observations describe Raven's current recovery and control flow. Neither should be presented as independent external audit certification.