Public-Key Addressable Resource Records
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 would be accessible to anyone capable of maintaining a private key.
Where we are going, this https://o4dksfbqk85ogzdb5osziw6befigbuxmuxkuxq8434q89uj56uyy resolves everywhere!
TTL
values in them to minimize DHT traffic as much as possible for improved scalability and reliability.Try the web app demo.
Or if you prefer Rust Examples
sequenceDiagram
participant Client
participant Server
participant DHT
participant Republisher
Client->>Server: Publish
note over Server: Optional Pkarr Server
Server->>DHT: Put
Note over Server,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->>Server: Resolve
Server->>DHT: Get
DHT->>Server: Response
Server->>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 server as a relay.
Browser web apps should try calling local Pkarr server at the default port 6881
, if not accessible, they have to query a remote server instead. Eitherway, these apps should allow users to configure servers of their choice.
Clients with private keys are also capable of submitting signed records either to the DHT directly, or through Pkarr relay server, to update user’s records when needed.
To support existing applications totally oblivious of Pkarr, users will have to (manually or programatically) edit their OS DNS servers to add one or more DNS servers that recognize Pkarr and query the DHT to resolve packets from there. However, the best outcome would be adoption from existing widely used resolvers like 1.1.1.1
and 8.8.8.8
.
Pkarr relays are optional but they:
Relays are very light and cheap to operate, that they can easily run altruistically, but private, and paid servers are possible too.
Services and hosting providers mentioned in Resource Records of a user, 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 will use Mainline_DHT as the overlay network. Specifically BEP44 for storing ephemeral arbitrary data.
Reasons for choosing Mainline include:
To ensure a good chance of scalability and resilience, a few expectations need to be set straight:
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?
But before that, you need to efficiently and consistently discover the multiple hosts for a given data-set.
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 to resolvable URL: 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 that, it is never as reliable and authoritative as DNS. Pkarr help 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 ina 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
Pkarr doesn’t need to bootstrap anything or invent anything, instead using 15 years old battle tested Distributed Hash Table with millions of nodes, and good old web servers.
Why not human readable domains on a blockchain?
Introducing scarcity to names, arguably the most subjective and personal thing in our lives, serves noone except rent seekers. We already know how to use phonebooks, we just need to upgrade small numbers, to bigger sovereign keys.
Why not GNU Name System?
The GNU net is exciting and impressive, but I didn’t have enough time to test it or understand how hard it would be to build a PoC on top of it.
GNU name system seems to support Petname system natively, which means it does require more storage and bandwith from the DHT than a 1000 bytes max size enforced by Mainline DHT. I believe that petnameing should be left to application layer.
Luckily GNU net uses ed25519 key as well, so there is always a path for migration if we are careful.