Lattice QCD allows for a systematic reduction of the error on crucial non-perturbative input to constraints on the standard model. A brief review of related challenges and recent progress on precise constraints on CP violation from kaon and B physics is given.