NASA says that it can build a magnetic dipole shield at the Mars L1 Lagrange Point, but how do they support the electricity?
They haven't got that far yet.
This article says scientists have proposed a method for creating an artificial magnetic field. The next steps are:
- Design a system that can generate the magnetic field required.
- Calculate how much power that system needs.
And then, if the result of 1. and 2. is a feasible system and not e.g. far too large for us to launch into orbit, they can start thinking about how that power will be provided.