A Information-Theoretic Approach to Side-channel Analysis