Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions for a cheap/free .NET library for doing Zip with AES encryption?

I'm trying to find an zip compression and encryption component with encryption suitable for use by the US Federal Government, so I can't use Zip 2.0 encryption, it has to be AES or the like. I've already found SharpZipLib (can't do AES encyrption), and Chilkat (can do AES encryption, but costs money). Am I missing any other options?

like image 771
MatthewMartin Avatar asked Dec 04 '08 13:12

MatthewMartin


1 Answers

How much would you be willing to pay for AES in DotNetZip? ;)

DotNetZip supports AES Encryption, with 128 or 256-bit keys.

http://www.codeplex.com/DotNetZip

Example code:

  using (ZipFile zip = new ZipFile())
  {
    zip.AddFile("ReadMe.txt"); // no password for this entry

    // use a password for subsequent entries
    zip.Password= "This.Encryption.is.FIPS.197.Compliant!";
    zip.Encryption= EncryptionAlgorithm.WinZipAes256;
    zip.AddFile("Rawdata-2008-12-18.csv");
    zip.Save("Backup-AES-Encrypted.zip");
  }

The AES-encrypted zip files produced by DotNetZip can be read and extracted by WinZip, and vice-versa.

You can also just create regular zip files without encryption.

oh, and it's free.

like image 197
Cheeso Avatar answered Oct 28 '22 12:10

Cheeso