I present a theory for ice friction for ice sliding on a hard randomly rough surface which includes ice melting-freezing (regelation), viscoelastic energy dissipation, and cavitation. The theory is an extension of earlier work by Weertman, Lliboutry, Nye, and Kamb. I present numerical results for surfaces with realistic surface roughness power spectra. I consider both airfilled and (pressurized) waterfilled cavities. The calculated frictional shear stresses are consistent with experimental observations for temperate glaciers.