diff options
author | jsing <> | 2023-02-04 14:00:18 +0000 |
---|---|---|
committer | jsing <> | 2023-02-04 14:00:18 +0000 |
commit | d00cad41b7d89e460a24f1758127775119a2be6d (patch) | |
tree | 2731c4fbcd55504a599f6fe1b6dc3c056b9a580f /src | |
parent | 6fee4189019f0d88575b1a34a9ac2d619669d416 (diff) | |
download | openbsd-d00cad41b7d89e460a24f1758127775119a2be6d.tar.gz openbsd-d00cad41b7d89e460a24f1758127775119a2be6d.tar.bz2 openbsd-d00cad41b7d89e460a24f1758127775119a2be6d.zip |
Remove bn_sqr_words() on amd64.
s2n-bignum's bignum_sqr() is not the same as bn_sqr_words() (which only
computes a partial result, unlike the former). This went unnoticed since
bn_sqr() is called directly on amd64, hence bn_sqr_words() is currently
unused.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bn/arch/amd64/bn_arch.c | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/arch/amd64/bn_arch.h | 3 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/lib/libcrypto/bn/arch/amd64/bn_arch.c b/src/lib/libcrypto/bn/arch/amd64/bn_arch.c index dc3000fe8b..be2badc8a8 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.3 2023/02/02 18:39:26 jsing Exp $ */ | 1 | /* $OpenBSD: bn_arch.c,v 1.4 2023/02/04 14:00:18 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -118,11 +118,3 @@ bn_sqr_comba8(BN_ULONG *rd, const BN_ULONG *ad) | |||
118 | bignum_sqr_8_16_alt((uint64_t *)rd, (uint64_t *)ad); | 118 | bignum_sqr_8_16_alt((uint64_t *)rd, (uint64_t *)ad); |
119 | } | 119 | } |
120 | #endif | 120 | #endif |
121 | |||
122 | #ifdef HAVE_BN_SQR_WORDS | ||
123 | void | ||
124 | bn_sqr_words(BN_ULONG *rd, const BN_ULONG *ad, int num) | ||
125 | { | ||
126 | bignum_sqr(num, (uint64_t *)rd, num, (uint64_t *)ad); | ||
127 | } | ||
128 | #endif | ||
diff --git a/src/lib/libcrypto/bn/arch/amd64/bn_arch.h b/src/lib/libcrypto/bn/arch/amd64/bn_arch.h index c41a84409b..637903077a 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.10 2023/02/02 18:39:26 jsing Exp $ */ | 1 | /* $OpenBSD: bn_arch.h,v 1.11 2023/02/04 14:00:18 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -35,7 +35,6 @@ | |||
35 | #define HAVE_BN_SQR | 35 | #define HAVE_BN_SQR |
36 | #define HAVE_BN_SQR_COMBA4 | 36 | #define HAVE_BN_SQR_COMBA4 |
37 | #define HAVE_BN_SQR_COMBA8 | 37 | #define HAVE_BN_SQR_COMBA8 |
38 | #define HAVE_BN_SQR_WORDS | ||
39 | 38 | ||
40 | #define HAVE_BN_SUB | 39 | #define HAVE_BN_SUB |
41 | #define HAVE_BN_SUB_WORDS | 40 | #define HAVE_BN_SUB_WORDS |