STRUCT ECRYPTFS_KEY_TFM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct ecryptfs_key_tfm β€” the Persistent key tfm, aka the crypto handle that just stays around πŸ’…


✨ SYNOPSIS ✨

okay so picture the vibes, here's the whole struct bestie:

struct ecryptfs_key_tfm {
    struct crypto_skcipher *key_tfm;
    size_t key_size;
    struct mutex key_tfm_mutex;
    struct list_head key_tfm_list;
    unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1];
 };

πŸŽ€ Members πŸŽ€

  • key_tfm β€” the crypto API handle to the key, it's giving main character energy πŸ”₯
  • key_size β€” how big the key is, in bytes
  • key_tfm_mutex β€” a mutex so that literally only one operation in eCryptfs is using the persistent TFM at any point in time. no sharing, no chaos, one at a time periodt πŸ”’
  • key_tfm_list β€” the handle that hangs this whole thing off the module-wide TFM list 🧡
  • cipher_name β€” string name for the cipher for this TFM, iconic ✨

πŸ¦‹ Description πŸ¦‹

so the tea is: typically eCryptfs will use the same ciphers over and over again throughout the course of its operations. and like… re-initializing the same cipher every single time? exhausting. unnecessary. so to avoid unnecessarily destroying and initializing the same cipher repeatedly, eCryptfs keeps a list of crypto API contexts around to use when needed 🫢

it's literally a little crypto wardrobe. why rebuild the fit every time when you can just keep it on rotation πŸ’…


🌸 SEE ALSO 🌸

  • Kernel file ./fs/ecryptfs/ecryptfs_kernel.h struct ecryptfs_global_auth_tok(9) πŸ‘€

and that's the page bestie!! source is ./fs/ecryptfs, dated October 2026, all about struct ecryptfs_key_tfm(9) β€” go read it again, slay πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from