STRUCT BLK_CRYPTO_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct blk_crypto_config β€” an inline encryption key's crypto configuration, bestie. This page is struct blk_crypto_config(9) from the Kernel API Manual, and it's lowkey the blueprint for how a key does its crypto thing. πŸ’–

🌸 SYNOPSIS 🌸

       struct blk_crypto_config {
           enum blk_crypto_mode_num crypto_mode;
           unsigned int data_unit_size;
           unsigned int dun_bytes;
           enum blk_crypto_key_type key_type;
           int flags;
        };

πŸŽ€ Members πŸŽ€

Okay so here's the member-by-member vibe check:

  • crypto_mode β€” the encryption algorithm this key is for. That's the whole assignment. ✨
  • data_unit_size β€” the data unit size for all encryption/decryptions with this key. It's the size in bytes of each individual plaintext and ciphertext, and it is always a power of 2. It might be, e.g., the filesystem block size or the disk sector size. Slay. πŸŽ€
  • dun_bytes β€” the maximum number of bytes of DUN used when using this key. No cap, just DUN bytes. πŸ”₯
  • key_type β€” the type of this key, bestie: either raw or hardware-wrapped. Pick your fighter. πŸ’…
  • flags β€” BLK_CRYPTO_CFG_* flags. The asterisk is doing a lot of work, iykyk. ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/blk-crypto.h, plus these iconic besties:

Go read them if you want the full lore. This page is literally the config struct, not the whole saga. πŸ™ˆ

Okay that's the page, bestie β€” source/version ./include/linux, dated October 2026, for struct blk_crypto_config(9). Bye, love you, mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from