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 typerng, as marked in/proc/crypto. If you don't use this option, the cipherstdrngis 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 ofkcapi-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 thekcapi-rngapplication β
π 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
- fedora 43: libkcapi-tools 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- fedora 44: libkcapi-tools 1.5.0-7.fc44 Β· BSD-3-Clause OR GPL-2.0-only
- nixos 26.05: libkcapi 1.5.0
- Copyright (c) 2017 - 2024 by Stephan Mueller (smueller@chronox.de)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms