crypto: allow custom generator for DiffieHellman