f_ changed the topic of ##raspberrypi-internals to: The inner workings of the Raspberry Pi (Low level VPU/HW) -- for general queries please visit #raspberrypi -- open firmware: https://librerpi.github.io/ -- VC4 VPU Programmers Manual: https://github.com/hermanhermitage/videocoreiv/wiki -- chat logs: https://libera.catirclogs.org/~h~raspberrypi-internals -- bridged to matrix and discord
fgarcia has quit [Ping timeout: 265 seconds]
fgarcia has joined ##raspberrypi-internals
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
jcea has quit [Ping timeout: 256 seconds]
Stromeko has quit [Quit: Going… gone.]
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined ##raspberrypi-internals
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined ##raspberrypi-internals
Stromeko has joined ##raspberrypi-internals
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
<kaotika> the /dev/hwrng node on the pi zero seems to be safe enough. it's ring oscillator jitter most likely
<kaotika> not safe to use raw? idk. i have run diehard on it
<kaotika> running diehard on 300MB of it
<kaotika> hwrng generates about 112KB/s from the node
<kaotika> so i assume it is not a drbg ctr generator
<kaotika> it may actually do hardware measurements for every bit
<kaotika> post-processing is unkown but it must be there
<kaotika> seeing several failed tests
<kaotika> leading me to believe this is not a csprng
<kaotika> the speed and faild diehard tests indicate this HWRNG is legitimately generating raw bytes through a hardware process as alleged
<kaotika> the documentation is very minimal
<kaotika> one should not use this raw for cryptography they say
<kaotika> i find it interesting it has a hardware RNG at all
<kaotika> here is output from diehard. there are several failed tests https://paste.sh/mrae0S7z#XaJT-GjBlpZFthAZmQ7xQd4M
jcea has joined ##raspberrypi-internals
srk has quit [Ping timeout: 256 seconds]
<clever> kaotika: let me see what i can glean from the drivers.....
<clever> ./drivers/char/hw_random/bcm2835-rng.c
<clever> kaotika: i see a warp-up count, where it says it will discard the first 0x40000 values, because they are less random, it just gets written to a register at offset 4
<clever> then it sets an enable flag
<clever> within the status register, is an 8bit word count, the driver will then read from a 32bit data register, up to that many times
<clever> so basically, the hw is filling a FIFO with random 32bit values, and reporting how much data is within the FIFO
<clever> linux will then read data from there, possibly sleeping if the fifo has no data, but it can read less then you requested, as all file IO can
<kaotika> clever: i am thinking ring oscillators because of the warm-up discard
<kaotika> it fails many of the diehard tests but the min-entropy if very good.
<kaotika> ah, got to rest. bbl!
<clever> there is also an interruptlisted in the device-tree, but the driver never uses it
<clever> i assume that is to interrupt when the fifo is full and more rng is available
<kaotika> what is it for do you think?
<kaotika> oh
<clever> so you can be fed rng on an event basis, rather then polling for more rng
<kaotika> i got one of these toys before i knew the pi had /dev/hwrng https://github.com/leetronics/infnoise
<kaotika> this thing is open source. interesting little thing
<clever> ive heard that linux generally just has a daemon that copies hwrng to /dev/random
<clever> and that keeps the prng well scrambled
<kaotika> yes that seems to be how they do it
<kaotika> they mix all the entropy they can
jcea has quit [Ping timeout: 245 seconds]
srk has joined ##raspberrypi-internals
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
Avron has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Avron has joined ##raspberrypi-internals
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
jcea has joined ##raspberrypi-internals
Herc has quit [Read error: Connection reset by peer]
Herc has joined ##raspberrypi-internals
angerisagift has quit [Ping timeout: 260 seconds]