crypto: refactor code for dealing with AES cipher
commite3ba0b67014b9fa15239f99bfcc227200e89024b
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 11 Feb 2016 14:05:21 +0000 (11 14:05 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 17 Mar 2016 14:41:15 +0000 (17 14:41 +0000)
tree58a858dd25f3ac712d22083b4c8760a5ddb96954
parent84f7f180b034b2a08b558bd3fbb5be1ae88f74c1
crypto: refactor code for dealing with AES cipher

The built-in and nettle cipher backends for AES maintain
two separate AES contexts, one for encryption and one for
decryption. This is going to be inconvenient for the future
code dealing with XTS, so wrap them up in a single struct
so there is just one pointer to pass around for both
encryption and decryption.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
crypto/cipher-builtin.c
crypto/cipher-nettle.c