21 current = modn.
Square(current);
25 return static_cast<unsigned int>(current.
GetBit(--bitsLeft));
31 for (
int i=0; i<8; i++)
59 Integer e = a_exp_b_mod_c (2, i / maxBits + 1, (p-1)*(q-1));
60 current = modn.Exponentiate(x0, e);
61 bitsLeft = maxBits - i % maxBits;
const Integer & Square(const Integer &a) const
Square an element in the ring.
BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed)
Construct a BlumBlumShub.
void ProcessData(byte *outString, const byte *inString, size_t length)
Encrypt or decrypt an array of bytes.
void Seek(lword index)
Seek to an absolute position.
unsigned int GenerateBit()
Generate new random bit and return it.
byte GenerateByte()
Generate new random byte and return it.
void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
Multiple precision integer with arithmetic operations.
word64 lword
Large word type.
unsigned char byte
8-bit unsigned datatype
Classes for Blum Blum Shub generator.
Multiple precision integer with arithmetic operations.
Crypto++ library namespace.
bool GetBit(size_t i) const
Provides the i-th bit of the Integer.
BlumBlumShub without factorization of the modulus.
unsigned int BitPrecision(const T &value)
Returns the number of bits required for a value.
the value is positive or 0