posted 15 years ago
Most folks don't do it that way. RSA only works on blocks of the key length. The normal approach is to generate a random number/nonce, encrypt it with RSA and send it. Then use that random nonce to encipher the long string, send that too. On the receiving end, use RSA to decrypt the nonce, and use it to decrypt the rest of the message.