Encryption Architecture of Cryptix Messenger

Cryptix Messenger Encryption Overview

Cryptix Messenger uses end-to-end encryption at wallet level for message content. Encryption is performed entirely inside the client/web wallet before the message is transmitted to a node. As a result, the blockchain stores not the plaintext, but only the encrypted message content (ciphertext). This architecture provides full end-to-end encryption for message content between sender and recipient.

Key model

The messenger uses its own dedicated messenger key. This key is separate from the normal wallet/spend key and is deterministically derived from the wallet mnemonic or seed. This ensures that the messenger key is:

  • recoverable across devices,
  • logically separated from the payment/spend key,
  • and usable for wallet recovery or device changes.

Important: The private key, seed, and spend key are never shared. The protocol only uses the public messenger key.

Technical key derivation flow

Messenger keys are deterministically derived from the wallet recovery phrase (mnemonic), but in a separate derivation domain so they remain isolated from normal wallet spending keys.

  1. Seed source: The wallet mnemonic is used as root seed material.
  2. Messenger E2E key: A deterministic 32-byte secret is derived via HKDF-SHA256 and used as the private key material for the messenger CryptoBox keypair. The corresponding messenger public key is shared.
  3. Handshake signing key: A separate key is derived via BIP39 -> seed -> XPrv path. This key is used only for handshake authentication and key ownership proof.
  4. Additional verification: Handshake payloads are signature-verified and cross-checked against messenger payload/header fields before a peer key is accepted for encrypted messaging.

Because messenger keys and wallet spending keys are derived in separate branches, messenger keys are never reused as spend keys. Messenger public keys therefore cannot be used to derive wallet private keys.

Messenger seed material is only made available to the messenger context during login, wallet creation, or wallet connect. It is cleared again on disconnect or wallet switch.

Curve usage (chain vs messenger)

Cryptix separates on-chain signing and messenger encryption intentionally:

  • secp256k1 is used for wallet/address/transaction signing on the chain.
  • curve25519 is used for messenger end-to-end encryption in the web wallet.

This separation keeps payment signing and messenger encryption as two logically independent security domains.

Initial contact

Because wallet addresses in the Cryptix stack do not directly contain the key required for messenger encryption, the first contact is handled through a handshake.

In this first message, users exchange their public messenger keys. Once that key is known, all following messages can be sent as true end-to-end encrypted messages.

The handshake body also includes an explicit signature verification step to confirm key ownership before encrypted chat continues.

Message flow

  1. A handshake message is sent to exchange the public messenger key.
  2. The received public key is stored in the wallet or messenger contact.
  3. All following messages are encrypted locally.
  4. Only the recipient can decrypt them with their messenger private key.

Payload structure

The fields are used as follows:

  • nonce = nonce used for encryption
  • body = encrypted message content (ciphertext)
  • sender_kind=1
  • sender_data = sender's public messenger key
  • recipient_tag = derived short identifier of the recipient
  • msg_type = distinguishes between handshake and encrypted message

Security properties

This model ensures that:

  • nodes do not see plaintext messages,
  • explorers cannot read message contents,
  • only sender and recipient can decrypt the content,
  • publishing a public key is not a security risk,
  • and the seed, wallet private key, or spend key cannot be derived from the public key.

Important note

The encryption protects the message content, but not automatically all metadata. Depending on the chain context, it may still remain visible:

  • that a message was sent,
  • when it was sent,
  • and which transaction carried it.
  • however, the wallet is fundamentally anonymous, meaning that nobody knows who owns an address.
  • Our web wallet servers do not collect any data. The servers cannot identify which user is using which wallet or assign IP addresses.
  • by using your own node and self-hosted node (for example, through All in One), there are no external connections and IP tracking is impossible, as it is impossible to determine which node submitted the transaction.

Version status and roadmap

Cryptix Messenger and its encryption stack are currently in Version 1. Work on Version 2 is already in progress.

Version 2 is planned to include a special variant of the self-developed Frost Hash and an even stronger encryption model for messenger communication.


Developer Information:
https://github.com/cryptix-network/rusty-cryptix/blob/main/docs/messenger/README.md