docs: function KEXINIT(self, cb) { // Client/Server
    randBytes(16, function(myCookie) {
      /*
        byte         SSH_MSG_KEXINIT
        byte[16]     cookie (random bytes)
        name-list    kex_algorithms
        name-list    server_host_key_algorithms
        name-list    encryption_algorithms_client_to_server
        name-list    encryption_algorithms_server_to_client
        name-list    mac_algorithms_client_to_server
        name-list    mac_algorithms_server_to_client
        name-list    compression_algorithms_client_to_server
        name-list    compression_algorithms_server_to_client
        name-list    languages_client_to_server
        name-list    languages_server_to_client
        boolean      first_kex_packet_follows
        uint32       0 (reserved for future extension)
      */
      var algos = self.config.algorithms;
  
      var kexBuf = algos.kexBuf;
      if (self.remoteBugs & BUGS.BAD_DHGEX) {
        var copied = false;
        var kexList = algos.kex;
        for (var j = kexList.length - 1; j >= 0; --j) {
          if (kexList[j].indexOf('group-exchange') !== -1) {
            if (!copied) {
              kexList = kexList.slice();
              copied = true;
            }
            kexList.splice(j, 1);
          }
        }
        if (copied)
          kexBuf = Buffer.from(kexList.join(','));
      }
  
      var hostKeyBuf = algos.serverHostKeyBuf;
  
      var kexInitSize = 1 + 16
                        + 4 + kexBuf.length
                        + 4 + hostKeyBuf.length
                        + (2 * (4 + algos.cipherBuf.length))
                        + (2 * (4 + algos.hmacBuf.length))
                        + (2 * (4 + algos.compressBuf.length))
                        + (2 * (4 /* languages skipped */))
                        + 1 + 4;
      var buf = Buffer.allocUnsafe(kexInitSize);
      var p = 17;
  
      buf[0] = MESSAGE.KEXINIT;
  
      if (myCookie !== false)
        myCookie.copy(buf, 1);
  
      writeUInt32BE(buf, kexBuf.length, p);
      p += 4;
      kexBuf.copy(buf, p);
      p += kexBuf.length;
  
      writeUInt32BE(buf, hostKeyBuf.length, p);
      p += 4;
      hostKeyBuf.copy(buf, p);
      p += hostKeyBuf.length;
  
      writeUInt32BE(buf, algos.cipherBuf.length, p);
      p += 4;
      algos.cipherBuf.copy(buf, p);
      p += algos.cipherBuf.length;
  
      writeUInt32BE(buf, algos.cipherBuf.length, p);
      p += 4;
      algos.cipherBuf.copy(buf, p);
      p += algos.cipherBuf.length;
  
      writeUInt32BE(buf, algos.hmacBuf.length, p);
      p += 4;
      algos.hmacBuf.copy(buf, p);
      p += algos.hmacBuf.length;
  
      writeUInt32BE(buf, algos.hmacBuf.length, p);
      p += 4;
      algos.hmacBuf.copy(buf, p);
      p += algos.hmacBuf.length;
  
      writeUInt32BE(buf, algos.compressBuf.length, p);
      p += 4;
      algos.compressBuf.copy(buf, p);
      p += algos.compressBuf.length;
  
      writeUInt32BE(buf, algos.compressBuf.length, p);
      p += 4;
      algos.compressBuf.copy(buf, p);
      p += algos.compressBuf.length;
  
      // Skip language lists, first_kex_packet_follows, and reserved bytes
      buf.fill(0, buf.length - 13);
  
      self.debug('DEBUG: Outgoing: Writing KEXINIT');
  
      self._state.incoming.expectedPacket = 'KEXINIT';
  
      var outstate = self._state.outgoing;
  
      outstate.kexinit = buf;
  
      if (outstate.status === OUT_READY) {
        // We are the one starting the rekeying process ...
        outstate.status = OUT_REKEYING;
      }
  
      send(self, buf, cb, true);
    });
    return true;
  }