0

AES-NI is to improve the speed of applications performing encryption and decryption using the Advanced Encryption Standard (AES). Does AES-NI supports the AES-GCM cipher as well along AES-CBC? may i know why aesni_gcm_cipher is defined in aes_gcm_cipher in openssl code?

rakesh sharma
  • 129
  • 2
  • 8
  • There is no apparent reason why AES-GCM shouldn't be accelerated by AES-NI. Whether this is the case in OpenSSL is a another question. – Artjom B. Oct 17 '16 at 19:17
  • yes my question was mainly with respective to OpenSSL. could someone please confirm it ? – rakesh sharma Oct 17 '16 at 19:30
  • @jww since you have marked my question as duplicate with another Q., could you please help in pointing the reference of GCM in anywhere in reply of that question. i do know AES-NI is meant for AES acceleration but does it support GCM mode along with CBC. please clarify. – rakesh sharma Oct 17 '16 at 20:01
  • @Rakesh - GCM is a mode of operation, and it has nothing to do with AES-NI. AES uses accelerated AES-NI according to the cited question. GCM mode's claim to fame in hardware acceleration for the 64x64 → 128 multiply using the carry-less multiply instructions, like `pclmullqhq` and `pclmullqlq`. ARMv8 has accelerated carry-less multiply too via `pmull` and `pmull2`. My apologies if I am missing something in your question. – jww Oct 17 '16 at 20:12
  • @jww Thanks a lot for your reply, even my understanding was same. AES-NI is meant for AES acceleration no matter which mode we uses whether it is CBC, GCM, CCM but just wanted to confirm it from the experts before making the conclusion and thanks for your clarification. – rakesh sharma Oct 17 '16 at 20:24
  • @Jww i am just curious to know that is there a more way to increase the performance for AES-GCM by setting any other bit along with AES-NI bit in value returned by OPENSSL_ia32cap_loc()?? i know bydefault AES-NI bit will be set there.. – rakesh sharma Oct 17 '16 at 20:41
  • @Rakesh - According to the [`OPENSSL_ia32cap` man page](http://www.openssl.org/docs/manmaster/crypto/OPENSSL_ia32cap.html), the two bits of interest are #33 for `PCLMULQDQ` and bit #57 for `AES-NI `. – jww Oct 17 '16 at 20:56

0 Answers0