code: func (ctl *HandshakeController) handleKeys(pubkeyid string, keymsg *handshakeMsg) error {
  	// new keys from peer
  	if len(keymsg.Keys) > 0 {
  		log.Debug("received handshake keys", "pubkeyid", pubkeyid, "from", keymsg.From, "count", len(keymsg.Keys))
  		var sendsymkeyids []string
  		for _, key := range keymsg.Keys {
  			sendsymkey := make([]byte, len(key))
  			copy(sendsymkey, key)
  			sendsymkeyid, err := ctl.pss.setSymmetricKey(sendsymkey, keymsg.Topic, PssAddress(keymsg.From), false, false)
  			if err != nil {
  				return err
  			}
  			sendsymkeyids = append(sendsymkeyids, sendsymkeyid)
  		}
  		if len(sendsymkeyids) > 0 {
  			ctl.updateKeys(pubkeyid, &keymsg.Topic, false, sendsymkeyids, keymsg.Limit)
  
  			ctl.alertHandshake(pubkeyid, sendsymkeyids)
  		}
  	}
  
  	// peer request for keys
  	if keymsg.Request > 0 {
  		_, err := ctl.sendKey(pubkeyid, &keymsg.Topic, keymsg.Request)
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Handle incoming key exchange message
  // Add keys received from peer to store
  // and enerate and send the amount of keys requested by peer
  //
  // TODO:
  // - flood guard
  // - keylength check
  // - update address hint if:
  //   1) leftmost bytes in new address do not match stored
  //   2) else, if new address is longer