NIST API (RefCode and OptCCode) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cast 256 | Crypton | DEAL | DFC | E2 | Frog | HPC | Mars | RC6 | Rijndael | Safer + | Serpent | Twofish | Loki 97 | Magenta | ||
API Headers | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | Incompatible change (o) | OK | OK | OK | OK | |
makeKey | OK | no ASCII conversion (d) | have to malloc (f) | OK | OK | OK | have to free (k) | bad return value (m) | OK | bad prototype (n) | OK | OK | OK (q) | OK | OK | |
cipherInit (a) | init not complete (c) | no ASCII conversion (d) | OK | no NULL IV (h) | OK | OK | init not complete and have to free (k) (l) | bad return value (m) | OK | bad prototype (n) | OK | OK | OK | OK | OK | |
blockEncrypt | OK | OK | OK | bad inputLen value (i) | OK | returns TRUE (j) | OK | OK | OK | OK | returns TRUE (j) | OK | OK | returns TRUE (j) | OK | |
Compilation (b) | OK | Take care (e) | Case of filenames (g) | OK | OK | OK | OK | OK | OK | OK | OK | One letter macro (p) | Take care (e) | OK | OK | |
Notes on implementation of API functions
| ||||||||||||||||
Decryption of an encrypted message (RefCode and OptCCode) | ||||||||||||||||
Cast 256 | Crypton | DEAL | DFC | E2 | Frog | HPC | Mars | RC6 | Rijndael | Safer + | Serpent | Twofish | Loki 97 | Magenta | ||
ECB | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | OK | |
CBC (a) | OK # | OK # (c) | OK # | OK | OK | OK # | OK # | OK | OK # | OK | OK # | OK # | OK | OK | OK | |
CFB1 (b) | OK # | no # | OK # | OK | OK | no # (d) | OK # | no (e) | OK # | OK (f) | OK # | OK # (g) | OK # (g) | OK | OK | |
NotesIt is OK when the decryption give the original message. I made the tests with a 128 bits message.
| ||||||||||||||||
Compilation and execution of the tests (RefCode and OptCCode) | ||||||||||||||||
Cast 256 | Crypton | DEAL | DFC | E2 | Frog | HPC | Mars | RC6 | Rijndael | Safer + | Serpent | Twofish | Loki 97 | Magenta | ||
Little Endian | OK (a) | OK | OK | OK | OK | OK | OK for ix86 (d) | OK for ix86 (f) | OK | OK | OK | OK | Not easy (m) | OK | OK | |
Big Endian | OK (a) | OK | OK | OK | Fails (c) | OK | Fails (d) (e) | SIGBUS (f) (g) | Fails (i) | OK | OK | OK | Not easy (m) | OK | OK | |
64 bit long | OK (b) | OK | OK | OK | Fails (c) | OK | Fails (d) | OK (f) (h) | Fails (j) | OK (k) | OK | Not easy (l) | Not easy (m) (n) | Not easy (o) | OK | |
Notes : ANSI conformance and portability of the C sourceWhen the encryption of the same clear text with the same key does not give the same result on different machines, this is a serious problem because you cannot have an encrypted channel between these machines. Such incompatibility is often due to endianess problems, but it cannot happen if the source is strict ANSI. The reference is the ciphering done by some ix86 system.
| ||||||||||||||||
ANSI C timings : OptCCode, using NIST API | ||||||||||||||||
Cast 256 | Crypton | DEAL | DFC (*) | E2 | Frog | HPC (*) | Mars | RC6 | Rijndael | Safer + | Serpent | Twofish | Loki 97 | Magenta | ||
Cyrix 6x86MX 166 MHz Linux 2.0 | 57µs 9460c 1.87MB/s 1355c | 4.4µs 730c 1.20MB/s 2111c | 224µs 37000c 0.56MB/s 4523c | 134µs 22000c 0.46MB/s 5506c | 41µs 6800c 2.08MB/s 1218c | 18ms 3000000c 1.49MB/s 1700c | 1.5ms 250000c 0.45MB/s 5629c | 36µs 6000c 2.92MB/s 867c | 28µs 4650c 2.45MB/s 1034c | 145µs 24000c 2.95MB/s 859c | 21µs 3500c 0.92MB/s 2753c | 83µs 14000c 1.42MB/s 1784c | 114µs 19000c 2.18MB/s 1162c | 138µs 23000c 0.39MB/s 6495c | 5.1µs 850c 0.14MB/s 18100c | |
Pentium II 200 MHz Linux 2.0 | 40µs 8050c 2.61MB/s 1168c | 3.0µs 600c 2.62MB/s 1166c | 152µs 30500c 0.79MB/s 3862c | 60µs 12000c 0.93MB/s 3270c | 18µs 3680c 4.17MB/s 732c | 10.5ms 2100000c 1.25MB/s 2444c | 1.3ms 260000c 0.57MB/s 5366c | 24µs 4800c 3.83MB/s 796c | 14µs 2800c 3.65MB/s 836c | 99µs 19800c 4.60MB/s 862c | 15µs 3000c 1.31MB/s 2324c | 58µs 11600c 1.67MB/s 1826c | 63µs 12600c 3.81MB/s 800c | 84µs 16800c 0.66MB/s 4610c | 2.4µs 480c 0.10MB/s 30400c | |
UltraSparc 270 MHz SunOS 5.6 | 23µs 6200c
3.67MB/s 1123c (a) | 2.5µs 675c
4.90MB/s 841c (b) | 115µs 31000c
1.51MB/s 2728c (b) | 60µs 16200c
1.02MB/s 4039c (b) |
275µs 74Kc
0.18MB/s 23Kc (e,b) | 10ms 2700000c
1.52MB/s 2710c (a) | 1.1ms 300000c
0.83MB/s 4964c | core | 61µs 16500c
3.45MB/s 1194c (f,b) | 40µs 10800c
4.26MB/s 990c (b) | 11µs 3000c
1.20MB/s 3433c (b) |
31µs 8400c
3.73MB/s 1105c(g,b) | 52µs 14000c
4.24MB/s 972c (b) | 49µs 13200c
1.19MB/s 3462c (b) | 2.7µs 730c
0.27MB/s 15260c | |
Alpha EV56 500 MHz Linux 2.1 | 18µs 9000c 5.01MB/s 1523c | 1.6µs 800c 2.67MB/s 2860c (c) | 131µs 65500c 2.25MB/s 3390c | 48µs 24000c 1.33MB/s 5735c (d) |
0.27ms 135000c 0.19MB/s 40Kc (e) | 7.7ms 3800000c 1.38MB/s 5530c | 0.62ms 310000c 1.45MB/s 5260c | 12µs 6000c 8.63MB/s 884c | 20µs 10000c 8.08MB/s 944c (e) | 93µs 46500c 5.81MB/s 1313c | 14µs 7000c 0.59MB/s 12930c | 42µs 21000c 4.93MB/s 1548c | 42µs 21000c 8.22MB/s 928c | 40µs 20000c 1.37MB/s 5570c | 2.4µs 1200c 0.30MB/s 25430c | |
The timings are measured for 128 bits keys and 128 bits messages.
There is the time for key setup in ms or µs
and the rate in Mbytes/sec for ECB mode.
They measure the performance of the algorithm for
a multi-architecture and portable communication
software.
All compilations done with gcc -O9 version 2.8.1, unless we found a faster compiler (e.g. the vendor's compiler).
|