qemu/include/crypto
Ard Biesheuvel 9ea17007c4 target/riscv: Use existing lookup tables for MixColumns
The AES MixColumns and InvMixColumns operations are relatively
expensive 4x4 matrix multiplications in GF(2^8), which is why C
implementations usually rely on precomputed lookup tables rather than
performing the calculations on demand.

Given that we already carry those tables in QEMU, we can just grab the
right value in the implementation of the RISC-V AES32 instructions. Note
that the tables in question are permuted according to the respective
Sbox, so we can omit the Sbox lookup as well in this case.

Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Zewen Ye <lustrew@foxmail.com>
Cc: Weiwei Li <liweiwei@iscas.ac.cn>
Cc: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20230731084043.1791984-1-ardb@kernel.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-09-11 11:45:54 +10:00
..
aes-round.h crypto: Add aesdec_ISB_ISR_AK_IMC 2023-07-08 07:30:17 +01:00
aes.h target/riscv: Use existing lookup tables for MixColumns 2023-09-11 11:45:54 +10:00
afsplit.h Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
akcipher.h include/: spelling fixes 2023-09-08 13:08:52 +03:00
block.h crypto: Make block callbacks return 0 on success 2022-07-12 12:14:55 +02:00
cipher.h crypto: Allocate QCryptoCipher with the subclass 2020-09-10 11:02:23 +01:00
desrfb.h replace TABs with spaces 2023-03-20 12:43:50 +01:00
hash.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
hmac.h crypto: define cleanup functions for use with g_autoptr 2019-08-22 10:47:12 +01:00
init.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen.h include/: spelling fixes 2023-09-08 13:08:52 +03:00
pbkdf.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
random.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
secret.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
secret_common.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
secret_keyring.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
sm4.h crypto: move sm4_sbox from target/arm 2022-04-29 10:47:45 +10:00
tls-cipher-suites.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tlscreds.h crypto: Make QCryptoTLSCreds* structures private 2021-06-29 18:30:24 +01:00
tlscredsanon.h crypto: Make QCryptoTLSCreds* structures private 2021-06-29 18:30:24 +01:00
tlscredspsk.h crypto: Make QCryptoTLSCreds* structures private 2021-06-29 18:30:24 +01:00
tlscredsx509.h crypto: Make QCryptoTLSCreds* structures private 2021-06-29 18:30:24 +01:00
tlssession.h crypto: TLS: introduce check_pending 2023-02-15 11:01:03 -05:00
xts.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00