  The scattering of electromagnetic waves by three--dimensional periodic
structures is important for many problems of crucial scientific and engineering
interest. Due to the complexity and three-dimensional nature of these waves,
the fast, accurate, and reliable numerical simulations of these are
indispensable for engineers and scientists alike. For this, High Order Spectral
methods are frequently employed and here we describe an algorithm in this
class. Our approach is perturbative in nature where we view the deviation of
the permittivity from a constant value as the deformation and we pursue regular
perturbation theory. This work extends our previous contribution regarding the
Helmholtz equation to the full vector Maxwell equations, by providing a
rigorous analyticity theory, both in deformation size and spatial variable
(provided that the permittivity is, itself, analytic).
