This page explains how AENC protects your data. It covers the building blocks it uses, where each one applies, and how they fit together. You will find it useful if you want to check the design yourself.
AENC's core is an offline encryption tool. You build a self-contained encrypted package on your device and share it over any channel you already use; only the person you picked can open it. Used this way, no AENC server takes part in encryption or decryption, so there is no metadata about who talks to whom for anyone to collect. The Google Play edition adds an optional, opt-in built-in messenger (a paid feature) that delivers those same end-to-end-encrypted packages through our own zero-knowledge relay — the relay only ever handles ciphertext plus minimal delivery metadata and can never read your content or keys (see §13).
What AENC protects. It keeps your content private and genuine while it travels over channels you do not trust. It keeps your private keys secret even if you lose the phone or someone installs a fake copy of the app. What it does not claim. It cannot protect an unlocked device in an attacker's hands, and it does not pretend the client side anti tamper is unbreakable. Those measures only raise the cost of an attack. The real boundary is simple. Your private keys live off the device, on removable media.
| Primitive | Role in AENC |
|---|---|
| X25519 (ECDH) | Key agreement between sender and recipient for every encrypted message. |
| AES-256-GCM | Authenticated encryption (AEAD) of the message payload and of the identity file at rest. |
| Ed25519 | Digital signatures. They authenticate a message in SIGNED mode and self sign a pairing certificate. |
| sntrup761 (Streamlined NTRU Prime) | Post quantum KEM. It combines with X25519 in the optional hybrid mode. |
| HKDF-SHA-256 | Key derivation. It turns the shared secrets from key agreement into a fresh AEAD key for each message. |
| Argon2id | Memory hard password hashing (64 MiB, 3 passes, 1 lane). It protects the identity file with your passphrase. |
| SHA-256 | Pairing fingerprints and domain separated hashing. |
All formats use canonical CBOR (CTAP2 canonical). The exact header and envelope bytes serve verbatim as AEAD associated data. Before it runs any crypto, the decoder rebuilds the input and compares it byte for byte, so it rejects anything that is not canonical or has been changed.
An identity is a set of key pairs that AENC generates on your device.
You share the public halves as a pairing certificate (§8). The private halves stay in the encrypted
.aekey file, which you keep on a removable drive (we recommend this) or on the phone. AENC loads
them into memory only while the identity is unlocked (§10).
Each encrypted item is a self contained package (magic AES2 for text, AEF2 for
files). "Sealed sender" means AENC encrypts the sender's identity inside the package. Anyone who
intercepts it sees no sender, no recipient name, only opaque bytes.
AENC computes the signature or MAC over a length prefixed transcript. That transcript binds the header, the wrapped key, the sender key, the timestamp and the message, so nothing can be swapped between packages.
A Post Quantum identity carries an extra sntrup761 key. When both sides are PQ, AENC derives the content key from both an X25519 ECDH secret and an sntrup761 encapsulation, and mixes them through HKDF. An attacker has to break both to recover the key. So your message stays private even against a future quantum computer, and it stays at least as strong as X25519 is today.
Types must match. A Classical identity and a Post Quantum identity cannot message each other. You both need the same type. A coloured badge shows which one you have. Blue means Classical, green means Post Quantum.
AENC stores your identity as an encrypted .aekey file, protected by your passphrase.
Argon2id is slow and memory hard on purpose (64 MiB, 3 passes). That makes cracking a stolen
.aekey expensive, so pick a long, strong passphrase. For the best protection, keep the file on
a removable USB drive and pull it out when you are done. You can store it on the phone, but that is less secure.
To message someone, you import their public pairing certificate, usually by scanning a QR code in person. The certificate signs itself and carries no name.
When you import a certificate, AENC rebuilds the bundle canonically and compares it byte for byte, checks that the advertised cipher suites match the keys inside, and verifies the Ed25519 self signature. It does all of this before it trusts anything. The fingerprint is a domain separated SHA-256 over the whole bundle. Two people compare it in person to stop anyone slipping in the middle at pairing time. A contact stays unverified until you confirm it.
Your contacts live only in memory during a session. To keep them, AENC saves them as an encrypted
.aecb file. It encrypts that file with a subkey from your identity, so only you can open your own
contact book, and the book is tied to the identity that made it. The book records whether each contact is
verified.
mlock) memory with guard pages, and wipes them when you lock, when the app goes idle, or when you close it.AENC is built so that examining the phone turns up almost nothing. Forensic tools recover what an app leaves behind, things like databases, caches, logs, thumbnails, and files that were deleted but not overwritten. AENC leaves none of that on purpose.
mlock) memory and wipes them on lock, on idle, or when the app closes. It
encrypts captured photos and voice straight from memory and never writes them to disk. Decrypted content is
view only and gets wiped on exit..aenc blob. Seizing the transport, the server or the recipient's inbox yields ciphertext only.The one weak moment, and how to avoid it. Forensics has a real chance only if someone grabs the device while it is unlocked, with the USB key inserted and a session open. That is the short window when keys are in memory. Pull the drive and lock when you are done. After that, even with full physical access and professional tools, there is next to nothing to recover.
AENC ships as two builds from one codebase. The crypto core described above is identical in both, byte for byte. They differ only in how you get a licence and whether the app may use the network. Encryption always runs fully on your device. Neither build ever sends your message content, ciphertext, contacts or private keys.
INTERNET
permission, so the OS makes any network traffic impossible. No server, no telemetry.INTERNET because Google
Play Billing and our licence check need it, so it reaches the fixed set of endpoints below.| Endpoint | Owner | Purpose | Data sent | Content / keys |
|---|---|---|---|---|
license.aenc.io (licence) | AENC | Activates and quietly refreshes the paid subscription licence. Offline encryption is free and never contacts this server. | Play purchase token, Play Integrity token, opaque device id, product id | never |
license.aenc.io/relay (messenger) | AENC | Zero-knowledge store-and-forward relay for the optional messenger. Carries end-to-end-encrypted message/file blobs to opaque, rotating mailbox addresses; delete-on-fetch. Holds an encrypted prekey directory + (if push on) your FCM token. | Ciphertext blobs, opaque mailbox/prekey ids, IP + timing + size (not logged) | ciphertext only |
fcm.googleapis.com (push) | Firebase Cloud Messaging — contentless "new message" wake-up (opt-out). Carries no sender/content. | Device push token, delivery timing | never | |
| Google Play Services (on device → Google) | Play Billing purchase flow + Play Integrity attestation | Purchase / subscription state, integrity verdict | never | |
play.google.com/store/apps/details | Anti tapjacking. Is an enabled accessibility service published on Play (200) or sideloaded (404)? | Package names of enabled third party accessibility services | never | |
firebaselogging.googleapis.comfirebaselogging-pa.googleapis.com | Telemetry bundled transitively by Google Play Billing (not AENC code) | Device model, build fingerprint, SIM operator (mcc_mnc), locale, timezone, network type | never |
Bottom line. All of that traffic uses HTTPS with TLS. The offline build sends nothing at all. In neither build does any plaintext message, contact, or private key ever leave the device; the messenger relay carries only ciphertext it cannot read, plus the minimal metadata needed to deliver it. The Play listing's Data Safety declaration reflects the online build's traffic.
The Google Play edition adds an optional, paid, opt-in messenger. Its design goal: add convenient online
delivery without weakening the offline guarantees above. The message a recipient opens is still the same
standalone sealed .aenc that decrypts only with their removable key — online delivery is a
separable layer wrapped around it, never a replacement for it.
A sent message is built as: inner = sealed .aenc(text/pointer), then wrapped by a
Double Ratchet envelope for transport. The recipient unwraps the ratchet layer and is left with
the standalone .aenc, which the offline engine then opens with the identity key exactly as in §5.
Strip the ratchet entirely and the inner .aenc still decrypts — the two layers share no keys. So even a
total compromise of the ratchet/transport yields only ciphertext that still needs the removable .aekey.
b64url(sha256(your Ed25519 key))); the bundle itself is stored encrypted under a
key derived from your public key, so the relay holds only an irreversible id + ciphertext it cannot read or
enumerate. Bundles are self-signed and pinned to the trusted contact key, so the relay cannot substitute or forge one.A deliberately "dumb" Node store-and-forward spool: deposit puts a ciphertext blob at an opaque
mailbox, fetch returns and deletes it (delete-on-fetch; short safety TTL for
never-collected messages). Large files stream to disk as encrypted blobs, resumable, then deleted on receipt.
There are no accounts and no id/IP request logging. Anonymous writes are gated by a lightweight
proof-of-work to blunt flooding. It never holds plaintext, keys, or a readable identity.
To wake a killed app, the relay can send a contentless Firebase (FCM) push — a bare "open and fetch" signal, no sender or content. This is opt-out; with push off, delivery falls back to in-app polling. The honest residual metadata cost of online delivery: your IP, message timing and size, and — while push is on — a stable device push token the relay/Google use to reach you. Rotating mailbox addresses remove address-level linkage; IP/timing and push-token linkage are mitigated only by turning push off or, on the roadmap, by an onion-routing transport. Content, keys, and identity remain protected throughout.