How Should I Encrypt My Data using RSA in the .NET Framework?

This was a question I found myself asking the past week and what led to some confusion for me was the example code posted on MSDN here https://msdn.microsoft.com/en-us/library/ms148409.aspx. In the example, at the bottom of the page, it was using RSA to do part of the encryption and AES to do another part of the encryption. It wasn’t exactly clear from the post why it was doing it this way, but after a little research I came across this article http://stackoverflow.com/questions/13238674/aes-vs-rsa-to-encrypt-large-size-of-data which explained that RSA is significantly more computationally expensive than AES. I can only assume, given the example was working on a file, that AES was chosen to encrypt the data symmetrically and then RSA was used to asymmetrically encrypt the key used in the AES symmetrical encryption.

Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s