Crypto++
8.2
Free C++ class library of cryptographic schemes
|
9 PublicBlumBlumShub::PublicBlumBlumShub(
const Integer &n,
const Integer &seed)
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;
bool GetBit(size_t i) const
Provides the i-th bit of the Integer.
BlumBlumShub without factorization of the modulus.
byte GenerateByte()
Generate new random byte and return it.
@ POSITIVE
the value is positive or 0
const Integer & Square(const Integer &a) const
Square an element in the ring.
void ProcessData(byte *outString, const byte *inString, size_t length)
Encrypt or decrypt an array of bytes.
void GenerateBlock(byte *output, size_t size)
Generate random array of bytes.
unsigned int BitPrecision(const T &value)
Returns the number of bits required for a value.
Classes for Blum Blum Shub generator.
unsigned int GenerateBit()
Generate new random bit and return it.
void Seek(lword index)
Seek to an absolute position.
Crypto++ library namespace.
Multiple precision integer with arithmetic operations.
Multiple precision integer with arithmetic operations.