mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
crypto: Add aesdec_IMC
Add a primitive for InvMixColumns. Acked-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
04e1f30eed
commit
5b41deb310
3 changed files with 79 additions and 0 deletions
|
@ -59,6 +59,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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue