For the complete documentation index, see llms.txt. This page is also available as Markdown.

Encryption options

OCC v1 offers three encryption options: custom, AES with a random key, and AES with a key from ECDH.

Encryption happens in the sender's app before anything is stored or recorded. OCC v1 offers three options.

Option
How the key is made
When to use it

Custom

The integrator supplies its own implementation

You have specific requirements

AES

A random (or imported) secret key; AES-256-GCM

Simple cases

AES with ECDH

A shared secret from Elliptic-Curve Diffie-Hellman; AES-256-GCM

Sender and receiver each hold a key pair

AES with ECDH

The receiver's public encryption key must be recorded on chain (in the user contract). The sender combines it with their own private key to compute a shared secret, which is the AES key. The receiver does the same in reverse. The Encryptor extension holds the private key and computes the shared secret, so the app never sees the private key.

Figure: The public key is shared on chain, private keys stay in Encryptor, and both sides derive the same AES key.

Chat

One-to-one chat messages use AES with ECDH, like mail. In a group chat, a conversation key is encrypted separately for each member, so adding a member means encrypting the key for them. See Message flows.

Not your keys, not your messages

If you lose your private key, nobody can decrypt your content. Back up your key as described in the Encryptor manual.

Last updated