diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2024-07-29 16:32:02 +0200 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2024-07-29 16:32:02 +0200 |
commit | 66e72a01b60ae6950ddbb3585fdc1424d303e14b (patch) | |
tree | 05789274ef25cb5d08b99d1797e7760047469685 /lib/crypto/mpi/ec.c | |
parent | 3d0e8b6edd6b08f72e07e1230f371f6ca93531e4 (diff) | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) |
Merge tag 'v6.11-rc1' into clk-meson-next
Linux 6.11-rc1
Diffstat (limited to 'lib/crypto/mpi/ec.c')
-rw-r--r-- | lib/crypto/mpi/ec.c | 6 |
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); |