summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Musta <tommusta@gmail.com>2014-03-13 09:13:25 -0500
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:33 +0200
commit40c84b54dd47f3ad2a170c036a97aa1b777c645d (patch)
treedb98c461fefe62fe4e03bbd8db9c00e0684b2c38 /include
parent28668b5f31b05f6413826e110ff909522759f7d9 (diff)
downloadhqemu-40c84b54dd47f3ad2a170c036a97aa1b777c645d.zip
hqemu-40c84b54dd47f3ad2a170c036a97aa1b777c645d.tar.gz
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 e79c707..a4044f5 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];
OpenPOWER on IntegriCloud