We present a mathematical framework for the seismology of photospheric flux tubes using a uniform straight cylinder as a flux-tube model. In contrast to the earlier model of Fujimura & Tsuneta (2009), we also include a non-zero gas pressure; we do not use the thin tube approximation and we use an underdense region inside the flux tube. We used the linearised ideal magnetohydrodynamic equations to describe different wave modes in the photosphere. Using the wave mode polarisations we then obtained phase relations which represent different observables. Those phase relations were used to calculate phase differences and amplitude ratios. Finally we inverted these amplitude ratios to obtain plasma parameters which are not directly observable. The mathematical framework results in phase differences that can be conveniently compared with observational data to distinguish between different wave modes. Once the wave mode has been identified, the inverted amplitude ratios can be used to either analytically or numerically estimate the magnitude of plasma parameters which are not directly observable, such as the vertical wavenumber. Artificial observations of different wave modes have shown that the framework mostly succeeds in identifying the correct wave mode and in reproducing the correct plasma parameters using the inverted amplitude ratios.