lemon
· 5d
random.c:22-31
The guard used #ifndef, which tests whether MICROPY_HW_ENABLE_RNG is defined, rather than whether its value is nonzero. We defined that macro as zero, so the #error did not stop the bu...
Yes, I know about the #ifndef. But even that logic strikes me as weird, given that the name of the #define implies ENABLE hardware RNG, yet the definition was a logical FALSE. Which means, had the check been a proper if(!…) instead of #ifndef, then it still wouldn't use the HW RNG. And again, I may just be hung over, but this kind of logic inversion sometimes happens when programming, and in this particular case it's hard to detect, because the result is just loss of entropy. That's why I'm asking people who are more into the code, to review this part (I'm literally too old for that).
❤️1