The physical properties of resistive random-access memories can be exploited to design physical unclonable functions, they can also be used to insert sensing elements detecting tampering activities. We are presenting how un-filtered cryptographic key generation cycles can permanently damage about 20% to 40% of the memory cell population, while the strong cells return to their pristine state after operation. During an enrollment cycle performed once upfront, the weak cells are identified, tracked with a ternary state, and never used during subsequent key generation cycles thereafter. The weak cells are likely to be damaged when the opponent blindly characterizes the physical unclonable functions or attempt to generate cryptographic keys. Thereby these weaker cells act as sensing elements of this type of attacks. The cryptographic scheme is optimized to tolerate a certain level of failure of the stronger cells, and to compute ternary states to keep track of the weaker cells. The implementation was written in Phyton and C++ at the server level, and in C at the client level. The protocols use the standard hash algorithm SHA-3, and the extended output function SHAKE.