Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

July 16, 2007

RSA Encryption not intended for Bulk Data Encryption

Question:
I am trying to use RSA to encrypt 190K of data, but it is taking 72 seconds to run. Can this be sped up?

Answer:
RSA encryption is a *very* time consuming algorithm, and should never be used to encrypt large amounts of data. The typical use for RSA is to encrypt symmetric algorithm session keys. For example, instead of encrypting 190K with RSA, you would generate a secret key for a (much faster) symmetric encryption algorithm, such as AES. You encrypt the data using AES, then use RSA to encrypt the AES key (typically using the public key). You send both the encrypted session key and the encrypted data to your partner. The partner then decrypts the session key with the corresponding RSA private key, and then uses it to decrypt the AES encrypted data.


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.