CRSAPrivateKeyCRT Class Reference

class CRSAPrivateKeyCRT : public CRSAPrivateKey

An alternate representation of an RSA private key providing significant speed enhancements through its use of the Chinese Remainder Theorem (CRT).

Here, a private key is represented by a modulus (n), the two prime factors of the modulus (p, q), p's CRT exponent (dP), q's CRT exponent (dQ), and the CRT coefficient (qInv). See PKCS#1 at http://www.rsasecurity.com/rsalabs/pkcs/ for more information.

Inherits from

Constructor & Destructor Documentation

CRSAPrivateKeyCRT(RInteger &, RInteger &, RInteger &, RInteger &, RInteger &, RInteger &)

IMPORT_C CRSAPrivateKeyCRT ( RInteger & aN,
RInteger & aP,
RInteger & aQ,
RInteger & aDP,
RInteger & aDQ,
RInteger & aQInv
) [protected]

Constructor

Parameters

RInteger & aN The RSA parameter, n (the modulus)
RInteger & aP The RSA parameter, p (the first factor)
RInteger & aQ The RSA parameter, q (the second factor)
RInteger & aDP The RSA parameter, dP (the first factor's CRT exponent)
RInteger & aDQ The RSA parameter, dQ (the second factor's CRT exponent)
RInteger & aQInv The RSA parameter, qInv (the CRT coefficient)

CRSAPrivateKeyCRT(const CRSAPrivateKeyCRT &)

CRSAPrivateKeyCRT ( const CRSAPrivateKeyCRT & ) [private]

Parameters

const CRSAPrivateKeyCRT &

~CRSAPrivateKeyCRT(void)

IMPORT_C ~CRSAPrivateKeyCRT ( void ) [virtual]

Destructor

Parameters

void

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

DP(void)

IMPORT_C const TInteger & DP ( void ) const

Gets the RSA parameter, dP (the first factor's CRT exponent)

Parameters

void

DQ(void)

IMPORT_C const TInteger & DQ ( void ) const

Gets the RSA parameter, dQ (the second factor's CRT exponent)

Parameters

void

NewL(RInteger &, RInteger &, RInteger &, RInteger &, RInteger &, RInteger &)

IMPORT_C CRSAPrivateKeyCRT * NewL ( RInteger & iN,
RInteger & aP,
RInteger & aQ,
RInteger & aDP,
RInteger & aDQ,
RInteger & aQInv
) [static]

Creates a new CRSAPrivateKeyCRT object from a specified modulus and decryption exponent.

leave
KErrArgument If any of the parameters are not positive integers, and releases ownership.

Parameters

RInteger & iN The RSA parameter, n (the modulus)
RInteger & aP The RSA parameter, p (the first factor)
RInteger & aQ The RSA parameter, q (the second factor)
RInteger & aDP The RSA parameter, dP (the first factor's CRT exponent)
RInteger & aDQ The RSA parameter, dQ (the second factor's CRT exponent)
RInteger & aQInv The RSA parameter, qInv (the CRT coefficient)

NewLC(RInteger &, RInteger &, RInteger &, RInteger &, RInteger &, RInteger &)

IMPORT_C CRSAPrivateKeyCRT * NewLC ( RInteger & iN,
RInteger & aP,
RInteger & aQ,
RInteger & aDP,
RInteger & aDQ,
RInteger & aQInv
) [static]

Creates a new CRSAPrivateKeyCRT object from a specified modulus and decryption exponent.

The returned pointer is put onto the cleanup stack.

leave
KErrArgument If any of the parameters are not positive integers, and releases ownership.

Parameters

RInteger & iN The RSA parameter, n (the modulus)
RInteger & aP The RSA parameter, p (the first factor)
RInteger & aQ The RSA parameter, q (the second factor)
RInteger & aDP The RSA parameter, dP (the first factor's CRT exponent)
RInteger & aDQ The RSA parameter, dQ (the second factor's CRT exponent)
RInteger & aQInv The RSA parameter, qInv (the CRT coefficient)

P(void)

IMPORT_C const TInteger & P ( void ) const

Gets the RSA parameter, p (the first factor)

Parameters

void

Q(void)

IMPORT_C const TInteger & Q ( void ) const

Gets the RSA parameter, q (the second factor)

Parameters

void

QInv(void)

IMPORT_C const TInteger & QInv ( void ) const

Gets the RSA parameter, qInv (the CRT coefficient)

Parameters

void

operator=(const CRSAPrivateKeyCRT &)

CRSAPrivateKeyCRT & operator= ( const CRSAPrivateKeyCRT & ) [private]

Parameters

const CRSAPrivateKeyCRT &

Member Data Documentation

RInteger iDP

RInteger iDP [protected]

The RSA parameter, dP, which is the first factor's CRT exponent

RInteger iDQ

RInteger iDQ [protected]

The RSA parameter, dQ, which is the second factor's CRT exponent

RInteger iP

RInteger iP [protected]

The RSA parameter, p, which is the first factor

RInteger iQ

RInteger iQ [protected]

The RSA parameter, q, which is the second factor

RInteger iQInv

RInteger iQInv [protected]

The RSA parameter, qInv, which is the CRT coefficient