On the Physical Security of Cryptographic Implementations