Khandaq

Privacy Policy

Last updated: 9 August 2026

Khandaq is a free, open-source, peer-to-peer messenger built on the Tox protocol. It is engineered so that we cannot read your messages even if we wanted to. This policy explains, in plain language, what that means.

The short version. No account. No phone number. No email. No advertising. No behavioural analytics. Your messages, calls, and files are end-to-end encrypted and travel directly between you and the people you talk to. Khandaq operates no central server that stores your conversations. The one exception to “no servers” is notifications: waking a phone requires Google’s push service and a small Khandaq wake relay, which see delivery data but never message content — see Push notifications.

What we do NOT collect

Data stored on your device

How the network works

Push notifications

Because Khandaq is peer-to-peer, no server is holding your messages and no server can tell your phone that one is waiting. To make notifications work at all, two things are involved.

The relay receives: the recipient’s push token (so it knows which device to wake), optionally the sender’s Tox public key (so the app can open the right chat — this is the public key only, not the full Tox ID), and the IP address of the sender’s device, as any web server would see. It does not receive message text, files, call audio or video, or the recipient’s Tox identity.

The wake notification itself carries a fixed “Khandaq — New message”, never anything you wrote. Once the app has fetched and decrypted the message peer-to-peer it posts its own notification with the real sender and text. On iOS, if the app was still running in the background, it then removes the generic wake banner, so you are left with the one contentful notification; if you had force-quit the app, the banner stays generic until you open Khandaq. On Android the generic banner is posted by Google’s messaging component under an identifier the app does not know, so the app cannot take it away — there you briefly see two notifications, the generic wake one and the contentful one, until you tap or dismiss them.

Your own wake address is a URL that contains your notification token, and your device sends it to your contacts over the encrypted Tox link, because their devices are the ones that have to wake yours. So each contact you add holds an identifier for your app installation, and your device in turn calls the wake addresses your contacts gave it. Both apps refuse to call anything outside a fixed list. That list is the Khandaq relay plus legacy relay addresses inherited from the upstream project the apps are built on: two of them on Android (tox.zoff.xyz and toxcon2020.zoff.cc) and one on iOS (tox.zoff.xyz). Those are only ever reached if a contact’s app handed you a wake address hosted there; Khandaq itself only ever issues addresses on its own relay. On Android you can additionally switch on a third-party push server (ntfy, UnifiedPush or Mozilla’s) in the settings — it is off unless you turn it on. The token changes if you reinstall the app or clear its data.

The relay keeps one piece of state: a truncated hash of the push token together with the time it last woke that device. This is used only to suppress duplicates — without it, a sender retrying delivery produces a stream of identical banners. These rows are deleted once they are older than 24 hours, are not linked to an account or a Tox ID, and are not used for statistics. Separately, the relay’s web server writes ordinary access logs — the calling IP address, the time, the request and its result — as any web server does. The server is configured to strip secret parameters out of the logged line, but that rule only fires on requests that carry a signature, and the apps currently on the App Store and Google Play are built without the signing key, so they do not sign. In practice, therefore, the log line for a normal wake call today does contain the recipient’s push token and the sender’s Tox public key. These logs are rotated off the server in the normal course, are never joined to the wake table, and are used only for fault-finding and abuse handling.

You can turn notifications off at any time in your device’s system settings.

Device permissions

Khandaq asks for a permission only when you use the feature that needs it. The full list of permissions you are prompted for:

All of these are used on the device. None of the data they give access to is sent to us.

Android also declares permissions the system never puts a prompt in front of. Naming all of them, so the list above is not read as the whole story: internet and network state; wake lock, foreground service, special-use foreground service, run at boot and raised thread priority, which keep the peer-to-peer connection alive in the background; modify audio settings and disable keyguard for calls; full-screen intent, so an incoming call can take over the lock screen; exact alarm, so the background connection is re-established on schedule rather than whenever the system feels like it; the Google messaging receive permission that Firebase Cloud Messaging needs; Bluetooth and nearby devices, so a call can be routed to a connected headset — declared, but the app never puts a prompt in front of you for them; and a signature-level permission the app defines for its own internal broadcasts. One more, draw over other apps, is declared but is not called by any Khandaq code. None of these read personal data. Khandaq does not declare “all files access” or “ignore battery optimisations”.

Location deserves a note: your position is read only when you choose to send it, and it then travels end-to-end encrypted like any other message. Both apps draw a small map preview for a location message, which means the map provider — OpenStreetMap on Android, Apple Maps on iOS — receives a request for the map imagery around those coordinates, and with it your device’s IP address. Khandaq does not receive either.

Children

Khandaq is not directed to children under 17. Because it provides unrestricted, unmoderated communication, it is rated accordingly on the App Store.

Third parties

Khandaq does not sell or rent personal data to anyone, and it runs no advertising or analytics business. There is no profile to sell: we hold no account, no contact list, and no message content. A small number of services are unavoidably involved in making the app work, and each of them is listed here.

Khandaq is open source, and the Tox protocol libraries it builds on are open source and community-audited, so these claims can be checked against the code rather than taken on trust.

Changes to this policy

If this policy changes, the updated version will be posted on this page with a new “Last updated” date.

Contact

Questions about privacy? Email support@khandaq.org.