Crypto++
8.4
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
6 #ifndef CRYPTOPP_RABIN_H
7 #define CRYPTOPP_RABIN_H
29 {m_n = n; m_r = r; m_s = s;}
39 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
42 const Integer& GetModulus()
const {
return m_n;}
43 const Integer& GetQuadraticResidueModPrime1()
const {
return m_r;}
44 const Integer& GetQuadraticResidueModPrime2()
const {
return m_s;}
46 void SetModulus(
const Integer &n) {m_n = n;}
47 void SetQuadraticResidueModPrime1(
const Integer &r) {m_r = r;}
48 void SetQuadraticResidueModPrime2(
const Integer &s) {m_s = s;}
71 {m_n = n; m_r = r; m_s = s; m_p = p; m_q = q; m_u = u;}
88 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
93 const Integer& GetPrime1()
const {
return m_p;}
94 const Integer& GetPrime2()
const {
return m_q;}
95 const Integer& GetMultiplicativeInverseOfPrime2ModPrime1()
const {
return m_u;}
97 void SetPrime1(
const Integer &p) {m_p = p;}
98 void SetPrime2(
const Integer &q) {m_q = q;}
99 void SetMultiplicativeInverseOfPrime2ModPrime1(
const Integer &u) {m_u = u;}
108 static std::string StaticAlgorithmName() {
return "Rabin-Crypto++Variant";}
115 template <
class STANDARD>
123 template <
class STANDARD,
class H>
Classes for optimal asymmetric encryption padding.
Interface for private keys.
void Initialize(const Integer &n, const Integer &r, const Integer &s)
Initialize a Rabin public key.
Applies the trapdoor function.
Integer CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const
Calculates the inverse of an element.
Classes for probablistic signature schemes.
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 Initialize(RandomNumberGenerator &rng, unsigned int keybits)
Create a Rabin private key.
Rabin trapdoor function using the private key.
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
Get a named value.
Rabin trapdoor function using the public key.
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.