Skip to main content

A federated end-to-end encrypted messaging protocol delivered over DNS

Project description

DNS Mesh Protocol

End-to-end encrypted messaging delivered over DNS. No central server, no app store, no gatekeeper — runs on the same infrastructure the internet already runs on.

Documentation · Getting started · Protocol spec · 5-min training deck

Status: alpha, pre-external-audit. Wire format, federation, identity / key rotation, multi-tenant auth, and the formal protocol spec are shipped. Don't route confidentiality-critical traffic through DMP until the cryptographic audit lands. See SECURITY.md.

What it is

DMP is an open protocol for moving end-to-end encrypted messages between two people, using DNS as the transport. The recipient looks your records up the same way any computer looks up google.com.

Instead of trusting one company to relay your messages, you trust the DNS recursive chain — which is already what every device on the internet does for every other lookup, all day, every day. That chain has no single owner.

If DNS works on your network, DMP works on your network.

Try it (5 min, against the public node)

pipx install dnsmesh

dnsmesh init alice --domain dmp.dnsmesh.io --endpoint https://dnsmesh.io
dnsmesh tsig register --node dnsmesh.io     # one HTTPS hop, mints a TSIG key
dnsmesh identity publish                     # DNS UPDATE + TSIG, no more HTTPS
dnsmesh identity refresh-prekeys             # forward-secret first messages

# Add a contact you know (someone who's already published):
dnsmesh identity fetch bob@dmp.dnsmesh.io --add

# Send + receive
dnsmesh send bob@dmp.dnsmesh.io "hi bob"
dnsmesh recv

Curious what a node currently publishes:

dig _dnsmesh-heartbeat.dmp.dnsmesh.io TXT +short

Full walkthrough with troubleshooting in Getting Started.

Self-host (one VPS)

curl -fsSL https://raw.githubusercontent.com/oscarvalenzuelab/DNSMeshProtocol/main/deploy/native-ubuntu/install.sh \
    | sudo DMP_NODE_HOSTNAME=dmp.example.com bash

After install you need to delegate a DNS subzone to the node so public resolvers can find the records it serves. One NS record at your registrar, one env var on the node. Full walkthrough: Deployment → DNS subdomain delegation.

For a clustered HA deployment (3+ nodes with anti-entropy): Deployment → Cluster.

How the trust model works

After M9 (0.5.x), the protocol speaks DNS in both directions:

  • Reads — plain DNS TXT queries. Anyone can resolve any user's identity, mailbox slots, or chunks via the public recursive chain.
  • Writes — RFC 2136 DNS UPDATE signed with RFC 8945 TSIG. Each user holds a per-user TSIG key (minted via one HTTPS call to /v1/registration/tsig-confirm) scoped to their own DNS owner patterns. Two users sharing a node can't overwrite each other.

The only HTTPS the protocol uses for normal operation is that one TSIG-key registration step. Everything else is DNS. Cluster anti-entropy between same-operator nodes stays HTTPS as a documented HA-only exception (design note).

End-to-end encryption is X25519 ECDH + ChaCha20-Poly1305, with Ed25519 sender authentication and one-time prekeys for forward secrecy. Wire format and crypto details: Protocol → Wire format.

Not a good fit for

  • Real-time chat (DNS caching gives propagation in seconds-to-minutes)
  • File transfer or media payloads
  • Anonymity from traffic analysis (DMP hides content, not metadata)

Contributing

See CONTRIBUTING.md. 1357+ tests; security-sensitive changes get an extra review round.

License

AGPL-3.0 — if you host DMP as a service you must publish your changes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dnsmesh-0.6.0.tar.gz (550.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dnsmesh-0.6.0-py3-none-any.whl (366.0 kB view details)

Uploaded Python 3

File details

Details for the file dnsmesh-0.6.0.tar.gz.

File metadata

  • Download URL: dnsmesh-0.6.0.tar.gz
  • Upload date:
  • Size: 550.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dnsmesh-0.6.0.tar.gz
Algorithm Hash digest
SHA256 739f92376d7d4fe055b4175f30d67c113a8c2f6fac655afbb01d9f35f8d70880
MD5 0e7468dd7580a6485654104b1ebde508
BLAKE2b-256 bdce021838c922154bfd1e0c78a6eca675f975e56529f44eb021b9cd5ce810cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnsmesh-0.6.0.tar.gz:

Publisher: publish-pypi.yml on oscarvalenzuelab/DNSMeshProtocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dnsmesh-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: dnsmesh-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 366.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dnsmesh-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55d5b83d6de574c1b2340df6ff43c1d908378a1281d49ba6925edf8b3feb14d5
MD5 119ef47efa9285a309f39a9ef5b87a94
BLAKE2b-256 040191ff4f313e700352a50bb600187f541365a64a36cb1021c191184c25a426

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnsmesh-0.6.0-py3-none-any.whl:

Publisher: publish-pypi.yml on oscarvalenzuelab/DNSMeshProtocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page