project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Private Chat

Private Messages on Blockchain using Asymmetric encryption + Symmetric encryption

Private Chat

Created At

ETHOnline 2023

Project Description

I make this project because i have curious about if is possible to have an private chat on blockchain, and can be possible using Asymmetric encryption + Symmetric encryption

First you need to publish a public key generated by your own :

  • With this public key an user can encrypt the message to start a comunication

  • In the message you define what secret key gonna be used from the two users to decrypt the messages

  • Once the comunication is established an acepted, you can start sending messages to the another user using the same secret key

The asymmetric encryption is for the first contact to decrypt the message wihout exposed in the blockchain from a attacker and the symmetric encryption is used to comunicated all the messages

Note :

The reason of why not using just Asymmetric encryption is because i don't wanna store the message in a database or somewhere, i wanna take the sample of how wallets are created, if you lost him you lost the chat, is for security reason and can works like a more decentralizated way, because you and the another parts has the secret key, and the attacker just gonna see the encryptes values and not the real values

The second reason of not using just Asymmetric encryption is because if you send a message and are not stroed anywhere and for exmaple tou reload the information, you gonna see the data that you sended to the another user encrypted, because you need to encrypt with the public key to send the message, so if is not stored anywhere the data is lost, the solution for this is the Symmertic encryption, after the first connection with the another user con send the KEY and IV and in this point you can start sending message and reload the information because the two users is gonna be encrypting the messages with the same key defined for that chat

To be honestly i really wanna build the frontend but i not have much time because i spend a lot of time thinking how this can be possible, and i have luck because i solved, may be is not the best solution but works, and i am happy with that, because i did it :)

How it's Made

I going to use hardhat to compile my smart contracts and start building the test cases, i have a lot of ideas for this, like group chats, private messages, and anothers things, for now i just have time to create the smart contract and trying to use zero knoledge to process the transactions, also has a privacy things

background image mobile

Join the mailing list

Get the latest news and updates