Lines Matching refs:phi
190 gcry_mpi_t phi; /* helper: (p-1)(q-1) */
261 /* calculate Euler totient: phi = (p-1)(q-1) */
264 phi = gcry_mpi_snew ( nbits );
269 mpi_mul( phi, t1, t2 );
271 mpi_fdiv_q(f, phi, g);
273 while (!gcry_mpi_gcd(t1, e, phi)) /* (while gcd is not 1) */
281 /* calculate the secret key d = e^1 mod phi */
292 log_mpidump("phi= ", phi );
303 gcry_mpi_release (phi);
386 gcry_mpi_t phi; /* Euler totient. */
512 /* Compute the Euler totient: phi = (p-1)(q-1) */
515 phi = gcry_mpi_snew (nbits);
518 mpi_mul (phi, pm1, qm1);
521 gcry_assert (gcry_mpi_gcd (g, e, phi));
523 /* Compute: f = lcm(p-1,q-1) = phi / gcd(p-1,q-1) */
527 mpi_fdiv_q (f, phi, g);
528 gcry_mpi_release (phi); phi = NULL;
620 gcry_mpi_t phi = mpi_alloc_secure ( 0 );
647 mpi_mul( phi, t1, t2 );
649 mpi_fdiv_q(t, phi, t);
672 mpi_free (phi);