diff options
| -rw-r--r-- | src/lib/libcrypto/bn/arch/amd64/bn_arch.c | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/bn/arch/amd64/bn_arch.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/arch/amd64/bn_arch.c b/src/lib/libcrypto/bn/arch/amd64/bn_arch.c index 5f3549fc26..0fe6070efa 100644 --- a/src/lib/libcrypto/bn/arch/amd64/bn_arch.c +++ b/src/lib/libcrypto/bn/arch/amd64/bn_arch.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_arch.c,v 1.15 2025/08/31 09:34:51 jsing Exp $ */ | 1 | /* $OpenBSD: bn_arch.c,v 1.16 2025/09/01 15:15:44 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -126,6 +126,15 @@ bn_mul_comba8(BN_ULONG *rd, const BN_ULONG *ad, const BN_ULONG *bd) | |||
| 126 | } | 126 | } |
| 127 | #endif | 127 | #endif |
| 128 | 128 | ||
| 129 | #ifdef HAVE_BN_MUL_WORDS | ||
| 130 | void | ||
| 131 | bn_mul_words(BN_ULONG *r, BN_ULONG *a, int a_len, BN_ULONG *b, int b_len) | ||
| 132 | { | ||
| 133 | bignum_mul(a_len + b_len, (uint64_t *)r, a_len, (const uint64_t *)a, | ||
| 134 | b_len, (const uint64_t *)b); | ||
| 135 | } | ||
| 136 | #endif | ||
| 137 | |||
| 129 | #ifdef HAVE_BN_MULW_ADD_WORDS | 138 | #ifdef HAVE_BN_MULW_ADD_WORDS |
| 130 | BN_ULONG | 139 | BN_ULONG |
| 131 | bn_mulw_add_words(BN_ULONG *rd, const BN_ULONG *ad, int num, BN_ULONG w) | 140 | bn_mulw_add_words(BN_ULONG *rd, const BN_ULONG *ad, int num, BN_ULONG w) |
diff --git a/src/lib/libcrypto/bn/arch/amd64/bn_arch.h b/src/lib/libcrypto/bn/arch/amd64/bn_arch.h index f42c6bc201..3cb1d1d274 100644 --- a/src/lib/libcrypto/bn/arch/amd64/bn_arch.h +++ b/src/lib/libcrypto/bn/arch/amd64/bn_arch.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_arch.h,v 1.18 2025/08/30 07:54:27 jsing Exp $ */ | 1 | /* $OpenBSD: bn_arch.h,v 1.19 2025/09/01 15:15:44 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -33,6 +33,7 @@ | |||
| 33 | #define HAVE_BN_MUL_COMBA4 | 33 | #define HAVE_BN_MUL_COMBA4 |
| 34 | #define HAVE_BN_MUL_COMBA6 | 34 | #define HAVE_BN_MUL_COMBA6 |
| 35 | #define HAVE_BN_MUL_COMBA8 | 35 | #define HAVE_BN_MUL_COMBA8 |
| 36 | #define HAVE_BN_MUL_WORDS | ||
| 36 | #define HAVE_BN_MULW_ADD_WORDS | 37 | #define HAVE_BN_MULW_ADD_WORDS |
| 37 | #define HAVE_BN_MULW_WORDS | 38 | #define HAVE_BN_MULW_WORDS |
| 38 | 39 | ||
