# ssb-dns DNS on SSB. This repo documents a schema for ssb-dns, and may in the future serve as a JS library of the implementation to be factored out of [dnssb]. ## Schema ### type: `ssb-dns` Add a resource record and/or remove resource records, for a given domain name, class and record type. ```js { type: "ssb-dns", record: { name: string, class: string, type: string, data: string|object|Array?, }, branch: MsgId | [ MsgId ]?, } ``` - **record.name**: fully-qualified domain name for the record (not including the trailing dot) - **record.class**: class, e.g. `"IN"` - **record.type**: record type, e.g. `"A"` - **record.data**: record data. type depends on the record class+type. If `null` or `undefined`, the message adds no new record. - **branch**: id(s) of previous `ssb-dns` messages for the same name+class+type which should be considered deleted by this message. ### Record data The following are schemas for some record types in class `IN`: #### `A`, `AAAA`, `NS`, `PTR`, `CNAME` `domain` - **domain**: string #### `MX` `[priority, name]` - **priority**: number - **name**: string #### `SOA` ```js { mname: string, rname: string, serial: number, refresh: number, retry: number, expire: number, } ``` #### `TXT`, `SPF` `string | [string]` #### `SRV` ```js { priority: number, weight: number, port: number, target: string, } ``` #### `DS` ```js { key_tag: string, algorithm: string, digest_type: number, digest: number, } ``` #### `SSHFP` ```js { algorithm: string, fp_type: string, fingerprint: string } ``` ## Further Resources - [RFC 1034]: Domain names - concepts and facilities - [RFC 1035]: Domain names - implementation and specification - [RFC 2782]: A DNS RR for specifying the location of services (DNS SRV) - [RFC 4509]: Use of SHA-256 in DNSSEC DS RRs - [RFC 4592]: The Role of Wildcards in the Domain Name System - [RFC 6594]: ECDSA and SHA-256 Algorithms for SSHFP [RFC 1034]: https://tools.ietf.org/html/rfc1034 [RFC 1035]: https://tools.ietf.org/html/rfc1035 [RFC 2782]: https://tools.ietf.org/html/rfc2782 [RFC 4509]: https://tools.ietf.org/html/rfc4509 [RFC 4592]: https://tools.ietf.org/html/rfc4592 [RFC 6594]: https://tools.ietf.org/html/rfc6594 [dnssb]: %aVOBlkoiDbK99ROZPIaiiDk+4q2P4+G7MGul4UxkBBM=.sha256 ## License Copyright (c) 2017 Secure Scuttlebutt Consortium Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.