7NAMESPACE_BEGIN(CryptoPP)
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));
61 bitsLeft = maxBits - i % maxBits;
Classes for Blum Blum Shub generator.
virtual Element Exponentiate(const Element &a, const Integer &e) const
Raises a base to an exponent in the group.
BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed)
Construct a BlumBlumShub.
void Seek(lword index)
Seek to an absolute position.
Multiple precision integer with arithmetic operations.
bool GetBit(size_t i) const
Provides the i-th bit of the Integer.
@ POSITIVE
the value is positive or 0
const Integer & Square(const Integer &a) const
Square an element in the ring.
BlumBlumShub without factorization of the modulus.
unsigned int GenerateBit()
Generate new random bit and return it.
void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
byte GenerateByte()
Generate new random byte and return it.
void ProcessData(byte *outString, const byte *inString, size_t length)
Encrypt or decrypt an array of bytes.
word64 lword
Large word type.
Multiple precision integer with arithmetic operations.
unsigned int BitPrecision(const T &value)
Returns the number of bits required for a value.