The Earth acts as a gigantic heat engine driven by decay of radiogenic isotopes and slow cooling, which gives rise to plate tectonics, volcanoes, and mountain building. Another key product is the geomagnetic field, generated in the liquid iron core by a dynamo running on heat released by cooling and freezing to grow the solid inner core, and on chemical convection due to light elements expelled from the liquid on freezing. The power supplied to the geodynamo, measured by the heat-flux across the core-mantle boundary (CMB), places constraints on Earths evolution. Estimates of CMB heat-flux depend on properties of iron mixtures under the extreme pressure and temperature conditions in the core, most critically on the thermal and electrical conductivities. These quantities remain poorly known because of inherent difficulties in experimentation and theory. Here we use density functional theory to compute these conductivities in liquid iron mixtures at core conditions from first principles- the first directly computed values that do not rely on estimates based on extrapolations. The mixtures of Fe, O, S, and Si are taken from earlier work and fit the seismologically-determined core density and inner-core boundary density jump. We find both conductivities to be 2-3 times higher than estimates in current use. The changes are so large that core thermal histories and power requirements must be reassessed. New estimates of adiabatic heat-flux give 15-16 TW at the CMB, higher than present estimates of CMB heat-flux based on mantle convection; the top of the core must be thermally stratified and any convection in the upper core driven by chemical convection against the adverse thermal buoyancy or lateral variations in CMB heat flow. Power for the geodynamo is greatly restricted and future models of mantle evolution must incorporate a high CMB heat-flux and explain recent formation of the inner core.