Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

15-byte randomness via noise rssi #167

Open
Kongduino opened this issue Jun 25, 2021 · 0 comments
Open

15-byte randomness via noise rssi #167

Kongduino opened this issue Jun 25, 2021 · 0 comments

Comments

@Kongduino
Copy link

Kongduino commented Jun 25, 2021

In the radio.c file, there is code filling up a buffer called randbuf with random bytes using the RegRssiWideband register.
https://github.com/mcci-catena/arduino-lmic/blob/master/src/lmic/radio.c#L1124-L1134

The problem is this code has a line that prevents contiguous bits to be identical. I have my own library using a variation of this code, without the line prevent identical contiguous bits. I did some tests comparing the distribution of random numbers (between 0 and 255) with the LMIC and my library, and the results are very different. The distribution is way too regular with the LMIC code: look at the scatter plots.

lmic

vs

lorandom

I think this code should be fixed to ensure better randomness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant