[openssl-users] Inserting cipher into speed.c
rschm2 at unh.newhaven.edu
Sat Feb 4 22:00:11 UTC 2017
Thanks to everyones help here I was able to insert a new cipher into OpenSSL.
However, for performance reasons I'd like to begin testing the speed of my cipher and
compare to other already implemented ciphers.
I went ahead and started editing the ./apps/speed.c file to insert the new cipher but ran into some strange output.... (See below).
Here's what I've edited so far in speed.c:
1) Included header of my cipher <openssl/nightgale.h>
2) Updated ALGOR_NUM from 30 to 31 (~line 134)
3) Inserted a static declaration for the loop (~line 200) just like AES's
4) Updated the list of possible ciphers to chose (~line 241)
5) Added the new cipher as a define (~line 420)
6) Added cipher to the OPT_PAIR doit_choices (~line 423)
7) Created the actual Nightgale_loop (followed how AES had its implementation)
8) Added the call to the loop in speed_main()
Any ideas for such odd output? Seems like it's choosing default output.
Doing nightgale for 3s on 16 size blocks: 2147483647 nightgale's in 0.64s
Doing nightgale for 3s on 64 size blocks: 2147483647 nightgale's in 0.66s
Doing nightgale for 3s on 256 size blocks: 2147483647 nightgale's in 0.68s
Doing nightgale for 3s on 1024 size blocks: 2147483647 nightgale's in 0.78s
Doing nightgale for 3s on 8192 size blocks: 2147483647 nightgale's in 0.67s
Doing nightgale for 3s on 16384 size blocks: 2147483647 nightgale's in 0.67s
OpenSSL 1.1.1-dev xx XXX xxxx
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(int) aes(partial) idea(int) blowfish(ptr)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -Wa,--noexecstack
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
nightgale 53687091.17k 208240838.50k 808464431.81k 2819260582.73k 26256994083.92k 52513988167.83k
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openssl-users