Crypto++
5.6.4
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
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>
Interface for private keys.
Applies the trapdoor function.
Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const
Calculates the inverse of an element.
Classes for probablistic signature schemes.
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
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.
bool Validate(RandomNumberGenerator &rng, unsigned int level) const
Check this object for errors.
Interface for public keys.
Applies the inverse of the trapdoor function.
void GenerateRandomWithKeySize(RandomNumberGenerator &rng, unsigned int keySize)
Generate a random key or crypto parameters.
void AssignFrom(const NameValuePairs &source)
Assign values to this object.
Crypto++ library namespace.
Trapdoor Function (TF) Signature Scheme.
Trapdoor Function (TF) encryption scheme.
Template implementing constructors for public key algorithm classes.
Interface for retrieving values given their names.
Abstract base classes that provide a uniform interface to this library.
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg)
Multiple precision integer with arithmetic operations.
Multiple precision integer with arithmetic operations.
Integer PreimageBound() const
Returns the maximum size of a message before the trapdoor function is applied.