hello everybody (I'm not alone ?.. no?... I hope so:-)
well today I've got another question, about DES ecb
encryption performances.
My code is very slow :-(( -->2MB/s instead of 21MB/s
(indicated in the crypto++ 5.21 benchmark)
Code extract:
//-----------simple des ecb encryption---------------
DES::Encryption encrypt(key, 8);
ECB_Mode_ExternalCipher::Encryption
ecb_encrypt(encrypt);
ecb_encrypt.ProcessData(output, input,(nBlocks)*8);
ecb_encrypt.ProcessData(output+(nBlocks)*8,plainBytepad,
8);
//---------------------------------------------------
I have tried this too :
Code extract:
//-----------simple des ecb encryption---------------
DES::Encryption encrypt(key,8);
//encrypt the data
encrypt.ProcessAndXorMultipleBlocks(input,
NULL,output, nBlocks);
encrypt.ProcessAndXorMultipleBlocks(plainBytepad,
NULL, output+nBlocks*8, 1);
//-----------------------------------------------------
it's approximately the same slowness
Remark : plainBytepad is the last 8-block of input
padded by 0 if input's length is not an integral
multiple of eight bytes.
Is there a faster way to encrypt data with simple DES
ecb encrypt ? (the problem is the same with the 2DES &
3DES ecb)
Furthermore, I have to use (unsigned char*) type for
cleardata & cipherdata.
Thanks guys,
Nicolas Mivielle
fier de ne rien faire (ou presk)
sales majestés forever
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com