Privacy in online communication is a fundamental right of every person. Exchanging private instant messages securely over the internet should be easy and accessible to all. Blockchain technology proposes the ideal foundation to enable this solution. Up to now, on-chain instant messaging deployment would be hard to achieve due to slow blockchain network speed, congestion and transaction cost. With the arrival of the Solana blockchain on-chain, instant messaging is becoming a reality.
What it does
FOURim protocol leverages the Solana blockchain to serve as an immutable ledger exchanging encrypted messages from
FOURwaL wallet address A to
FOURwaL wallet address B theoretically in real-time. Messages on the blockchain are encrypted with the asymmetric algorithm (i.e.,
RSA), which is used to encrypt the instant message with the public key of the receiver. This design does not allow an attacker to infer relationships between segments of the encrypted message. Smart contracts are used to facilitate two unique requirements: (1) saving instant messages from the sender; and (2) retrieving instant messages from receivers.
How we built it
FOURim is being added to the existing 4thTech framework which already includes some components needed. Those components are (1) 4thTech Chromium and Firefox add-on wallet with added
Solana blockchain support; (2) 4thTech digital identity which serves as a public key exchange point between users; and (3) 4thTech web platform client which enables users to interact with instant messaging protocol.
The FOURim Solana program (smart contract) is available at: https://explorer.solana.com/address/2B21gTWNcVVvkWeDGtADzEyS57L4qRHqHBghbUVv1RkM?cluster=devnet
4thTech web platform client codebase was rewritten with
TypeScript and has overgone the crucial performance upgrade from
Vue 2 to
Vue 3. New features and functions are embedded, so the user experience can be as intuitive as possible. The update includes automatic electronic data verification (i.e., FOURns), while the blockchain network address recognition system simplifies the data file exchange (i.e., FOURdx) process. The 4thTech web platform client enables users to solve important technical blockchain challenges within a niche sector of data file exchange and instant messaging while supporting
Polkadot-Edgeware and now
Solana public chains.
Encryption of instant messages excample:
// Retrieve a receiver RSA public key const recipientPublicKey = await storageService.retrievePublicKey( formData.recipient.account.address, );
// Asymmetric encrypt - encrypt message const key = new NodeRSA(); key.importKey(publicKey, 'pkcs8-public');
const encryptedMessage = key.encrypt(message, 'base64');
// Save data to blockcahin const txDetails: TransactionDetails = await blockchainService.sendInstantMessage( sender.account, recipient.account.address, encryptedMessage, );
Challenges we ran into
The capacity of the message length and exact
TX message cost will be determined in the test phase. There is a possibility of the unlimited message length which would directly correlate with the
Accomplishments that we're proud of
We are proud of our coming fourth-year birthday. We are extremely proud of our breakthroughs in the fields of multi-blockchain application deployment and our research and development from the fields of decentralized data file and instant messaging exchange.
What we learned
During the past four years, we have learned that blockchain adoption will be coming first from the crypto space and later from the mainstream sectors. When
TX cost for executing our wallet to wallet data file exchange
SC went to 160$, we learned that you can not rely only on one chain and that blockchain interoperability and multi-chain deployment is a must.
What's next for Solana blockchain instant messaging protocol (FOURim)
After a successful deployment of the
Solana instant messaging protocol (i.e., FOURim) on the 4thTech web platform client, we are planning to develop a mobile client application.