Our study aims at the creation of a numerical toolbox that describes wave propagation in samples containing internal contacts (e.g. cracks, delaminations, debondings, imperfect intergranular joints) of known geometry with postulated contact interaction laws including friction. The code consists of two entities: the contact model and the solid mechanics module. Part I of the paper concerns the modeling of internal contacts (called cracks for brevity), while part II is related to the integration of the developed contact model into a solid mechanics module that allows the description of wave propagation processes. The contact model is used to produce normal and tangential load-displacement relationships, which in turn are used by the solid mechanics module as boundary conditions at the internal contacts. Due to friction, the tangential reaction curve is hysteretic and memory-dependent. In addition, it depends on the normal reaction curve. An essential feature of the proposed contact model is that it takes into account the roughness of the contact faces. On one hand, accounting for roughness makes the contact model more complicated since it gives rise to a partial slip regime when some parts on the contact area experience slip and some do not. On the other hand, as we will show, the concept of contact surfaces covered by asperities receding under load makes it possible to formulate a consistent contact model that provides nonlinear load-displacement relationships for any value of the drive displacements and their histories. This is a strong advantage, since this way, the displacement-driven model allows for a simple explicit procedure of data exchange with the solid mechanics module, while more traditional flat-surface contacts driven by loads generate a complex iterative procedure. More specifically, the proposed contact model is based on the previously developed method of memory diagrams that allows one to automatically obtain memory-dependent solutions to frictional contact problems in the particular case of partial slip. Here we extend the solution onto cases of total sliding and contact loss which is possible while using the displacement-driven formulation. The method requires the knowledge of the normal contact response obtained in our case as a result of statistical consideration of roughness of contact faces.