/* Device requests a Key Update and sends a new Dynamic Key. The Dynamic Key is updated on the Host. */
static void gzp_process_key_update(uint8_t *rx_payload)
/* Device requests a Key Update and sends a new Dynamic Key. The Dynamic Key is updated on the Host. */
static void gzp_process_key_update(uint8_t *rx_payload)
{
  gzp_crypt_select_key(GZP_KEY_EXCHANGE);
  gzp_crypt(&rx_payload[1], &rx_payload[1], GZP_CMD_KEY_UPDATE_PAYLOAD_LENGTH - 1);
  if(gzp_validate_id(&rx_payload[GZP_CMD_KEY_UPDATE_VALIDATION_ID]))
  {
    gzp_crypt_set_dyn_key(&rx_payload[GZP_CMD_KEY_UPDATE_NEW_KEY]);
  }
}