Earlier I wrote about upcoming private messaging with encryption on eSteem. In this post, let's dive into some technical stuff and encryption and decryption of memo and any messages with your Steem keys.
steem-js library for browsers (web) and node applications already have built-in features for you to easily use this.
var encoded = steem.memo.encode(privateWifAccountA, publicWifAccountB, `#This is my private message`);
Above code would return long encrypted text which can be used to send via any medium.
var decoded = steem.memo.decode(privateWifAccountAOrB, encoded);
Encrypted text then decoded on receiver or sender end to see content of message. Steem blockchain is open but your encrypted messages/memos/notes are much safer because only receiver and sender can read them or any other person who has access to private key of either side.
You can already test memo encryption within Steemit. Go to Wallet and Transfer some funds to any account and include memo message with
# hashtag front of message. This way only you and receiver can read the memo message, nobody else knows or sees what you guys are talking about.
For example, I have sent encrypted memo to @demo account few hours ago.
Here is what you see on blockchain:
Here what was actually sent, decrypted on my wallet
Simple enough, right?! Well, there are some practical edge cases where applications should be able to decrypt messages even after user has changed their private keys. But will write more on that, later when feature is live.
Either case, encrypted private messages are possible right now and future dedicated applications can make use of this simple feature we have.
This post has been scheduled with eSteem
Feel free to reach out if you have questions, issues, suggestions, feature requests on eSteem.
email@example.com| Website | Steemit.chat | Telegram | Twitter | Github