CDHKeyPair Class Reference

#include <asymmetrickeys.h>

class CDHKeyPair : public CBase

Inherits from

  • CDHKeyPair

    Detailed Description

    This class is capable of generating a Diffie-Hellman (DH) public/private key pair.

    Member Attribute Documentation

    iPrivate

    CDHPrivateKey *iPrivate[protected]

    The DH private key

    iPublic

    CDHPublicKey *iPublic[protected]

    The DH public key

    Constructor & Destructor Documentation

    CDHKeyPair ( void )

    IMPORT_CCDHKeyPair(void)[protected]

    Default constructor

    ~CDHKeyPair ( void )

    IMPORT_C~CDHKeyPair(void)[virtual]

    The destructor frees all resources owned by the object, prior to its destruction.

    Member Function Documentation

    ConstructL ( RInteger &, RInteger & )

    IMPORT_C voidConstructL(RInteger &aN,
    RInteger &aG
    )[protected]

    Constructor

    ParameterDescription
    aNThe DH parameter, n (a large prime)
    aGThe DH parameter, g (the generator)

    ConstructL ( RInteger &, RInteger &, RInteger & )

    IMPORT_C voidConstructL(RInteger &aN,
    RInteger &aG,
    RInteger &ax
    )[protected]

    Constructor

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

    NewL ( RInteger &, RInteger & )

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

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

    leave
    KErrArgument If aG is out of bounds
    ParameterDescription
    aNThe DH parameter, n (a large prime)
    aGThe DH parameter, g (the generator)

    Returns: A pointer to a new CDHKeyPair object

    NewL ( RInteger &, RInteger &, RInteger & )

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

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

    leave
    KErrArgument If either aG or ax are out of bounds
    ParameterDescription
    aNThe DH parameter, n (a large prime)
    aGThe DH parameter, g (the generator)
    axThe DH value, x (a random large integer)

    Returns: A pointer to a new CDHKeyPair object

    NewLC ( RInteger &, RInteger & )

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

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

    The returned pointer is put onto the cleanup stack.

    leave
    KErrArgument If aG is out of bounds
    ParameterDescription
    aNThe DH parameter, n (a large prime)
    aGThe DH parameter, g (the generator)

    Returns: A pointer to a new CDHKeyPair object

    NewLC ( RInteger &, RInteger &, RInteger & )

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

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

    The returned pointer is put onto the cleanup stack.

    leave
    KErrArgument If either aG or ax are out of bounds
    ParameterDescription
    aNThe DH parameter, n (a large prime)
    aGThe DH parameter, g (the generator)
    axThe DH value, x (a random large integer)

    Returns: A pointer to a new CDHKeyPair object

    PrivateKey ( void )

    IMPORT_C const CDHPrivateKey &PrivateKey(void)const

    Gets the DH private key

    Returns: The DH private key

    PublicKey ( void )

    IMPORT_C const CDHPublicKey &PublicKey(void)const

    Gets the DH public key

    Returns: The DH public key