Re: AsymetricAlgorithm Encryption Limit

Tarik Soulami <[email protected]> Tue, 25 Jun 2002 15:28:44 -0700
Newsgroups gmane.comp.windows.devel.dotnet.general
Message-ID <FDA786C04E4A034989BB35DC0D41DD4403E595E6@red-msg-09.redmond.corp.microsoft.com>
RSA is not supposed to be used to encrypt large amounts of data because
it is an asymmetric algorithm, and is slower than any symmetric
algorithm.

You can't encrypt more than the (modulus size - padding size) at a time,
but nothing prevents you from doing it in chunks. However, it is much
better to use a symmetric algorithm (example: Rijndael or TripleDES) if
you're going to encrypt large amounts of data.

Thanks,
--Tarik

-----Original Message-----
From: Dinesh Upare [mailto:[email protected]]
Sent: Tuesday, June 25, 2002 7:50 AM
To: [email protected]
Subject: [DOTNET] AsymetricAlgorithm Encryption Limit


Hi,

I was trying to encrypt some objects using RSACryptoServiceProvider
class in
.NET.
But if the objects crosses certain limit I get the exception as "Bad
Length".

I went trough the MSDN, it says Asymmetric alorithms are used to encrypt
small bytes of data.

Is it really so? Can't i use RSACrypto... to encrypt large data.

I have a option of using symetric algo to encrypt large data, but before
that I would like to know that,
.NET specifies a limit of data encrypted using Asymmetric algo?

Thanks.

Sincerely

Dinesh

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.