Countermeasures against side channel or fault attacks