Skip to content
Zero-trust toward the network

Security is not a feature.
It is the architecture.

ChatNyto assumes the broker is curious, the Wi-Fi is hostile and the cloud is optional. Messages are sealed on the device, calls are encrypted end to end, and stored history is unreadable without the account that owns it.

AES-256-GCM X25519 + Ed25519 Keys generated on device AGPL-3.0 · source available
The threat model

Decide who you distrust, then design for it.

ChatNyto does not ask you to trust a company, a server or a network. It asks you to trust the person you are talking to, and the device in your hand. Everything in between is treated as a possible adversary.

Party Can see Cannot see
Your device Everything, while unlocked — by definition. Nothing. It is the trust anchor.
MQTT broker Topic names, public fingerprints, timings, ciphertext sizes, public presence advertisements. Message text, pictures, voice notes, group keys, private keys, passwords or call audio.
Network operator The connection to the broker, and its metadata. The plaintext of anything carried through it — including MQTT over TLS or LoRa.
ChatNyto project Nothing. There is no ChatNyto messaging service to observe. Everything. We operate no relay in the message path.
AI provider you configure The prompts and context you deliberately send to it. Your other chats, your keys, or any message you did not send to that agent.

The broker is a dumb pipe

It routes sealed envelopes. It never receives a channel key and has no way to derive one.

The device holds the keys

Identity key pairs are generated locally. Private seeds leave the device only inside an encrypted transfer.

No central account

An account is a key pair, not a row in a database. There is no ChatNyto user table to breach.

The cryptography

Standard primitives, carefully composed.

No BespokeCipher. The app uses well-known constructions from the cryptography package and the platform keystore. This section states exactly what is used and where the keys come from.

Purpose Construction Key origin
Identity X25519 key agreement + Ed25519 signatures Generated on device at account creation
Password vault PBKDF2-HMAC-SHA256, 210,000 iterations, AES-256-GCM Your password + a random per-account salt
Recovery code 120 random bits, PBKDF2-HMAC-SHA256, 20,000 iterations, AES-256-GCM A code shown once when the account is created
Direct messages X25519 ECDH → HKDF-SHA256 (chatnyto:p2p) → AES-256-GCM Your private key + the peer's advertised public key
Group messages PBKDF2-HMAC-SHA256, 60,000 iterations → AES-256-GCM Group passphrase, or the topic name when there is none
History & outbox at rest HKDF-SHA256 (chatnyto:storage) → AES-256-GCM Derived from the account's own identity seed
Presence & group control Ed25519 signatures The account's signing key — verified before use
Calls WebRTC DTLS-SRTP; relayed voice inside the chat envelope Negotiated by the two peers through encrypted signalling
The current design uses long-term identity keys for direct-message key agreement. There is no per-message ratchet, so a stolen private key could decrypt captured past traffic for that identity. The recovery code and password protect keys at rest; they cannot protect a device that is already unlocked and compromised.
Identity

Your key is the account.

ChatNyto never asks for an email address or a phone number. A name and a password create two key pairs locally: X25519 for agreement, Ed25519 for signatures. The public halves are published as a self-signed presence advertisement; the private halves never leave the device in the clear.

  • No sign-up, no central profile, no phone number
  • Several identities on one device, each isolated by scope
  • Presence advertisements signed and verified
  • Contact QR codes carry the public keys they describe
  • Fingerprints can be compared in person
Public identity signature valid
name
Maya
fingerprint
8f:2a:7c:11:9d:04:ab:31:6e:…
x25519 public key
kQ3v…9pXw
ed25519 public key
tR7m…2cLf
self-signature
verified ✓
The broker can read this advertisement. It is public by design.
Messages

Sealed before they touch the network.

Every chat payload is an AES-256-GCM envelope. The broker sees a topic, a nonce, a ciphertext and a MAC. It does not see the message, and it cannot forge one.

What the broker sees ciphertext only
topic
chatnyto/chat/dm/8f:2a:7c:11…--c1:9d:04:ab…
payload
{ "enc":"aes-256-gcm", "n":"…", "c":"…", "m":"…" }
from / to
public fingerprints
size
encrypted length
What the recipient sees after decryption

Direct messages: decrypted with the X25519 ECDH key only the pair can derive.

Private groups: decrypted with the key derived from the group passphrase.

Public groups: decrypted with the topic-derived key — private from the broker, not from anyone who knows the group name.

History: stored under a separate at-rest key, so a locked account leaves unreadable ciphertext on disk.

Encrypt-then-publish · AES-GCM authenticates every envelope
A public group is not a private one. With no passphrase, the group key is derived from the topic name. That keeps the broker out, but anyone who learns the name can derive the same key. Set a passphrase when the group is actually private.
Calls

Signalling inside the envelope.

A call starts as a series of control messages inside the pair's encrypted chat: offer, answer, ICE candidates, decline, end. The broker routes them without reading them. Media then takes the best path available.

01

Direct WebRTC

DTLS-SRTP between the two devices. Nothing in the middle.

02

STUN / TURN

The network's own servers, discovered from its HTTPS profile.

03

Encrypted MQTT relay

ADPCM frames inside the same AES-256-GCM channel, on Android and iOS.

Call path encrypted end to end
Offer, answer, ICE
Published inside the DM or group envelope, repeated while ringing.
Direct media
SRTP with keys negotiated over the encrypted signalling channel.
Relay fallback
When no direct path appears, the call switches to ADPCM over MQTT.
TURN servers see the encrypted media stream and the IP addresses of the participants. They do not receive the call keys.
At rest

A locked account is genuinely locked.

Locking is not a screen that hides a list. The message history and outbox are encrypted under a key derived from the identity seed, and the seed is sealed under your password. Without either, the data on disk is ciphertext.

Encrypted preferences

Message history and the pending outbox are AES-256-GCM encrypted with a key derived from the account seed. Each account has its own scope.

Platform keystore

Passwords and broker credentials live in Android Keystore, iOS Keychain, libsecret or Windows DPAPI — never in the app's own preferences.

Recovery, not backdoor

A 120-bit recovery code can unlock the same seeds if the password is forgotten. Lose both and the account cannot be recovered — by design.

Where What lives there Protection
Platform secure storage Identity password, broker credentials OS keystore · Keychain · libsecret · DPAPI
App preferences Broker addresses, public account metadata, contacts, call history, settings App sandbox; private seeds are sealed blobs
App preferences (encrypted) Message history, encrypted outbox AES-256-GCM under the account's at-rest key
Files Ringtones, chosen wallpapers App sandbox
Broker Ciphertext, topics, public presence No key material at all
Honest limits

What this design does not protect you from.

A security page that only lists strengths is marketing. These are the boundaries of the current implementation — read them before relying on it for a threat model that matters.

Compromised or unlocked devices

If malware can read the app's memory or you leave it unlocked, it can read the conversation. ChatNyto protects data in transit and at rest, not a device that is already owned by an attacker.

Metadata

The broker sees which public fingerprints are talking, when, and roughly how much. It does not see content. Traffic analysis is still traffic analysis.

Public groups

A group without a passphrase has a topic-derived key. Anyone who knows the topic can decrypt it. Use a passphrase for a genuinely private group.

Lost secrets

No password and no recovery code means no way back into the account. There is no support desk that can reset it, and no server-side copy to restore.

Third-party AI providers

When you talk to a hosted model, that provider receives the prompts you send. That is the service you chose. Point an agent at a local model to keep the exchange on your network.

The parts not yet in place

The code has not had an independent security audit. Direct messages use long-term keys rather than a forward-secret ratchet. Call relay is Android and iOS only. Treat these as real constraints.

Responsible disclosure

Found something? Tell us privately.

Please do not open a public issue for a vulnerability. Use the repository's private security advisory form, include enough detail to reproduce it, and give us a chance to fix it before disclosure.