Mass composition and cross-section from the shape of cosmic ray shower longitudinal profiles