commit 504439b79f638424c48ef71d6b5d79b11f31ed17 Author: Suraxius Date: Sun Nov 29 23:28:09 2020 +0100 initial diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..f3323f2 --- /dev/null +++ b/.vimrc @@ -0,0 +1,4 @@ +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 +set expandtab diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e1a09d2 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +distrins: main.cpp core/ api/ resolver/ cluster/ + g++ main.cpp -o distrins diff --git a/README.md b/README.md new file mode 100644 index 0000000..d762874 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# DistriNS +A Distributed approach to Authoritative DNS diff --git a/api/.keep b/api/.keep new file mode 100644 index 0000000..e69de29 diff --git a/cluster/.keep b/cluster/.keep new file mode 100644 index 0000000..e69de29 diff --git a/core/.keep b/core/.keep new file mode 100644 index 0000000..e69de29 diff --git a/core/Makefile b/core/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/index.md b/index.md new file mode 100644 index 0000000..20365af --- /dev/null +++ b/index.md @@ -0,0 +1,77 @@ + +# Bootstraping DNS via Distributed Ledger + +## Table of Contents + +
+ + +## Introduction +Bootstraping the DNS system using a distributed ledger, removing the inherent flaw that is its centralized nature while binding in neatly with current dns infrastructure. + +## Requirements +- Bind into current infrastructure without requireing more then an extra root hint on resolvers. +- Existing domains need to be able to migrate (pre-registering .com, .net and all the others might be the way to go here. +- A zone needs to be secured using one or more keys. +- A key needs the be revokable. +- Keys need to have a hirarchy: have a ranking assigned that decides which key can revoke which other keys. +- Keys need to be restrictable to records or entire zones (scoped) +- ~~Only top-level domains are allowed. Otherwise the chain size grows too large. Using ns records to delegate instead.~~ +- Set allowed level of subdomains in settings with default of 0 (Only root zones like com, net etc.) +- Peer cluster communication needs to be secure, with each client having a private key. + +## Considerations + +### Some calculations + +a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,z,y +0,1,2,3,4,5,6,7,8,9 +and - += 26 + 10 + 1 = 37 + +Max combined length: 255 +37^255 = too large + +Limiting to 5 characters (no numbers) brings the posibilities down to 11'881'376 Domains + +64 bytes per ecc key + + + +## System Parts + +### DNS Resolver +To facilitate queries from current infrastructure for the authoritative zone (set when peer joins the cloud) + +### HTTP API +To create/update/delete zones. + +### Peer Cloud +#### Peering +- Node discovery +- Tracking node uptime +- Rate node quality based on uptime +- DNS record of peers allowed to join are added via transactions +- Allow manual joining of new peer with a token +- Network transparency: Nodes are identified by their public key, not ip address. +- Keep track of which node authorized the joining of a new peer. Allows removal of entire tree of nodes if problematic joins happen. + +#### Consensus +- Limit new zone registrations per time spent part of peer cluster. +- Only allow changes to existing zones once a node has been online for a while. +- Resources may be dropped from local storage once they are superceeded after a certain time period +- Virtual Voting + +### Ledger + +#### Type +- blockchain +- transaction table + +#### Resource Types (Transactions) +- DNS Zone +- DNS Record? +- TLS Certificate +- Resource Access Key +- Authorized Peer (public key of host allowed to join the cluster) + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..e69de29 diff --git a/resolver/.keep b/resolver/.keep new file mode 100644 index 0000000..e69de29