Index of /crypto

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]AdvCrypto.zip18-Nov-2007 23:09 637K 
[   ]AppliedCryptography2ndEdition.zip18-Nov-2007 23:09 3.4M 
[   ]Basic and Digest Authentication.url18-Nov-2007 23:09 92  
[   ]CAPICOM_CHM.zip18-Nov-2007 23:09 274K 
[TXT]CapiSig.html18-Nov-2007 23:09 32K 
[   ]CapiSig.zip18-Nov-2007 23:09 23K 
[   ]Crypt-CBC-KDF.zip18-Nov-2007 23:09 7.8K 
[TXT]Crypto.java18-Nov-2007 23:09 5.6K 
[   ]CryptoAPI_KeyBrowser.zip18-Nov-2007 23:09 207K 
[TXT]DHBigInt.html18-Nov-2007 23:09 56K 
[TXT]DHBigInt.pl.html18-Nov-2007 23:09 37K 
[   ]DHVer3.zip18-Nov-2007 23:09 52K 
[   ]PbkBlobFromCert.zip18-Nov-2007 23:09 4.5K 
[   ]PrimeGen.out17-Oct-2010 16:58 5.2K 
[TXT]PrimeGen.pl.txt18-Nov-2007 23:09 3.3K 
[TXT]PyHmac.py.txt28-Mar-2011 12:51 3.4K 
[TXT]README.html08-May-2008 10:05 3.6K 
[   ]acVBSCrypto.zip18-Nov-2007 23:09 246K 
[   ]acvbscrypto.zip18-Nov-2007 23:09 246K 
[   ]dh4.tar.gz18-Nov-2007 23:09 43K 
[TXT]dhtest.c18-Nov-2007 23:09 8.0K 

Warning - Win32 Projects, no Linux

Here you will find my archived Win32 crypto code -- done mostly in Visual Basic, with significant 
amounts of Perl. My aim was to make a toolbox that allows easy testing of the Win32 CryptoAPI, both 
from script and from VB. The bulk of the work is in [AdvCrypto.zip].

AdvCrypto is coded in Visual Basic 6 sp3. If you want to use the source and build
it yourself, send email to tlviewer@yahoo.com with a short note.

AdvCrypto.zip is a VB group project to build and test
the AdvCrypto.dll classes. Encryption and decryption have a clean interface that takes
all the sweat out of deciding how to derive symmetric keys. There is a flag to derive
from password, password as cleartext, or password from blob. To use a password as cleartext requires
that a special simpleblob is packed, encrypted, then imported -- all behind the scenes. I'm the 
first to do this in VB.

The DLL includes 2 exponent-of-one
key pairs built-in as resources. When the container-name is ExpOfOne_128, then the DLL takes
care of all the messy details of setting up a container with this special key pair. From this
container all your symmetric key exports will be cleartext by default.

There are utility functions that isolate the Microsoft KDF, to enforce odd parity on a 
DES key, and provide methods to call many functions of the CryptoAPI.

If you only want to script AdvCrypto, then acVBSCrypto.zip provides a
binary release plus a boatload of sample scripts, without the VB source. You will need to go into the
./release folder and do regsvr32 AdvCrypto.dll before you can call objects in VBScript.

Crypto.java is a java sample that demos a helper function to provide the
MS KDF in Java. Without this function interops with the CryptoAPI are almost impossible.

Crypt-CBC-KDF.zip is a perl script and module which demo's the MS
KDF in perl and how it can work within the methods of the CBC module -- another TLViewer.org world premier.

There is code in DHVer3.zip (DHBigInt.pl) which 
shows how to do a Diffie-Hellman key exchange between the CryptoAPI 
and Perl's CBC based modules. I have also done DH exchanges between 
OpenSSL and CryptoAPI via EBCrypt. This was 
done in plain VBScript. EBCrypt is an ActiveX layer over a static build of 
OpenSSL. It's a very clean way to interop with OpenSSL in Win32 -- your 
second choice will be commandline or C API (labor intensive).

Much of the difficulty of using the CryptoAPI is its blackbox key 
derivation algo. I have shined a bright light on this KDF (key derivation 
function). I show its logic in Perl, Python, Java, C, and VB. This KDF is 
not documented by MS in any public way -- only on a few list servers used 
by insiders like Jeff Spelman, was it ever discussed. I am one of the few 
coders that have released it into the public domain. It is 
now easy to interop crypto between Unix and Win32 via Perl using my functions.

It's of interest to note that MS has not included any DH in the DOTNET 
framework -- they exclusively use RSA. IMHO nearly all of the insiders 
at MS are ignorant about the very crypto library included in their OS -- it's pretty 
obvious that CryptoAPI must have been coded by outside contractors.

I use DHBigInt.pl (perl) to benchmark my new Linux builds. Since this code 
is 100% portable, I can at once compare Intel/AMD boxes running Windows or Linux. The Linux boxes, without exception, 
run this code at least 3 times faster than any Windows setup!

msp
October 27, 2005