6 #ifndef CRYPTOPP_RABIN_H 7 #define CRYPTOPP_RABIN_H 30 {m_n = n; m_r = r; m_s = s;}
40 bool GetVoidValue(
const char *
name,
const std::type_info &valueType,
void *pValue)
const;
90 bool GetVoidValue(
const char *
name,
const std::type_info &valueType,
void *pValue)
const;
117 template <
class STANDARD>
125 template <
class STANDARD,
class H>
InvertibleRabinFunction ThisClass
Trapdoor Function (TF) encryption scheme.
const Integer & GetPrime1() const
static std::string StaticAlgorithmName()
Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const
Calculates the inverse of an element.
void DEREncode(BufferedTransformation &bt) const
#define NAMESPACE_BEGIN(x)
Integer PreimageBound() const
Returns the maximum size of a message before the trapdoor function is applied.
Abstract base classes that provide a uniform interface to this library.
Interface for random number generators.
Interface for private keys.
Rabin trapdoor function using the public key.
Applies the inverse of the trapdoor function.
RabinES< OAEP< SHA1 > >::Encryptor RabinEncryptor
void SetPrime1(const Integer &p)
void SetModulus(const Integer &n)
RabinES< OAEP< SHA1 > >::Decryptor RabinDecryptor
const Integer & GetPrime2() const
bool Validate(int, bool, const char *)
Multiple precision integer with arithmetic operations.
void SetQuadraticResidueModPrime1(const Integer &r)
const Integer & GetModulus() const
void BERDecode(BufferedTransformation &bt)
Applies the trapdoor function.
const Integer & GetQuadraticResidueModPrime1() const
const Integer & GetMultiplicativeInverseOfPrime2ModPrime1() const
Integer ImageBound() const
Returns the maximum size of a message after the trapdoor function is applied.
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg)
void Initialize(const Integer &n, const Integer &r, const Integer &s, const Integer &p, const Integer &q, const Integer &u)
Initialize a Rabin private key.
void SetQuadraticResidueModPrime2(const Integer &s)
void SetPrime2(const Integer &q)
void AssignFrom(const NameValuePairs &source)
Assign values to this object.
void SetMultiplicativeInverseOfPrime2ModPrime1(const Integer &u)
InvertibleRabinFunction PrivateKey
void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize)
Generate a random key or crypto parameters.
Multiple precision integer with arithmetic operations.
Interface for public keys.
Rabin trapdoor function using the private key.
Classes for probablistic signature schemes.
bool Validate(RandomNumberGenerator &rng, unsigned int level) const
Check this object for errors.
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
const Integer & GetQuadraticResidueModPrime2() const
void Initialize(const Integer &n, const Integer &r, const Integer &s)
Initialize a Rabin public key.
void Initialize(RandomNumberGenerator &rng, unsigned int keybits)
Create a Rabin private key.
Interface for retrieving values given their names.
Trapdoor Function (TF) Signature Scheme.