mirror of
https://github.com/openbsd/src.git
synced 2026-04-24 22:26:03 +00:00
Provide LIBRESSL_USE_.*_ASSEMBLY defines.
Make life easier for portable by providing LIBRESSL_USE_.*_ASSEMBLY defines, which enable/disable assembly for a specific algorithm. This means that selected platforms can include the assembly files and specify a define, rather than having to try to patch the crypto_arch.h headers. Discussed with tb@
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.17 2025/06/28 12:51:08 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.18 2026/01/17 16:18:31 jsing Exp $
|
||||
|
||||
# aarch64-specific libcrypto build rules
|
||||
|
||||
SRCS += crypto_cpu_caps.c
|
||||
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SRCS += sha1_aarch64.c
|
||||
SRCS += sha1_aarch64_ce.S
|
||||
SRCS += sha256_aarch64.c
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.5 2025/06/28 12:51:08 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.6 2026/01/17 16:18:31 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -35,9 +35,11 @@ extern uint64_t crypto_cpu_caps_aarch64;
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA512_BLOCK_DATA_ORDER
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.16 2026/01/17 14:30:37 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.17 2026/01/17 16:18:31 jsing Exp $
|
||||
|
||||
# alpha-specific libcrypto build rules
|
||||
|
||||
# bn
|
||||
CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY
|
||||
SSLASM+= bn alpha-mont
|
||||
CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
||||
|
||||
# modes
|
||||
CFLAGS+= -DLIBRESSL_USE_GCM_ASSEMBLY
|
||||
SSLASM+= modes ghash-alpha
|
||||
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SSLASM+= sha sha1-alpha
|
||||
|
||||
.for dir f in ${SSLASM}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.3 2026/01/17 14:30:37 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.4 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -20,11 +20,15 @@
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_GCM_ASSEMBLY
|
||||
#define HAVE_GCM_GHASH_4BIT
|
||||
#define HAVE_GCM_GMULT_4BIT
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.45 2026/01/17 14:53:09 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.46 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# amd64-specific libcrypto build rules
|
||||
|
||||
@@ -8,6 +8,7 @@ EXTRA_PL = ${LCRYPTO_SRC}/perlasm/x86_64-xlate.pl
|
||||
SRCS += crypto_cpu_caps.c
|
||||
|
||||
# aes
|
||||
CFLAGS+= -DLIBRESSL_USE_AES_ASSEMBLY
|
||||
SSLASM+= aes aes-x86_64
|
||||
SSLASM+= aes aesni-x86_64
|
||||
SRCS += aes_amd64.c
|
||||
@@ -20,6 +21,7 @@ CFLAGS+= -DOPENSSL_BN_ASM_MONT5
|
||||
SSLASM+= bn x86_64-mont5
|
||||
|
||||
# bn s2n-bignum
|
||||
CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY
|
||||
SRCS += bn_arch.c
|
||||
SRCS += bignum_add.S
|
||||
SRCS += bignum_cmadd.S
|
||||
@@ -44,17 +46,20 @@ SRCS += bignum_sub.S
|
||||
SRCS += word_clz.S
|
||||
|
||||
# md5
|
||||
CFLAGS+= -DLIBRESSL_USE_MD5_ASSEMBLY
|
||||
SRCS+= md5_amd64_generic.S
|
||||
|
||||
# modes
|
||||
CFLAGS+= -DLIBRESSL_USE_GCM_ASSEMBLY
|
||||
SSLASM+= modes ghash-x86_64
|
||||
SRCS += gcm128_amd64.c
|
||||
|
||||
# rc4
|
||||
CFLAGS+= -DLIBRESSL_USE_RC4_ASSEMBLY
|
||||
SSLASM+= rc4 rc4-x86_64
|
||||
|
||||
# ripemd
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SRCS+= sha1_amd64.c
|
||||
SRCS+= sha1_amd64_generic.S
|
||||
SRCS+= sha1_amd64_shani.S
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.17 2026/01/17 14:53:09 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.18 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -33,11 +33,11 @@ extern uint64_t crypto_cpu_caps_amd64;
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_AES_ASSEMBLY
|
||||
#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
|
||||
@@ -47,24 +47,31 @@ extern uint64_t crypto_cpu_caps_amd64;
|
||||
#define HAVE_AES_CTR32_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_ECB_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_XTS_ENCRYPT_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_GCM_ASSEMBLY
|
||||
#define HAVE_GCM128_INIT
|
||||
#define HAVE_GCM_GHASH_4BIT
|
||||
#define HAVE_GCM_GMULT_4BIT
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_MD5_ASSEMBLY
|
||||
#define HAVE_MD5_BLOCK_DATA_ORDER
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_RC4_ASSEMBLY
|
||||
#define HAVE_RC4_INTERNAL
|
||||
#define HAVE_RC4_SET_KEY_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA512_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA512_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.29 2026/01/17 14:30:37 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.30 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# hppa-specific libcrypto build rules
|
||||
|
||||
# aes
|
||||
CFLAGS+= -DLIBRESSL_USE_AES_ASSEMBLY
|
||||
SSLASM+= aes aes-parisc aes-parisc
|
||||
|
||||
# bn
|
||||
CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY
|
||||
SSLASM+= bn parisc-mont parisc-mont
|
||||
CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
||||
|
||||
# modes
|
||||
CFLAGS+= -DLIBRESSL_USE_GCM_ASSEMBLY
|
||||
SSLASM+= modes ghash-parisc ghash-parisc
|
||||
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SSLASM+= sha sha1-parisc sha1-parisc
|
||||
SSLASM+= sha sha512-parisc sha256-parisc
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.3 2026/01/17 14:30:37 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.4 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -20,17 +20,22 @@
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_AES_ASSEMBLY
|
||||
#define HAVE_AES_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_DECRYPT_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_GCM_ASSEMBLY
|
||||
#define HAVE_GCM_GHASH_4BIT
|
||||
#define HAVE_GCM_GMULT_4BIT
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.34 2026/01/17 14:53:09 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.35 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# i386-specific libcrypto build rules
|
||||
|
||||
@@ -8,27 +8,33 @@ EXTRA_PL = ${LCRYPTO_SRC}/perlasm/x86gas.pl ${LCRYPTO_SRC}/perlasm/x86asm.pl
|
||||
SRCS += crypto_cpu_caps.c
|
||||
|
||||
# aes
|
||||
CFLAGS+= -DLIBRESSL_USE_AES_ASSEMBLY
|
||||
SSLASM+= aes aes-586
|
||||
SSLASM+= aes aesni-x86
|
||||
SRCS += aes_i386.c
|
||||
|
||||
# bn
|
||||
CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY
|
||||
SSLASM+= bn bn-586
|
||||
SSLASM+= bn co-586
|
||||
CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
||||
SSLASM+= bn x86-mont
|
||||
|
||||
# md5
|
||||
CFLAGS+= -DLIBRESSL_USE_MD5_ASSEMBLY
|
||||
SSLASM+= md5 md5-586
|
||||
|
||||
# modes
|
||||
CFLAGS+= -DLIBRESSL_USE_GCM_ASSEMBLY
|
||||
SSLASM+= modes ghash-x86
|
||||
SRCS += gcm128_i386.c
|
||||
|
||||
# rc4
|
||||
CFLAGS+= -DLIBRESSL_USE_RC4_ASSEMBLY
|
||||
SSLASM+= rc4 rc4-586
|
||||
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SSLASM+= sha sha1-586
|
||||
SSLASM+= sha sha256-586
|
||||
SSLASM+= sha sha512-586
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.16 2026/01/17 14:53:09 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.17 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -33,11 +33,11 @@ extern uint64_t crypto_cpu_caps_i386;
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_AES_ASSEMBLY
|
||||
#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
|
||||
@@ -47,24 +47,31 @@ extern uint64_t crypto_cpu_caps_i386;
|
||||
#define HAVE_AES_CTR32_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_ECB_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_XTS_ENCRYPT_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_GCM_ASSEMBLY
|
||||
#define HAVE_GCM128_INIT
|
||||
#define HAVE_GCM_GHASH_4BIT
|
||||
#define HAVE_GCM_GMULT_4BIT
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_MD5_ASSEMBLY
|
||||
#define HAVE_MD5_BLOCK_DATA_ORDER
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_RC4_ASSEMBLY
|
||||
#define HAVE_RC4_INTERNAL
|
||||
#define HAVE_RC4_SET_KEY_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA512_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA512_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.20 2026/01/17 13:55:30 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.21 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# mips64-specific libcrypto build rules
|
||||
|
||||
# aes
|
||||
CFLAGS+= -DLIBRESSL_USE_AES_ASSEMBLY
|
||||
SSLASM+= aes aes-mips aes-mips
|
||||
|
||||
# bn
|
||||
CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY
|
||||
SSLASM+= bn mips bn-mips
|
||||
SSLASM+= bn mips-mont mips-mont
|
||||
CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
||||
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SSLASM+= sha sha1-mips sha1-mips
|
||||
SSLASM+= sha sha512-mips sha256-mips
|
||||
SSLASM+= sha sha512-mips sha512-mips
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.2 2025/02/14 12:01:58 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.3 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -20,19 +20,21 @@
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_AES_ASSEMBLY
|
||||
#define HAVE_AES_SET_ENCRYPT_KEY_INTERNAL
|
||||
#define HAVE_AES_SET_DECRYPT_KEY_INTERNAL
|
||||
#define HAVE_AES_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_DECRYPT_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA512_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA512_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.15 2026/01/17 13:55:31 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.16 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# powerpc-specific libcrypto build rules
|
||||
|
||||
# aes
|
||||
# slower than C code
|
||||
#SSLASM+= aes aes-ppc aes-ppc
|
||||
|
||||
# bn
|
||||
CFLAGS+= -DLIBRESSL_USE_BN_ASSEMBLY
|
||||
SSLASM+= bn ppc bn-ppc
|
||||
SSLASM+= bn ppc-mont ppc-mont
|
||||
CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
||||
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SSLASM+= sha sha1-ppc sha1-ppc
|
||||
SSLASM+= sha sha512-ppc sha256-ppc
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.2 2025/02/14 12:01:58 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.3 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -20,11 +20,12 @@
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.17 2026/01/17 13:55:31 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.18 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# powerpc-specific libcrypto build rules
|
||||
|
||||
# aes
|
||||
# slower than C code
|
||||
#SSLASM+= aes aes-ppc aes-ppc
|
||||
|
||||
# bn
|
||||
#SSLASM+= bn ppc bn-ppc
|
||||
#SSLASM+= bn ppc-mont ppc-mont
|
||||
#CFLAGS+= -DOPENSSL_BN_ASM_MONT
|
||||
|
||||
# sha
|
||||
#SSLASM+= sha sha1-ppc sha1-ppc
|
||||
#SSLASM+= sha sha512-ppc sha256-ppc
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.23 2026/01/17 14:30:37 jsing Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.24 2026/01/17 16:18:32 jsing Exp $
|
||||
|
||||
# sparc64-specific libcrypto build rules
|
||||
|
||||
# aes
|
||||
CFLAGS+= -DLIBRESSL_USE_AES_ASSEMBLY
|
||||
SSLASM+= aes aes-sparcv9 aes-sparcv9
|
||||
# bn
|
||||
|
||||
# modes
|
||||
CFLAGS+= -DLIBRESSL_USE_GCM_ASSEMBLY
|
||||
SSLASM+= modes ghash-sparcv9 ghash-sparcv9
|
||||
|
||||
# sha
|
||||
CFLAGS+= -DLIBRESSL_USE_SHA_ASSEMBLY
|
||||
SSLASM+= sha sha1-sparcv9 sha1-sparcv9
|
||||
SSLASM+= sha sha512-sparcv9 sha256-sparcv9
|
||||
SSLASM+= sha sha512-sparcv9 sha512-sparcv9
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: crypto_arch.h,v 1.3 2026/01/17 14:30:37 jsing Exp $ */
|
||||
/* $OpenBSD: crypto_arch.h,v 1.4 2026/01/17 16:18:32 jsing Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
@@ -20,20 +20,24 @@
|
||||
|
||||
#ifndef OPENSSL_NO_ASM
|
||||
|
||||
#ifdef LIBRESSL_USE_AES_ASSEMBLY
|
||||
#define HAVE_AES_ENCRYPT_INTERNAL
|
||||
#define HAVE_AES_DECRYPT_INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_GCM_ASSEMBLY
|
||||
#define HAVE_GCM_GHASH_4BIT
|
||||
#define HAVE_GCM_GMULT_4BIT
|
||||
#endif
|
||||
|
||||
#ifdef LIBRESSL_USE_SHA_ASSEMBLY
|
||||
#define HAVE_SHA1_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA1_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA256_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA256_BLOCK_GENERIC
|
||||
|
||||
#define HAVE_SHA512_BLOCK_DATA_ORDER
|
||||
#define HAVE_SHA512_BLOCK_GENERIC
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user