def ssh_KEXINIT(self, packet):
        if SSHTransportBase.ssh_KEXINIT(self, packet) is None:
            # Connection was disconnected while doing base processing.
            # Maybe no common protocols were agreed.
            return

        if _kex.isFixedGroup(self.kexAlg):
            # We agreed on a fixed group key exchange algorithm.
            self.x = _generateX(randbytes.secureRandom, 512)
            self.g, self.p = _kex.getDHGeneratorAndPrime(self.kexAlg)
            self.e = _MPpow(self.g, self.x, self.p)
            self.sendPacket(MSG_KEXDH_INIT, self.e)
        else:
            # We agreed on a dynamic group. Tell the server what range of
            # group sizes we accept, and what size we prefer; the server
            # will then select a group.
            self.sendPacket(
                MSG_KEX_DH_GEX_REQUEST,
                struct.pack(
                    '!LLL',
                    self._dhMinimalGroupSize,
                    self._dhPreferredGroupSize,
                    self._dhMaximalGroupSize,
                    ))
Called when we receive a MSG_KEXINIT message.  For a description
dataset/ETHPy150Open twisted/twisted/twisted/conch/ssh/transport.py/SSHClientTransport.ssh_KEXINIT