RE: Triple DES
Please forgive me. I sent this to the incorrect mailing list. Please delete/ignore.
-----Original Message-----
From: owner-iperf-users --at-- dast.nlanr.net [mailto:owner-iperf-users --at-- dast.nlanr.net] On Behalf Of Hawks Jim-R80007
Sent: Thursday, September 02, 2004 9:21 AM
To: iperf-users --at-- dast.nlanr.net
Subject: Triple DES
Does anyone have a 3DES example?
I'm under pressure and am not a C++ expert yet, thus Crypto++ is a bit beyond me for the moment.
DES and AES work as follows (substituting <AES> as the type for the AES version)
if (mode == SatSymCbc)
{
if (encrypt)
{
// establish keys and encrypt
CBC_Mode<DES>::Encryption cbcEncryption(key, keyLength, iv);
cbcEncryption.ProcessData(cipherTextR, plainTextX, plaintextLength);
}
else
{
// establish keys and decrypt
CBC_Mode<DES>::Decryption cbcDecryption(key, keyLength, iv);
cbcDecryption.ProcessData(plainTextR, cipherTextX, plaintextLength);
}
}
else if (mode == SatSymEcb)
etc.
I attempted first to submit type TDES, as I thought I'd come accross that while wading through the code. Didn't recognize it. I assumed it was <DES> with an overloaded function [CBC_Mode<DES>::Encryption cbcEncryption(key1, key2, key3, keyLength, iv);]. It didn't like that either. I'll keep digging through the code but any help would be greatly appreciated.
Thanks in advance.
Jim