Per-user keys-DSA Algorithm
Given a set of parameters, the second phase computes private and public keys for a single user:
Choose x by some random method, where 0 < x < q.
Calculate y = gx mod p.
Public key is (p, q, g, y). Private key is x.
There exist efficient algorithms for computing the modular exponentiations h(pâ€“1)/q mod p and gx mod p, such as exponentiation by squaring.