Security enhancement and bandwidth increase are requirements of ultrafast future optical code division networks that also minimise the latency at nodes without distressing the traffic performance. In OCDMA systems, eavesdropper tries to breach the optical code, and encoded/encrypted data in order to get correct code word of legitimate user. For security enhancement, an ultra high speed 4×100 Gbps two dimensional Diagonal identity matrix (2D-DIM) code and four input single output (FISO) all optical logic gate (AOLG) with private key encryption is proposed and its performance in terms of security is analyzed. Expressions for synchronous and asynchronous transmissions are derived for proposed work and it is perceived that asynchronous transmission has better security. Further performance/security analysis is carried out for different scenarios such as with/without FISO, with 1D-DIM/2D-DIM codes, using 4×1 AND gate/NOR gate in terms of correct code detection rate (CCDR), max. eye amplitude (MEA), Received Q factor, Signal to noise ratio (SNR) at different launched power levels for legitimate user and eavesdropper. Eavesdropper attacked the proposed system but due to FISO layering, private key encryption, and 2D-DIM codes, cannot get acceptable level of CCDR. To the best of author's knowledge, proposed system is ultra high speed with enhanced security and no reported studies have investigated security enhancement at this much ultra high speed.