1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2019 Linaro Ltd <ard.biesheuvel@linaro.org>
6 #include <asm/cpufeature.h>
11 void crypto_aegis128_update_neon(void *state, const void *msg);
12 void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src,
14 void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src,
17 int aegis128_have_aes_insn __ro_after_init;
19 bool crypto_aegis128_have_simd(void)
21 if (cpu_have_feature(cpu_feature(AES))) {
22 aegis128_have_aes_insn = 1;
25 return IS_ENABLED(CONFIG_ARM64);
28 void crypto_aegis128_update_simd(union aegis_block *state, const void *msg)
31 crypto_aegis128_update_neon(state, msg);
35 void crypto_aegis128_encrypt_chunk_simd(union aegis_block *state, u8 *dst,
36 const u8 *src, unsigned int size)
39 crypto_aegis128_encrypt_chunk_neon(state, dst, src, size);
43 void crypto_aegis128_decrypt_chunk_simd(union aegis_block *state, u8 *dst,
44 const u8 *src, unsigned int size)
47 crypto_aegis128_decrypt_chunk_neon(state, dst, src, size);