We present a method of calculation to simulate numerically the growth and propagation of shear cracks in an elastic medium. The problem is formulated in terms of integral equations written along the crack contour. These boundary integral equations are discretized in both horizontal wavenumber and space and are solved in the frequency domain, at each time step. The earthquake model that we consider starts with a nucleating crack where slip occurs instantaneously at some arbitrary time. The shear stress is calculated at the tip of the crack, and, if and when it reaches the static friction, the crack tip propagates and the shear stress drops to the dynamic friction level. The boundary integral equation system is then solved for the new crack, and this scheme is repeated until the rupture stops or reaches the extremity of the fault. The method is naturally free of singularities. It can be applied to the case of a nonplanar fault. A few examples of simulation are presented to illustrate the method.