The secret of why Mars grew cold and dry may be locked away in its rocks