public interface KeyPairGenDSA
The library contains a default implementation of this class, based on the JCE classes available in Java SE from 1.4.
The actual implementation class is chosen by the configuration option
"keypairgen.dsa", and then instantiated using the no-argument
constructor. The library uses each instance only for one key generation.
q is a 160-bit prime (when using SHA-1),
p a prime of the given key size such that
p-1 is a multiple of
g is a generator of a
multiplicative subgroup of order
g are called
community parameters and can be shared by many keys (some
implementations may have precalculated ones).
x is a random number with
0 < x < q, and
y = g^x mod p - these two numbers are key pair specific, and
x must be preserved secretely.
|Modifier and Type||Method and Description|
The secret key
The public key
Generates a key pair.
void init(int key_size) throws Exception
key_size- the number of bits of the key to be produced.
y = g^x mod p.
p, a prime.
qof the subgroup of (Z/pZ)^* generated by
g, also prime.
gof the subgroup.
This is an inofficial Javadoc created by Paŭlo Ebermann. Have a look at the official homepage.