  We use large hybrid (kinetic protons-fluid electrons) simulations to
investigate the transport of energetic particles in self-consistent
electromagnetic configurations of collisionless shocks. In previous papers of
this series, we showed that ion acceleration may be very efficient (up to
$10-20\%$ in energy), and outlined how the streaming of energetic particles
amplifies the upstream magnetic field. Here, we measure particle diffusion
around shocks with different strengths, finding that the mean free path for
pitch-angle scattering of energetic ions is comparable with their gyroradii
calculated in the self-generated turbulence. For moderately-strong shocks,
magnetic field amplification proceeds in the quasi-linear regime, and particles
diffuse according to the self-generated diffusion coefficient, i.e., the
scattering rate depends only on the amount of energy in modes with wavelengths
comparable with the particle gyroradius. For very strong shocks, instead, the
magnetic field is amplified up to non-linear levels, with most of the energy in
modes with wavelengths comparable to the gyroradii of highest-energy ions, and
energetic particles experience Bohm-like diffusion in the amplified field. We
also show how enhanced diffusion facilitates the return of energetic particles
to the shock, thereby determining the maximum energy that can be achieved in a
given time via diffusive shock acceleration. The parametrization of the
diffusion coefficient that we derive can be used to introduce self-consistent
microphysics into large-scale models of cosmic ray acceleration in
astrophysical sources, such as supernova remnants and clusters of galaxies.
