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

February 25, 2008

Encrypt here, Decrypt there…

A common question is: I’m encrypting using on X, but wish to decrypt on Y. Is it possible? The answer is yes — only if all encryption parameters are identical. Here’s a summarized list:

(Assuming it is a symmetric encryption algorithm such as AES, Blowfish, Twofish, 3DES, RC2, etc.)

These input parameters must match on both encrypting and decrypting sides:

(1) Algorithm (AES, Blowfish, Twofish, 3DES, etc)
(2) Mode (CBC, ECB)
(3) Key Length (128-bit, 192-bit, 256-bit, etc.)
(4) Initialization Vector if CBC mode
(5) Binary Secret Key
(6) Padding Scheme (but only last block will differ if mismatched).

A more detailed explanation/example of matching encryption input/output.

Helpful hint: When trying to get two systems to interoperate, use test data that is more than one block long. This way, if all params are matching except the padding scheme, you’ll see that all output blocks are matching except the last one (where the padding differs).


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.