Encryption large amount of data by using Asymmetric encryption.

  • Thread starter Thread starter Bart
  • Start date Start date
B

Bart

Dear all,

I would like to encrypt a large amount of data by using public/private keys,
but I read on MSDN:
"Symmetric encryption is performed on streams and is therefore useful to
encrypt large amounts of data. Asymmetric encryption is performed on a small
number of bytes and is therefore only useful for small amounts of data."
There is not possibility to do it? I have tried to encrypt a 300kB file by
RSA Algorithm, but I received always "Bad length"!

Thank you,

Bart
 
Ciao Bart,

Split the file into small blocks and encrypt each block separately.

Still, do you really need RSA encryption for all the file? You can encrypt
the file with a symmetric algorithm, write the encrypted file and then
append the symmetric key in turn encrypted with RSA.
That's similar to how SSL works - symmetric "session" keys are exchanged
encrypted with RSA (or some other asymmetric algorithm, don't remember for
sure) and then all data exchange is done with symmetric encryption to
improve speed.
 
Back
Top