AES-256-GCM, encrypted on the device before anything leaves it
Keys between two devices
X25519, from which HKDF-SHA256 derives one key per pair of devices
Key of a circle
Derived with HKDF-SHA256 from the 32-byte secret in the invitation link
Sender
Ed25519 signature of the device on every packet sent over the internet
Path to the locations
TLS; the app checks the fixed key of every location from the signed list
Copies
Every message and file at three locations run by different providers
Retention
Messages for 30 days at most; storage and passwords until you delete them
Backup file
PBKDF2-HMAC-SHA256 with 600,000 iterations, then AES-256-GCM
Account
None. No phone number, no email address, no password held by us
The message format is called ANMP, the protocol of the locations ANDP, both in version 1. Only widely used, publicly reviewed algorithms are used, no home-made cryptography.
In detail
Topic by topic.
Keys, devices and persons
Every installation creates two random key pairs: one for signing (Ed25519) and one for key exchange (X25519). The private parts leave the device only in your own backup or when you pair another device of your own.
If you use several devices, a key chain sits above them: a root key certifies a person key, which signs the list of your own devices (16 at most). Your contacts remember the root key. A removed device is listed as revoked and stays revoked.
If a device is lost, the root key issues a new person key, the mailbox moves, and each of your circles changes its key.
Circles and invitations
A circle is a random 32-byte secret. It sits in the invitation link after the # sign. A browser never sends that part to a server, not even to our website.
From the secret the app derives separate keys: one for messages, one for the circle’s storage, one for its place at the locations and one for the envelope that hides the packet header from the locations.
When someone is removed from a circle or leaves it, the circle gets a new secret. It is sent to each remaining device individually encrypted. A removed member keeps what they already had but sees nothing new.
Messages to one person
Direct messages are encrypted separately for each of the recipient’s devices, with the key of that pair of devices. They are kept in the recipient’s personal mailbox. Only their own devices may read and list it; contacts only get the right to write into it, and that right expires and can be revoked.
Every packet sent over the internet carries the signature of the sending device. It sits inside the encryption, so the locations do not see it. The app drops anything that does not match the sender’s known key chain.
What the locations see and what they do not
The locations are stores for encrypted packets. They check signatures and permissions; they read nothing.
Not visible: texts, pictures, files, passwords, names, circle names, who writes to whom in terms of persons, phone numbers (there are none).
Visible: the identifier of the place written to (a public key, not a name), the size and time of each packet and its expiry.
Visible for direct messages: the public key of the writing device. A location can therefore see that a certain device writes into a certain mailbox, without knowing who either belongs to.
Visible as with any server: the IP address of the connection while it lasts.
Distribution and outages
There are currently 5 locations in 4 countries, run by different providers. Every packet has a name derived from its content (SHA-256), cannot be changed and is kept at three locations run by different providers. Each device works out which three from the list of locations.
The locations sync with each other every minute. If one does not answer for ten minutes, another one receives its copies; once it is back, it takes over again. There is no majority vote: even a split network keeps accepting on both sides and catches up afterwards.
The list of locations is signed with a fixed key. The app only accepts lists whose signature is valid and only talks to locations from that list. A link or a foreign server cannot redirect it to other locations.
A message counts as sent as soon as one location holds it. If none can be reached, it waits on the device for up to seven days.
The radio path
Over radio, anynear uses radios running the free Meshtastic software (LoRa). All anynear radios share one radio channel. Its key is public and protects nothing. What is protected is the content: it is encrypted exactly as over the internet, with the key of the circle or of the pair of devices.
A radio packet is 233 bytes at most. Depending on the kind, 83 to 152 bytes remain for text; photos and files never go by radio. Instead of fixed identifiers, the packet carries identifiers that change every hour, so that listeners cannot track sender and destination over time.
If a device within range has internet access, it passes packets it hears into the network unchanged, and the other way round. It cannot read them in the process.
Storage and passwords
Your own storage hangs on a random secret that only your devices know. It cannot be derived from any public key; from outside it is not even visible that you have a storage. Every file gets its own random key. Name, type and size sit in an encrypted entry.
Passwords are encrypted twice: once with a key of the app that your phone keeps behind its screen lock (fingerprint, face or PIN), and once more for keeping them at the locations.
Deleted files stay in the bin for seven days and are then removed from the locations.
Backup and moving
The backup is a file you create and keep yourself. It contains your keys, your history and your attachments. From your password (at least 8 characters) and a random value, PBKDF2-HMAC-SHA256 computes the key in 600,000 iterations; encryption is AES-256-GCM.
We never receive the file and do not know the password. If you forget it, nobody can open the backup.
Notifications
Android: no push service. The app keeps a connection to the locations itself.
iPhone: a location asks Apple to wake the device. This wake-up contains no message content and no sender. The app then fetches the message itself and decrypts it on the device. Apple learns that and when a device was woken.
In the browser, wake-ups go through the push service of the browser vendor, likewise without content.
Known limits
What anynear cannot do or has not yet proven.
These points are part of an honest description. They are listed here so that you do not have to look for them yourself.
No continuous key change
A circle uses the same key until a member or device is removed; two devices keep using the same pair key. Someone who records encrypted packets and later obtains the circle secret or a device key can read them. Experts call the missing property forward secrecy. It is a deliberate simplification for small, trusted circles.
The invitation link is the key
Whoever has the invitation link of a circle can read the circle. Share it only through channels you trust, and remove members who no longer belong; the key then changes.
One operator
All locations are currently run by one person, Kevin Schu, with different providers in several countries. The network is distributed: no single location and no single provider can stop it. It is not independent of its operator, and locations run by others cannot be added so far.
No independent audit yet
So far nobody from outside has audited the protocol or the code. Everything on this page is our own statement.
Source code not public yet
Publication is being prepared. Until then, the statements here can only be verified to a limited extent.
The locations see circumstances
No content, but time, size and the identifier of the mailbox or circle, and for direct messages the public key of the writing device.
Radio offers less
Direct messages are not signed over radio; only the shared key vouches for the sender. In a circle the signature is on by default but can be switched off to make room for text. A member could then write in another member’s name. Delivery by radio is never guaranteed.
Order follows the sender’s clock
Messages are sorted by the time of the sending device. If its clock is off by more than five minutes, the locations do not accept its messages.
Alerts from devices at home
When a device such as Home Assistant sends an alert to its address, the receiving location briefly sees its content in plain text, encrypts it for the channel at once and stores it only encrypted.
Beta
anynear is a test version and may contain bugs. Keep a second copy of important documents and logins, and do not rely on anynear alone in an emergency.
Verify it yourself
What can already be checked today.
List of locations. Public and signed at anynear.net/andp/v1/net. Network ID: ro9NwRU2zyAA-5xRZy0U48TOfL5kGHDZABeekQ1utVk. Key that signs the list (Ed25519): NGt0UXWBluz3qOAx3IKiojRyRMM_f4nBzxoqutAkDY4.
Information from every location. Every location states its limits (largest file, longest expiry) and its key at https://<id>.relay.anynear.net/andp/v1/info, for example de-nue-01.
Reachability. The status page asks all locations again on every visit.
The Android app. The page Get the app shows the version and SHA-256 of the file. Package name: app.anynear. SHA-256 of the signing certificate: fc9312843674309113d2b0d226b8a482ba1b9fd7311e2f5d57fecf8f892f84c9.
This website. It sets no cookies, loads no scripts from other servers and embeds no analytics. The developer tools of your browser show this.
Source code
Open as soon as it is tidied up.
The app is licensed under the GPL-3.0. The repositories are not public yet. We are preparing to publish the app, the web app and the two protocols ANMP and ANDP, with specification and test vectors. For now we are not publishing the software of the locations.
Until then: if you use the app and want to see its source code, write to support@anynear.app.
Report a vulnerability
Found something?
Write to support@anynear.app, in German or English. Describe what you observed and how it can be reproduced. Please do not include other people’s data, invitation links or backup files.
We confirm receipt and tell you what happens next.
Please give us time to close the gap before you make it public.
Test only with your own devices and circles, and do not disrupt the operation of the locations.
We cannot pay a bounty. If you wish, we name you once the gap is closed.