How do you explain following :

Using libdes 4.01, I get following performance on my machine (Linux
2.2.5, PIII 666Mhz)

[pjunod@lasecpc4 des]$ ../../../libdes/speed
Doing set_key for 10 seconds
4803568 set_key's in 10.00 seconds
Doing des_encrypt's for 10 seconds
15436306 des_encrypt's in 10.00 second
Doing des_cbc_encrypt on 1024 byte blocks for 10 seconds
111925 des_cbc_encrypt's of 1024 byte blocks in 10.00 second
Doing des_ede_cbc_encrypt on 1024 byte blocks for 10 seconds
42058 des_ede_cbc_encrypt's of 1024 byte blocks in 10.00 second
Doing crypt for 10 seconds
410127 crypts in 10.00 second
set_key            per sec =    480356.80 (  2.1uS)
DES raw ecb bytes  per sec =  12349044.80 (  0.6uS)
DES cbc bytes      per sec =  11461120.00 (  0.7uS)
DES ede cbc bytes  per sec =   4306739.20 (  1.9uS)
crypt              per sec =     41012.70 ( 24.4uS)

Using Openssl 0.9.5, I get :

Doing des cbc for 3s on 8 size blocks: 4869679 des cbc's in 0.00s
Doing des cbc for 3s on 64 size blocks: 707035 des cbc's in 0.00s
Doing des cbc for 3s on 256 size blocks: 181178 des cbc's in 0.00s
Doing des cbc for 3s on 1024 size blocks: 45449 des cbc's in 0.00s
Doing des cbc for 3s on 8192 size blocks: 5700 des cbc's in 0.00s
Doing des ede3 for 3s on 8 size blocks: 1916400 des ede3's in 0.00s
Doing des ede3 for 3s on 64 size blocks: 255166 des ede3's in 0.00s
Doing des ede3 for 3s on 256 size blocks: 64436 des ede3's in 0.00s
Doing des ede3 for 3s on 1024 size blocks: 16132 des ede3's in 0.00s
Doing des ede3 for 3s on 8192 size blocks: 2016 des ede3's in 0.00s
OpenSSL 0.9.5 28 Feb 2000
built on: Wed Mar 15 13:55:43 MET 2000
options:bn(32,32) md2(int) rc4(ptr,int) des(idx,cisc,4,long) idea(int)
blowfish(idx)
compiler: gcc -DTHREADS -D_REENTRANT -DRL_DEBUG -DREF_CHECK
-DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO
-D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow
-Wid-clash-31 -pipe
The 'numbers' are in 1000s of bytes per second processed.
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192
bytes
des cbc       38957432.00k 45250240.00k 46381568.00k 46539776.00k
46694400.00k
des ede3      15331200.00k 16330624.00k 16495616.00k 16519168.00k
16515072.00k 

How do you explain the difference of performance ? For example, cbc is 4
(!) times quicker. Was the des library severely and dramatically
improved in 3 years ?

I cannot trust the results of OpenSSL. For instance, crypto++ 3.2 claims
7 MB/s on my machine...

A+

Pascal

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Pascal Junod, [EMAIL PROTECTED]                       *
* Laboratoire de S�curit� et de Cryptographie (LASEC)              *
* ++ 41 (0) 21 693 7617, INR 313, EPFL, CH-1015 Lausanne           *
* Route d'Yverdon 25, CH-1028 Pr�verenges, Switzerland             *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to