CDSAParameters Class Reference

class CDSAParameters : public CBase

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

See FIPS 186-2, Digital Signature Standard

Inherits from

Constructor & Destructor Documentation

CDSAParameters(RInteger &, RInteger &, RInteger &)

IMPORT_C CDSAParameters ( RInteger & aP,
RInteger & aQ,
RInteger & aG
) [protected]

Constructor

Parameters

RInteger & aP The DSA parameter, p (the prime)
RInteger & aQ The DSA parameter, g (the subprime)
RInteger & aG The DSA parameter, g (the base)

CDSAParameters(void)

IMPORT_C CDSAParameters ( void ) [protected]

Default constructor

Parameters

void

CDSAParameters(const CDSAParameters &)

CDSAParameters ( const CDSAParameters & ) [private]

Parameters

const CDSAParameters &

~CDSAParameters(void)

IMPORT_C ~CDSAParameters ( void ) [virtual]

Destructor

Parameters

void

Member Functions Documentation

G(void)

IMPORT_C const TInteger & G ( void ) const

Gets the DSA parameter, g (the base)

Parameters

void

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

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

Parameters

const TDesC8 & aSeed
TUint & aCounter
RInteger & aP
TUint aL
RInteger & aQ
TBool aUseInputCounter = EFalse

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.

Parameters

RInteger & aP The DSA parameter, p (the prime)
RInteger & aQ The DSA parameter, g (the subprime)
RInteger & aG The DSA parameter, g (the base)

P(void)

IMPORT_C const TInteger & P ( void ) const

Gets the DSA parameter, p (the prime)

Parameters

void

Q(void)

IMPORT_C const TInteger & Q ( void ) const

Gets the DSA parameter, q (the subprime)

Parameters

void

ValidPrimeLength(TUint)

IMPORT_C TBool ValidPrimeLength ( TUint aPrimeBits ) [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.

Parameters

TUint aPrimeBits The prime modulus

ValidatePrimesL(const CDSAPrimeCertificate &)

IMPORT_C TBool ValidatePrimesL ( const CDSAPrimeCertificate & aCert ) const

Validates the primes regenerated from a DSA prime certificate

Parameters

const CDSAPrimeCertificate & aCert The DSA prime certificate that contains the seed and counter value from a DSA key generation process

operator=(const CDSAParameters &)

CDSAParameters & operator= ( const CDSAParameters & ) [private]

Parameters

const CDSAParameters &

Member Data Documentation

RInteger 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

RInteger 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.

RInteger iQ

RInteger iQ [protected]

The DSA parameter, q (the subprime)

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