In this paper, an optical nonlinear cryptosystem based on phase-truncated Fourier transform is proposed. A time-varying nonlinear term, denoted as μ(x1, y1, t), is introduced within the framework of the classical PTFT cryptosystem to enhance the security. This term, characterized by its randomly generated complex distribution, remains spatially separated from the input image in the input plane and has no contribution in the decryption of the input image. The proposed encryption approach capitalizes on the remaining information capacity inherent in the optical system and enhances security. The proposed enciphering scheme is proved to be resistant to various attacks, including ciphertext-only attacks, known-plaintext attacks and chosen-plaintext attacks. In addition, the statistical analysis and comparison with the existing schemes has also been carriedout to demonstrate its strengths.