joplin-notes/joplin notion extension/Web Development/Github/2FA.md
2026-11-04 00:33:23 +05:30

918 B

I have to make a E2E chat application where users can create a room and invite others. RSA can be used to send text messages easily.

To send message from user A to users B,C,D and E i need to encrypt my message 4 times for different users using public key of B,C,D and E and these encrypted version of messages to them. Its not a big deal for text. But if i have to encrypt larger files using RSA then i have to make encrypted version of files 4 times for different 4 users and it would be much slower if there are like 100s of users. So a smart way is to instead of encrypting files using RSA, we can encrypt using any symmetric encryption then encrypt the keys using RSA and send it

Users will get different versions of keys but only 1 encrypted version of that file