KCAPI-RNG(1)

πŸ’– KCAPI-RNG πŸ’–

okay bestie, welcome to the General Commands Manual section, this is kcapi-rng, and she is that girl πŸŽ€


✨ NAME ✨

kcapi-rng β€” Kernel Crypto API Random Number Gatherer πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

kcapi-rng [OPTION]

🌸 DESCRIPTION 🌸

So the kcapi-rng app is literally your little tool to pull random numbers out of the Linux kernel crypto API, straight from the command line πŸ’…

It's giving "reading /dev/hwrand" energy, except β€” and this is the important part β€” the random number generators it uses are fully deterministic, meaning they are DRNGs fr fr.

Any potential seed data? You can hand it over via STDIN 🫢 Some of the DRNGs need seeding because they don't seed themselves. So kcapi-rng makes sure the DRNGs get seeded by pulling that seed data from the getrandom system call (or /dev/urandom if getrandom isn't available, ngl).

How much seed data? That's defined by the DRNG itself, and you can go review it in /proc/crypto πŸ‘€

And here's the cute part: the seed you provide via STDIN gets added to the internally-generated seed. Then the generated random numbers go out to STDOUT. periodt ✨

The following options are supported when invoking kcapi-rng:


πŸ’œ OPTIONS πŸ’œ

  • -b, --bytes BYTES β€” generate BYTES number of random bytes 🌈
  • -n, --name NAME β€” the NAME argument says which random number generator implementation you wanna use πŸ’« The allowed random number generators are defined by the Linux kernel, and you can check which ciphers are currently registered at /proc/crypto. > heads up bestie: the content of that file can change when new ciphers get registered, so don't treat it as set in stone πŸ’€ The NAME argument is given directly to the Linux kernel crypto API. The cipher you pick must be of type rng, as marked in /proc/crypto. If you don't use this option, the cipher stdrng is used as the default πŸŽ€
  • --hex β€” the generated random numbers get printed out in hexadecimal notation instead of as a binary string πŸ”₯
  • -v, --verbose β€” enables a verbose operation of kcapi-rng. Use this option multiple times to increase the verbosity πŸ“ˆ
  • -q, --quiet β€” prevents the generation of any log output 🀫
  • -h, --help β€” displays the help text 🫢
  • --version β€” displays the version number of the kcapi-rng application ⭐

πŸ‘‘ SEE ALSO πŸ‘‘

kcapi-enc(1) kcapi-dgst(1) kcapi-hasher(1)


and that's the whole page, bestie 🧚 this was KCAPI-RNG(1) from the General Commands Manual, dated 2017-08-14, mwah πŸ’– no cap, go generate some bytes πŸ’…βœ¨

πŸ“¦ where this page comes from