diff options
| author | jsing <> | 2025-07-13 06:01:33 +0000 |
|---|---|---|
| committer | jsing <> | 2025-07-13 06:01:33 +0000 |
| commit | f0234f5a33ecf3b2784f3e73bdf1e937abe56599 (patch) | |
| tree | a43688f8969e5bd862faf101152f51b1560e7731 /src/lib/libcrypto/arch | |
| parent | 417b1213b262bbe6d34c708537dff4b062920bfa (diff) | |
| download | openbsd-f0234f5a33ecf3b2784f3e73bdf1e937abe56599.tar.gz openbsd-f0234f5a33ecf3b2784f3e73bdf1e937abe56599.tar.bz2 openbsd-f0234f5a33ecf3b2784f3e73bdf1e937abe56599.zip | |
Simplify AES-XTS implementation and remove AES-NI specific code from EVP.
Provide aes_xts_encrypt_internal() and call that from aes_xts_cipher().
Have amd64 and i386 provide their own versions that dispatch to
aesni_xts_encrypt()/aesni_xts_decrypt() as appropriate. The
AESNI_CAPABLE code and methods can then be removed.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/arch')
| -rw-r--r-- | src/lib/libcrypto/arch/amd64/crypto_arch.h | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/arch/i386/crypto_arch.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/arch/amd64/crypto_arch.h b/src/lib/libcrypto/arch/amd64/crypto_arch.h index 9f292cc530..7c3c89a088 100644 --- a/src/lib/libcrypto/arch/amd64/crypto_arch.h +++ b/src/lib/libcrypto/arch/amd64/crypto_arch.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto_arch.h,v 1.9 2025/06/28 12:39:10 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_arch.h,v 1.10 2025/07/13 06:01:33 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -39,6 +39,7 @@ extern uint64_t crypto_cpu_caps_amd64; | |||
| 39 | #define HAVE_AES_DECRYPT_INTERNAL | 39 | #define HAVE_AES_DECRYPT_INTERNAL |
| 40 | #define HAVE_AES_CBC_ENCRYPT_INTERNAL | 40 | #define HAVE_AES_CBC_ENCRYPT_INTERNAL |
| 41 | #define HAVE_AES_CTR32_ENCRYPT_INTERNAL | 41 | #define HAVE_AES_CTR32_ENCRYPT_INTERNAL |
| 42 | #define HAVE_AES_XTS_ENCRYPT_INTERNAL | ||
| 42 | 43 | ||
| 43 | #define HAVE_GCM128_INIT | 44 | #define HAVE_GCM128_INIT |
| 44 | 45 | ||
diff --git a/src/lib/libcrypto/arch/i386/crypto_arch.h b/src/lib/libcrypto/arch/i386/crypto_arch.h index 95d4cc468b..8b292165fb 100644 --- a/src/lib/libcrypto/arch/i386/crypto_arch.h +++ b/src/lib/libcrypto/arch/i386/crypto_arch.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto_arch.h,v 1.8 2025/06/28 12:39:10 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_arch.h,v 1.9 2025/07/13 06:01:33 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -39,6 +39,7 @@ extern uint64_t crypto_cpu_caps_i386; | |||
| 39 | #define HAVE_AES_DECRYPT_INTERNAL | 39 | #define HAVE_AES_DECRYPT_INTERNAL |
| 40 | #define HAVE_AES_CBC_ENCRYPT_INTERNAL | 40 | #define HAVE_AES_CBC_ENCRYPT_INTERNAL |
| 41 | #define HAVE_AES_CTR32_ENCRYPT_INTERNAL | 41 | #define HAVE_AES_CTR32_ENCRYPT_INTERNAL |
| 42 | #define HAVE_AES_XTS_ENCRYPT_INTERNAL | ||
| 42 | 43 | ||
| 43 | #define HAVE_GCM128_INIT | 44 | #define HAVE_GCM128_INIT |
| 44 | 45 | ||
