summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Musta2014-03-13 15:13:25 +0100
committerAlexander Graf2014-06-16 13:24:33 +0200
commit40c84b54dd47f3ad2a170c036a97aa1b777c645d (patch)
treedb98c461fefe62fe4e03bbd8db9c00e0684b2c38 /include
parentspapr_pci: fix MSI limit (diff)
downloadqemu-40c84b54dd47f3ad2a170c036a97aa1b777c645d.tar.gz
qemu-40c84b54dd47f3ad2a170c036a97aa1b777c645d.tar.xz
qemu-40c84b54dd47f3ad2a170c036a97aa1b777c645d.zip
util: Add S-Box and InvS-Box Arrays to Common AES Utils
This patch adds tables for the S-Box and InvS-Box transformations commonly used by various Advanced Encription Standard (AES) instruction models. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/aes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qemu/aes.h b/include/qemu/aes.h
index e79c707436..a4044f52c7 100644
--- a/include/qemu/aes.h
+++ b/include/qemu/aes.h
@@ -23,6 +23,9 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
const unsigned long length, const AES_KEY *key,
unsigned char *ivec, const int enc);
+extern const uint8_t AES_sbox[256];
+extern const uint8_t AES_isbox[256];
+
/*
AES_Te0[x] = S [x].[02, 01, 01, 03];
AES_Te1[x] = S [x].[03, 02, 01, 01];