prime.h
Upload User: zbbssh
Upload Date: 2007-01-08
Package Size: 196k
Code Size: 0k
Category:

CA program

Development Platform:

C/C++

  1. struct BigNum;
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. /* Generate a prime >= bn. leaving the result in bn. */
  6. int primeGen(struct BigNum *bn, unsigned (*rand)(unsigned),
  7. int (*f)(void *arg, int c), void *arg, unsigned exponent, ...);
  8. /*
  9.  * Generate a prime of the form bn + k*step.  Step must be even and
  10.  * bn must be odd.
  11.  */
  12. int primeGenStrong(struct BigNum *bn, struct BigNum const *step,
  13. int (*f)(void *arg, int c), void *arg);
  14. #ifdef __cplusplus
  15. }
  16. #endif