xiaoxiang781216 edited a comment on pull request #5837: URL: https://github.com/apache/incubator-nuttx/pull/5837#issuecomment-1078693797
BTW, from the manual: https://www.freebsd.org/cgi/man.cgi?query=arc4random_buf&sektion=3&n=1 https://man7.org/linux/man-pages/man2/getrandom.2.html https://man7.org/linux/man-pages/man3/getentropy.3.html arc4random_buf is different from getrandom/getentropy. The second is designed return the true random number from hardware, but the first is a pseudo random number generator which's seed may come from getentropy, which also mention in the manual too: The subsystem is re-seeded from the kernel random(4) subsystem using getentropy(3) on a regular basis, and also upon fork(2). So the better design is that: 1. Decouple the random number generator interface from file handle as mention before 2. Add getrandom syscall to remove the file system interaction with item 1 3. Move random number pool from crypto to libc, so we can have arc4random_buf 4. Implement the software based /dev/[u]random by item 2 and the random event But, this is a huge work and need the dedicated resource to finish. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org