23 void Initialize(
const Integer &n)
39 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
42 const Integer& GetModulus()
const {
return m_n;}
43 void SetModulus(
const Integer &n) {m_n = n;}
56 {m_n = n; m_p = p; m_q = q; m_u = u;}
73 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
78 const Integer& GetPrime1()
const {
return m_p;}
79 const Integer& GetPrime2()
const {
return m_q;}
80 const Integer& GetMultiplicativeInverseOfPrime2ModPrime1()
const {
return m_u;}
82 void SetPrime1(
const Integer &p) {m_p = p;}
83 void SetPrime2(
const Integer &q) {m_q = q;}
84 void SetMultiplicativeInverseOfPrime2ModPrime1(
const Integer &u) {m_u = u;}
93 static std::string StaticAlgorithmName() {
return "RW";}
99 template <
class STANDARD,
class H>
virtual void AssignFrom(const NameValuePairs &source)=0
Assign values to this object.
This file contains helper classes/functions for implementing public key algorithms.
void Load(BufferedTransformation &bt)
Loads a key from a BufferedTransformation.
Abstract base classes that provide a uniform interface to this library.
virtual bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const =0
Get a named value.
Interface for random number generators.
Integer ImageBound() const
Returns the maximum size of a message after the trapdoor function is applied.
Interface for private keys.
Applies the inverse of the trapdoor function.
Multiple precision integer with arithmetic operations.
Applies the trapdoor function.
void Load(BufferedTransformation &bt)
Loads a key from a BufferedTransformation.
void Save(BufferedTransformation &bt) const
Saves a key to a BufferedTransformation.
virtual bool Validate(RandomNumberGenerator &rng, unsigned int level) const =0
Check this object for errors.
virtual void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs ¶ms=g_nullNameValuePairs)
Generate a random key or crypto parameters.
void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize)
Generate a random key or crypto parameters.
Interface for public keys.
Crypto++ library namespace.
Integer PreimageBound() const
Returns the maximum size of a message before the trapdoor function is applied.
void Save(BufferedTransformation &bt) const
Saves a key to a BufferedTransformation.
Interface for retrieving values given their names.
Trapdoor Function Based Signature Scheme.