3

Am I missing something, or is RSA very very limiting when it comes to ecrypting data when it comes to the actual message size?

I have read that you can only encrypt a message of around 117 to 200 bytes in size (depending on your key size: 1024 or 2048 bits). Is this correct?

If so, I think I have read people suggesting on using it for larger files. I guess they are just repeating the process many times over and over in blocks of 117 bytes?

user1361315
  • 165
  • 1
  • 5

3 Answers3

7

In practice, asymmetric algorithms like RSA are usually used for key transport. In other words, instead of a true message, they are used to encrypt a secret key for a symmetric cipher.

That symmetric cipher key is used to encrypt the actual message, and that could be gigabytes, depending on the algorithm.

Standards like TLS, PGP, and S/MIME use RSA in this way.

By the way, a limit of 117 bytes is for a 1024-bit RSA key. Keys that small are no longer recommended.

erickson
  • 1,045
  • 8
  • 10
0

RSA is typcially used for a Symmetric Key Exchange, so most cases dont need more bytes. You can,however repeat the encryption for each block of the message.

Chris Kooken
  • 101
  • 1
0

The normal way to encrypt larger data blocks is to use a symmetric crypto algorithm to encrypt the actual data, and then encrypt the symmetric key using RSA.