Security enhancements for Steem Messenger

in #utopian-io6 years ago (edited)

Introduction

Steem Messenger is a cool project to bring chat plus encryption on the Steem blockchain. It cleverly uses the memo key and the memo encryption function in the JavaScript library to achieve this goal. I took the time to review the cryptography and security of the design. I haven't seen anything bad or shocking but I notice some nice to have features since we are in a decentralized setting. This is the reason this post is a proposal and not a bug report.

What is missing?

First of all, let's recall how the encryption works. I will assume understanding of asymmetric and symmetric cryptography.

A(priv_A,pub_A)  wants to speak with B(priv_B,pub_B)
A generates a shared secret: priv_A * pub_B = s
Using s, A can encrypt the message m: E(s,m)
B compute s = priv_B * pub_A
B decrypts the message: D(s,E(s,m))=m

So B could have created the encrypted message. B can publish a message and pretend A send it and said I will give you 50 steem for your work. You need to trust the server to know who created the message. But we do not want to trust the server that much, do we?

Secondly the server can change the order of the messages or deliver them later. Or A or B can lie on when the message was created. You need to trust the server timestamp.

Proposal

The first problem is usually solved with signature. On steem, you would use the posting key. Of course there are more complicated route like the signal protocol but I don't think this is what we need.

The second is easily solved using the blockchain timestamp. If when A write a message, she uses the hash of the last block she saw, B knows that the message could not have been created before.

Overall you have both solution when you send transfer with the memo or a comment. You get the
signature and it is anchored in the blockchain. Using transfers is a bit annoying because you have to pay each time. So it could work with comments, on a special post started by A or B and the answer would be as a comment thread.

Conclusion

Those features decrease the trust needed on the server. They don't need to be implemented but they are nice to have in a decentralized system. I would not like the server admin to be bribed... Some of the solutions I laid out don't require much development while other can not just use the default steem-js library. like this project and want to improve its privacy orientation.

Thanks.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

thank you for contributing through utopian.


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Loading...

Hi @cryptohazard it seems like the PO don't see that your suggestions bring any benefits to his project . so we can't approve your contribution .

sorry if we caused any inconvenience


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

yes. No worry. It seems that the PO is annoyed with my proposal while that was not my goal. I don't want to continue argument so if he doesn't validate it, let's leave it like that.

Thanks for your review anyway.

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64266.94
ETH 3077.24
USDT 1.00
SBD 3.87