diff options
| author | jsing <> | 2025-05-24 07:07:18 +0000 |
|---|---|---|
| committer | jsing <> | 2025-05-24 07:07:18 +0000 |
| commit | 8ed7978ba9261ae91449f542e06d0cd25c7e1b62 (patch) | |
| tree | 236cfffcebf0e6f3642a69eda1a0bf667229950e /src/lib/libcrypto/arch/arm/crypto_arch.h | |
| parent | 5cff19849712572985ae477d2a126ea82eb5a96c (diff) | |
| download | openbsd-8ed7978ba9261ae91449f542e06d0cd25c7e1b62.tar.gz openbsd-8ed7978ba9261ae91449f542e06d0cd25c7e1b62.tar.bz2 openbsd-8ed7978ba9261ae91449f542e06d0cd25c7e1b62.zip | |
Disable libcrypto assembly on arm.
The arm CPU capability detection is uses SIGILL and is unsafe to call from
some contexts. Furthermore, this is only useful to detect NEON support,
which is then unused on OpenBSD due to __STRICT_ALIGNMENT. Requiring a
minimum of ARMv7+VFP+NEON is also not unreasonable.
The SHA-1, SHA-256 and SHA-512 (non-NEON) C code performs within ~5% of
the assembly, as does RSA when using the C based Montgomery multiplication.
The C versions of AES and GHASH code are around ~40-50% of the assembly,
howeer if you care about performance you really want to use
Chacha20Poly1305 on this platform.
This will enable further clean up to proceed.
ok joshua@ kinjiro@ tb@
Diffstat (limited to 'src/lib/libcrypto/arch/arm/crypto_arch.h')
| -rw-r--r-- | src/lib/libcrypto/arch/arm/crypto_arch.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/lib/libcrypto/arch/arm/crypto_arch.h b/src/lib/libcrypto/arch/arm/crypto_arch.h index 07d7829fe3..732a59cf72 100644 --- a/src/lib/libcrypto/arch/arm/crypto_arch.h +++ b/src/lib/libcrypto/arch/arm/crypto_arch.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto_arch.h,v 1.2 2025/02/14 12:01:58 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_arch.h,v 1.3 2025/05/24 07:07:18 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -20,20 +20,6 @@ | |||
| 20 | 20 | ||
| 21 | #ifndef OPENSSL_NO_ASM | 21 | #ifndef OPENSSL_NO_ASM |
| 22 | 22 | ||
| 23 | #define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL | ||
| 24 | #define HAVE_AES_SET_DECRYPT_KEY_INTERNAL | ||
| 25 | #define HAVE_AES_ENCRYPT_INTERNAL | ||
| 26 | #define HAVE_AES_DECRYPT_INTERNAL | ||
| 27 | |||
| 28 | #define HAVE_SHA1_BLOCK_DATA_ORDER | ||
| 29 | #define HAVE_SHA1_BLOCK_GENERIC | ||
| 30 | |||
| 31 | #define HAVE_SHA256_BLOCK_DATA_ORDER | ||
| 32 | #define HAVE_SHA256_BLOCK_GENERIC | ||
| 33 | |||
| 34 | #define HAVE_SHA512_BLOCK_DATA_ORDER | ||
| 35 | #define HAVE_SHA512_BLOCK_GENERIC | ||
| 36 | |||
| 37 | #endif | 23 | #endif |
| 38 | 24 | ||
| 39 | #endif | 25 | #endif |
