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!
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!