CDHPublicKey Class Reference

class CDHPublicKey : public CDHParameters

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

Inherits from

Constructor & Destructor Documentation

CDHPublicKey(RInteger &, RInteger &, RInteger &)

IMPORT_CCDHPublicKey(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

CDHPublicKey(void)

IMPORT_CCDHPublicKey(void)[protected]

Constructor

Parameters

void

CDHPublicKey(const CDHPublicKey &)

CDHPublicKey(const CDHPublicKey &)[private]

Parameters

const CDHPublicKey &

~CDHPublicKey(void)

IMPORT_C~CDHPublicKey(void)[virtual]

Destructor

Parameters

void

Member Functions Documentation

NewL(RInteger &, RInteger &, RInteger &)

IMPORT_C CDHPublicKey *NewL(RInteger &aN,
RInteger &aG,
RInteger &aX
)[static]

Creates a new DH public 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

NewLC(RInteger &, RInteger &, RInteger &)

IMPORT_C CDHPublicKey *NewLC(RInteger &aN,
RInteger &aG,
RInteger &aX
)[static]

Creates a new DH public 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

X(void)

IMPORT_C const TInteger &X(void)const

Gets the DH value, X

Parameters

void

operator=(const CDHPublicKey &)

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

Parameters

const CDHPublicKey &

Member Data Documentation

RInteger iX

RInteger iX[protected]

The DH value, X

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