Theoretical derivation of diffusion-tensor coefficients for the transport of charged particles in magnetic fields