Engineering guides / Realtime communication and P2P engineering

By Arte Soft engineering · 24 October 2026

Encrypted chat architecture: define keys, recovery and trust boundaries

An encrypted transport is one security boundary, not a complete messaging design. Before commissioning a chat app, decide who must be unable to read content and what trade-offs you accept for recovery, moderation and multiple devices.

Write the threat model in plain language

Identify the parties the design intends to protect against: network observers, infrastructure operators, compromised accounts or a stolen unlocked device. Different threats require different controls. State what the system does not protect against, such as a recipient copying a message. An architecture discussion should not begin with an unqualified promise of “military-grade” security or imply independent auditing that has not happened.

Separate transport protection from end-to-end protection

A secure connection to a server protects data in transit to that server. End-to-end content encryption requires a key arrangement that preserves the intended boundary beyond transport. For calls routed through a media server, consider where media can be decrypted. For messages, decide whether attachments, previews, backups and notification content follow the same rule. Inconsistent secondary paths can undermine an otherwise careful design.

Design the key lifecycle

Discuss identity verification, adding devices, losing a device, account recovery and key rotation. Recovery convenience can conflict with the promise that the service operator cannot decrypt content. Describe the chosen compromise clearly. A single successful encryption-and-decryption demonstration does not address how users confirm a contact after a device change or how older messages remain available under the stated policy.

Treat metadata as its own inventory

Even when content is protected, the service may retain identities, contact relationships, timestamps, delivery state or network information. Decide what is operationally necessary and how long it is kept. Include attachments and push infrastructure in the map. A privacy description should not say the server knows nothing simply because it cannot read message bodies; that claim requires a much broader examination of the system.

Plan review and acceptance

Use well-established libraries and protocols where appropriate, and obtain specialist security review for the intended assurance level. Engineering tests should cover malformed inputs, revoked devices, missing keys, interrupted attachment transfers and recovery failures. Avoid replacing cryptographic review with a screenshot of unreadable database values. Document what was reviewed, by whom and which version of the implementation it covered.

Security review preparation

  • Draw where plaintext exists and identify every component that can access content, including attachment previews and notification generation.
  • Document the consequence of a lost device and the exact recovery promise before selecting a key-storage design.
  • List unreviewed assumptions openly and agree which require specialist examination, rather than presenting transport encryption as proof that every messaging security property has been achieved.

Set accurate expectations for a partner

Arte Soft can discuss product integration and communication engineering, with Wonek chat work labelled engineering R&D. Neither is a claim of an independently audited secure messenger. A scoped architecture engagement should deliver a threat model, data-flow map, protocol choices and open questions for security specialists. That makes it possible to commission the right review before relying on promises that the implementation has not established.

Relevant Arte Soft work

Wonek — communication engineering R&D, not a shipped or audited messaging product is our own product or engineering project. It provides context for the work we discuss here; it is not a claim of identical results for every client deployment.

Sources and further reading

Need help with Messaging architecture review?

Send the current app, system or brief, the behaviour you need and your constraints. We can agree a discovery, implementation or repair scope with concrete acceptance criteria.

Discuss this with Arte Soft

Continue reading