Crypto++
|
_ More...
#include <rsa.h>
Public Member Functions | |
void | Initialize (RandomNumberGenerator &rng, unsigned int modulusBits, const Integer &e=17) |
void | Initialize (const Integer &n, const Integer &e, const Integer &d, const Integer &p, const Integer &q, const Integer &dp, const Integer &dq, const Integer &u) |
void | Initialize (const Integer &n, const Integer &e, const Integer &d) |
factor n given private exponent | |
void | BERDecode (BufferedTransformation &bt) |
void | DEREncode (BufferedTransformation &bt) const |
void | Load (BufferedTransformation &bt) |
void | Save (BufferedTransformation &bt) const |
OID | GetAlgorithmID () const |
void | BERDecodePrivateKey (BufferedTransformation &bt, bool parametersPresent, size_t size) |
decode privateKey part of privateKeyInfo, without the OCTET STRING header | |
void | DEREncodePrivateKey (BufferedTransformation &bt) const |
encode privateKey part of privateKeyInfo, without the OCTET STRING header | |
Integer | CalculateInverse (RandomNumberGenerator &rng, const Integer &x) const |
bool | Validate (RandomNumberGenerator &rng, unsigned int level) const |
void | GenerateRandom (RandomNumberGenerator &rng, const NameValuePairs &alg) |
bool | GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const |
void | AssignFrom (const NameValuePairs &source) |
const Integer & | GetPrime1 () const |
const Integer & | GetPrime2 () const |
const Integer & | GetPrivateExponent () const |
const Integer & | GetModPrime1PrivateExponent () const |
const Integer & | GetModPrime2PrivateExponent () const |
const Integer & | GetMultiplicativeInverseOfPrime2ModPrime1 () const |
void | SetPrime1 (const Integer &p) |
void | SetPrime2 (const Integer &q) |
void | SetPrivateExponent (const Integer &d) |
void | SetModPrime1PrivateExponent (const Integer &dp) |
void | SetModPrime2PrivateExponent (const Integer &dq) |
void | SetMultiplicativeInverseOfPrime2ModPrime1 (const Integer &u) |
void | Initialize (const Integer &n, const Integer &e) |
void | BERDecodePublicKey (BufferedTransformation &bt, bool parametersPresent, size_t size) |
decode subjectPublicKey part of subjectPublicKeyInfo, without the BIT STRING header | |
void | DEREncodePublicKey (BufferedTransformation &bt) const |
encode subjectPublicKey part of subjectPublicKeyInfo, without the BIT STRING header | |
Integer | ApplyFunction (const Integer &x) const |
Integer | PreimageBound () const |
Integer | ImageBound () const |
const Integer & | GetModulus () const |
const Integer & | GetPublicExponent () const |
void | SetModulus (const Integer &n) |
void | SetPublicExponent (const Integer &e) |
Integer | ApplyRandomizedFunction (RandomNumberGenerator &rng, const Integer &x) const |
bool | IsRandomized () const |
virtual Integer | MaxPreimage () const |
virtual Integer | MaxImage () const |
virtual bool | BERDecodeAlgorithmParameters (BufferedTransformation &bt) |
virtual bool | DEREncodeAlgorithmParameters (BufferedTransformation &bt) const |
Integer | CalculateRandomizedInverse (RandomNumberGenerator &rng, const Integer &x) const |
bool | IsRandomized () const |
virtual bool | BERDecodeAlgorithmParameters (BufferedTransformation &bt) |
virtual bool | DEREncodeAlgorithmParameters (BufferedTransformation &bt) const |
virtual void | BERDecodeOptionalAttributes (BufferedTransformation &bt) |
decode optional attributes including context-specific tag | |
virtual void | DEREncodeOptionalAttributes (BufferedTransformation &bt) const |
encode optional attributes including context-specific tag | |
Protected Attributes | |
Integer | m_d |
Integer | m_p |
Integer | m_q |
Integer | m_dp |
Integer | m_dq |
Integer | m_u |
Integer | m_n |
Integer | m_e |
ByteQueue | m_optionalAttributes |
_
void InvertibleRSAFunction::GenerateRandom | ( | RandomNumberGenerator & | rng, |
const NameValuePairs & | alg | ||
) |
parameters: (ModulusSize, PublicExponent (default 17))
Definition at line 104 of file rsa.cpp.
References NameValuePairs::GetIntValue(), Name::ModulusSize(), Name::KeySize(), NameValuePairs::GetValueWithDefault(), Name::PublicExponent(), Name::PointerToPrimeSelector(), and Integer::InverseMod().
void PKCS8PrivateKey::BERDecodeOptionalAttributes | ( | BufferedTransformation & | bt | ) | [virtual, inherited] |