Skip to content

End-to-end encrypted message on Neo blockchain

Notifications You must be signed in to change notification settings

CityOfZion/inbox

Repository files navigation

inbox

Send end-to-end encrypted message to another Neo address on Neo blockchain.

This project is built for educational purposes. It requires you to put your WIF inside the app. It's not able to connect via other connection methods such as WalletConnect, or dAPI yet. Your WIF is stored locally using localStorage and never leave your computer or your phone. You can choose to log out at any time. It will remove your WIF from localStorage.

Demo

Inbox.
https://dinbox.app

Twitter like public timeline with your NeoNS domain.
https://dinbox.app/@apisit.neo

What it can do

  • You can send an encrypted message to any Neo N3 address that has NeoNS's .neo domain.
  • Post on your public timeline

Under the hood

Inbox uses ECDH — Your private key and recipient's public key are used to create a shared secret to encrypt a message with AES. Your public key is sent along with a transaction so a recipient can use it to create a shared secret to decrypt your message.

Inbox uses NeoNS as a decentralized public key server for key exchange mechanism. Your encrypted message is a data attached to a NEP-17 transfer transaction. See sample of a transaction here.

Here is a message protocol and a sample code

let inboxProtocolStruct =  
{
    "text": "",
    "publicKey": "",
    "protocol": "iep-0",
    "fromDomain": ""
    "toDomain": "",
}

let prefixHex = Neon.u.str2hexstring("inbox")
//add prefix to data field so we can catch it later.
let data = prefixHex + Neon.u.str2hexstring(JSON.stringify(inboxProtocolStruct))

Technologies and libraries

This project uses the following underlying technologies and libraries.

Flows

Send Message Read Message

Screenshots

Compose Compose with recipient Account List Message Settings

Install

npm install

Run

npm run start

Build

npm run build

About

End-to-end encrypted message on Neo blockchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published