Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free Encryption library for Delphi [closed]

I'm looking for a free and up to date encryption library for Delphi 2010 that implements RSA and AES (Rijndael).

I want a free library because I plan to write and publish some sample code that will use it.

A Delphi 2010 version of TurboPower LockBox has been posted to the SongBeamer site, that implements both of these, but I'm concerned that it's getting a little old. For example, small RSA key sizes and no new security features for many years.

Update: Is the perception that LockBox is out of date or lacks important features incorrect? Is it still relevant for production development? (Particularly the RSA key sizes)

like image 913
Bruce McGee Avatar asked Sep 09 '09 22:09

Bruce McGee


2 Answers

TurboPower LockBox 3.1.0 is now released. It supports:

  • Delphi 2007 and Delphi 2010
  • Unicodestrings for Delphi 2010
  • AES, DES, 3DES, Blowfish and Twofish ciphers
  • A long list of block chaining modes
  • MD5 and SHA1 hashes
  • RSA encryption, decryption, signature and verification
  • Variable length RSA keys - Almost no contraints on the range.
  • D-Unit test code
  • Automatic salting
  • Proper mangement of IV's (in contrast to DCPcrypt)
  • White Box, Free and Open Source
  • 100% visible native source code (no DLL's)

http://sourceforge.net/projects/tplockbox/ and http://lockbox.seanbdurkin.id.au/

like image 126
Sean B. Durkin Avatar answered Sep 22 '22 12:09

Sean B. Durkin


The RSA algorithm is not necessarily out of date, but the key size is important. It is still used regularly all over the place. An RSA key length of 3072 bits should be used if security is required beyond 2030. This is just a function of the improvements in computing power and not a weakness in the algorithm.

I was looking at the LockBox prior to SongBeamer starting to maintain it (Delphi 2007) I found the RSA unstable - just crashing or producing wrong results from time to time. It may have been fixed since then though. If you are going to use it, make sure it supports the key lengths you need, and then create some automated tests with known inputs and outputs. Make sure it runs stable. If it does, then use it by all means.

You can also use the Microsoft Crypto API to do your RSA encryption. I wrote a wrapper for Delphi 2007, but have not updated it for Unicode (I know, shame on me). Someone else might be able to update it to work with Unicode easily.

Another option would be to use the .NET Framework cryptography functions via COM interoperability or something.

like image 45
Jim McKeeth Avatar answered Sep 19 '22 12:09

Jim McKeeth