delvingbitcoin

Hardcoded seeds, DNS seeds and Darknet nodes

Hardcoded seeds, DNS seeds and Darknet nodes

Posted on: September 23, 2024 14:33 UTC

A novel method has been developed for encoding various types of network addresses within DNS records, specifically utilizing AAAA records for this purpose.

This approach demonstrates a unique way to encode onion (Tor), I2P (Invisible Internet Project), and CJDNS (an encrypted IPv6 network) addresses by leveraging the structure of AAAA records. The encoding efficiency of this method is around 50%, primarily due to the inherent overhead associated with each DNS record. For instance, AAAA records come with approximately 12 bytes of overhead, which includes a ten-byte record overhead in addition to one or two bytes dedicated to a hardcoded restricted IPv6 prefix along with ordering information.

The technique employs the ff00::/8 IPv6 prefix to indicate custom encoding, using the subsequent 8 bits for ordering purposes. While this does present an increase in overhead, it's noted that the method operates seamlessly with standard DNS resolution tools such as getaddrinfo and does not affect server-side caching mechanisms negatively. Through this encoding scheme, eleven AAAA records are necessary to represent two addresses each from onion, I2P, and CJDNS networks.

An example provided showcases how this encoding functions in practice, with a demonstration involving the resolution of custom encoded addresses via a specific DNS query. Regular IPv6 addresses remain unaffected by this scheme, ensuring that standard operations are not disrupted. This innovative approach opens up possibilities for DNS-based applications to integrate alternative network address types seamlessly, albeit with considerations regarding the trade-off between encoding efficiency and the versatility of supported address types.