15 NAMESPACE_BEGIN(CryptoPP)
27 OID GetAlgorithmID()
const;
33 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
38 Integer PreimageBound()
const {
return m_n;}
39 Integer ImageBound()
const {
return m_n;}
42 const Integer & GetModulus()
const {
return m_n;}
43 const Integer & GetPublicExponent()
const {
return m_e;}
45 void SetModulus(
const Integer &n) {m_n = n;}
46 void SetPublicExponent(
const Integer &e) {m_e = e;}
60 {m_n = n; m_e = e; m_d = d; m_p = p; m_q = q; m_dp = dp; m_dq = dq; m_u = u;}
73 OID GetAlgorithmID()
const {
return RSAFunction::GetAlgorithmID();}
84 bool GetVoidValue(
const char *name,
const std::type_info &valueType,
void *pValue)
const;
88 const Integer& GetPrime1()
const {
return m_p;}
89 const Integer& GetPrime2()
const {
return m_q;}
90 const Integer& GetPrivateExponent()
const {
return m_d;}
91 const Integer& GetModPrime1PrivateExponent()
const {
return m_dp;}
92 const Integer& GetModPrime2PrivateExponent()
const {
return m_dq;}
93 const Integer& GetMultiplicativeInverseOfPrime2ModPrime1()
const {
return m_u;}
95 void SetPrime1(
const Integer &p) {m_p = p;}
96 void SetPrime2(
const Integer &q) {m_q = q;}
97 void SetPrivateExponent(
const Integer &d) {m_d = d;}
98 void SetModPrime1PrivateExponent(
const Integer &dp) {m_dp = dp;}
99 void SetModPrime2PrivateExponent(
const Integer &dq) {m_dq = dq;}
100 void SetMultiplicativeInverseOfPrime2ModPrime1(
const Integer &u) {m_u = u;}
103 Integer m_d, m_p, m_q, m_dp, m_dq, m_u;
110 Integer PreimageBound()
const {
return ++(m_n>>1);}
117 Integer PreimageBound()
const {
return ++(m_n>>1);}
123 static const char * CRYPTOPP_API StaticAlgorithmName() {
return "RSA";}
129 template <
class STANDARD>
136 template <
class STANDARD,
class H>
143 static const char * CRYPTOPP_API StaticAlgorithmName() {
return "RSA-ISO";}