Home GnuPG

addm/subm/mulm: fix case when destination is same MPI as divider

Description

addm/subm/mulm: fix case when destination is same MPI as divider

* mpi/mpi-add.c (_gcry_mpi_addm, _gcry_mpi_subm): Take copy of M when
W and M are the same MPI.
* mpi/mpi-mul.c (_gcry_mpi_mulm): Likewise.
* tests/mpitests.c (test_addm_subm_mulm): New.
(main): Run addm/subm/mulm test.
  • Reported-by: Guido Vranken <guidovranken@gmail.com>
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jun 3 2023, 12:20 PM
Parents
rCbeeff8eda4a9: twofish-avx2: de-unroll round function
Branches
Unknown
Tags
Unknown