Skip to content

Instantly share code, notes, and snippets.

@SkyzohKey
Created October 19, 2016 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SkyzohKey/d74ccbc6d0c6501eedf0d85053c45f47 to your computer and use it in GitHub Desktop.
Save SkyzohKey/d74ccbc6d0c6501eedf0d85053c45f47 to your computer and use it in GitHub Desktop.

Tox Name Resolution proposal

Intro

Let's assume we have 3 Tox nodes in the DHT with some flag system, like:

  1. [-ID] GCQS45MRYJZ4K7XCB5TM...
  2. [-ID] JGZAM85PPHNK3E8V64GG...
  3. [-ID] CXWYHT3XAXJP4PJMNXVK...

Where [-ID] is the node flags, meaning that this node is hosting a ToxID service. Then we have it's public key, allowing an user to easily add that node.

Those 3 Tox nodes are ran by a daemon on a server, we will call them The Services. They will be in charge of computing the Alias to ToxID request.

Now, we have an User we call him Bob, he basically wants to add his girlfriend Alice via it's Alias (Her alias is: alice.privacy.matter).

Bob add Alice by pasting his alias on her client, then press the "Add" button. The following stuff happens:

  1. Bob client read the DHT or use cached data to determine which Service to contact.
  • Client retains GCQS45MRYJZ4K7XCB5TM... and CXWYHT3XAXJP4PJMNXVK... as the services that'll do that computation.
  1. Bob client add those services and ask them to resolve alice.privacy.matter alias, and to return the ToxID (some custom packets may be involved, or simple messages).
  2. The Service known as CXWYHT3XAXJP4PJMNXVK... returns UCJNEFPQGJCCSBRS6QS3X..., which is the Alice public key.
  3. Bob client now can make the request to Alice, without having used HTTP(s)/DNS/other dark magic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment