Skip to content

Instantly share code, notes, and snippets.

@SkyzohKey
Created October 19, 2016 02:03
Show Gist options
  • Save SkyzohKey/d74ccbc6d0c6501eedf0d85053c45f47 to your computer and use it in GitHub Desktop.
Save SkyzohKey/d74ccbc6d0c6501eedf0d85053c45f47 to your computer and use it in GitHub Desktop.

Revisions

  1. SkyzohKey created this gist Oct 19, 2016.
    22 changes: 22 additions & 0 deletions alias2toxid.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # 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.
    2. **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).
    3. **The Service** known as **CXWYHT3XAXJP4PJMNXVK**... returns **UCJNEFPQGJCCSBRS6QS3X**..., which is the **Alice** public key.
    4. **Bob** client now can make the request to **Alice**, without having used HTTP(s)/DNS/other dark magic.