Are BouncyCastle's AES engines hardware accelerated?

1.4k views Asked by At

I wonder if anyone knows if BouncyCastle's AES engines support hardware acceleration, e.g., make use of AES-NI. My understanding is that some "native code" need to be invoked in order to be accelerated, but I couldn't find any.

Are BC's AES engines completely software implementations? If so, that's not so good given that many modern MCUs/CPUs provide AES modules - correct? A similar question was asked about 5 years ago, but the situation was somewhat different as hardware acceleration was not prevalent.

2

There are 2 answers

0
Michael On BEST ANSWER

According to Bouncy Castle it is not supported and will not be supported: https://github.com/bcgit/bc-java/issues/221

0
Fabrice On

LTS versions of BouncyCastle now support AES-NI on Linux.

From https://www.bouncycastle.org/lts-java/

One additional feature of this release is that it includes JNI support for Intel AES, DRBG/RNG, and SHA2 as well as ARM AES and SHA2. Please note that at the moment JNI support is only available on Linux.

See also https://github.com/bcgit/bc-java/issues/1396