mpi: Simplify mpi_powm.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 4 Apr 2017 08:38:05 +0000 (17:38 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 4 Apr 2017 08:38:05 +0000 (17:38 +0900)
commit719468e53133d3bdf12156c5bfdea2bf15f9f6f1
tree35d3ce2fb5c1677e876307ceb65fcb2b079827c9
parent654024081cfa103c87bb163b117ea3568171d408
mpi: Simplify mpi_powm.

* mpi/mpi-pow.c (_gcry_mpi_powm): Simplify the loop.

--

This fix is not a solution for the problem reported (yet).  The
problem is that the current algorithm of _gcry_mpi_powm depends on
exponent and some information leaks is possible.

Reported-by: Andreas Zankl <andreas.zankl@aisec.fraunhofer.de>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
mpi/mpi-pow.c