mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
crypto: Add aesdec_ISB_ISR_IMC_AK
Add a primitive for InvSubBytes + InvShiftRows + InvMixColumns + AddRoundKey. Acked-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
7c58cb972e
commit
15ff15982a
3 changed files with 82 additions and 0 deletions
|
@ -119,4 +119,25 @@ static inline void aesdec_ISB_ISR_AK(AESState *r, const AESState *st,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform InvSubBytes + InvShiftRows + InvMixColumns + AddRoundKey.
|
||||
*/
|
||||
|
||||
void aesdec_ISB_ISR_IMC_AK_gen(AESState *ret, const AESState *st,
|
||||
const AESState *rk);
|
||||
void aesdec_ISB_ISR_IMC_AK_genrev(AESState *ret, const AESState *st,
|
||||
const AESState *rk);
|
||||
|
||||
static inline void aesdec_ISB_ISR_IMC_AK(AESState *r, const AESState *st,
|
||||
const AESState *rk, bool be)
|
||||
{
|
||||
if (HAVE_AES_ACCEL) {
|
||||
aesdec_ISB_ISR_IMC_AK_accel(r, st, rk, be);
|
||||
} else if (HOST_BIG_ENDIAN == be) {
|
||||
aesdec_ISB_ISR_IMC_AK_gen(r, st, rk);
|
||||
} else {
|
||||
aesdec_ISB_ISR_IMC_AK_genrev(r, st, rk);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CRYPTO_AES_ROUND_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue