Delphi Math Functions

Cryptography and Multiple-Precision Arithmetic


Contents

Cryptography
Multiple-Precision Arithmetic
Also see Cryptography section of efg's Mathematics Page

Cryptography
Federation of American Scientists:  Cryptology Links
Everything to hide:  Knowing the right cryptographic algorithm
Dr. Dobb's Security Page

Category Source(s)
Anti-Cracking FAQ from Richey's Delphi-Box
http://www.inner-smile.com/nocrack.htm 
ASCryptoKit5 Easy to use, fast and flexible components implementing most popular algorithms to encrypt/decrypt data and calculate digests. Package includes random and prime numbers generators up to 4096 bit. All cryptography components can generate keys, load and save them to file. All but RSA support ECB. CBC, CFB and OFB modes, ciphering in-place or into internal buffers.
http://delphi.icm.edu.pl/ftp/d50share/ASCryptoKit5.zip
Block Ciphers

A block cipher class hierarchy. Currently includes TDESCipher and TBlowfishCipher, with more to come soon. The ciphers all form a hierarchy, descending from TBlockCipher, allowing for polymorphic instantiation of any cipher you choose. The DES implementation has been heavily optimized with a lot of help from Bob Lee. It encrypts 4.2 megs/sec on my Pentium II. Blowfish has been similarly optimized, encrypting 6.5 megs/sec.
www.csd.net/~daves/delphi/BlockCiphers.zip

Crypt32 Delphi Super Page: http://delphi.icm.edu.pl/ftp/d10free/crypt32.zip
Cipher Compendium of various Hash-,Checksum- and Encryption algorithm, include:
Hash-Alogrithm: MD4, MD5, RipeMD160, SHA1, Haval (128-256)
Checksum-Algorithm: XOR16, XOR32, CRC32
Encryption-Algorithm: Gost, Cast128, Cast256, IDEA, Mars, Misty 1, RC2, RC4, RC5, RC6, FROG, SAFER-K40, SAFER-SK40, SAFER-K64, SAFER-SK64, SAFER-K128, SAFER-SK128, TEA, Skipjack, Rijndael, Blowfish.  
http://delphi.icm.edu.pl/ftp/d20free/cipher.zip
Crypt100 This component enables you to store the text of any Control in an encrypted form in the program file so you can protect important information that is only available on runtime.  http://delphi.icm.edu.pl/ftp/d30free/crypt100.zip
Crypt102 by Herzog Samuel. TDESCrypt component. Delphi Super Page: http://delphi.icm.edu.pl/ftp/d30free/crypt102.zip
CryptLib Several advanced encryption algorithms
Delphi Super Page: http://delphi.icm.edu.pl/ftp/d30free/cryptlib.zip
CryptoAPI ProjectJediButton.gif (3350 bytes)
Project JEDI Conversion Library by Massimo Maria Ghisalberti
http://www.delphi-jedi.org/Jedi:APILIBRARY 

Interface for Microsoft CryptoAPI version 1.1
ftp://delphi-jedi.org/api/CryptoAPI1.zip 

Bug-fixed: Interface for Microsoft CryptoAPI version 2.0
ftp://delphi-jedi.org/api/CryptoAPI2.zip 

See also WinCrypt

CryptoFile CryptoFile Ŕ una utilitÓ per la CryptoFile Ŕ una utilitÓ per la cifratura di file di qualunque tipo, possono essere scelti due tipi di cifratura e marchiare il file con il nome del proprietario. www.geocities.com/SiliconValley/Vista/3089/cryptofile.ZIP
Cryptography Links
http://inner-smile.com/free_web.htm#links
Delphi Crypto Software Delphi AdvancedEncryption Components.
Crytpography and Encryption: WinPGP32: Secure Hash Algorithm, BlowFish Algorithm, Elliptic Curve Public Key Component, DES; Also, Delphi Crypto Graveyard.  www.crypto-central.com
Delphi Cryptography Page Binary compatible implementations of SkipJack,Blowfish, RC2, RC4, RC6 and MD5. Crypto Papers: Twofish, Serpant, RC4, RC5, RC6, MD5, Deal.
www.cityinthesky.co.uk/cryptography.html 
Delphi Encryption Compendium A Compendium of various strong Encryption Algorithm and more... includes:
  • 40 Ciphers (IDEA, Blowfish, Twofish, DES, Square ...)
  • 23 Hashs (MD4/5, SHA/1, RipeMD, Havel, Tiger ...)
  • 5 Checksums (CRC32, CRC16-CCITT, CRC16-Standard ...)
  • 6 Textformats (MIME Base 64, XX/UU Coding, RFC1760 Six Word ...)
  • 2 Randoms (LFSR Linear Feedback Shift Register with variable Period upto 2^2032-1 ...)
  • with Ciphers can be encrypt in Modes CTS/ CBC/ CFB/ OFB/ ECB
  • Ciphers supports Message Authentication Codes in CBC-MAC/ CFB-MAC/ CTS-MAC
  • fast Implementation (i.e. Blowfish > 8Mb/sec, MD4 > 27Mb/sec) Internet RFC2289/RFC1760/RFC2444 One Time Password Routines as Component

http://www.torry.ru/vcl/security/strong/chipher.zip
http://delphi.icm.edu.pl/ftp/d20free/cipher.zip

Delphi Pages Encryption
Search Delphi Pages
DES DataEncryptionStandard.pas, which contains TDESCipher, an implementation of the 56-bit Data Encryption Standard block cipher. Also includes an example project.   Optimized with much help from Bob Lee.  Encrypts 4.2 megabytes/sec on a P2.   www.csd.net/~daves/delphi

DES encryption/decryption component. www.geocities.com/SiliconValley/Bay/2111/des.zip

Encrypt Component to code/decode text in a string.  Delphi Super Page: http://delphi.icm.edu.pl/ftp/d10free/encrypt.zip
Encryption in Delphi  (Revisited) www.undu.com/Articles/990427d.html
EncryptMsg, DecryptMsg In Chapter 21, pp. 347-349, How to Program Delphi 3
gbcrypt Simple and very fast Encrypt/Decrypt component working on  registers with a 64 bits key.  Delphi Super Page: http://delphi.icm.edu.pl/ftp/d10free/gbcrypt.zip
How to encrypt a String D3/D4 version using TSecurity class
efg's  SimpleSecurity.ZIP project
Image Encryption CryptImage.jpg (868 bytes)  Image Encryption:  BMPs and JPEGs

See Andreas Filsinger's original  summary of this encryption method and an updated version for Delphi 6.01.

MD5 Algorithm Steve Shafer's UseNet Post with Delphi unit
Message Digests A collection of classes for creating message digests, including MD2, MD4, MD5, SHA-1, and RIPEMD-160. Also includes a class for making secure hashes (HMACs) out of these digests. The hierarchy works out real neat, so they all have a consistent interfaces, and a cute little virtual constructor mechanism for creating the HMACs class.
www.csd.net/~daves/delphi/MessageDigests.zip 
Microsoft CryptoAPI For Your Eyes Only -- Working with the Microsoft CryptoAPI
Delphi Informant
, Feb. 1999, pp. 52-60.  (link broken 8 Oct 2000)
Misty1 A binary compatible implementation of the Misty1 encryption  algorithm.  Delphi Super Page:
http://delphi.icm.edu.pl/ftp/d20free/misty1.zip
PGP Pretty Good Privacy:  Implementing Secure Messaging with PGP, Delphi Informant
www.delphiinformant.com/features/2001/01/di200101mr_f/di200101mr_f.asp 
R2, R4, R5, R6 Block encryption algorithms by David Barton
http://delphi.icm.edu.pl/ftp/d20free/rc2.zip
http://delphi.icm.edu.pl/ftp/d20free/rc4.zip
http://delphi.icm.edu.pl/ftp/d20free/rc5.zip
http://delphi.icm.edu.pl/ftp/d20free/rc6.zip
RSA http://ace.ulyssis.student.kuleuven.ac.be/~triade/GInt/bin/RSA.zip
Shipjack Shipjack block encryption algorithm by David Barton  http://delphi.icm.edu.pl/ftp/d20free/skipjack.zip
Software protection Software protection based on hardware serial numbers that  are being crypted using MD5 and converted to license and  serial registration numbers.   Delphi Super Page:
http://delphi.icm.edu.pl/ftp/d30share/security.zip
Steganography Hiding in plain view:  The little-known technique of steganography provides a stealthy way to conceal data in other text.  http://community.borland.com/article/0,1410,20586,00.html 
SWAG Encryption SWAG (Software Archive Group).  
www.gdsoft.com/swag/encrypt.zip    (requires Reader)
 
TBlowfish Delphi implementation of the popular and fast 'Blowfish' algorithm. Blowfish is royalty free and does not have   any known weaknesses, and can support a key length of up to 448   bits.   Delphi Super Page: http://delphi.icm.edu.pl/ftp/d20free/blownreg.zip
TDESCrypt component See the Delphi Studio Companion CD #1
www.magsys.co.uk/delphi  
TEncrypt Cross-compilable source for Encryption/Decryption component
http://www.mistral.co.uk/gbamber/bin/code1632source.zip
TMxCrypto Allows you to encrypt/decrypt a file with 2 key encryption.
www.silicmdr.com/downloads/mxcripto0.6.zip
Torry's Security Links

www.torry.ru/cryptstrong.htm 
www.torry.ru/crypting.htm 

WinCrypt See also CryptoAPI

Delphi Super Page: http://delphi.icm.edu.pl/ftp/d20free/wincrypt.zip

Bernd Lehmann's Example Project using WinCrypt


Multiple-Precision Arithmetic

Numerical Methods in Pascal page
http://www-rab.larc.nasa.gov/nmp/nmpIndex.htm#LargeIntegers
 

Arbitrary precision computation
http://numbers.computation.free.fr/Constants/Algorithms/representation.html 

Description Source(s)
"Big" Factorials "Big Factorials" program
www.delphiforfun.org/Programs/big_factorials.htm
Big_Number Page Non-Delphi:  Ada
www.chez.com/bignumber/index.html
BNC High-precision (151 digits) floating  point calculator.
http://delphi.icm.edu.pl/ftp/c10free/bnc.zip
GMP 2.0.2: Pascal header for the GNU Multi-Precision Library http://fjf.gnu.de/programs.html#GMP

GNU Multi-Precision (GMP) Info:
www.gnu.org/software/gmp/gmp.html

GNU MP page:
www.swox.com/gmp

Huge Integer Tools (HIT) Marcel Martin's HIT (Huge Integer Tools) is a high-performance set of multi-precision arithmetic tools for Delphi 4  and above. With HIT, you can efficiently and easily program algorithms that require very big integers (or polynomials over GF(2)). HIT was designed to be as fast as possible. The speed is achieved by using fast algorithms and by using optimized assembly code for basic operations

HIT (Huge Integer Tools) is a set of multi-precision arithmetic tools. With HIT you can efficiently implement algorithms that require very big integers or polynomials over GF(2): Primality Testing, Factorization, Public Key Cryptography, etc. (ver. 1.02, HIT is FREE for personal, educational, or any non-commercial  use)
www.znz.freesurf.fr 

HugeInt Huge integer arithmetics. Unsigned integers repesented as string.   As many digits as memory can accept. (ver. 1.0, Demo projects attached. Example prime number search.) 
http://delphi.icm.edu.pl/ftp/d40free/hugeint.zip
Huge numbers Unofficial Delphi Developers FAQ: www.gnomehome.demon.nl/uddf
Section 37, Item 1
LongCalc RPN expression evaluation with vast integers
www.merlyn.demon.co.uk/programs/longcalc.pas
PassCryp.    Simple component which implements Crypto API function to   generate a hash of a string. Good for storing password information in encrypted form inside tables.
http://delphi.icm.edu.pl/ftp/d30free/passcryp.zip
SysTools: BCD High Precision Math http://www.turbopower.com/products/SysTools/bcd

Links Verified 8 Oct 2000
Updated 28 Nov 2002


since 1 Nov 1998