  The cold dark matter model of structure formation faces apparent problems on
galactic scales. Several threads point to excessive halo concentration,
including central densities that rise too steeply with decreasing radius. Yet,
random fluctuations in the gaseous component can 'heat' the centres of haloes,
decreasing their densities. We present a theoretical model deriving this effect
from first principles: stochastic variations in the gas density are converted
into potential fluctuations that act on the dark matter; the associated force
correlation function is calculated and the corresponding stochastic equation
solved. Assuming a power law spectrum of fluctuations with maximal and minimal
cutoff scales, we derive the velocity dispersion imparted to the halo particles
and the relevant relaxation time. We further perform numerical simulations,
with fluctuations realised as a Gaussian random field, which confirm the
formation of a core within a timescale comparable to that derived analytically.
Non-radial collective modes enhance the energy transport process that erases
the cusp, though the parametrisations of the analytical model persist.
  In our model, the dominant contribution to the dynamical coupling driving the
cusp-core transformation comes from the largest scale fluctuations. Yet, the
efficiency of the transformation is independent of the value of the largest
scale and depends weakly (linearly) on the power law exponent; it effectively
depends on two parameters: the gas mass fraction and the normalisation of the
power spectrum. This suggests that cusp-core transformations observed in
hydrodynamic simulations of galaxy formation may be understood and parametrised
in simple terms, the physical and numerical complexities of the various
implementations notwithstanding.
