Computer simulations of nanofocusing by elliptical mirrors are presented wherein the diffraction and propagation of coherent hard x rays are predicted using wave-optical calculations. Surface height data acquired via microstitching interferometry were used to calculate the complex pupil function of a mirror, taking into account the Fresnel reflectivity and treating the surface topography as an aberration to a perfect elliptical mirror. The reflected wave-field amplitude and phase downstream of the mirror were obtained by numerically evaluating the Fresnel-Kirchhoff diffraction integral. Simulated intensity profiles and contours (isophotes) around the focal plane are presented for coherent illumination by a 15 keV point source, which indicate nearly diffraction-limited focusing at the 40 nm level. The effect of high spatial frequency microroughness on nanofocusing was investigated by low-pass filtering the Fourier spectrum of the residual height profile. Simulations using the filtered metrology data confirmed that roughness length scales shorter than 0.1 mm have a minor effect on the focal spot size and intensity.