title: AES GCM with hardware accelerated support before Java 9
body: <p>My use case involves encrypting large amounts of sensitive data on the order of petabytes using AES with GCM in Java and I will need high throughput to make that task complete in reasonable time.</p>
  
  <p>As was <a href="https://stackoverflow.com/a/27028067">previously asked and answered</a> on here, AES/GCM is still severely crippled in the latest JDK 8 (~<strong>17MB/s</strong> on my hardware). I'm happy to know that <a href="http://openjdk.java.net/jeps/246" rel="nofollow noreferrer">JEP 246</a> for adding <a href="https://bugs.openjdk.java.net/secure/attachment/25422/GCM%20Analysis.pdf" rel="nofollow noreferrer">significant hardware acceleration for GCM</a> made it onto the roadmap for Java 9, however General Availability for the next major Java release has been pushed out to over a year away as of me writing this.</p>
  
  <p>So far the fastest implementation I have found is the Bouncy Castle Provider, with no hardware acceleration and throughput on the order of <strong>170MB/s</strong>. I know that my hardware supports acceleration by running benchmarks of the native libraries <strong>GnuTLS</strong> (<em>gnutls-cli --benchmark-ciphers</em>) and <strong>OpenSSL</strong> (<em>openssl speed -evp aes-128-gcm</em>), both clocking in at over <strong>2GB/s</strong> for AES/GCM. Unfortunately I can't find a current Java wrapper around either of these. The closest I've come across is <a href="http://incubator.apache.org/projects/juice.html" rel="nofollow noreferrer">Apache JuiCE</a>, built on OpenSSL, but it was abandoned over 8 years ago.</p>
  
  <p>Has anyone come across a JCE Provider that supports hardware acceleration for AES/GCM that I could use in the near term, either commercial or open source?</p>