Public-Key Addressable Resource Records
TLDR • Demo • Architecture • Specifications • FAQ
The simplest possible streamlined integration between the Domain Name System and peer-to-peer overlay networks, enabling self-issued public keys to function as sovereign, publicly addressable, censorship-resistant top-level domains. This system is accessible to anyone capable of maintaining a private key.
Where we are going, this https://o4dksfbqk85ogzdb5osziw6befigbuxmuxkuxq8434q89uj56uyy resolves everywhere!
Try the web app demo Or if you prefer Rust, check out our Examples
sequenceDiagram
participant Client
participant Relay
participant DHT
participant Republisher
Client->>Relay: Publish
note over Relay: Optional Pkarr Relay
Relay->>DHT: Put
Note over Relay,DHT: Store signed DNS packet
Client->>Republisher: Republish request
note over Client, Republisher: Notify Hosting provider mentioned in RRs
loop Periodic Republish
Republisher->>DHT: Republish
end
Client->>Relay: Resolve
Relay->>DHT: Get
DHT->>Relay: Response
Relay->>Client: Response
Native applications can directly query and verify signed records from the DHT if they are not behind NAT. Otherwise, they will need to use a Pkarr Relay.
Browser web apps should try calling the local Pkarr relay at the default port 6881. If not accessible, they must query a remote relay as a fallback. In either case, these apps should allow users to configure relays of their choice.
Clients with private keys can also submit signed records either directly to the DHT or through a Pkarr relay to update their records when needed.
To support existing applications that are unaware of Pkarr, users will need to (manually or programmatically) edit their OS DNS servers to add one or more DNS servers that recognize Pkarr and query the DHT. However, the ideal outcome would be adoption by existing widely used resolvers like 1.1.1.1
(Cloudflare) and 8.8.8.8
(Google).
Pkarr relays are optional but they:
Relays are very light and cheap to operate, making them easy to run altruistically. Private and paid relays are also possible.
Services and hosting providers mentioned in a user’s Resource Records are incentivized to republish these records and keep them alive on the DHT, for the same reasons they are incentivized to gain that user in the first place.
Pkarr uses Mainline DHT as the overlay network, specifically BEP44 for storing ephemeral arbitrary data.
Reasons for choosing Mainline include:
To ensure good scalability and resilience, a few expectations need to be set:
Why would you need resource records for keys?
In pursuit of a sovereign, distributed, and open web, we identify three challenges:
Distributed Semantics: Everything expressed as keys and metadata
Developing interoperable semantics for verifiable metadata about a set of public keys that form a digital identity, complete with reputation, social graph, credentials, and more.
Distributed Database(s): Anyone can host the data
Verifiable data alone is insufficient; a host-agnostic database is essential for an open web, as opposed to walled gardens.
Distributed Discovery: Where is the data?
Before anything else, you need to efficiently and consistently discover the multiple hosts for a given dataset.
Addressing Distributed Discovery first makes the most sense for several reasons:
The marginal utility of solving these challenges positively correlates with their order.
In existing and emerging open social network protocols, users do tolerate limited interoperability between clients, second-class identifiers controlled by hosting or domain servers, inefficient or non-existent conflict-free replication between data stores, and the absence of local-first or offline support. However, their most common complaints involve unavailability, censorship, deplatforming, and difficulty in securely managing keys.
Solve the most issues
Pkarr solves unavailability by turning public keys into resolvable URLs: resource locator. Pkarr solves censorship and deplatforming by allowing users to conveniently change DNS records to point to other providers or platforms. While there are other ways to do this, it is never as reliable and authoritative as DNS. Pkarr helps with key management by enabling users to maintain a long-lasting identity tied to one key, rarely used, and hopefully kept offline at all times.
Finally, by solving censorship and deplatforming in a sovereign way, the need for signed data becomes less urgent, and we buy more time to figure out the UX of signing everything everywhere all the time.
with least work possible
Pkarr doesn’t need to bootstrap anything or invent anything, instead using 15 years old battle tested Distributed Hash Table (Mainline DHT) with millions of nodes, and good old web servers.