PradyumnaKrishna / enigma-protocol

An end to end encrypted messenger using Flask, SocketIO, and Vue.js
https://protocol.onpy.in
MIT License
20 stars 34 forks source link

Add support for long text #34

Closed Sukhendu2002 closed 11 months ago

Sukhendu2002 commented 11 months ago

Issue: https://github.com/PradyumnaKrishna/Enigma-Protocol/issues/20

Sukhendu2002 commented 11 months ago

@PradyumnaKrishna, I make the changes.

So to solve this issue I generate a random symmetric key and encrypt the message with the symmetric key and then encrypt the symmetric key with the recipient public key.

For the receiver end, I am sending the symmetric key along with iv and the encrypted message, the receiver has to first decrypt the symmetric key using their private key and then decrypt the message using the decrypted symmetric key.