lib/crypto: optimize aes_cmac_128
commitec84abe68a24206632a5b9b03bbb11ce4ac8a662
authorStefan Metzmacher <metze@samba.org>
Tue, 11 Aug 2015 22:59:58 +0000 (12 00:59 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 31 Aug 2015 08:18:15 +0000 (31 10:18 +0200)
treee8d169b3ef37f8aeeb353ca91882ae03ff50bc6b
parent3a633176302437e20286bbb5f70502b76584ecae
lib/crypto: optimize aes_cmac_128

- We avoid variables in order to do a lazy cleanup
  in aes_cmac_128_final() via ZERO_STRUCTP(ctx)
- We avoid unused memcpy() calls
- We use the optimized aes_block_{xor,lshift}() functions
- Align AES_BLOCK_SIZE arrays to 8 bytes

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 8795ad2030ade771145264be7c64d960dcfdbed7)
lib/crypto/aes_cmac_128.c
lib/crypto/aes_cmac_128.h