The use of radio frequency (RF) waves to generate plasma current and to modify the current profile in magnetically confined fusion devices is well documented. The current is generated by the interaction of electrons with an appropriately tailored spectrum of externally launched RF waves.In theoretical and computational studies, the interaction of RF waves with electrons is represented by a quasilinear diffusion operator. The balance, in steady state, between the quasilinear operator and the collision operator gives the modified electron distribution from which the generated current can be calculated. In this paper the relativistic operator for momentum and spatial diffusion of electrons due to RF waves and non-axisymmetric magnetic field perturbations is derived. Relativistic treatment is necessary for the interaction of electrons with waves in the electron cyclotron (EC) range of frequencies. The spatial profile of the RF waves is treated in general so that diffusion due to localized beams is included. The non-axisymmetry magnetic field perturbations can be due to magnetic islands as in neoclassical tearing modes. The plasma equilibrium is expressed in terms of the magnetic flux coordinates of an axisymmetric toroidal plasma. The electron motion is described by guiding center coordinates using the action-angle variables of motion in an axisymmetric toroidal equilibrium. The Lie perturbation technique is used to derive a diffusion operator which is non-singular and time dependent. The resulting action diffusion equation describes resonant and non-resonant momentum and spatial diffusion. Momentum space diffusion leads to current generation in the plasma and spatial diffusion describes the effect of RF waves and magnetic perturbations on spatial evolution of the current profile. Depending on the symmetry of the equilibrium and the corresponding relation of the action variables to the configuration space variables, additionally to diffusion along the radial direction, poloidal and toroidal electron diffusion is also described. In deriving the diffusion operator, no statistical assumption, such as the Markovian assumption, for the underlying electron dynamics, is imposed. Consequently, the operator is time dependent and valid for a dynamical phase space that is a mix of correlated regular orbits and decorrelated chaotic orbits. The diffusion operator is expressed in a form suitable for implementation in a numerical code.2