  Observations of gamma-ray burst afterglows suggest that the correlation
length of magnetic field fluctuations downstream of relativistic non-magnetized
collisionless shocks grows with distance from the shock to scales much larger
than the plasma skin depth. We argue that this indicates that the plasma
properties are described by a self-similar solution, and derive constraints on
the scaling properties of the solution. For example, we find that the scaling
of the characteristic magnetic field amplitude with distance from the shock is
B \propto D^{s_B} with -1<s_B<=0, that the spectrum of accelerated particles is
dn/dE \propto E^{-2/(s_B+1)}, and that the scaling of the magnetic correlation
function is <B_i(x)B_j(x+dx)> \propto x^{2s_B} (for x>>D). We show that the
plasma may be approximated as a combination of two self-similar components: a
kinetic component of energetic particles and an MHD-like component representing
"thermal" particles. We argue that the latter may be considered as infinitely
conducting, in which case s_B=0 and the scalings are completely determined
(e.g. dn/dE \propto E^{-2} and B \propto D^0). Similar claims apply to non-
relativistic shocks such as in supernova remnants, if the upstream magnetic
field can be neglected. Self-similarity has important implications for any
model of particle acceleration and/or field generation. For example, we show
that the diffusion function in the angle \mu of momentum p in diffusive shock
acceleration models must satisfy D_{\mu\mu}(p,D) = D^{-1}D'_{\mu\mu}(p/D), and
that a previously suggested model for the generation of large scale magnetic
fields through a hierarchical merger of current-filaments should be
generalized. A numerical experiment testing our analysis is outlined
(Abridged).
