summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_internal.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_internal.h b/src/lib/libcrypto/bn/bn_internal.h
index 4f4d1c31f5..8a729b8e44 100644
--- a/src/lib/libcrypto/bn/bn_internal.h
+++ b/src/lib/libcrypto/bn/bn_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_internal.h,v 1.10 2023/03/07 05:57:01 jsing Exp $ */ 1/* $OpenBSD: bn_internal.h,v 1.11 2023/03/07 09:35:55 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -347,11 +347,9 @@ static inline void
347bn_mulw_addtw(BN_ULONG a, BN_ULONG b, BN_ULONG c2, BN_ULONG c1, BN_ULONG c0, 347bn_mulw_addtw(BN_ULONG a, BN_ULONG b, BN_ULONG c2, BN_ULONG c1, BN_ULONG c0,
348 BN_ULONG *out_r2, BN_ULONG *out_r1, BN_ULONG *out_r0) 348 BN_ULONG *out_r2, BN_ULONG *out_r1, BN_ULONG *out_r0)
349{ 349{
350 BN_ULONG carry, r2, r1, r0, x1, x0; 350 BN_ULONG carry, r2, r1, r0, x1;
351 351
352 bn_mulw(a, b, &x1, &x0); 352 bn_mulw_addw(a, b, c0, &x1, &r0);
353 bn_addw(c0, x0, &carry, &r0);
354 x1 += carry;
355 bn_addw(c1, x1, &carry, &r1); 353 bn_addw(c1, x1, &carry, &r1);
356 r2 = c2 + carry; 354 r2 = c2 + carry;
357 355