Home > Delphi > Delphi Encryption Compendium (DEC) 5.2 for D2009 released

Delphi Encryption Compendium (DEC) 5.2 for D2009 released

November 25th, 2008

Hi,

I’ve recently released an updated version of the Delphi Encryption Compendium (DEC) compatible with Delphi versions up to 2009. A code example of using it with Unicode strings is included in the library.

This libary was updated and released with permisson of the original author Hagen Reddman who developed the versions DEC 3 and DEC 5.1.

The Delphi Encryption Compendium supports several hashes, ciphers and text encodings and is imho one of the best libraries for strong cryptography in Delphi. And the best: It is free of charge!

It is available at Torry: http://www.torry.net

Thanks to Michael Puff (a.k.a. Luckie) for hosting the library on his server!

Due to the request here are the hashes for the file DEC_v5.2.zip linked at Torry / Michael’s Server:

<dec_v5.2.zip>

MD5: af599125809e4258597138a7c4496b80
RipeMD128: 9e2717abecbcd20623ebb05a04a70143
RipeMD160: fe25c2d89c2487412c4c7b9d04a2f4a9eaf792df
SHA1: cda26284cd4099a30bd7c32e2076bac0cd1b9f32
SHA256: cdec0862005a6da637d3f7d9277d2cb65f0c3eb58f5a02866989e9b56879f999

Arvid Delphi , , , ,

  1. Salvor Hardin
    November 25th, 2008 at 17:20 | #1

    Thanks!

    Would it be possible for you to publish the SHA256 hash of DEC 5.2 package, so we can verify the version downloaded from Torry is not modified?

    Thanks again! And keep up the great work!

  2. Arvid
    November 25th, 2008 at 17:42 | #2

    Hi Salvor or should I better say Mayor ;)

    You’re welcome! I’ve added some hash informations to the blog post above.

  3. Adrien
    November 25th, 2008 at 20:33 | #3

    Hi Arvid,

    Speaking about encryption, do you know if the DCP library (Delphi Ciphers and Hashs) works under D2009 ? I use them under D2007 with great success, and I’m planning to upgrade soon… Thanks.

  4. Arvid
    November 25th, 2008 at 21:45 | #4

    Hi Adrien,

    as far as I know Dave’s DCP library has not been updated (yet?). I haven’t tested it as I am knowing of two working libraries so far (my DEC and TP LockBox ported by Sebastian Zierer available at http://www.songbeamer.com/delphi/).

    Checking Dave’s page it seems that the DCP is stuck at the D2005 level somehow but I would expect some problems using it in D2009 without additional changes.

    Best is to contact Dave and ask for an updated version.

    Regards
    Arvid

  5. K. A.
    November 25th, 2008 at 22:11 | #5

    Very nice Job!

    Thank you!

  6. Thomas
    June 2nd, 2009 at 12:55 | #6

    Hi Arvid.

    It seems that the downloads at torry.net do not match the MD5 and SHA256-haashes (I did not test the others). However, the download from Luckie’s page works fine and the hashes are correct.

  7. Arvid
    June 2nd, 2009 at 13:36 | #7

    Hi Thomas,

    @Thomas
    Torry missed the last update from Michael’s Website so the checksum was different. I started an update process for the Torry entry but this will take some time as it has to be reviewed by them.

    Thank you for pointing to this!

    Cheers,
    Arvid

  8. Jordi
    June 29th, 2009 at 12:01 | #8

    Hi!

    I want to upgrade to Delphi 2009 and I need to use the Cipher tools. And the components uploaded in Torry’s page are uncompleted. Where can I download the correct version? Any link?

    Thanks!!

  9. Arvid
    June 29th, 2009 at 12:21 | #9

    @Jordi
    Hi Jordi,

    the package is complete.

    The DEC 5 is a complete rewrite of the DEC 3.x. You will likely experience incompatibilities, especially when talking about the proprietary block chaining modes and the CipherManager components you’d mentioned.

    Hagen already removed the CipherManager wrapper components in the year 2006. I cannot port something to Delphi 2009 what isn’t there.

    Cheers,
    Arvid

    P.S.: The 2006 version is found here: http://www.michael-puff.de/Developer/Delphi/Importe/Hagen_Reddmann/Archiv/

  10. Figo
    November 18th, 2009 at 18:58 | #10

    Hi !

    Is there any forum support / help for DEC 5.2 ?

    A used 2.2 version of DEC, but impossible to decrypt 2.2 crypted material with 5.2 routines.

    Here is my Encode routine for 2.2 :

    with TCipher_Blowfish.Create do
    try
    IncludeHashKey := True;
    InitKey(AnsiString(myKey), nil);
    try
    DecodeStream(InputStream, OutputStream, InputStream.Size – Hash.DigestKeySize);
    except
    Result := False;
    end;

    2.2 version uses SHA1 default class for key, and include it at begining of crypted stream, so I’ve try (and a lot of others ways) someting like this with DEC 5.2 :

    Buf := AllocMem(20); // Size of Hash.Digest in 2.2
    InputStream.Read(Buf^, 20);

    with DECCipher.TCipher_Blowfish.Create do
    try
    Mode := cmCBCx; // CTSx doesn’t work
    Init(Buf); // Init(THash_SHA1.KDFx(myKey, RandomBinary(16), Context.KeySize) doesn’t work better
    DecodeStream(InputStream, OutputStream, InputStream.Size – 20);
    finally
    Free;
    end;

    Nothing is working, i’m desperate…
    Someone to help me ?
    Thanks…

    • Arvid
      November 19th, 2009 at 11:10 | #11

      Hi figo,

      I already considered setting up a project page for the DEC. Check back to my blog, I’ll publish it here as soon as I am ready.

      But: Regarding your current problem there is no one-step solution. The DEC 3 had been out for several years, even the DEC 5.1 was available since ~ 2004 iirc. There are so many breaking changes which where made long before I had taken care of the source, so every compatibility issue is a time-consuming challange on it’s own. Sorry to say that.

      Cheers,
      Arvid

  11. Arvid
    March 9th, 2010 at 01:25 | #12

    Hi Maestro3,

    thank you for your comment. I will have a look at it as soon as I have some spare time.

    Regards,
    Arvid

  1. No trackbacks yet.