Fault injections on smartcards or other hardware seem to be an issue for low risk tolerant environments. What are possible countermeasures to fault injections?
From my research, it all depends on what attacker can do. Assuming they can do everything possible on the market, what would be the best measures to counter such attacks?
My ideas are that one could integrate hardware sensors which detect voltage glitches or electromagnetic radiation and for example reset or brick the hardware when attacked.
But what if you cannot modify the hardware?
Software countermeasures I came up with could be that one has to create such "sensors" in the code, which are constantly checking the values if they deliver expected results. Also, the code itself should be without any logical flaws that, in case of a fault, will deliver unexpected results.
What other countermeasures are there?