#include <asymmetrickeys.h>
class CDHPrivateKey : public CDHParameters |
Protected Attributes | |
---|---|
RInteger | ix |
Public Member Functions | |
---|---|
virtual | ~CDHPrivateKey(void) |
IMPORT_C CDHPrivateKey * | NewL(RInteger &, RInteger &, RInteger &) |
IMPORT_C CDHPrivateKey * | NewLC(RInteger &, RInteger &, RInteger &) |
IMPORT_C const TInteger & | x(void) |
Protected Member Functions | |
---|---|
CDHPrivateKey(RInteger &, RInteger &, RInteger &) | |
CDHPrivateKey(void) |
Inherited Attributes | |
---|---|
CDHParameters::iG | |
CDHParameters::iN |
Representation of a Diffie-Hellman (DH) private key.
RInteger | ix | [protected] |
The DH value, x, which is a random large integer.
X = g^x mod n (note the case sensitivity)
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.
Parameter | Description |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
ax | The DH value, x (a random large integer) |
Returns: A pointer to a new CDHPrivateKey object
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.
Parameter | Description |
---|---|
aN | The DH parameter, n (a large prime) |
aG | The DH parameter, g (the generator) |
ax | The DH value, x (a random large integer) |
Returns: A pointer to a new CDHPrivateKey object
IMPORT_C const TInteger & | x | ( | void | ) | const |
Gets the DH value, x, which is a random large integer.
Returns: The DH value, x