2

I try to estimate the energy consumption by a sensor node when executing an authentication algorithm witch contains operations (hashing, XOR, Encryption / decryption by public/private key, addition,...).

The algorithm is named MDA (Message Digest Based Authentication). It contains:

(SN:sensor node; CH: cluster head; Th: hash operation ; Tx: transmit;
 Touex: XOR; Trec: reception; Tenc: encryption; Tdec: decryption)
**-Registration Phase :** 
*SN-->CH:
2Th+Tx+Touex
*CH-->SN:
Trec+Touex+3Th+Tenc+Tx
**- Authentication Phase :**
*SN-->Ch
Th+2Tenc+Tx
*CH-->SN
Trec+Touex+2Tdec+Th
**- Numeric Certif**
*CH-->SN
Th+Tenc+Tx
*SN:
Trec+Tdec

So I ask if there are measurements that I can use to calculate energy.

fgrieu
  • 140,762
  • 12
  • 307
  • 587
  • 1
    @AleksanderRas Not at all. It's perfectly on topic as this is a common attack/research field for cryptographic hardware. There are generic methods common to all. We reach for the close button too quickly. And it seems to be getting worse. – Paul Uszak Aug 31 '19 at 12:26
  • I'm going to have to agree word for word with @ AleksanderRas (the answer depends on the hardware and exact implementation) - plus, even if that information was available, it would make this a question of electronics/EE rather than about cryptography itself. – Ella Rose Aug 31 '19 at 12:50
  • 3
    Do you want to measure the energy consumed on an actual device, or estimate the amount of energy required on an hypothetical device? Both will depend at lot on the device's architecture. – fgrieu Aug 31 '19 at 12:51
  • I'm closing this as it says "estimate" in the question, and although Paul shows a way of measuring energy for power analysis, that doesn't seem to answer the question. We don't know the platform nor the primitives, so any estimation would be worthless in and off of itself. – Maarten Bodewes Sep 03 '19 at 00:12

1 Answers1

-1

There's a degree of electronics twiddling necessary for this. You start with:-

schematic

A stiff power supply passing through a shunt resistor is typically used, which is then monitored with a storage oscilloscope. A low resistance is necessary, say 0.1 Ohms, but that really depends on the operating point consumption of your sensor device. You can't have the power supply dipping below operational thresholds as that will nullify the experiment. Control the device to perform your required operations, and you'll read a voltage off the scope. Then simply $consumption = \frac{voltage}{resistance}$.

This is called power analysis, and Wiki has an entry level article. You'll see from the graphic on the RHS that the power signature is not really as simple as I implied. That's where a lot of statistics and probability matching will become necessary. Some don't even bother with power consumption (amps) calculations and go with purely graphical approaches. A wibbly waveform might indicate a correct key, and a wobbly waveform might indicate a bad key. This part is entirely characteristic of the individual device under test. And how you intend to exactly distinguish various cryptographic operations within the sensors.

Also one of the challenges will be in managing to grab and isolate the power consumption at the point of cryptographic operation, rather than simply running the status LEDs. You may need additional wiring between the control inputs and the oscilloscope's trigger input.

But it's a start...

Paul Uszak
  • 15,390
  • 2
  • 28
  • 77
  • 2
    This answer appears to be 99% about electronics/EE with cryptography just barely being mentioned. This is not to say that the answer is wrong, but if this is a suitable answer, then the question is surely off-topic for our site. – Ella Rose Aug 31 '19 at 12:49
  • @EllaRose Recall the recent conversation with our fine feathered friend... – Paul Uszak Aug 31 '19 at 12:52
  • You're going to have to quote and explain how the reference is relevant. It's not clear to me how that is a response to the prior comment or what it is supposed to indicate. – Ella Rose Aug 31 '19 at 12:54
  • 2
    The answer's "consumption" is actually the instantaneous intensity, $\displaystyle\frac V R$. The instantaneous power is $\displaystyle\frac{V^2}R$. The energy consumption from start $t_0$ to end $t_1$ of computation is $\displaystyle\frac 1R\int_{t_0}^{t_1}V^2,dt$. – fgrieu Sep 01 '19 at 12:50
  • @fgrieu Are you possibly suggesting that this Q&A might be on topic then? – Paul Uszak Sep 01 '19 at 18:41
  • @Paul Uszak: it looks to me that the question, understood as in the present answer, is off-topic or nearly so; still, the answer is worth a comment trying to improve it. On the other hand, comparing the energy consumption (perhaps, relative) of different crypto primitives would be rather on-topic. – fgrieu Sep 01 '19 at 18:46