STRUCT BIO_CRYPT_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct bio_crypt_ctx(9) πŸ’…

okay so literally welcome to the Kernel API Manual, bestie β€” this page is about struct bio_crypt_ctx, and it’s giving β€œtiny but important” energy. No cap. 🫢

🌸 NAME 🌸

struct bio_crypt_ctx β€” an inline encryption context. That’s the whole vibe: inline encryption, in one struct. ✨

✨ SYNOPSIS ✨

Here’s the struct, exactly as it shows up, bestie:

struct bio_crypt_ctx {
    const struct blk_crypto_key     *bc_key;
    u64 bc_dun[BLK_CRYPTO_DUN_ARRAY_SIZE];
};

Lowkey that’s it. Highkey iconic. πŸ’…

🫢 Members 🫢

  • bc_key β€” the key, algorithm, and data unit size to use. πŸ”‘ Like, the whole β€œwhat key are we using” situation.
  • bc_dun β€” the data unit number (starting IV) to use. πŸ”’ Yes, starting IV. Keep that detail, bestie.

πŸ’– DESCRIPTION πŸ’–

A bio_crypt_ctx specifies that the contents of the bio will be encrypted (for write requests) or decrypted (for read requests) inline by the storage device or controller, or by the crypto API fallback. 🫢

So, group-chat translation: this struct is the note that says the bio’s contents get encrypted for write requests or decrypted for read requests, inline by the storage device or controller, or by the crypto API fallback. 🌈

πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ β€” this page is from ./include/linux, dated October 2026, and it’s literally struct bio_crypt_ctx(9), periodt. 🫢✨

πŸ“¦ where this page comes from