summaryrefslogtreecommitdiff
path: root/lib/libcrypto/arch
AgeCommit message (Collapse)Author
2024-08-11Provide and use crypto_arch.h.Joel Sing
Provide a per architecture crypto_arch.h - this will be used in a similar manner to bn_arch.h and will allow for architecture specific #defines and static inline functions. Move the HAVE_AES_* and HAVE_RC4_* defines here. ok tb@
2024-06-04enable -fret-clean on amd64, for libc libcrypto ld.so kernel, and all theTheo de Raadt
ssh tools. The dynamic objects are entirely ret-clean, static binaries will contain a blend of cleaning and non-cleaning callers.
2024-03-29Always use C functions for AES_{encrypt,decrypt}().Joel Sing
Always provide AES_{encrypt,decrypt}() via C functions, which then either use a C implementation or call the assembly implementation. ok tb@
2024-03-29Move camellia to primary Makefile.Joel Sing
These files are now built on all platforms.
2024-03-29Stop building camellia assembly on amd64 and i386.Joel Sing
This is a legacy algorithm and the assembly is only marginally faster than the C code. Discussed with beck@ and tb@
2024-03-29Move aes_core.c to the primary Makefile.Joel Sing
This is now built on all platforms.
2024-03-29Always use C functions for AES_set_{encrypt,decrypt}_key().Joel Sing
Always include aes_core.c and provide AES_set_{encrypt,decrypt}_key() via C functions, which then either use a C implementation or call the assembly implementation. ok tb@
2024-03-29Move wp_block.c to the primary Makefile.Joel Sing
This is now built on all platforms.
2024-03-29Stop building whirlpool assembly on amd64 and i386.Joel Sing
This is a legacy algorithm and the assembly is only marginally faster than the C code. Discussed with beck@ and tb@
2024-03-28Merge aes_cbc.c into aes.c now that aes_cbc.c is used on all platforms.Joel Sing
2024-03-28Make AES_cbc_encrypt() always be a C function.Joel Sing
Rename the assembly generated functions from AES_cbc_encrypt() to aes_cbc_encrypt_internal(). Always include aes_cbc.c and change it to use defines that are similar to those used in BN. ok tb@
2024-03-28Remove OPENSSL_UNISTD defineTheo Buehler
2024-03-28Move rc4.c to primary Makefile.Joel Sing
This is now built on all platforms.
2024-03-28Use C functions for RC4 public API.Joel Sing
Rather than having public API switch between C and assembly, always use C functions as entry points, which then call an assembly implementation (if available). This makes it significantly easier to deal with symbol aliasing/namespaces and it also means we benefit from vulnerability prevention provided by the C compiler. Rename the assembly generated functions from RC4() to rc4_internal() and RC4_set_key() to rc4_set_key_internal(). Always include rc4.c and change it to use defines that are similar to those used in BN. ok beck@ joshua@ tb@
2024-03-28Move des sources to primary Makefile.Joel Sing
Now that all platforms use a C des implementation, move it to the primary Makefile.
2024-03-28Stop building the assembly implementation of des on sparc64.Joel Sing
This one was hiding behind an m4 script. Build tested by tb@
2024-03-28Stop building the assembly implementation of des and ripemd on i386.Joel Sing
This is the only architecture that has an assembly implementation for these algorithms. There is little to gain from accelerating legacy algorithms on a legacy architecture. Discussed with beck@ and tb@
2024-03-27Remove unused rc4 parisc assembly.Joel Sing
This is already disabled since it is "about 35% slower than C code".
2024-03-27Consolidate rc4 code.Joel Sing
Discussed with tb@
2024-03-27Remove assembly for stitched modes.Joel Sing
The stitched modes have been removed, so having assembly for them is of little use.
2024-03-27Move bf_enc.c to the primary Makefile.Joel Sing
Now that all architectures are using bf_enc.c, it does not make sense to have it in every Makefile.inc file.
2024-03-27Stop building the assembly implementation of blowfish on i386.Joel Sing
This is the only architecture that has an assembly implementation. There is little to gain from accelerating a legacy algorithm on a legacy architecture. ok beck@ tb@
2023-11-12split the Symbols.list up so that arch specific symbols do not end up everywhereRobert Nagy
ok tb@
2023-08-25zap a stray spaceTheo Buehler
2023-07-26Remove constructor attribute for OPENSSL_cpuid_setup() on arm/aarch64.Joel Sing
OPENSSL_cpuid_setup() is invoked via OPENSSL_init_crypto(), whihc is triggered by various entry points to the library. As such, we do not need to invoke it as a constructor. ok tb@
2023-07-07Provide a libcrypto Makefile.inc for riscv64.Joel Sing
This is currently no different from the existing behaviour and just pulls in the C code that would have previously been built. However, it means that OPENSSL_NO_ASM is no longer being defined by the main libcrypto Makefile, which in turn will allow us to implement assembly optimisations.
2023-04-15Stop building GF2m assemblyTheo Buehler
GF2m support will be removed shortly. In the interim drop some of this unused code already and let it fall back to the C implementation. ok jsing
2023-04-05Sprinkle a few BTI instructions into the arm64 assembly files and passMark Kettenis
-mmark-bti-property to indicate those now have BTI support. ok jsing@, deraadt@
2023-02-22Replace bn_sub_part_words() with bn_sub().Joel Sing
Now that bn_sub() handles word arrays with potentially different lengths, we no longer need bn_sub_part_words() - call bn_sub() instead. This allows us to entirely remove the unnecessarily complex bn_sub_part_words() code. ok tb@
2023-02-16Enable s2n-bignum word_clz() on amd64.Joel Sing
The BN_num_bits_word() function is a hot path, being called more than 80 million times during a libcrypto regress run. The word_clz() implementation uses five instructions to do the same as the generic code that uses more than 60 instructions. Discussed with tb@
2023-01-31Remove the now empty bn_asm.c.Joel Sing
This rather misnamed file (bn_asm.c) previously contained the C code that was needed to build libcrypto bignum on platforms that did not have assembly implementations of the functions it contained.
2023-01-31Remove sparc related files from libcrypto.Joel Sing
The sparc platform got retired a while back, however some parts remained hiding in libcrypto. Mop these up (along with the bn_arch.h that I introduced). Spotted by and ok tb@
2023-01-29Use s2n-bignum assembly implementations for libcrypto bignum on amd64.Joel Sing
This switches the core bignum assembly implementations from x86_64-gcc.c to s2n-bignum for amd64. ok miod@ tb@
2023-01-21Provide an implementation of bn_sqr() that calls s2n-bignum's bignum_sqr().Joel Sing
ok tb@
2023-01-20Replace BN_DIV3W with HAVE_BN_DIV_3_WORDS (in bn_arch.h).Joel Sing
ok tb@
2023-01-17Remove non-visible and unused OPENSSL_wipe_cpu and OPENSSL_atomic_addMiod Vallat
interfaces, and remove empty assembly OPENSSL_cpuid_setup routines - the default empty C fallback will work as good. ok jsing@
2023-01-14Remove unused Elliptic Curve code.Joel Sing
For various reasons, the ecp_nistp* and ecp_nistz* code is unused. While ecp_nistp* was being compiled, it is disabled due to OPENSSL_NO_EC_NISTP_64_GCC_128 being defined. On the other hand, ecp_nistz* was not even being built. We will bring in new versions or alternative versions of such code, if we end up enabling it in the future. For now it is just causing complexity (and grep noise) while trying to improve the EC code. Discussed with tb@
2023-01-13Move all data tables from .text section to .rodata, and update the code toMiod Vallat
fetch them correctly when building PIC. Also drop unused data, and remove --no-execute-only from linker flags. ok kettenis@
2023-01-13Move all data tables from .text section to .rodata, and update the code toMiod Vallat
fetch them correctly when building PIC. Also drop unused data, and remove --no-execute-only from linker flags. ok jsing@ kettenis@
2023-01-11based upon inspection of obj/*.S ...Theo de Raadt
temporarily force sparc64 libcrypto to be built --no-execute-only because perlasm is still putting tables (intended to be rodata) into text. This will help dynamic executables, but static executables won't be saved by this. But this is temporary because we hope the perlasm problem is fixed soon.
2023-01-11temporarily force hppa libcrypto to be built --no-execute-only becauseTheo de Raadt
perlasm is still putting tables (intended to be rodata) into text. This will help dynamic executables, but static executables won't be saved by this. But this is temporary because we hope the perlasm problem is fixed soon. ok miod
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
i removed the arithmetics -> arithmetic changes, as i felt they were not clearly correct ok tb
2022-03-25use the new CPU_ID_AA64ISAR0 sysctl to determine CPU features on arm64Robert Nagy
ok tb@, deraadt@, kettenis@
2022-03-23Start disentangling armv7 and aarch64 codeTheo Buehler
arm_arch.h and armcap.c are shared between armv7 and aarch64 which results in an inscrutable #ifdef maze. Move copies of these files into arch/{arm,aarch64}/ with appropriate names and some trivial minor adjustments. ok deraadt inoguchi kettenis
2021-05-02riscv64 openssl configDale Rahn
copied from other 64 bit arch ok jsg@
2021-05-01Retire OpenBSD/sgi.Visa Hankala
OK deraadt@
2020-06-29Disable assembly code for powerpc64; more work is needed to make it work.Mark Kettenis
2020-06-28Switch back to bn_mul_mont_int since the bn_mul_mont_fpu64 code isn'tMark Kettenis
hooked up and the lack of a bn_mul_mont_int implementation results in undefined references.
2020-06-26Accidentally doubled these files on first commit. Correcting.Dale Rahn
2020-06-25Intial attempt at powerpc64 libcrypto pieces.Dale Rahn
just commit this kettenis@