Link to home
Start Free TrialLog in
Avatar of DrDamnit
DrDamnitFlag for United States of America

asked on

Encrypt a file with RSA in .net

I am working on an ecryption module for an app, and I need to be able to encrypt an entire file to send it over the network to the server.

The functionality I am looking for is similar to what gnu pgp provides (or the Windows counterpart, Cryptophane).

Problem I am running into is that RSA appears to only work up to a certain size (and not very big at that).

How would I use RSA to encrypt a 500k or 1mb file?

Worst case scenario, can it be used to encrypt 8192 bytes at a time so I can encrypt the chunks being sent to the server?

Thanks in advance.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

As this tutorial suggests, RSA is recommended for encrypting small amounts of data such as passwords
http://www.dreamincode.net/forums/showtopic67705.htm

Is using some other encryption an option?
Avatar of DrDamnit

ASKER

Other encryption is definitely an option.

As long as I can encrypt / decrypt using .net, I don't care what the encryption is. (stronger the better obviously!)
oh... I also prefer asymmetric encryption that uses a public and private key pair.
I have a utility class which i use for encryption/decryption in my projects. I can post the code if you are interested.
Yes. Please do.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bhermer
bhermer