def generate(bits=<NUM_LIT>, progress_func=None):
dsa = DSA.generate(bits, rng.read, progress_func)<EOL>key = DSSKey(vals=(dsa.p, dsa.q, dsa.g, dsa.y))<EOL>key.x = dsa.x<EOL>return key<EOL>
Generate a new private DSS key.  This factory function can be used to
generate a new host key or authentication key.

@param bits: number of bits the generated key should be.
@type bits: int
@param progress_func: an optional function to call at key points in
    key generation (used by C{pyCrypto.PublicKey}).
@type progress_func: function
@return: new private key
@rtype: L{DSSKey}