aboutsummaryrefslogtreecommitdiff
path: root/include/crypto/aes-round.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto/aes-round.h')
-rw-r--r--include/crypto/aes-round.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/crypto/aes-round.h b/include/crypto/aes-round.h
index 7d2be40a67..7be2cc0d8e 100644
--- a/include/crypto/aes-round.h
+++ b/include/crypto/aes-round.h
@@ -60,6 +60,24 @@ static inline void aesenc_SB_SR_AK(AESState *r, const AESState *st,
}
/*
+ * Perform InvMixColumns.
+ */
+
+void aesdec_IMC_gen(AESState *ret, const AESState *st);
+void aesdec_IMC_genrev(AESState *ret, const AESState *st);
+
+static inline void aesdec_IMC(AESState *r, const AESState *st, bool be)
+{
+ if (HAVE_AES_ACCEL) {
+ aesdec_IMC_accel(r, st, be);
+ } else if (HOST_BIG_ENDIAN == be) {
+ aesdec_IMC_gen(r, st);
+ } else {
+ aesdec_IMC_genrev(r, st);
+ }
+}
+
+/*
* Perform InvSubBytes + InvShiftRows + AddRoundKey.
*/