#include <asymmetrickeys.h>
class CDSAParameters : public CBase |
Protected Attributes | |
---|---|
RInteger | iG |
RInteger | iP |
RInteger | iQ |
Public Member Functions | |
---|---|
virtual | ~CDSAParameters(void) |
IMPORT_C const TInteger & | G(void) |
TBool | GeneratePrimesL(const TDesC8 &, TUint &, RInteger &, TUint, RInteger &, TBool) |
IMPORT_C CDSAParameters * | NewL(RInteger &, RInteger &, RInteger &) |
IMPORT_C const TInteger & | P(void) |
IMPORT_C const TInteger & | Q(void) |
IMPORT_C TBool | ValidPrimeLength(TUint) |
IMPORT_C TBool | ValidatePrimesL(const CDSAPrimeCertificate &) |
Protected Member Functions | |
---|---|
CDSAParameters(RInteger &, RInteger &, RInteger &) | |
CDSAParameters(void) |
Concrete class representing the parameters common to both a DSA public and private key.
See FIPS 186-2, Digital Signature Standard
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 | [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 | [protected] |
The DSA parameter, q (the subprime)
This is a 160-bit prime divisor of p-1.
IMPORT_C const TInteger & | G | ( | void | ) | const |
Gets the DSA parameter, g (the base)
Returns: The DSA parameter, g
IMPORT_C CDSAParameters * | NewL | ( | RInteger & | aP, |
RInteger & | aQ, | |||
RInteger & | aG | |||
) | [static] |
Creates a new DSA parameters object from a specified prime, subprime, and base.
Parameter | Description |
---|---|
aP | The DSA parameter, p (the prime) |
aQ | The DSA parameter, g (the subprime) |
aG | The DSA parameter, g (the base) |
Returns: A pointer to a new CDSAParameters object
IMPORT_C const TInteger & | P | ( | void | ) | const |
Gets the DSA parameter, p (the prime)
Returns: The DSA parameter, p
IMPORT_C const TInteger & | Q | ( | void | ) | const |
Gets the DSA parameter, q (the subprime)
Returns: The DSA parameter, q
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.
Parameter | Description |
---|---|
aPrimeBits | The prime modulus |
Returns: ETrue, if within the constraints; EFalse, otherwise.
IMPORT_C TBool | ValidatePrimesL | ( | const CDSAPrimeCertificate & | aCert | ) | const |
Validates the primes regenerated from a DSA prime certificate
Parameter | Description |
---|---|
aCert | The DSA prime certificate that contains the seed and counter value from a DSA key generation process |
Returns: Whether or not the primes are valid