lib: crypt: Prepare the existing code to switch to Intel AES hardware instructions.
authorJeremy Allison <jra@samba.org>
Thu, 31 Aug 2017 18:41:32 +0000 (11:41 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 7 Sep 2017 00:01:08 +0000 (02:01 +0200)
commit3324b55bde96d4098df2f1138be5fd243206ceba
treeb54e5f67aa4bd0d7c0b560b89221e9119913f4f6
parent11a56768950e1caae302507e15e58eb1c316c30a
lib: crypt: Prepare the existing code to switch to Intel AES hardware instructions.

Rename the old struct aes_key as an intermediate struct aes_key_rj
and wrap it in a union so we can chose an alternate aes_key struct
when using Intel AES hardware.

Rename the original software implementations of:

 AES_set_encrypt_key()
 AES_set_decrypt_key()
 AES_encrypt()
 AES_decrypt()

by adding an _rj on the end, and call them via a wrapper
function.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13008

Based on original work by Justin Maggard <jmaggard@netgear.com>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/crypto/aes.c
lib/crypto/aes.h