From edb41402990165c33fbbe4972a505d2b907f57b5 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 8 Sep 2025 12:56:17 +0000 Subject: Allow generic AES implementation to be used as a fallback. Rename the C based AES implementation to *_generic() and provide *_internal() wrappers for these. This allows for architectures to provide accelerated versions without having to also provide a fallback implementation. ok tb@ --- src/lib/libcrypto/arch/amd64/crypto_arch.h | 7 ++++++- src/lib/libcrypto/arch/i386/crypto_arch.h | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/arch') diff --git a/src/lib/libcrypto/arch/amd64/crypto_arch.h b/src/lib/libcrypto/arch/amd64/crypto_arch.h index a8f64cf235..9a179a571e 100644 --- a/src/lib/libcrypto/arch/amd64/crypto_arch.h +++ b/src/lib/libcrypto/arch/amd64/crypto_arch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_arch.h,v 1.14 2025/08/14 15:11:01 jsing Exp $ */ +/* $OpenBSD: crypto_arch.h,v 1.15 2025/09/08 12:56:17 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -33,6 +33,11 @@ extern uint64_t crypto_cpu_caps_amd64; #ifndef OPENSSL_NO_ASM +#define HAVE_AES_SET_ENCRYPT_KEY_GENERIC +#define HAVE_AES_SET_DECRYPT_KEY_GENERIC +#define HAVE_AES_ENCRYPT_GENERIC +#define HAVE_AES_DECRYPT_GENERIC + #define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL #define HAVE_AES_SET_DECRYPT_KEY_INTERNAL #define HAVE_AES_ENCRYPT_INTERNAL diff --git a/src/lib/libcrypto/arch/i386/crypto_arch.h b/src/lib/libcrypto/arch/i386/crypto_arch.h index d2faa36e2e..522ed2788b 100644 --- a/src/lib/libcrypto/arch/i386/crypto_arch.h +++ b/src/lib/libcrypto/arch/i386/crypto_arch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_arch.h,v 1.12 2025/07/22 09:18:02 jsing Exp $ */ +/* $OpenBSD: crypto_arch.h,v 1.13 2025/09/08 12:56:17 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -32,6 +32,11 @@ extern uint64_t crypto_cpu_caps_i386; #ifndef OPENSSL_NO_ASM +#define HAVE_AES_SET_ENCRYPT_KEY_GENERIC +#define HAVE_AES_SET_DECRYPT_KEY_GENERIC +#define HAVE_AES_ENCRYPT_GENERIC +#define HAVE_AES_DECRYPT_GENERIC + #define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL #define HAVE_AES_SET_DECRYPT_KEY_INTERNAL #define HAVE_AES_ENCRYPT_INTERNAL -- cgit v1.2.3-55-g6feb