Skip to content

Instantly share code, notes, and snippets.

@gerritjvv
Last active June 17, 2019 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerritjvv/81df64fc1d0bdf5ca624a0371f4666aa to your computer and use it in GitHub Desktop.
Save gerritjvv/81df64fc1d0bdf5ca624a0371f4666aa to your computer and use it in GitHub Desktop.
Java JVM AES CBC GCM Benchmarks

Vanilla Java JCE

Benchmark                       Mode  Cnt      Score      Error  Units
AesJce.enc_aes128CbcHmacSha256  thrpt  200  40722.671 ±  739.025  ops/s
AesJce.enc_aes256CbcHmacSha512  thrpt  200  39288.300 ±  979.722  ops/s
AesJce.enc_aes128GCM            thrpt  200  75599.381 ± 1197.385  ops/s

AesJce.dec_aes128CbcHmacSha256  thrpt  200  49830.138 ± 1040.007  ops/s
AesJce.dec_aes256CbcHmacSha512  thrpt  200  51758.272 ±  839.378  ops/s
AesJce.dec_aes128GCM            thrpt  200  76144.372 ± 2626.274  ops/s

Apache Commons Crypto:

Benchmark                                Mode  Cnt      Score      Error  Units
AesCommons.enc_aes128CbcHmacSha256       thrpt  200  26567.236 ± 212.846  ops/s
AesCommons.enc_aes128GCM                 thrpt  200  59517.955 ± 385.987  ops/s

AesCommons.dec_aes128CbcHmacSha256       thrpt  200  25821.145 ± 463.154  ops/s
AesCommons.dec_aes128GCM                 thrpt  200  51019.787 ± 1098.928  ops/s

Bouncy Castle

Benchmark                                Mode  Cnt      Score      Error  Units
AesBouncyCastle.enc_aes128CbcHmacSha256  thrpt  200  23981.183 ± 182.650  ops/s
AesBouncyCastle.enc_aes128GCM            thrpt  200  19993.285 ± 167.915  ops/s

AesBouncyCastle.dec_aes128CbcHmacSha256  thrpt  200  24996.014 ± 161.343  ops/s
AesBouncyCastle.dec_aes128GCM            thrpt  200  19743.066 ± 152.837  ops/s

Buddy clojure lib (encryption only):

Benchmark                        Mode  Cnt    Score   Error  Units
Buddy.aes128CbcHmacSha256  thrpt  200    482.811 ± 5.144  ops/s {:algorithm :aes128-cbc-hmac-sha256}
Buddy.aes256CbcHmacSha512  thrpt  200    487.327 ± 5.476  ops/s {:algorithm :aes256-cbc-hmac-sha512}
Buddy.aes256GCM            thrpt  200  15845.017 ± 192.831  ops/s {:algorithm :aes256-gcm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment