  We obtain the first cosmological constraints on interactions between dark
matter and protons within the formalism of nonrelativistic effective field
theory developed for direct detection. For each interaction operator in the
effective theory, parametrized by different powers of the relative velocity of
the incoming particles, we use the Planck 2015 cosmic microwave background
(CMB) temperature, polarization, and lensing anisotropy to set upper limits on
the scattering cross section for all dark matter masses above 15 keV. We find
that for interactions associated with a stronger dependence on velocity, dark
matter and baryons stay thermally coupled for longer, but the interaction
strengths are suppressed at the low temperatures relevant for Planck
observations and are thus less constrained. At the same time, cross sections
with stronger velocity dependencies are more constrained in the limit of small
dark matter mass. In all cases, the effect of dark matter-proton scattering is
most prominent on small scales in the CMB power spectra and in the matter power
spectrum, and we thus expect substantial improvement over the current limits
with data from ground-based CMB experiments and galaxy surveys.
