[Cryptech Tech] counter data

Fredrik Thulin fredrik at thulin.net
Fri Aug 22 07:05:48 UTC 2014


On Thursday, August 21, 2014 10:53:08 PM Bernd Paysan wrote:
...
> > I'm going to leave it running but I think there might be an
> > overrepresentation of about 16 groups of digits. Look at the attached
> > histogram - looks suspect to me. I wonder if it is the noise source or the
> > MCU that introduces this, or if it will go away with more samples.
> 
> I've processed the data you sent me, and there's clearly some pattern to be
> seen.  I've plotted this y axis logarithmic - it's the deltas between
> consecutive counters converted to a histogram.

Wow, you're good - and fast! =)

I've attached the histogram of individual counter values from 25M samples. Of 
course the 16 peaks just became more prominent with more data.

> The 114 is much overrepresented, and that's because that's the bucket for
> all the transitions which are faster than you can measure them.  This also
> causes your low output bandwidth, because repeated 114 will get filtered
> out.

Hmm, that's not how I would have expected very fast interrupts to work but I 
can sort of see how that happens anyways.

> The remaining pattern looks like the MCU has counter values which are much
> more likely to be detected than others.

Yes - I will experiment some with hardware division of the clock rate and see 
what effect that has.

> This means: You will get much better results if you use a predictable
> capture counter in an FPGA (or a higher end fast microcontroller), i.e.
> count until the intput changes, then store the counter in RAM, increment
> the pointer and reset the counter - until the RAM is full, and you can wait
> for the external readout to take the sampled data.
> 
> Apart from these artefacts (controller too slow, high likely/low likely
> timer values), the data looks good; an exponential cutoff for higher delays
> is expected.

Thank you for the analysis and explanation. I'll try some things to see if I 
can improve the output. You've given me some good leads and tools to check 
with.

> Sent also on tech at cryptech.is, so that others can comment.  This is now data
> in a form that doesn't clutter up the mailing list archive.

Very good. Too bad you're going on vacation, but have a nice one and we'll see 
where we are when you get back =).

/Fredrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figure_1.png
Type: image/png
Size: 30192 bytes
Desc: not available
URL: <https://lists.cryptech.is/archives/tech/attachments/20140822/c1cae41e/attachment-0001.png>


More information about the Tech mailing list