-/* $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.
*
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 {
* 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]
-/* $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.
*
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);