x with 255 <= bit length <= 256
and 2 <= x <= p - 2.
Generates a fresh group14 private exponent.
The exponent is 256 bits with the top bit set, satisfying the RFC 4253 minimum of twice the security parameter for SHA-256.
Qualification: the exponent must come from a cryptographic RNG and must be erased (via DHPrivateKey.wipe) once the shared secret exists. Blinded agreement in ddn.crypto.kex.dh.DH randomizes each exponentiation but remains variable-time; that does not establish constant-time behavior for every DH operation on the path.
rng | Cryptographic random source. |
x with 255 <= bit length <= 256
and 2 <= x <= p - 2.