KCAPI_RNG_SEED(3)

πŸ’– kcapi_rng_seed(3) β€” from the libkcapi Programming Interface πŸ’–

okay bestie, buckle up, we're seeding an RNG and honestly? it's giving main character energy πŸ”₯


✨ NAME ✨

kcapi_rng_seed β€” seed the RNG 🎲


🌸 SYNOPSIS 🌸

int kcapi_rng_seed(struct kcapi_handle * handle, uint8_t * seed,
                   uint32_t seedlen);

πŸŽ€ ARGUMENTS πŸŽ€

  • handle β€” [in] the cipher handle, your little backstage pass πŸ’…
  • seed β€” [in] seed data 🌱
  • seedlen β€” [in] size of seed πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen, this is not a "call it if you feel like it" situation. This call must be called to initialize the selected RNG. like, mandatory mandatory. no skipping πŸ™…β™€οΈ

when the SP800-90A DRBG is the one in play, this call makes the DRBG seed itself from the internal noise sources. it's literally pulling up its own vibes from inside 🌈✨

and another thing β€” when you're using the SP800-90A DRBG, the seed buffer may be NULL. yes, NULL, it's allowed, she's flexible πŸ’β™€οΈ but if it's not NULL, then the DRBG takes your given data and uses it either as a personalization string in the case of the initial seeding, or as additional data for reseeding. either way, your data is getting a job 🫢

and it returns:

  • 0 upon success πŸŽ‰
  • a negative errno-style error code if an error occurred 😭
ngl bestie, remember that return value check. zero is the slay, negative is the "we have a problem" πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de>

  • Author. πŸ’œ

that's the whole page, bestie!! ✨

libkcapi Manual 1.5.0 β€” July 2025 πŸŽ€ go forth and seed responsibly, ily πŸ’–πŸ¦‹

πŸ“¦ where this page comes from