Crypto++
|
DSA group parameters, these are GF(p) group parameters that are allowed by the DSA standard. More...
#include <gfpcrypt.h>
Public Types | |
typedef GROUP_PRECOMP::Element | Element |
Public Member Functions | |
bool | ValidateGroup (RandomNumberGenerator &rng, unsigned int level) const |
void | GenerateRandom (RandomNumberGenerator &rng, const NameValuePairs &alg) |
bool | IsIdentity (const Integer &element) const |
void | SimultaneousExponentiate (Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const |
bool | GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const |
Element | MultiplyElements (const Element &a, const Element &b) const |
Element | CascadeExponentiate (const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const |
void | AssignFrom (const NameValuePairs &source) |
const DL_FixedBasePrecomputation < Element > & | GetBasePrecomputation () const |
DL_FixedBasePrecomputation < Element > & | AccessBasePrecomputation () |
const Integer & | GetModulus () const |
const Integer & | GetGenerator () const |
void | SetModulusAndSubgroupGenerator (const Integer &p, const Integer &g) |
bool | operator== (const DL_GroupParameters_IntegerBasedImpl< GROUP_PRECOMP, BASE_PRECOMP > &rhs) const |
bool | operator!= (const DL_GroupParameters_IntegerBasedImpl< GROUP_PRECOMP, BASE_PRECOMP > &rhs) const |
Protected Member Functions | |
int | GetFieldType () const |
bool DL_GroupParameters_DSA::ValidateGroup | ( | RandomNumberGenerator & | rng, |
unsigned int | level | ||
) | const |
also checks that the lengths of p and q are allowed by the DSA standard
Definition at line 61 of file gfpcrypt.cpp.
void DL_GroupParameters_DSA::GenerateRandom | ( | RandomNumberGenerator & | rng, |
const NameValuePairs & | alg | ||
) |
parameters: (ModulusSize), or (Modulus, SubgroupOrder, SubgroupGenerator)
ModulusSize must be between DSA::MIN_PRIME_LENGTH and DSA::MAX_PRIME_LENGTH, and divisible by DSA::PRIME_LENGTH_MULTIPLE
Definition at line 26 of file gfpcrypt.cpp.
References NameValuePairs::GetValue(), NameValuePairs::GetValueWithDefault(), NameValuePairs::GetIntValue(), RandomNumberGenerator::GenerateBlock(), and DSA::GeneratePrimes().