code: func (t *transport) prepareKeyChange(algs *algorithms, kexResult *kexResult) error {
  	if t.sessionID == nil {
  		t.sessionID = kexResult.H
  	}
  
  	kexResult.SessionID = t.sessionID
  
  	if ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult); err != nil {
  		return err
  	} else {
  		t.reader.pendingKeyChange <- ciph
  	}
  
  	if ciph, err := newPacketCipher(t.writer.dir, algs.w, kexResult); err != nil {
  		return err
  	} else {
  		t.writer.pendingKeyChange <- ciph
  	}
  
  	return nil
  }
docs: // prepareKeyChange sets up key material for a keychange. The key changes in
  // both directions are triggered by reading and writing a msgNewKey packet
  // respectively.