Hacker News new | past | comments | ask | show | jobs | submit login
Please Stop Encrypting with RSA Directly (soatok.blog)
21 points by some_furry on Jan 21, 2021 | hide | past | favorite | 1 comment



Disclaimer: I am not a cryptography expert at all.

That point about the maximum length of RSA messages is something I encountered while tinkering with encryption for chat purposes. It's dependent on the size of the RSA key. I ended up slicing the string into pieces that were short enough. Seemed to work fine, as long as the array of encrypted slices stays in the same order. For performance reasons though it makes sense to use a RSA/AES hybrid where you encrypt the actual message with AES and then send that AES key along, itself being RSA-encrypted. It took down the time to decrypt large messages such as pictures by a lot!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: