A pin setting key for setting rotational orientations of pins of a lock. Apparatus is provided for linear phase modulation utilizing a phase-locked loop. In one embodiment, three erbium-doped fiber amplifier are cascaded using low nonlinearity and low loss dispersion compensating module.