Lines Matching refs:phi
191 gcry_mpi_t phi; /* helper: (p-1)(q-1) */
262 /* calculate Euler totient: phi = (p-1)(q-1) */
265 phi = gcry_mpi_snew ( nbits );
270 mpi_mul( phi, t1, t2 );
272 mpi_fdiv_q(f, phi, g);
274 while (!gcry_mpi_gcd(t1, e, phi)) /* (while gcd is not 1) */
282 /* calculate the secret key d = e^1 mod phi */
293 log_mpidump("phi= ", phi );
304 gcry_mpi_release (phi);
387 gcry_mpi_t phi; /* Euler totient. */
513 /* Compute the Euler totient: phi = (p-1)(q-1) */
516 phi = gcry_mpi_snew (nbits);
519 mpi_mul (phi, pm1, qm1);
522 gcry_assert (gcry_mpi_gcd (g, e, phi));
524 /* Compute: f = lcm(p-1,q-1) = phi / gcd(p-1,q-1) */
528 mpi_fdiv_q (f, phi, g);
529 gcry_mpi_release (phi); phi = NULL;
621 gcry_mpi_t phi = mpi_alloc_secure ( 0 );
648 mpi_mul( phi, t1, t2 );
650 mpi_fdiv_q(t, phi, t);
673 mpi_free (phi);