SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

AES Encryption

Last post 11-18-2008 5:50 AM by DavidPierson. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-09-2005 1:28 PM

    AES Encryption

    Is anyone currently working on or planning on adding AES encryption to SharpZipLib?
  • 09-11-2005 3:14 AM In reply to

    Re: AES Encryption

    Hi,

    Refactoring of encryption to allow this kind of behaviour is still in progress.  So currently no work is being done on AES itself.  There are formatting issues to be compliant with WinZip/PKZIP formats as well as the raw encryption handling.

    Cheers,

    -jr-

  • 11-20-2007 2:39 AM In reply to

    Re: AES Encryption

    Thank you for the excellent SharpZip lib, John.

    I had a go at decrypting an AES-encrypted WinZip file.  Getting hold of the encrypted content stream was straightforward as the doco on the winzip site was correct, and the existing SharpZip code easy to modify.  I then tried using the RijndaelManaged class in .NET 2.0.  The problem is that WinZip are using AES in CTR mode (counter mode) but this is not a supported cipher mode in the RijndaelManaged library. 

     

     


  • 05-30-2008 10:29 PM In reply to

    Re: AES Encryption

     I may be noting something we all know, but I'll state it anyhow for the record for that volunteer who has the time to port the C code that WinZip uses to C#.

     WinZip's AES code (CTR mode) is based on C code written by Dr. Brian Gladman, and available with a BSD/GPL license from:

    http://fp.gladman.plus.com/cryptography_technology/fileencrypt/ 

     It might be possible to use some of the code in the .NET framework and not port all of it.

    You might also find some help over here:

    http://www.bouncycastle.org/csharp/index.html 

    They appear to be using an MIT X 11 license. 

    They have 3 AES engines implemented in C# and Java, also based on Dr. Gladman's code:

    http://www.bouncycastle.org/viewcvs/viewcvs.cgi/csharp/crypto/src/crypto/engines/AesEngine.cs 

     The November 2003 issue of MSDN magazine also had an article with code on implementing AES, I don't think it specifically implemented CTR mode, but it can be found at the Internet Archive at this url:

    http://web.archive.org/web/20070825140924/http://msdn.microsoft.com/msdnmag/issues/03/11/AES/default.aspx 

    Here is another article here:

    http://madebits.com/articles/aes/index.php 

    And an article describing what CTR mode is, as well as the other modes of block ciphers:

    http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29 

     I'd love to help more, but that is all I've got time for today.

  • 11-18-2008 5:50 AM In reply to

    Re: AES Encryption

    Done it!

    This has only taken a year :-) but I have just successfully decrypted an AES-encrypted zip file.  

    Have not yet tried creating a zipfile i.e. encrypting but I don't expect that to be a problem.

    Still a couple of items to finish this off , e.g. the last block of 16 bytes needs special handling, but again that should not be too hard.

    John, how would you prefer me to submit my code. ?

    P.S. I have done most of this with one hand as I broke mu right hand in a painting scaffolding ladder accident. You don't want to know :-)

Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.