To enhance confidentiality and reduce the number of arrayed-waveguide grating (AWG) routers, a dynamic scrambling scheme is proposed in which cyclic and free spectral range (FSR) properties of AWG routers are employed to use a maximal-length sequence (M-sequence) code as the signature address code. In this paper, a changing codeword mechanism is presented in which a flexible dynamic scrambling algorithm is embedded in the encoding and decoding codebook to control the state of both the wavelength and spatial optical (or electrical) switch matrices. Hence, the code family and code changing flexibility of the proposed scheme increases substantially because of the multiple effects of the wavelength and spatial switch matrices. Compared with the existing dynamic reconfigurable AWG-based schemes without multiple changing codewords in the FSR groups and spatial domains, the confidentiality of the proposed scheme is approximately 104 times higher than that of schemes without scrambling codeword mechanisms. 
Dynamic scrambling scheme of arrayed-waveguide grating-based encryptors and decryptors for protection against eavesdropping