STRUCT INLINECRYPT_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct inlinecrypt_ctx(9) β€” like, the kernel API manual, bestie πŸŽ€

okay so real talk, this page is all about struct inlinecrypt_ctx β€” aka the private data of an inlinecrypt target. it lives in the kernel API manual and honestly? it's giving backstage-pass energy. let's get into it ✨


🌸 NAME 🌸

struct inlinecrypt_ctx β€” the private data of an inlinecrypt target. that's it, that's the whole vibe 🫢


✨ SYNOPSIS ✨

like, here's the struct in all its glory, no cap:

struct inlinecrypt_ctx {
    struct dm_dev *dev;
    sector_t start;
    const char *cipher_string;
    unsigned int key_size;
    u64 iv_offset;
    unsigned int sector_size;
    unsigned int sector_bits;
    enum blk_crypto_key_type key_type;
    struct blk_crypto_key key;
    u64 max_dun;
 };

πŸ¦‹ Members πŸ¦‹

okay now the main character energy β€” every single field, explained, periodt:

  • dev β€” the underlying device. literally the whole point πŸ’€
  • start β€” the starting sector of the range of dev that this target actually maps. and for this purpose a "sector" is 512 bytes β€” write that down, it comes up again πŸ‘€
  • cipher_string β€” the name of the encryption algorithm being used. yes bestie, name-drop it πŸ”₯
  • key_size β€” size of the encryption key in bytes πŸŽ€
  • iv_offset β€” starting offset for IVs. the IVs are generated as if the target were preceded by iv_offset 512-byte sectors. it's giving "pretend there's stuff before us" energy ✨
  • sector_size β€” crypto sector size in bytes (usually 4096) πŸ’–
  • sector_bits β€” log2(sector_size). math moment, we love to see it 🧚
  • key_type β€” type of the key β€” either raw or hardware-wrapped. two paths, both iconic πŸ‘‘
  • key β€” the encryption key to use. the actual key, the star of the show πŸ’…
  • max_dun β€” the maximum DUN that may be used (computed from other params). not me computing things from other params 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/md/dm-inlinecrypt.c β€” go read it, iykyk 🌈

and that's the whole page, bestie πŸ’œ sign-off time: this cutie came out of ./drivers/md and it's dated October 2026, so yeah β€” it's lowkey from the future fr fr. slay πŸ¦‹β­

πŸ“¦ where this page comes from