Consider implementing the RSA cryptography algorithm. The typical way is to go through the 'key' bit by bit. The pseudo-code looks something like this:
foreach (bit in key) {
if (bit) {
// do multiplication and all hard work if bit is 1
}
// do other simpler stuff that you need to do regardless
}
Consider a cable box with a tamper resistant private key inside it. Can you imagine a side-channel attack on the above implementation to find the private key? Hint: Can you do something with a multimeter?