1 To get an idea of the performance of this library, use
4 perl util/sp-diff.pl file1 file2
6 will print out the relative differences between the 2 files which are
7 expected to be the output from the speed program.
9 The performace of the library is very dependant on the Compiler
10 quality and various flags used to build.
14 These are some numbers I did comparing RSAref and SSLeay on a Pentium 100.
15 [ These numbers are all out of date, as of SSL - 0.6.1 the RSA
16 operations are about 2 times faster, so check the version number ]
21 Pentium 100, 32meg, Windows NT Workstation 3.51
22 linux - gcc v 2.7.0 -O3 -fomit-frame-pointer -m486
24 Windows NT - Windows NT 3.51 - Visual C++ 4.1 - 586 code + 32bit assember
25 Windows 3.1 - Windows NT 3.51 - Visual C++ 1.52c - 286 code + 32bit assember
26 NT Dos Shell- Windows NT 3.51 - Visual C++ 1.52c - 286 code + 16bit assember
28 Times are how long it takes to do an RSA private key operation.
31 -------------------------------
32 SSLeay NT dll 0.042s 0.202s see above
33 SSLeay linux 0.046s 0.218s Assember inner loops (normal build)
34 SSLeay linux 0.067s 0.380s Pure C code with BN_LLONG defined
35 SSLeay W3.1 dll 0.108s 0.478s see above
36 SSLeay linux 0.109s 0.713s C without BN_LLONG.
37 RSAref2.0 linux 0.149s 0.936s
38 SSLeay MS-DOS 0.197s 1.049s see above
40 486DX66, 32meg, Windows NT Server 3.51
42 -------------------------------
43 SSLeay NT dll 0.084s 0.495s <- SSLeay 0.6.3
44 SSLeay NT dll 0.154s 0.882s
45 SSLeay W3.1 dll 0.335s 1.538s
46 SSLeay MS-DOS 0.490s 2.790s
48 What I find cute is that I'm still faster than RSAref when using standard C,
49 without using the 'long long' data type :-), %35 faster for 512bit and we
50 scale up to 3.2 times faster for the 'default linux' build. I should mention
51 that people should 'try' to use either x86-lnx.s (elf), x86-lnxa.s or
52 x86-sol.s for any x86 based unix they are building on. The only problems
53 with be with syntax but the performance gain is quite large, especially for
54 servers. The code is very simple, you just need to modify the 'header'.
56 The message is, if you are stuck using RSAref, the RSA performance will be
57 bad. Considering the code was compiled for a pentium, the 486DX66 number
58 would indicate 'Use RSAref and turn you Pentium 100 into a 486DX66' :-).
59 [ As of verson 0.6.1, it would be correct to say 'turn you pentium 100
62 I won't tell people if the DLL's are using RSAref or my stuff if no-one
67 PS while I know I could speed things up further, I will probably not do
68 so due to the effort involved. I did do some timings on the
69 SSLeay bignum format -> RSAref number format conversion that occurs
70 each time RSAref is used by SSLeay, and the numbers are trivial.
71 0.00012s a call for 512bit vs 0.149s for the time spent in the function.
72 0.00018s for 1024bit vs 0.938s. Insignificant.
73 So the 'way to go', to support faster RSA libraries, if people are keen,
74 is to write 'glue' code in a similar way that I do for RSAref and send it
76 My base library still has the advantage of being able to operate on
77 any size numbers, and is not that far from the performance from the
78 leaders in the field. (-%30?)
79 [ Well as of 0.6.1 I am now the leader in the filed on x86 (we at
80 least very close :-) ]
82 I suppose I should also mention some other numbers RSAref numbers, again
85 RSAref linux 830k/s 302k/s 4390k/s
86 SSLeay linux 855k/s 319k/s 10025k/s
87 SSLeay NT 1158k/s 410k/s 10470k/s
88 SSLeay w31 378k/s 143k/s 2383k/s (fully 16bit)
90 Got to admit that Visual C++ 4.[01] is a damn fine compiler :-)
92 Eric Young | BOOL is tri-state according to Bill Gates.
93 AARNet: eay@cryptsoft.com | RTFM Win32 GetMessage().