| 
    Crypto++ 8.9
    
   Free C++ class library of cryptographic schemes 
   | 
 
Generator of prime numbers of special forms. More...
#include <nbtheory.h>
Public Member Functions | |
| PrimeAndGenerator () | |
| Construct a PrimeAndGenerator.   | |
| PrimeAndGenerator (signed int delta, RandomNumberGenerator &rng, unsigned int pbits) | |
| Construct a PrimeAndGenerator.   | |
| PrimeAndGenerator (signed int delta, RandomNumberGenerator &rng, unsigned int pbits, unsigned qbits) | |
| Construct a PrimeAndGenerator.   | |
| void | Generate (signed int delta, RandomNumberGenerator &rng, unsigned int pbits, unsigned qbits) | 
| Generate a Prime and Generator.   | |
| const Integer & | Prime () const | 
| Retrieve first prime.   | |
| const Integer & | SubPrime () const | 
| Retrieve second prime.   | |
| const Integer & | Generator () const | 
| Retrieve the generator.   | |
Generator of prime numbers of special forms.
Definition at line 266 of file nbtheory.h.
      
  | 
  inline | 
Construct a PrimeAndGenerator.
Definition at line 270 of file nbtheory.h.
      
  | 
  inline | 
Construct a PrimeAndGenerator.
| delta | +1 or -1 | 
| rng | a RandomNumberGenerator derived class | 
| pbits | the number of bits in the prime p | 
PrimeAndGenerator() generates a random prime p of the form 2*q+delta, where delta is 1 or -1 and q is also prime. Internally the constructor calls Generate(delta, rng, pbits, pbits-1). 
pbits > 5 Definition at line 280 of file nbtheory.h.
      
  | 
  inline | 
Construct a PrimeAndGenerator.
| delta | +1 or -1 | 
| rng | a RandomNumberGenerator derived class | 
| pbits | the number of bits in the prime p | 
| qbits | the number of bits in the prime q | 
PrimeAndGenerator() generates a random prime p of the form 2*r*q+delta, where q is also prime. Internally the constructor calls Generate(delta, rng, pbits, qbits). 
qbits > 4 && pbits > qbits Definition at line 291 of file nbtheory.h.
| void PrimeAndGenerator::Generate | ( | signed int | delta, | 
| RandomNumberGenerator & | rng, | ||
| unsigned int | pbits, | ||
| unsigned | qbits | ||
| ) | 
Generate a Prime and Generator.
| delta | +1 or -1 | 
| rng | a RandomNumberGenerator derived class | 
| pbits | the number of bits in the prime p | 
| qbits | the number of bits in the prime q | 
Generate() generates a random prime p of the form 2*r*q+delta, where q is also prime. 
      
  | 
  inline | 
Retrieve first prime.
Definition at line 304 of file nbtheory.h.
      
  | 
  inline | 
Retrieve second prime.
Definition at line 308 of file nbtheory.h.
      
  | 
  inline | 
Retrieve the generator.
Definition at line 312 of file nbtheory.h.