We present an efficient theory and algorithm for computing four-component relativistic Dirac-Fock wave functions using the Coulomb, Gaunt, and full Breit interactions. Our implementation is based on density fitting, and is routinely applicable to systems with 100 atoms and a few heavy elements. The small components are expanded using 2-spinor basis functions. We show that the factorization of 3...