CDHPrivateKey Class Reference

class CDHPrivateKey : public CDHParameters

Representation of a Diffie-Hellman (DH) private key.

Inherits from

Constructor & Destructor Documentation

CDHPrivateKey(RInteger &, RInteger &, RInteger &)

IMPORT_CCDHPrivateKey(RInteger &aN,
RInteger &aG,
RInteger &ax
)[protected]

Constructor

Parameters

RInteger & aNThe DH parameter, n (a large prime)
RInteger & aGThe DH parameter, g (the generator)
RInteger & axThe DH value, x (a random large integer)

CDHPrivateKey(void)

IMPORT_CCDHPrivateKey(void)[protected]

Constructor

Parameters

void

CDHPrivateKey(const CDHPrivateKey &)

CDHPrivateKey(const CDHPrivateKey &)[private]

Parameters

const CDHPrivateKey &

~CDHPrivateKey(void)

IMPORT_C~CDHPrivateKey(void)[virtual]

Destructor

Parameters

void

Member Functions Documentation

NewL(RInteger &, RInteger &, RInteger &)

IMPORT_C CDHPrivateKey *NewL(RInteger &aN,
RInteger &aG,
RInteger &ax
)[static]

Creates a new DH private key from a specified large prime, generator, and random large integer.

Parameters

RInteger & aNThe DH parameter, n (a large prime)
RInteger & aGThe DH parameter, g (the generator)
RInteger & axThe DH value, x (a random large integer)

NewLC(RInteger &, RInteger &, RInteger &)

IMPORT_C CDHPrivateKey *NewLC(RInteger &aN,
RInteger &aG,
RInteger &ax
)[static]

Creates a new DH private key from a specified large prime, generator, and random large integer.

The returned pointer is put onto the cleanup stack.

Parameters

RInteger & aNThe DH parameter, n (a large prime)
RInteger & aGThe DH parameter, g (the generator)
RInteger & axThe DH value, x (a random large integer)

operator=(const CDHPrivateKey &)

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

Parameters

const CDHPrivateKey &

x(void)

IMPORT_C const TInteger &x(void)const

Gets the DH value, x, which is a random large integer.

Parameters

void

Member Data Documentation

RInteger ix

RInteger ix[protected]

The DH value, x, which is a random large integer.

X = g^x mod n (note the case sensitivity)