views:

229

answers:

2

Should I break the text into chunks?

Is RSA the wrong encryption scheme?

A: 

Typically, the asymmetric RSA algorithm is used for key exchanges. If you are encrypting larger chunks of data, it might be better to use something like AES.

Mark Wilkins
+6  A: 

Wrong scheme. The standard technique for message encryption (for example, PGP and CMS) is to generate a random symmetric session key K for something like AES and encrypted the message with AES using key K. Then encrypt K with the public key of each recipient of the message.

GregS
Yes, especially because RSA encryption is very slow compared to symmetric key algorithms like AES. Use RSA to establish a shared key and use that one to encrypt your actual data.
Krystian
You've left out one **crucial** step, which is to pad K with a secure padding scheme - like OAEP from PKCS#1 - before encrypting it with RSA. Crypto++ provides OAEP as an "Asymmetric Cipher Encoding Method".
caf
I left out *all* the crucial steps.
GregS