Crypto benchmark is a tool for benchmarking modern AEAD algorithms.
Due to the use of the old AES-128-OCB algorithm and its slow implementation in Mumble, we decided to determine the best cipher and library for the VoIP communicator.
We build the project using Travis CI, on Ubuntu 18.04, using GCC and Clang compilers, on AMD64 and ARM64 platforms. Current status:
$ ./crypto_benchmark
[NSS] running AES-256-GCM benchmark...
[NSS] 4.007687 seconds for 1000000 iterations, 4096 bytes message
[NSS] running ChaCha20-Poly1305 benchmark...
[NSS] 32.563270 seconds for 1000000 iterations, 4096 bytes message
[OpenSSL] running AES-256-GCM benchmark...
[OpenSSL] 2.398911 seconds for 1000000 iterations, 4096 bytes message
[OpenSSL] running AES-256-OCB benchmark...
[OpenSSL] 2.441164 seconds for 1000000 iterations, 4096 bytes message
[OpenSSL] running ChaCha20-Poly1305 benchmark...
[OpenSSL] 4.500481 seconds for 1000000 iterations, 4096 bytes message
[libsodium] running AEGIS-128L benchmark...
[libsodium] 0.753556 seconds for 1000000 iterations, 4096 bytes message
[libsodium] running AEGIS-256 benchmark...
[libsodium] 1.144947 seconds for 1000000 iterations, 4096 bytes message
[libsodium] running AES-256-GCM benchmark...
[libsodium] 4.243719 seconds for 1000000 iterations, 4096 bytes message
[libsodium] running ChaCha20-Poly1305 benchmark...
[libsodium] 5.813727 seconds for 1000000 iterations, 4096 bytes message
[wolfCrypt] running AES-256-GCM benchmark...
[wolfCrypt] 122.332474 seconds for 1000000 iterations, 4096 bytes message
[wolfCrypt] running ChaCha20-Poly1305 benchmark...
[wolfCrypt] 29.525731 seconds for 1000000 iterations, 4096 bytes message
The benchmark is written in C language.
NSS, OpenSSL, libsodium (custom build from the master branch, due to AEGIS availability), wolfCrypt
Algorithm | Library | License | Limitations |
---|---|---|---|
AES-256-GCM | NSS | MPL 2 | |
ChaCha20-Poly1305 | NSS | MPL 2 | |
AES-128-OCB | OpenSSL | Apache | Patented |
AES-256-GCM | OpenSSL | Apache | |
ChaCha20-Poly1305 | OpenSSL | Apache | |
AEGIS-128L | libsodium | ISC | |
AEGIS-256 | libsodium | ISC | |
AES-256-GCM | libsodium | ISC | Requires SSSE3 + aesni and pclmul instructions |
ChaCha20-Poly1305 | libsodium | ISC | |
AES-256-GCM | wolfCrypt | GPLv2 | Optimizations disabled by default |
ChaCha20-Poly1305 | wolfCrypt | GPLv2 | Optimizations disabled by default |
If you are willing to help in development of this tool, feel free to create a new issue, pull request, or start a discussion on #mumble-dev on Freenode.