• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/libgcrypt-1.5.0/cipher/

Lines Matching defs:factors

286    RET_FACTORS: if not NULL, an array with all factors are stored at
288 ALL_FACTORS: If set to true all factors of prime-1 are returned.
307 gcry_mpi_t *factors = NULL; /* Current factors. */
313 unsigned int fbits = 0; /* Length of prime factors. */
314 unsigned int n = 0; /* Number of factors. */
340 /* Find number of needed prime factors N. */
379 /* Allocate an array to hold all factors + 2 for later usage. */
380 factors = gcry_calloc (n + 2, sizeof (*factors));
381 if (!factors)
449 /* At a maximum we use strong random for the factors.
475 factors[i] = pool[i];
514 factors[j++] = pool[i];
540 mpi_mul (prime, prime, factors[i]);
585 log_mpidump ("factor pi: ", factors[i]);
591 log_debug (", p%d=%u", i, mpi_get_nbits (factors[i]));
597 /* Caller wants the factors. */
613 factors_new[i++] = mpi_copy (factors[j]);
622 factors_new[i] = mpi_copy (factors[i]);
626 factors_new[i] = mpi_copy (factors[i]);
641 factors[n] = q;
642 factors[n + 1] = mpi_alloc_set_ui (2);
658 mpi_fdiv_q (tmp, pmin1, factors[i]);
670 mpi_free (factors[n+1]);
707 if (factors)
708 gcry_free (factors); /* Factors are shallow copies. */
1114 PRIME. If FACTOR_BITS is non-zero, one of the prime factors of
1117 factors and store it in FACTORS. FLAGS might be used to influence
1121 unsigned int factor_bits, gcry_mpi_t **factors,
1141 factors? &factors_generated : NULL,
1155 if (factors)
1167 if (factors)
1168 *factors = factors_generated;
1200 gcry_mpi_t prime, gcry_mpi_t *factors,
1210 if (!factors || !r_g || !prime)
1214 for (n=0; factors[n]; n++)
1220 /* mpi_set (tmp, factors[0]); */
1222 /* mpi_mul (tmp, tmp, factors[i]); */
1246 mpi_fdiv_q (tmp, pmin1, factors[i]);
1264 /* Convenience function to release the factors array. */
1266 gcry_prime_release_factors (gcry_mpi_t *factors)
1268 if (factors)
1272 for (i=0; factors[i]; i++)
1273 mpi_free (factors[i]);
1274 gcry_free (factors);