Dark matter and generation of galactic magnetic fields