Welcome on Msgur Quick Notes !
Summary
Msgur (pronounced « Messenger ») is a web service offering a way to share a message in a secure way, only readable a single time (permanently destroyed after read). Messages are encrypted before leaving the sender and uncrypted by receiver at the very last end.Technical details
Message is encrypted using Symmetric AES-GCM Algorithm (a trade-off needed for practicity). Encrypted message is sent to the server, with the initializaton vector but not the key; that encryption key is inserted by the sender, in the final generated URL. To prevent the browser to transmit the encryption key when part of the URL, resource locator is assembled with fragment, using a hash (#) which is not sent as part of the query to the server.
In a nutshell (eveything happens in a browser):
- Sender write a message, then click « Encrypt and Send ».
- For each message, a new 128-bits encryption key (and initialization vector) is computed.
- Message is encrypted in the browser with the fresh generated key.
- The ciphertext (encrypted message) is transmitted to the server (with the iv).
- The server generate a unique random identifier which is stored in a database next to the encrypted message.
- The server send that unique identifier back to the sender.
- The sender craft a reader URL including all needed data needed to decrypt the ciphertext on it's own.
- The sender send that URL to whichever recipient, using the channel he prefers.
ID and the Key to be able to retreive the message and decrypt it.The server doesn't have the key, making encrypted message unreadable server side.
As soon as server receive the recipient request, the message is forwarded the client and then cipher is permanently erased. Because the message is destroyed on first read, if you can get the message, that means no one have seen it before. If the message doesn't exists when you try to read it, that could mean someone is hijacking the message in between.
The message request is operated via JavaScript, client side, to prevent any intermediate service trying to load the page to build a preview and... destroy the message prematurely.
Source code
You don't trust this server ? You don't trust me ? You want to keep control of your data ? That's really nice ! The full client and server code of this project is free and open source, feel free to host, hack it, modify it, improve it, audit it, run it yourself and trust no one else !
Take a look to: maxux/msgur