CDSAParameters Class Reference

#include <asymmetrickeys.h>

class CDSAParameters : public CBase

Inherits from

  • CDSAParameters

    Detailed Description

    Concrete class representing the parameters common to both a DSA public and private key.

    See FIPS 186-2, Digital Signature Standard

    Member Attribute Documentation

    iG

    RInteger iG[protected]

    The DSA parameter, g (the base)

    g = h^((p-1)/q) mod p,

    where h is any integer less than p-1 such that g > 1

    iP

    RInteger iP[protected]

    The DSA parameter, p (the prime).

    A prime modulus whose length is between KMinPrimeLength and KMaxPrimeLength bits, and is a multiple of KPrimeLengthMultiple.

    iQ

    RInteger iQ[protected]

    The DSA parameter, q (the subprime)

    This is a 160-bit prime divisor of p-1.

    Constructor & Destructor Documentation

    CDSAParameters ( RInteger &, RInteger &, RInteger & )

    IMPORT_CCDSAParameters(RInteger &aP,
    RInteger &aQ,
    RInteger &aG
    )[protected]

    Constructor

    ParameterDescription
    aPThe DSA parameter, p (the prime)
    aQThe DSA parameter, g (the subprime)
    aGThe DSA parameter, g (the base)

    CDSAParameters ( void )

    IMPORT_CCDSAParameters(void)[protected]

    Default constructor

    ~CDSAParameters ( void )

    IMPORT_C~CDSAParameters(void)[virtual]

    Destructor

    Member Function Documentation

    G ( void )

    IMPORT_C const TInteger &G(void)const

    Gets the DSA parameter, g (the base)

    Returns: The DSA parameter, g

    GeneratePrimesL ( const TDesC8 &, TUint &, RInteger &, TUint, RInteger &, TBool )

    TBool GeneratePrimesL(const TDesC8 &aSeed,
    TUint &aCounter,
    RInteger &aP,
    TUintaL,
    RInteger &aQ,
    TBoolaUseInputCounter = EFalse
    )[static]

    NewL ( RInteger &, RInteger &, RInteger & )

    IMPORT_C CDSAParameters *NewL(RInteger &aP,
    RInteger &aQ,
    RInteger &aG
    )[static]

    Creates a new DSA parameters object from a specified prime, subprime, and base.

    ParameterDescription
    aPThe DSA parameter, p (the prime)
    aQThe DSA parameter, g (the subprime)
    aGThe DSA parameter, g (the base)

    Returns: A pointer to a new CDSAParameters object

    P ( void )

    IMPORT_C const TInteger &P(void)const

    Gets the DSA parameter, p (the prime)

    Returns: The DSA parameter, p

    Q ( void )

    IMPORT_C const TInteger &Q(void)const

    Gets the DSA parameter, q (the subprime)

    Returns: The DSA parameter, q

    ValidPrimeLength ( TUint )

    IMPORT_C TBoolValidPrimeLength(TUintaPrimeBits)[static]

    Whether or not the prime is of a valid length

    It is valid if the length of the prime modulus is between KMinPrimeLength and KMaxPrimeLength bits, and the prime is a multiple of KPrimeLengthMultiple.

    ParameterDescription
    aPrimeBitsThe prime modulus

    Returns: ETrue, if within the constraints; EFalse, otherwise.

    ValidatePrimesL ( const CDSAPrimeCertificate & )

    IMPORT_C TBoolValidatePrimesL(const CDSAPrimeCertificate &aCert)const

    Validates the primes regenerated from a DSA prime certificate

    ParameterDescription
    aCertThe DSA prime certificate that contains the seed and counter value from a DSA key generation process

    Returns: Whether or not the primes are valid