Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@navarr
Created September 16, 2015 16:10
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 navarr/ddc541a41421c98fa315 to your computer and use it in GitHub Desktop.
Save navarr/ddc541a41421c98fa315 to your computer and use it in GitHub Desktop.

I have no idea how the blockchain works, but I think it'd be a great place for storage of distributed, encrypted, easily accessible mail.

Step 1 - Registration

An entry goes into the blockchain with the desired address (this is a username). The earliest entry for each desired address is the only one that is legitimate.

With this entry is stored a public key. Imagine the following psuedo-structure:

{ "type": "registration", "address": "navarr", "public-key": "data:text/plain;base64,--keyfile--" }

The user is then given a private key which they must keep in order to access that address. This is explained very carefully to the user. "This file is your login. You will not be able to login without this file. Store it in several safe places."

Step 2 - Sending Mail

{ "type": "message", "from": "bill.gates", "to": "navarr", "message": "data:text/plain;base64,-- private key encrypted --public key encrypted file-- --" }

A client would do a search on the blockchain for all messages to "navarr". For each of these it would grab the public key from the from sender to decrypt the first layer. This validates that the message is from the sender. Then, the user's private key is used to decrypt the second layer to view the message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment