RSAFunction_ISO Class Reference

Inheritance diagram for RSAFunction_ISO:

RSAFunction TrapdoorFunction X509PublicKey RandomizedTrapdoorFunction ASN1CryptoMaterial< PublicKey > TrapdoorFunctionBounds ASN1Object PublicKey CryptoMaterial NameValuePairs List of all members.

Detailed Description

Definition at line 106 of file rsa.h.

Public Member Functions

Integer ApplyFunction (const Integer &x) const
Integer PreimageBound () const
void Initialize (const Integer &n, const Integer &e)
OID GetAlgorithmID () const
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
bool Validate (RandomNumberGenerator &rng, unsigned int level) const
 check this object for errors
bool GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const
 to be implemented by derived classes, users should use one of the above functions instead
void AssignFrom (const NameValuePairs &source)
 assign values from source to this object
Integer ImageBound () const
const IntegerGetModulus () const
const IntegerGetPublicExponent () 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
void BERDecode (BufferedTransformation &bt)
 decode this object from a BufferedTransformation, using BER (Basic Encoding Rules)
void DEREncode (BufferedTransformation &bt) const
 encode this object into a BufferedTransformation, using DER (Distinguished Encoding Rules)
virtual bool BERDecodeAlgorithmParameters (BufferedTransformation &bt)
virtual bool DEREncodeAlgorithmParameters (BufferedTransformation &bt) const
void Save (BufferedTransformation &bt) const
 save key into a BufferedTransformation
void Load (BufferedTransformation &bt)
 load key from a BufferedTransformation
virtual void BEREncode (BufferedTransformation &bt) const
 encode this object into a BufferedTransformation, using BER

Protected Attributes

Integer m_n
Integer m_e


Member Function Documentation

bool RSAFunction::Validate ( RandomNumberGenerator rng,
unsigned int  level 
) const [virtual, inherited]

check this object for errors

Parameters:
level denotes the level of thoroughness: 0 - using this object won't cause a crash or exception (rng is ignored) 1 - this object will probably function (encrypt, sign, etc.) correctly (but may not check for weak keys and such) 2 - make sure this object will function correctly, and do reasonable security checks 3 - do checks that may take a long time
Returns:
true if the tests pass

Implements CryptoMaterial.

Reimplemented in InvertibleRSAFunction.

Definition at line 70 of file rsa.cpp.

References Integer::IsOdd(), RSAFunction::m_e, RSAFunction::m_n, and Integer::One().

Referenced by InvertibleRSAFunction::Validate().

void RSAFunction::AssignFrom ( const NameValuePairs source  )  [virtual, inherited]

assign values from source to this object

Note:
This function can be used to create a public key from a private key.

Implements CryptoMaterial.

Reimplemented in InvertibleRSAFunction.

Definition at line 86 of file rsa.cpp.

void ASN1CryptoMaterial< PublicKey >::Load ( BufferedTransformation bt  )  [inline, virtual, inherited]

Reimplemented from CryptoMaterial.

Reimplemented in InvertibleRSAFunction.

Definition at line 240 of file asn.h.

References ASN1Object::BERDecode().

virtual void ASN1Object::BEREncode ( BufferedTransformation bt  )  const [inline, virtual, inherited]

encode this object into a BufferedTransformation, using BER

this may be useful if DEREncode() would be too inefficient

Definition at line 1579 of file cryptlib.h.

Referenced by ASN1CryptoMaterial< PublicKey >::Save().


The documentation for this class was generated from the following files:
Generated on Sat Dec 23 02:07:33 2006 for Crypto++ by  doxygen 1.5.1-p1