Top Description Fields Constructors Methods
java.security.spec

public final Class DSAGenParameterSpec

extends Object
implements AlgorithmParameterSpec
Class Inheritance
All Implemented Interfaces
java.security.spec.AlgorithmParameterSpec

This immutable class specifies the set of parameters used for generating DSA parameters as specified in FIPS 186-3 Digital Signature Standard (DSS).
Since
1.8
See Also
AlgorithmParameterSpec

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
DSAGenParameterSpec(int
the desired length of the prime P in bits.
primePLen
,
int
the desired length of the sub-prime Q in bits.
subprimeQLen
)

Creates a domain parameter specification for DSA parameter generation using primePLen and subprimeQLen.

public
DSAGenParameterSpec(int
the desired length of the prime P in bits.
primePLen
,
int
the desired length of the sub-prime Q in bits.
subprimeQLen
,
int
the desired length of the domain parameter seed in bits, shall be equal to or greater than subprimeQLen.
seedLen
)

Creates a domain parameter specification for DSA parameter generation using primePLen, subprimeQLen, and seedLen.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the length of the prime P.
getPrimePLength
()

Returns the desired length of the prime P of the to-be-generated DSA domain parameters in bits.

public int

Returns:

the length of the domain parameter seed.
getSeedLength
()

Returns the desired length of the domain parameter seed in bits.

public int

Returns:

the length of the sub-prime Q.
getSubprimeQLength
()

Returns the desired length of the sub-prime Q of the to-be-generated DSA domain parameters in bits.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pLenback to summary
private final int pLen
qLenback to summary
private final int qLen
seedLenback to summary
private final int seedLen

Constructor Detail

DSAGenParameterSpecback to summary
public DSAGenParameterSpec(int primePLen, int subprimeQLen)

Creates a domain parameter specification for DSA parameter generation using primePLen and subprimeQLen. The value of subprimeQLen is also used as the default length of the domain parameter seed in bits.

Parameters
primePLen:int

the desired length of the prime P in bits.

subprimeQLen:int

the desired length of the sub-prime Q in bits.

Exceptions
IllegalArgumentException:
if primePLen or subprimeQLen is illegal per the specification of FIPS 186-3.
DSAGenParameterSpecback to summary
public DSAGenParameterSpec(int primePLen, int subprimeQLen, int seedLen)

Creates a domain parameter specification for DSA parameter generation using primePLen, subprimeQLen, and seedLen.

Parameters
primePLen:int

the desired length of the prime P in bits.

subprimeQLen:int

the desired length of the sub-prime Q in bits.

seedLen:int

the desired length of the domain parameter seed in bits, shall be equal to or greater than subprimeQLen.

Exceptions
IllegalArgumentException:
if primePLenLen, subprimeQLen, or seedLen is illegal per the specification of FIPS 186-3.

Method Detail

getPrimePLengthback to summary
public int getPrimePLength()

Returns the desired length of the prime P of the to-be-generated DSA domain parameters in bits.

Returns:int

the length of the prime P.

getSeedLengthback to summary
public int getSeedLength()

Returns the desired length of the domain parameter seed in bits.

Returns:int

the length of the domain parameter seed.

getSubprimeQLengthback to summary
public int getSubprimeQLength()

Returns the desired length of the sub-prime Q of the to-be-generated DSA domain parameters in bits.

Returns:int

the length of the sub-prime Q.