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_C CDHPublicKey ( RInteger & aN,
RInteger & aG,
RInteger & aX
) [protected]

Constructor

Parameters

RInteger & aN The DH parameter, n (a large prime)
RInteger & aG The DH parameter, g (the generator)
RInteger & aX The DH value, X

CDHPublicKey(void)

IMPORT_C CDHPublicKey ( 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 & aN The DH parameter, n (a large prime)
RInteger & aG The DH parameter, g (the generator)
RInteger & aX The 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 & aN The DH parameter, n (a large prime)
RInteger & aG The DH parameter, g (the generator)
RInteger & aX The 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)