User:Elifarley/pds
Main > Software > Wireless mesh networking
Peer Domain System is a decentralized name resolution system which provides strong authentication and prevents name conflicts.
Introduction
Basically, PDS keeps domain name data in .pdz or .pdr text files, which contain signed associations of names to IPs (or CNAMEs, that is, aliases to other names, DNS- or PDS-based).
These files are simple enough so that their domain associations can be easily spread by pasting their content on Twitter, discussion forums, web pages, emails, and so on. Users can simply copy a PDR text line found on a page and paste it on a text file inside the PDS application folder. Or they try to access a domain, and if it's not found among the currently available PDR files, the PDS client will automatically try to fetch it using Bit Torrent or a DHT-based map.
One of the design goals is to make it easy to share name resolution data.
Design Goals
- Be secure, decentralized and human-meaningful to the maximum extent possible
- Be an Application Layer protocol able to work under IPv4 and IPv6 Network Layer protocols.
- prevent name conflicts
- provide error checking on names
- hard to take down
- easy to use
- scalable
- integration with existing internet infrastructure (dns, browsers, bit torrent, twitter, dot p2p)
Standard Syntax
name:NCS#revision@signer
- name: name to be resolved
- NCS: Named CheckSum (any better name for this?) - provides error checking and helps prevent name conflicts
- revision: Like an SVN revision number
- signer: Identifies the public key that should be used to check the signature
- DHT key 1: (name, NCS)
- DHT key 2: (name, NCS, signer)
- DHT key 3: (name, NCS, signer, revision)
Questions:
- signer: How to get the signer's public key?
Examples:
- 3 levels (name:NCS#revision@signer)
- openfarmtech:4h#5@elifarley
- 2 levels (name:NCS):
- openfarmtech#4H
- 1 level (name):
- openfarmtech
Questions
revision should be serial or date?
DNS-style syntax
name.p2p
Examples:
- openfarmtech.p2p
Image Syntax
Encode PDR using QR code / SPARQCode ( a 2D barcode).
TODO Experiment with various 2D barcodes at the Online Barcode Generator
Date format
See wikipedia: Base32 Let's use z-base-32: human-oriented base-32 encoding
YYYDDDSSS YYY = 3 chars for year offset from 2000 DDD from 0 to 365 SSS from 0 to
Implementation Ideas
- Create a DNS server in Python.
- See if http://www.dnspython.org/ can help.
- Looks like this question on Python DNS Server will help.
- PowerDNS using a python app as a Pipe backend
- Search Google
- Use a bit torrent library to download PDZ and PDR files
- PDS client home folder:
- pdz folder
- pdr folder
- PDS client searches for peer domain data on the pdz and pdr folders. If no file matching the name being looked up is found, the pds client initiates multiple searches (on bittorrent, kademlia, twitter, google, etc) and creates a pdz file for each result found.
Use Cases
single record
PDR - Peer domain record - can be pasted on twitter, discussion forums, web pages, emails and so on
#pdr name NCS revision record-type value expiry-date signer digest
- #pdr magic string
- record-type can be a, aaaa, cname
- value can be an ip, standard dns name, other PDS name
examples:
#pdr openfarmtech h2 5 c openfarmtech.org - elifarley 2afqgwk6
#pdr openfarmtech h2 5 c openfarmtech.org - - t9fqj6kf
- expiry is optional
- signer is optional
pdz file
a .pdz file has all records of a given domain. A pds client retrieves the file using a dht like kademlia, bittorrent or other p2p apps. Users can also save such files in a specific folder called pdz, which should be shared with everyone.
name:NCS@signer.pdz