would like to know if I run code that contains different commands such as: for, if etc. I would like to know if there is a constant change in temperature or voltage on the CPU or on any other component in PC? And is it vice versa if I run code is there a way to know by temperature change or voltage difference what command is running? I know that there's a technique for cracking encryption on smart cards which actually looks at the current draw of the card and based on a plot of that current it determines how many times each loop gets executed.

  • And why would you be interested in knowing what command is running?
    – techraf
    Aug 26, 2016 at 12:58
  • smart cards use a tiny bit of power, so a single operation can cause a dip in voltage that can be detected with sensitive equipment. General purpose CPUs use so much (sometimes over 100watts) that a single operation's heat would be lost in the noise. There's also the matter of caching, which would change the amount of heat generated after repeated operations. In short: no.
    – dandavis
    Aug 26, 2016 at 22:09

1 Answer 1


Woohoo, with temperature it's a no go.

With voltage/power consumption you can roughly guess how much transistors are in use, and with knowledge of the inner processor diagram and command coding (ASM "version") you may guess wich command (set of transistor) is in use, but it sounds really error prone (see end of answer).

Deriving the same information from temperature is a no go because the temperature will vary from a ridiculous small amount and there's some inertia between warming and cooling, so a set of command could be done without noticing a 0.00000001° (Choose your temperature unit here) difference (assuming you could mesure at this precision).

For what it worth, for and if are nothing in a computer, those instruction would be translated (by compilation or interpretation) to assembly instructions, an if command will be made of a bunch of ASM commands, at least a CMP and JMP one (excluding the test itself which need loading values in registers etc.).

For the cracking technique, the algorithm is usually known, the variables are not, so you can 'guess' some variables (number of iterations, complexity of encryption) from the power needed by the card, it is more a rainbow table comparison from cards with the same components used with known algorithm and variables when measured AFAIK.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .