diff options
author | jsing <> | 2025-09-01 15:33:23 +0000 |
---|---|---|
committer | jsing <> | 2025-09-01 15:33:23 +0000 |
commit | edd4db8b24106490f82c1a694d4e2b35afe9c6cb (patch) | |
tree | 85f07d168195bfa52fb5268fa756de3a280f046a /src | |
parent | a71d96fc5f06e3d4eaad85e2958a525f4f6fd26e (diff) | |
download | openbsd-edd4db8b24106490f82c1a694d4e2b35afe9c6cb.tar.gz openbsd-edd4db8b24106490f82c1a694d4e2b35afe9c6cb.tar.bz2 openbsd-edd4db8b24106490f82c1a694d4e2b35afe9c6cb.zip |
Constify bn_mul_words().
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bn/arch/amd64/bn_arch.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_local.h | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_mul.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/libcrypto/bn/arch/amd64/bn_arch.c b/src/lib/libcrypto/bn/arch/amd64/bn_arch.c index 0fe6070efa..6c3888687b 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.16 2025/09/01 15:15:44 jsing Exp $ */ | 1 | /* $OpenBSD: bn_arch.c,v 1.17 2025/09/01 15:33:23 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -128,7 +128,8 @@ bn_mul_comba8(BN_ULONG *rd, const BN_ULONG *ad, const BN_ULONG *bd) | |||
128 | 128 | ||
129 | #ifdef HAVE_BN_MUL_WORDS | 129 | #ifdef HAVE_BN_MUL_WORDS |
130 | void | 130 | void |
131 | bn_mul_words(BN_ULONG *r, BN_ULONG *a, int a_len, BN_ULONG *b, int b_len) | 131 | bn_mul_words(BN_ULONG *r, const BN_ULONG *a, int a_len, const BN_ULONG *b, |
132 | int b_len) | ||
132 | { | 133 | { |
133 | bignum_mul(a_len + b_len, (uint64_t *)r, a_len, (const uint64_t *)a, | 134 | bignum_mul(a_len + b_len, (uint64_t *)r, a_len, (const uint64_t *)a, |
134 | b_len, (const uint64_t *)b); | 135 | b_len, (const uint64_t *)b); |
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h index 0356c4c00f..0df4b7f32e 100644 --- a/src/lib/libcrypto/bn/bn_local.h +++ b/src/lib/libcrypto/bn/bn_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_local.h,v 1.57 2025/08/31 09:33:30 jsing Exp $ */ | 1 | /* $OpenBSD: bn_local.h,v 1.58 2025/09/01 15:33:23 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -242,7 +242,8 @@ BN_ULONG bn_sub(BN_ULONG *r, int r_len, const BN_ULONG *a, int a_len, | |||
242 | void bn_mul_comba4(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b); | 242 | void bn_mul_comba4(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b); |
243 | void bn_mul_comba6(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b); | 243 | void bn_mul_comba6(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b); |
244 | void bn_mul_comba8(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b); | 244 | void bn_mul_comba8(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b); |
245 | void bn_mul_words(BN_ULONG *r, BN_ULONG *a, int a_len, BN_ULONG *b, int b_len); | 245 | void bn_mul_words(BN_ULONG *r, const BN_ULONG *a, int a_len, const BN_ULONG *b, |
246 | int b_len); | ||
246 | 247 | ||
247 | void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a); | 248 | void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a); |
248 | void bn_sqr_comba6(BN_ULONG *r, const BN_ULONG *a); | 249 | void bn_sqr_comba6(BN_ULONG *r, const BN_ULONG *a); |
diff --git a/src/lib/libcrypto/bn/bn_mul.c b/src/lib/libcrypto/bn/bn_mul.c index 6ba05f2eba..383ba795dd 100644 --- a/src/lib/libcrypto/bn/bn_mul.c +++ b/src/lib/libcrypto/bn/bn_mul.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mul.c,v 1.44 2025/08/30 07:54:27 jsing Exp $ */ | 1 | /* $OpenBSD: bn_mul.c,v 1.45 2025/09/01 15:33:23 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -323,7 +323,8 @@ bn_mulw_add_words(BN_ULONG *r, const BN_ULONG *a, int num, BN_ULONG w) | |||
323 | 323 | ||
324 | #ifndef HAVE_BN_MUL_WORDS | 324 | #ifndef HAVE_BN_MUL_WORDS |
325 | void | 325 | void |
326 | bn_mul_words(BN_ULONG *r, BN_ULONG *a, int a_len, BN_ULONG *b, int b_len) | 326 | bn_mul_words(BN_ULONG *r, const BN_ULONG *a, int a_len, const BN_ULONG *b, |
327 | int b_len) | ||
327 | { | 328 | { |
328 | BN_ULONG *rr; | 329 | BN_ULONG *rr; |
329 | 330 | ||