aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/ec.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-08-02 14:10:55 +0200
committerThomas Gleixner <tglx@linutronix.de>2024-08-02 14:10:55 +0200
commit4436e6da008fee87d54c038e983e5be9a6baf8fb (patch)
tree265a15efcf6f17e0e32e258d66b274fc5cad41d4 /lib/crypto/mpi/ec.c
parentb7c35279e0da414e7d90eba76f58a16223a734cb (diff)
parent8400291e289ee6b2bf9779ff1c83a291501f017b (diff)
Merge branch 'linus' into x86/mm
Bring x86 and selftests up to date
Diffstat (limited to 'lib/crypto/mpi/ec.c')
-rw-r--r--lib/crypto/mpi/ec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/crypto/mpi/ec.c b/lib/crypto/mpi/ec.c
index e16dca1e23d5..4781f00982ef 100644
--- a/lib/crypto/mpi/ec.c
+++ b/lib/crypto/mpi/ec.c
@@ -1285,14 +1285,12 @@ void mpi_ec_mul_point(MPI_POINT result,
sum = &p2_;
for (j = nbits-1; j >= 0; j--) {
- MPI_POINT t;
-
sw = mpi_test_bit(scalar, j);
point_swap_cond(q1, q2, sw, ctx);
montgomery_ladder(prd, sum, q1, q2, point->x, ctx);
point_swap_cond(prd, sum, sw, ctx);
- t = q1; q1 = prd; prd = t;
- t = q2; q2 = sum; sum = t;
+ swap(q1, prd);
+ swap(q2, sum);
}
mpi_clear(result->y);