CRSAPrivateKeyCRT Class Reference

#include <asymmetrickeys.h>

class CRSAPrivateKeyCRT : public CRSAPrivateKey

Inherits from

Detailed Description

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.

Member Attribute Documentation

iDP

RInteger iDP[protected]

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

iDQ

RInteger iDQ[protected]

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

iP

RInteger iP[protected]

The RSA parameter, p, which is the first factor

iQ

RInteger iQ[protected]

The RSA parameter, q, which is the second factor

iQInv

RInteger iQInv[protected]

The RSA parameter, qInv, which is the CRT coefficient

Constructor & Destructor Documentation

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

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

Constructor

ParameterDescription
aNThe RSA parameter, n (the modulus)
aPThe RSA parameter, p (the first factor)
aQThe RSA parameter, q (the second factor)
aDPThe RSA parameter, dP (the first factor's CRT exponent)
aDQThe RSA parameter, dQ (the second factor's CRT exponent)
aQInvThe RSA parameter, qInv (the CRT coefficient)

~CRSAPrivateKeyCRT ( void )

IMPORT_C~CRSAPrivateKeyCRT(void)[virtual]

Destructor

Member Function Documentation

DP ( void )

IMPORT_C const TInteger &DP(void)const

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

Returns: The first factor's CRT exponent

DQ ( void )

IMPORT_C const TInteger &DQ(void)const

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

Returns: The second factor's CRT exponent

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.
ParameterDescription
iNThe RSA parameter, n (the modulus)
aPThe RSA parameter, p (the first factor)
aQThe RSA parameter, q (the second factor)
aDPThe RSA parameter, dP (the first factor's CRT exponent)
aDQThe RSA parameter, dQ (the second factor's CRT exponent)
aQInvThe RSA parameter, qInv (the CRT coefficient)

Returns: A pointer to a new CRSAPrivateKeyCRT object

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.
ParameterDescription
iNThe RSA parameter, n (the modulus)
aPThe RSA parameter, p (the first factor)
aQThe RSA parameter, q (the second factor)
aDPThe RSA parameter, dP (the first factor's CRT exponent)
aDQThe RSA parameter, dQ (the second factor's CRT exponent)
aQInvThe RSA parameter, qInv (the CRT coefficient)

Returns: A pointer to a new CRSAPrivateKeyCRT object

P ( void )

IMPORT_C const TInteger &P(void)const

Gets the RSA parameter, p (the first factor)

Returns: The first factor

Q ( void )

IMPORT_C const TInteger &Q(void)const

Gets the RSA parameter, q (the second factor)

Returns: The second factor

QInv ( void )

IMPORT_C const TInteger &QInv(void)const

Gets the RSA parameter, qInv (the CRT coefficient)

Returns: The CRT coefficient