Traditional optical orthogonal code has small code cardinality, which is vulnerable to the brute-force attacks by eavesdroppers. In order to improve the anti-interception performance of optical fibre communication system based on optical coding, a new family of optical code with large code cardinality is proposed. Based on information-theoretic security, the interception probability of optical fibre coding system is proposed and defined, and the expression of the interception probability is derived for the first time. The influences of extraction distance, extraction ratio, the number of interfering users and the code length on the interception probability are analysed quantitatively. The anti-interception performance of the optical coding system is investigated by numerical analysis and OptiSystem simulation. It is shown that reliability and anti-interception performance can be achieved simultaneously by selecting appropriate code parameters and the number of interfering users.