Power Analysis: Methods and Countermeasures