#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 | CDSAParameters | ( | void | ) | [protected] |
Default constructor
IMPORT_C | ~CDSAParameters | ( | void | ) | [virtual] |
Destructor
IMPORT_C const TInteger & | G | ( | void | ) | const |
Gets the DSA parameter, g (the base)
TBool | GeneratePrimesL | ( | const TDesC8 & | aSeed, |
TUint & | aCounter, | |||
RInteger & | aP, | |||
TUint | aL, | |||
RInteger & | aQ, | |||
TBool | aUseInputCounter = EFalse | |||
) | [static] |
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 | |
---|---|
aP | The DSA parameter, p (the prime) |
aQ | The DSA parameter, g (the subprime) |
aG | The DSA parameter, g (the base) |
IMPORT_C const TInteger & | P | ( | void | ) | const |
Gets the DSA parameter, p (the prime)
IMPORT_C const TInteger & | Q | ( | void | ) | const |
Gets the DSA parameter, q (the subprime)
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 | |
---|---|
aPrimeBits | The prime modulus |
IMPORT_C TBool | ValidatePrimesL | ( | const CDSAPrimeCertificate & | aCert | ) | const |
Validates the primes regenerated from a DSA prime certificate
Parameters | |
---|---|
aCert | The DSA prime certificate that contains the seed and counter value from a DSA key generation process |