aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/max78000_aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/max78000_aes.c')
-rw-r--r--hw/misc/max78000_aes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/misc/max78000_aes.c b/hw/misc/max78000_aes.c
index 0bfb2f0..d883ddd 100644
--- a/hw/misc/max78000_aes.c
+++ b/hw/misc/max78000_aes.c
@@ -79,6 +79,12 @@ static void max78000_aes_do_crypto(Max78000AesState *s)
keydata += 8;
}
+ /*
+ * The MAX78000 AES engine stores an internal key, which it uses only
+ * for decryption. This results in the slighly odd looking pairs of
+ * set_encrypt and set_decrypt calls below; s->internal_key is
+ * being stored for later use in both cases.
+ */
AES_KEY key;
if ((s->ctrl & TYPE) == 0) {
AES_set_encrypt_key(keydata, keylen, &key);