README.mdView |
---|
| 1 … | +# ssb-dns |
| 2 … | + |
| 3 … | +DNS on SSB. |
| 4 … | + |
| 5 … | +This repo documents a schema for ssb-dns, and may in the future serve as a JS |
| 6 … | +library of the implementation to be factored out of [dnssb]. |
| 7 … | + |
| 8 … | +## Schema |
| 9 … | + |
| 10 … | +### type: `ssb-dns` |
| 11 … | + |
| 12 … | +Add a resource record and/or remove resource records, for a given domain name, class and record type. |
| 13 … | + |
| 14 … | +```js |
| 15 … | +{ |
| 16 … | + type: "ssb-dns", |
| 17 … | + record: { |
| 18 … | + name: string, |
| 19 … | + class: string, |
| 20 … | + type: string, |
| 21 … | + data: string|object|Array?, |
| 22 … | + }, |
| 23 … | + branch: MsgId | [ MsgId ]?, |
| 24 … | +} |
| 25 … | +``` |
| 26 … | + |
| 27 … | +- **record.name**: fully-qualified domain name for the record |
| 28 … | + (not including the trailing dot) |
| 29 … | +- **record.class**: class, e.g. `"IN"` |
| 30 … | +- **record.type**: record type, e.g. `"A"` |
| 31 … | +- **record.data**: record data. type depends on the record class+type. |
| 32 … | + If `null` or `undefined`, the message adds no new record. |
| 33 … | +- **branch**: id(s) of previous `ssb-dns` messages for the same name+class+type |
| 34 … | + which should be considered deleted by this message. |
| 35 … | + |
| 36 … | +### Record data |
| 37 … | + |
| 38 … | +The following are schemas for some record types in class `IN`: |
| 39 … | + |
| 40 … | +#### `A`, `AAAA`, `NS`, `PTR`, `CNAME` |
| 41 … | +`domain` |
| 42 … | + |
| 43 … | +- **domain**: string |
| 44 … | + |
| 45 … | +#### `MX` |
| 46 … | +`[priority, name]` |
| 47 … | + |
| 48 … | +- **priority**: number |
| 49 … | +- **name**: string |
| 50 … | + |
| 51 … | +#### `SOA` |
| 52 … | +```js |
| 53 … | +{ |
| 54 … | + mname: string, |
| 55 … | + rname: string, |
| 56 … | + serial: number, |
| 57 … | + refresh: number, |
| 58 … | + retry: number, |
| 59 … | + expire: number, |
| 60 … | +} |
| 61 … | +``` |
| 62 … | + |
| 63 … | +#### `TXT`, `SPF` |
| 64 … | +`string | [string]` |
| 65 … | + |
| 66 … | +#### `SRV` |
| 67 … | +```js |
| 68 … | +{ |
| 69 … | + priority: number, |
| 70 … | + weight: number, |
| 71 … | + port: number, |
| 72 … | + target: string, |
| 73 … | +} |
| 74 … | +``` |
| 75 … | + |
| 76 … | +#### `DS` |
| 77 … | +```js |
| 78 … | +{ |
| 79 … | + key_tag: string, |
| 80 … | + algorithm: string, |
| 81 … | + digest_type: number, |
| 82 … | + digest: number, |
| 83 … | +} |
| 84 … | +``` |
| 85 … | + |
| 86 … | +#### `SSHFP` |
| 87 … | +```js |
| 88 … | +{ |
| 89 … | + algorithm: string, |
| 90 … | + fp_type: string, |
| 91 … | + fingerprint: string |
| 92 … | +} |
| 93 … | +``` |
| 94 … | + |
| 95 … | +## Further Resources |
| 96 … | + |
| 97 … | +[RFC 1034]: Domain names - concepts and facilities |
| 98 … | +[RFC 1035]: Domain names - implementation and specification |
| 99 … | +[RFC 2782]: A DNS RR for specifying the location of services (DNS SRV) |
| 100 … | +[RFC 4509]: Use of SHA-256 in DNSSEC DS RRs |
| 101 … | +[RFC 4592]: The Role of Wildcards in the Domain Name System |
| 102 … | +[RFC 6594]: ECDSA and SHA-256 Algorithms for SSHFP |
| 103 … | + |
| 104 … | +[RFC 1034]: https://tools.ietf.org/html/rfc1034 |
| 105 … | +[RFC 1035]: https://tools.ietf.org/html/rfc1035 |
| 106 … | +[RFC 2782]: https://tools.ietf.org/html/rfc2782 |
| 107 … | +[RFC 4509]: https://tools.ietf.org/html/rfc4509 |
| 108 … | +[RFC 4592]: https://tools.ietf.org/html/rfc4592 |
| 109 … | +[RFC 6594]: https://tools.ietf.org/html/rfc6594 |
| 110 … | +[dnssb]: %aVOBlkoiDbK99ROZPIaiiDk+4q2P4+G7MGul4UxkBBM=.sha256 |
| 111 … | + |
| 112 … | +## License |
| 113 … | + |
| 114 … | +Copyright (c) 2017 Secure Scuttlebutt Consortium |
| 115 … | + |
| 116 … | +Usage of the works is permitted provided that this instrument |
| 117 … | +is retained with the works, so that any entity that uses the |
| 118 … | +works is notified of this instrument. |
| 119 … | + |
| 120 … | +DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. |