This paper describes the physical implementation of an all-optical implementation security architecture for optical code division multiple access networks based on lattice cryptography. Our design is mainly based on the use of loop-based optical delay lines and fiber Bragg grating. The encryption process is achieved by delaying a pulse in the optical delay line according to the structure of the codewords. The number of loops is defined by the position of the pulse in codeword. We demonstrate that our implementation is less complex and more flexible than classical approaches such as fixed length optical delay lines. In addition, a performance evaluation using eye diagrams shows that our architecture is more robust against eavesdropping security attacks.