User:Elifarley/pds: Difference between revisions
No edit summary |
|||
Line 16: | Line 16: | ||
* Be an [[wikipedia: Application Layer| Application Layer]] protocol able to work under IPv4 and IPv6 [[wikipedia: Network Layer| Network Layer]] protocols. | * Be an [[wikipedia: Application Layer| Application Layer]] protocol able to work under IPv4 and IPv6 [[wikipedia: Network Layer| Network Layer]] protocols. | ||
*prevent name conflicts | *prevent name conflicts | ||
*hard to take down | *hard to take down | ||
*easy to use | *easy to use | ||
*scalable | *scalable | ||
*provide error checking on names | |||
* | * | ||
*integration with existing internet infrastructure (dns, browsers, bit torrent, twitter, dot p2p) | *integration with existing internet infrastructure (dns, browsers, bit torrent, twitter, dot p2p) | ||
==Standard Syntax== | ==Standard Syntax== | ||
'''name: | Full syntax: | ||
'''name:suffix#revision@signer''' | |||
===name=== | |||
* Name to be resolved | |||
* regexp: '''/[a-z0-9-]*/''' ) | |||
''To test the regexp, see http://regexpal.com/'' | |||
===suffix=== | |||
* Helps prevent name conflicts and provides error checking. | |||
* Format: '''ABC''' with: | |||
** '''ABC''' must match '''/[a-zA-Z0-9]{3}/''' | |||
** The domain owner can only choose '''A''' and '''B''' | |||
** '''C''' is a checksum | |||
** If '''A''' is a letter, '''B''' must be a digit | |||
** If '''A''' is a digit, '''B''' must be a letter | |||
** Examples: | |||
*** b4c | |||
*** b4C | |||
*** B4c | |||
*** B4C | |||
*** 4bc | |||
*** 4Bc | |||
*** 4bC | |||
*** 4BC | |||
===revision=== | |||
Like an SVN revision number | |||
===signer=== | |||
Identifies the public key that should be used to check the signature | |||
* DHT key 1: (name, | ==Keys== | ||
* DHT key 2: (name, | * DHT key 1: (name, suffix) | ||
* DHT key 3: (name, | * DHT key 2: (name, suffix, signer) | ||
* DHT key 3: (name, suffix, signer, revision) | |||
Questions: | Questions: | ||
Line 39: | Line 64: | ||
Examples: | Examples: | ||
* 3 levels (name: | * 3 levels (name:suffix#revision@signer) | ||
** openfarmtech:4h#5@elifarley | ** openfarmtech:4h#5@elifarley | ||
* 2 levels (name: | * 2 levels (name:suffix): | ||
** openfarmtech#4H | ** openfarmtech#4H | ||
* 1 level (name): | * 1 level (name): | ||
Line 89: | Line 114: | ||
PDR - Peer domain record - can be pasted on twitter, discussion forums, web pages, emails and so on | PDR - Peer domain record - can be pasted on twitter, discussion forums, web pages, emails and so on | ||
<code> | <code> | ||
#pdr name: | #pdr name:suffix#revision record-type value expiry-date signer digest | ||
</code> | </code> | ||
* #pdr magic string | * #pdr magic string | ||
Line 108: | Line 133: | ||
<code> | <code> | ||
name: | name:suffix@signer.pdz | ||
</code> | </code> | ||
Revision as of 00:07, 31 March 2011
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
- hard to take down
- easy to use
- scalable
- provide error checking on names
- integration with existing internet infrastructure (dns, browsers, bit torrent, twitter, dot p2p)
Standard Syntax
Full syntax: name:suffix#revision@signer
name
- Name to be resolved
- regexp: /[a-z0-9-]*/ )
To test the regexp, see http://regexpal.com/
suffix
- Helps prevent name conflicts and provides error checking.
- Format: ABC with:
- ABC must match /[a-zA-Z0-9]{3}/
- The domain owner can only choose A and B
- C is a checksum
- If A is a letter, B must be a digit
- If A is a digit, B must be a letter
- Examples:
- b4c
- b4C
- B4c
- B4C
- 4bc
- 4Bc
- 4bC
- 4BC
revision
Like an SVN revision number
signer
Identifies the public key that should be used to check the signature
Keys
- DHT key 1: (name, suffix)
- DHT key 2: (name, suffix, signer)
- DHT key 3: (name, suffix, signer, revision)
Questions:
- signer: How to get the signer's public key?
Examples:
- 3 levels (name:suffix#revision@signer)
- openfarmtech:4h#5@elifarley
- 2 levels (name:suffix):
- 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:suffix#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:suffix@signer.pdz