Algorithm
Sisyphus
sisyphus1 at optusnet.com.au
Mon Mar 10 12:59:27 CET 2008
----- Original Message -----
From: "seu Zé Pereira" <seuzepereira at yahoo.com.br>
To: <gmp-discuss at swox.com>
Sent: Monday, March 10, 2008 2:25 AM
Subject: Algorithm
> Does anyone know the name of the algorithm that uses GMP to perform the
> operation p^q MOD m?
>
For p^q MOD m, GMP uses either the mpz_powm() or mpz_powm_ui() function -
depending upon whether "q" is an mpz_t (when mpz_powm is used) or an int
(when case mpz_powm_ui is used).
But I've told you nothing about the actual algorithm that's being used ...
and I think that's what you're really asking about.
Does
http://gmplib.org/manual/Modular-Powering-Algorithm.html#Modular-Powering-Algorithm
provide the information you seek ?
Cheers,
Rob
More information about the gmp-discuss
mailing list