Skip to content

Instantly share code, notes, and snippets.

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 ThisIsMissEm/13d37d8745f39656ed52e88031d69bf6 to your computer and use it in GitHub Desktop.
Save ThisIsMissEm/13d37d8745f39656ed52e88031d69bf6 to your computer and use it in GitHub Desktop.
Securely(?) sharing private keys using DHTs & one-time tokens
‪From the initiating client (owner)‬
1. create a short-code (say 12 lowercase hex characters)‬
2. Using the dat archives public key, encrypt that value, let that be token‬
3. poll a DHT for token's value‬
4. Once we receive a value for that token, encrypt the archive private key with the received public key & save as a file
‪From the new client:‬
1. Ask the user to input the short-code from the same dat archive
2. Using the archives public-key, encrypt that value
3. Create a new public/private key pair
4. Publish the token to a DHT with the public key as the value
5. Wait for archive to update
6. On update, read the file amd decrypt the archive private key using the private key generated in step 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment