# Power Consumption Calculation

Hello,

Are the traces resulting from the capturing considered power traces or voltage? I want to calculate the energy consumption. What I did was I treated the traces as voltage traces^2 divided it by 0.22(shunt resistance I assumed) then I got the area under the graph. Is that correct? I am using UFO Board and CWLITE Standalone.

Thanks

Unfortunately you can’t really do that:

what calibration is required?

The calibration that one would do with say an oscilloscope.
In side-channel attacks we only really care about relative differences in measurements; we don’t care about absolute measurements. That’s why CW isn’t meant to be used that way.

what are differences in measurements relevant to? Like what is the first power trace that we measure the difference according to? Idle starting power=0 or power=rated?

Does that mean that the traces are voltage differences traces compared to the 3.3V? I am using STM32F3 on UFO board

Very roughly yes/maybe, but not really. Google “AC coupling vs DC coupling” to learn more. ChipWhisperer’s measurements are best considered dimensionless.
If you want to measure power/current/power properly, then there are tools for this purpose, for example https://www.joulescope.com/ (no affiliation).

OK I get you. Thanks for explaining.

Hello,

When analyzing power traces using AC coupling, can I compare the energy calculated for different codes to determine which one consumes more power? Additionally, can I consider traces with the highest values as the areas of the code that consume the most power?

Thanks

To a certain degree yes. Just be aware that ChipWhisperer does not measure the actual absolute power consumption. But you can certainly use it to see the effect of different opcodes and operands, as this blog post does: side channels: power analysis | Gianluca Pacchiella