CDHPrivateKey Class Reference

#include <asymmetrickeys.h>

class CDHPrivateKey : public CDHParameters

Inherits from

Detailed Description

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

Member Attribute Documentation

ix

RInteger ix[protected]

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

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

Constructor & Destructor Documentation

CDHPrivateKey ( RInteger &, RInteger &, RInteger & )

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

Constructor

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

CDHPrivateKey ( void )

IMPORT_CCDHPrivateKey(void)[protected]

Constructor

~CDHPrivateKey ( void )

IMPORT_C~CDHPrivateKey(void)[virtual]

Destructor

Member Function 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
aNThe DH parameter, n (a large prime)
aGThe DH parameter, g (the generator)
axThe DH value, x (a random large integer)
Return Value
A pointer to a new CDHPrivateKey object

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
aNThe DH parameter, n (a large prime)
aGThe DH parameter, g (the generator)
axThe DH value, x (a random large integer)
Return Value
A pointer to a new CDHPrivateKey object

x ( void )

IMPORT_C const TInteger &x(void)const

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

Return Value
The DH value, x