嵌入式系统上的“唯一性”/熵的来源 [英] sources of "uniqueness"/entropy on embedded systems

查看:291
本文介绍了嵌入式系统上的“唯一性”/熵的来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个嵌入式系统。在启动或重置时,我想要做的是生成唯一的ID,以便在不同的重新启动时以很高的概率生成不同的唯一ID。



它无法访问实时时钟,但它可以访问ADC和UART。我想知道是否有一个体面的方法从这些来源收集熵,以生成唯一的ID。我很熟悉 Yarrow 。有没有好的方法来使用这个?



不幸的是,我没有任何可预见的特征的噪声源; ADC连接到多个相对低噪声的输入,所以我想我只能使用ADC的最低有效位作为输入。



编辑:为什么值得,这是TI TMS320F28335处理器。






更新/澄清:我正在寻找一种收集熵软件的方法。我找到了另一种方式来解决我的问题,所以在某种程度上,我的问题是一个问题,但我仍然在寻找有关 特定软件解决方案的指导,以收集熵 低熵源,如ADC的最低有效位和接收UART字符的系统时序。

解决方案




  • 浮点ADC输入的最低位,但您触及了


  • 一个非常高分辨率的定时器(〜10ns),并且在用户按键之间的时刻采取最低的n位。如果你接受那个用户按键(最高的时间分辨率)在他们的时机上是有效的随机的,它的效果很好。




你也可以在诸如网络数据包之间的时间等时间,但是那些可以比很多人的事情更加确定性/可预测性。电气噪声和用户互动是更好的熵来源。



顺便说一下,在按键之间的时间的东西,我倾向于将它们存储在嵌入式系统中,从上电,在最后8个循环缓冲区,因为你不知道什么时候你需要它们。 (换句话说:不要等到你需要随机的位,然后强迫用户按下按钮3次!)


I have an embedded system. What I would like for it to do when it powers up or otherwise resets, is to generate a unique ID, so that on different restarts a different unique ID is generated with high probability.

It does not have access to a real-time clock, but it does have access to an ADC and a UART. I am wondering if there is a decent way to gather entropy from these sources to generate a unique ID. I am vaguely familiar with Yarrow. Is there a good way to use this?

Unfortunately I do not have any noise sources of predictable characteristics; the ADC is connected to a number of relatively-low-noise inputs, so I suppose I could just use the least-significant bits of the ADC as inputs.

edit: for what it's worth, this is the TI TMS320F28335 processor.


update/clarification: I was looking for a method in software of gathering entropy. I found another way to solve my problem, so in a way, my question was a moot point, but I am still looking for guidance on specific software solutions to gather entropy from low-entropy sources like least-significant bits of the ADC and system timing for receiving UART characters.

解决方案

I've used:

  • the lowest bit of a floating ADC input, but you touched on that

  • an extremely high-resolution timer (~10ns), and taken the lowest "n" bits when timing between user keypresses. If you accept that user keypresses (at the highest timing resolution) are effectively random in their timing, it works pretty well.

You could also time things like time between network packets, etc. but those can be a lot more deterministic/predictable than what a lot of people thing. Electrical noise and user interaction are better sources of entropy.

By the way, on the "timings between keypresses" stuff, I tend to store those on an embedded system starting at power-on, in a circular buffer of the last 8 or so, because you never know when you're going to need them. (IN other words: Don't wait until you need the random bits, and then force the user to press buttons 3 times!)

这篇关于嵌入式系统上的“唯一性”/熵的来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆