Direct imaging and spectroscopy of Earth-like planets will require high-contrast imaging at very close angular separation: 1e10 star to planet ux ratio at a few tenths of an arcsecond. Large telescopes in space are necessary to provide sufficient collecting area and angular resolution to achieve this goal. In the static case, coronagraphic instrument designs combined with wavefront control techniques have been optimized for segmented on-axis telescope geometries, but the extreme wavefront stability required at very high contrast of the order of tens of picometers remains one of the main challenges. Indeed, cophasing errors and instabilities directly contribute to the degradation of the final image contrast. A systematic understanding is therefore needed to quantify and optimize the static and dynamic constraints on segment phasing. We present an analytical model: Pair-based Analytical model for Segmented Telescopes Imaging from Space (PASTIS), which enables quasi-instantaneous analytical evaluations of the impact of segment-level aberrations and phasing on the image contrast. This model is based on a multiple sum of Young interference fringes between pairs of segments and produces short and long exposure coronagraphic images with a segmented telescope in presence of local phase aberrations on each segment. PASTIS matches end-to-end numerical simulations with high-fidelity (3% rms error on the contrast). Moreover, the model can be inverted by dint of a projection on the singular modes of the phase to provide constraints on each Zernike polynomial for each segment. These singular modes provide information on the contrast sensitivity to segment-level phasing errors in the pupil, which can be used to derive constraints on both static and dynamic mitigation strategies (e.g. backplane geometry or segment vibration sensing and control). The few most sensitive modes can be well identified and must be controlled at the level of tens of picometers, while the least sensitive modes in the hundreds of picometers. This novel formalism enables a fast and efficient sensitivity analysis for any segmented telescopes, in both static and dynamic modes.