Thermodynamics and kinetics of water-rock interaction