  Cosmological inflation provides the initial conditions for the structure
formation. However, the origin of large-scale magnetic fields cannot be
addressed in this framework. The key issue for this long-standing problem is
the conformal invariance of the electromagnetic (EM) field in 4-D. While many
approaches have been proposed in the literature for breaking conformal
invariance of the EM action, here, we provide a completely new way of looking
at the modifications to the EM action and generation of primordial magnetic
fields during inflation. We explicitly construct a higher derivative EM action
that breaks conformal invariance by demanding three conditions - theory be
described by vector potential $A_\mu$ and its derivatives, Gauge invariance be
satisfied, and equations of motion be linear in second derivatives of vector
potential. The unique feature of our model is that appreciable magnetic fields
are generated at small wavelengths while tiny magnetic fields are generated at
large wavelengths that are consistent with current observations.
