7 #ifndef CRYPTOPP_RABIN_H 8 #define CRYPTOPP_RABIN_H 24 {m_n = n; m_r = r; m_s = s;}
34 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
37 const Integer& GetModulus()
const {
return m_n;}
38 const Integer& GetQuadraticResidueModPrime1()
const {
return m_r;}
39 const Integer& GetQuadraticResidueModPrime2()
const {
return m_s;}
41 void SetModulus(
const Integer &n) {m_n = n;}
42 void SetQuadraticResidueModPrime1(
const Integer &r) {m_r = r;}
43 void SetQuadraticResidueModPrime2(
const Integer &s) {m_s = s;}
57 {m_n = n; m_r = r; m_s = s; m_p = p; m_q = q; m_u = u;}
67 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
72 const Integer& GetPrime1()
const {
return m_p;}
73 const Integer& GetPrime2()
const {
return m_q;}
74 const Integer& GetMultiplicativeInverseOfPrime2ModPrime1()
const {
return m_u;}
76 void SetPrime1(
const Integer &p) {m_p = p;}
77 void SetPrime2(
const Integer &q) {m_q = q;}
78 void SetMultiplicativeInverseOfPrime2ModPrime1(
const Integer &u) {m_u = u;}
87 static std::string StaticAlgorithmName() {
return "Rabin-Crypto++Variant";}
93 template <
class STANDARD>
99 template <
class STANDARD,
class H>
Trapdoor Function Based Encryption Scheme.
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.
Applies the inverse of the trapdoor function.
Multiple precision integer with arithmetic operations.
Applies the trapdoor function.
Integer ImageBound() const
Returns the maximum size of a message after the trapdoor function is applied.
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg)
void AssignFrom(const NameValuePairs &source)
Assign values to this object.
void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize)
Generate a random key or crypto parameters.
Interface for public keys.
Crypto++ library namespace.
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.
Interface for retrieving values given their names.
A template implementing constructors for public key algorithm classes.
Trapdoor Function Based Signature Scheme.