Home GnuPG

mpi: fix gcry_mpi_powm for negative base.
c56080c26186Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

mpi: fix gcry_mpi_powm for negative base.

* mpi/mpi-pow.c (gcry_mpi_powm) [USE_ALGORITHM_SIMPLE_EXPONENTIATION]:
Fix for the case where BASE is negative.
* tests/mpitests.c (test_powm): Add a test case of (-17)^6 mod 19.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Dec 4 2013, 2:03 AM
Parents
rC2ff86db2e1b0: Add build support for ppc64le.
Branches
Unknown
Tags
Unknown

Event Timeline

NIIBE Yutaka <gniibe@fsij.org> committed rCc56080c26186: mpi: fix gcry_mpi_powm for negative base. (authored by NIIBE Yutaka <gniibe@fsij.org>).Dec 4 2013, 2:31 AM