With the latest technological advancements and attractive features of all optical networks such as bandwidth, performance, reliability, cost efficiency, redundancy these networks have been considered as most viable solution to satisfy promptly growing bandwidth demands. With the increased demand for an optical network, there arises the need for security as well. Vulnerabilities in all optical network made to concentrate more on security issues, as an unimaginable amount of data is being transmitted across these communication links. The proposed methodology to provide the security to these links involve the design of optical linear feedback shift register (LFSR) which gives the scrambled bits also known as randomization. By this process the information signal will be in unreadable form it is highly difficult to predict for the intruder to hack the information signal. In addition to this, the chaos masking and de masking technique is preferred to secure the information. The generated chaotic signal is non- periodic and non- binary so it is not possible to predict the form of the signal. Further this work gives the performance analysis for with and without chaos masking and demasking technique for the acceptable BER of 10e-12 and Q-factor of 7. It also gives the design and study for in-band jamming and out-band jamming attacks for all-optical networks. Simulation of proposed design is done using OptiSystem version 16.0 software tool and the performance are analyzed at different data rate and for different fiber length.