arduino-lorawan
arduino-lorawan copied to clipboard
15-byte randomness via noise rssi
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.
vs
I think this code should be fixed to ensure better randomness.