From b32af9d26196fa867fd55bca978dfef2a391a772 Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 26 Mar 2023 19:09:42 +0000 Subject: [PATCH] Minor whitespace tidying --- lib/libcrypto/bn/bn_exp.c | 9 +++++---- lib/libcrypto/bn/bn_mont.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/libcrypto/bn/bn_exp.c b/lib/libcrypto/bn/bn_exp.c index e2e4aa541c9..9e4497bb069 100644 --- a/lib/libcrypto/bn/bn_exp.c +++ b/lib/libcrypto/bn/bn_exp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_exp.c,v 1.40 2023/03/26 18:52:29 tb Exp $ */ +/* $OpenBSD: bn_exp.c,v 1.41 2023/03/26 19:09:42 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -409,9 +409,10 @@ BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, BN_CTX_start(ctx); - /* Allocate a montgomery context if it was not supplied by the caller. + /* + * Allocate a Montgomery context if it was not supplied by the caller. * If this is not done, things will break in the montgomery part. - */ + */ if (in_mont != NULL) mont = in_mont; else { @@ -1100,7 +1101,7 @@ BN_mod_exp_internal(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m * standard algorithm: * * BN_mod_exp_mont 33 .. 40 % [AMD K6-2, Linux, debug configuration] - * 55 .. 77 % [UltraSparc processor, but + * 55 .. 77 % [UltraSparc processor, but * debug-solaris-sparcv8-gcc conf.] * * BN_mod_exp_recp 50 .. 70 % [AMD K6-2, Linux, debug configuration] diff --git a/lib/libcrypto/bn/bn_mont.c b/lib/libcrypto/bn/bn_mont.c index ed49ec83eb5..582c8d4ef8d 100644 --- a/lib/libcrypto/bn/bn_mont.c +++ b/lib/libcrypto/bn/bn_mont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_mont.c,v 1.52 2023/03/07 09:42:09 jsing Exp $ */ +/* $OpenBSD: bn_mont.c,v 1.53 2023/03/26 19:09:42 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -354,7 +354,7 @@ bn_montgomery_multiply_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *b for (i = 0; i < n_len; i++) { /* Compute new t[0] * n0, as we need it inside the loop. */ w = (ap[0] * bp[i] + tp[0]) * n0; - + carry1 = carry2 = 0; for (j = 0; j < n_len; j++) { bn_mulw_addw_addw(ap[j], bp[i], tp[j], carry1, &carry1, &x); -- 2.20.1