Last active
August 29, 2015 14:02
-
-
Save irungentoo/58dd6df2681093026c87 to your computer and use it in GitHub Desktop.
tox dns3 standard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tox dns3 standard. | |
Encrypted Tox dns requests and responses. | |
request: | |
[4 byte nonce][temporary client public key][encrypted with crypto_box(temporary client public key, server long term public key, 4 byte nonce + 20 byte zeros)[queried username]] | |
-> base32 (a to z, 0 to 5) -> separate with . as needed. | |
Notes: | |
-the temporary public key is a public key temporarily generated that is discarded right after the session is. | |
-4 byte nonce must be increased by 1 on every request (it must not be generated randomly because birthday problem) | |
-every 2^32 requests (if that ever happens) the temporary client public key must be changed | |
(two requests with the same nonce must never ever happen.) | |
response: | |
DNS TXT record: | |
[encrypted with crypto_box(temporary client public key, server long term public key, 4 byte nonce(sent in request) + 1 byte equal to 1 and 19 bytes of zeros (this is the same 4 byte nonce that was sent in the request))[Tox id (binary format)]] | |
-> base32 (same as above) | |
Possible issues with this: | |
-no PFS (find some way of making the server change its key every couple of days maybe?) | |
-clients need a local list of tox dns server long term public keys. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment