Timeline for For encrypted chat app, how can I store sent messages so that they are encrypted but still can be viewed by the sender?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 29, 2019 at 16:40 | comment | added | Jake McGhee | @not2savvy I see, that makes sense. With hybrid encryption we are using faster symmetric encryption for messages that can get very long and only using slower asymmetric encryption for key sizes which stay relatively the same size. Thank you very much! | |
Jun 28, 2019 at 9:51 | comment | added | not2savvy | @JakeMcGhee, glad to hear it works well. The main reason for not using the asymmetric encryption with the public key directly is that this does not scale well. Asymmetric encryption algorithms are slower by a factor of 100-10,000 compared to symmetric ones. The message size can differ significantly in size, affecting performance. The solution, called "hybrid encryption", is to use the efficiency of the symmetric algorithm for the message, and use asymmetric encryption for the symmetric key. This scales much better because the key size does not vary. | |
Jun 27, 2019 at 18:45 | comment | added | Jake McGhee | @not2savvy I ended up implementing your solution and it worked very well. One question someone had about my project but I couldn't quite answer is why is this implementation preferable to just encrypting the message itself twice with RSA - once with the sender's public key and again with the receiver's public key and the pair of encrypted messages together. Like I said your implementation works great - I am just trying to understand better the advantages / disadvantages of other implementations. Thank you | |
Jun 2, 2019 at 17:57 | vote | accept | Jake McGhee | ||
Jun 2, 2019 at 10:18 | comment | added | Jake McGhee | This was exactly what I was looking for thank you | |
Jun 2, 2019 at 7:32 | comment | added | not2savvy | Actually, it’s common to encrypt the message with a symmetric key, then encrypt the symmetric key twice with both the recipient‘s and the sender‘s public key, then store both with the message. | |
Jun 2, 2019 at 4:31 | history | answered | ThoriumBR | CC BY-SA 4.0 |