  Nuclear uncertainties in the production of $p$ nuclei in massive stars have
been quantified in a Monte Carlo procedure. Bespoke temperature-dependent
uncertainties were assigned to different types of reactions involving nuclei
from Fe to Bi. Their simultaneous impact was studied in postprocessing
explosive trajectories for three different stellar models. It was found that
the grid of mass zones in the model of a 25 $M_\odot$ star, which is widely
used for investigations of $p$ nucleosynthesis, is too crude to properly
resolve the detailed temperature changes required for describing the production
of $p$ nuclei. Using models with finer grids for 15 $M_\odot$ and 25 $M_\odot$
stars with initial solar metallicity, it was found that most of the production
uncertainties introduced by nuclear reaction uncertainties are smaller than a
factor of two. Since a large number of rates were varied at the same time in
the Monte Carlo procedure, possible cancellation effects of several
uncertainties could be taken into account. Key rates were identified for each
$p$ nucleus, which provide the dominant contribution to the production
uncertainty. These key rates were found by examining correlations between rate
variations and resulting abundance changes. This method is superior to studying
flow patterns, especially when the flows are complex, and to individual,
sequential variation of a few rates.
