The invention is applicable to the technical field of computers and communication and provides an element modular inversion calculation method and device. The method comprises the steps that the initial values of temporary variables X1 and X2 and decreasing variables u and v are obtained, wherein the initial values of the temporary variables X1 and X2 are 1 and 0 respectively, and the initial values of the decreasing variables u and v are a and P0 respectively; the temporary variables X1 and X2 and the decreasing variables u and v are subjected to iterative computation, wherein the iteration process meets the equations: a*x1=u(mod P0), a*x2=v(mod P0); after each time of iteration is completed in the iterative computation, whether one of u and v is 1 is judged, if neither u nor v is 1, the iterative computation is continued, and if either u or v is 1, the iterative computation is ended; after the iterative computation is ended, if u is 1, X1 is assigned to X, and if v is 1, X2 is assigned to X; when K=0, whether X is greater than zero or not is judged, and if X is greater than zero, X is the modular inversion related to P. By means of the technical scheme, the element modular inversion calculation method and device have the advantages that the computing speed is high, and the number of required computing resources is small.