JITTERENTROPY-RNGD(1)

πŸ“¦
version 1.3.2 Β· 3 versions
, in nixos 26.05, nixpkgs unstable, ubuntu stonking

✨ JITTERENTROPY-RNGD ✨

okay bestie, gather round, because today we're talking about jitterentropy-rngd β€” the CPU Jitter Random Number Generator Daemon πŸ’– (yes that's real, yes it's a "General Commands Manual" girly, and no, it is not boring, wait for it)


🌸 NAME 🌸

jitterentropy-rngd β€” the CPU Jitter Random Number Generator Daemon. she makes entropy out of vibes. literally. timing vibes.


πŸŽ€ SYNOPSIS πŸŽ€

jitterentropy-rngd [OPTION]

πŸ¦‹ DESCRIPTION πŸ¦‹

so, the whole thing with jitterentropy-rngd is that it hands you a source of good entropy by collecting CPU execution time jitter. like, the actual tiny wobbles in how long your CPU takes to do stuff?? iconic. that entropy gets injected into the Linux kernel /dev/random device using the RNDADDENTROPY ioctl β€” the one described over in random(4). periodt.

the entropy living inside that CPU execution time jitter gets magnified by the CPU Jitter Random Number Generator. and the CPU Jitter Random Number Generator uses the CPU execution timing jitter to generate a bit stream that complies with different statistical measurements that determine the bit stream is random. so it's not just a vibe, it passes the measurements, okay?? πŸ‘‘

and here's the fun part: the CPU Jitter Random Number Generator works equally well in virtualized environments as well as on bare-metal, provided a high-resolution timer is made available with the clock_gettime() function. no cap. you can check which timer is currently in use by reading this file:

  • /sys/devices/system/clocksource/clocksource0/current_clocksource

and if you wanna change the clock source?? one of the available clock sources listed in this file:

  • /sys/devices/system/clocksource/clocksource0/available_clocksource

can be written into that mentioned current_clocksource file, and the kernel immediately changes the use clock. immediate. no waiting. πŸ’…

now the part that matters for your boot-up girlies: the CPU Jitter Random Number Generator unconditionally injects 256 bits of entropy into the Linux kernel during startup time, before it daemonizes. so when the invocation of the jitterentropy-rngd returns, the Linux kernel is seeded with at least 256 bits of entropy. 🫢

but babe, keep this in mind: the Linux kernel performs a schedule operation during the injection of data, which implies that immediately after starting the jitterentropy-rngd, the kernel may still complain about insufficient entropy available for /dev/urandom. it's not her fault, it's scheduling. 😭

also!! in addition to all that, the jitterentropy-rngd injects 256 bits of entropy every 10 minutes, unconditionally, irrespective whether the kernel has sufficient entropy or not. she does not check the vibes. she just gives. ✨


πŸ’… OPTIONS πŸ’…

the following options are supported when invoking jitterentropy-rngd β€” buckle up:

  • -v, --verbose β€” enable a verbose operation of the daemon. using this option multiple times increases the verbosity. also, using this option implies that the jitterentropy-rngd will not daemonize. (she stays in the room with you. main character energy.)
  • -p, --pid [FILE] β€” triggers the creation of a PID file at the given location.
  • -h, --help β€” displays the help text.
  • --version β€” returns the version number of the jitterentropy-rngd.
  • -s, --sp800-90b β€” triggers a specific seeding strategy of the kernel /dev/random device to insert entropy that ensures the ChaCha20 DRNG behind /dev/random receives 256 bits of entropy as defined by SP800-90B. yes bestie, the standard. compliance slay. πŸ“œ
  • -f, --flags [FLAGS] β€” allows specifying the flags value documented with jitterentropy(3) when allocating the Jitter RNG.
  • -o, --osr [OSR] β€” allows specifying the oversampling rate (OSR) as documented with jitterentropy(3) when allocating the Jitter RNG.
  • --status β€” returns the Jitter RNG status output from the jitterentropy(3) library API of jent_status. and lowkey important: to make sure this output is actually helpful, all other parameters should be also set identically to the runtime invocation of the daemon. otherwise the status is just lying to you, and we don't do that. πŸ™ˆ

πŸ”₯ NOTES πŸ”₯

  • the jitterentropy-rngd does not perform write operations on any file system object. which means β€” okay this is the good news β€” it can be executed on a fully read-only mounted file system. no write perms needed, she's a guest, she's polite. 🧚
  • the random bit stream generated by jitterentropy-rngd is considered to hold full entropy. full. not partial. not "mostly". full. πŸ’–

🌈 SEE ALSO 🌈

random(4) clock_gettime(2)


so yeah, that's the whole page, and honestly?? her. πŸ’œ thank you for coming to my little deep dive bestie β€” signed off on <rainbow>2017-02-11</rainbow> from the General Commands Manual, JITTERENTROPY-RNGD(1), mwah, go seed some kernels πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from