ubifs_node_calc_hmac(9)
π ubifs_node_calc_hmac(9) β the UBIFS node HMAC calculator π
okay so bestie, we're in the ubifs_node_calc_hmac(9) page of the Kernel API Manual and this one is a little crypto-flavored baddie. no cap, it's short but she matters. π
β¨ NAME β¨
ubifs_node_calc_hmac β literally calculates the HMAC of a UBIFS node. that's the whole vibe. π
πΈ SYNOPSIS πΈ
int ubifs_node_calc_hmac (const struct ubifs_info *c , const void *node
, int len , int ofs_hmac , void *hmac );
like, look at her go. five args, one int coming back. iconic. β¨
π¦ ARGUMENTS π¦
cβ the UBIFS file-system description object. your main character struct, fr fr.nodeβ the node we're inserting a HMAC into. she's getting a little authentication glow-up. πlenβ the length of the node. gotta know how much node we're working with.ofs_hmacβ the offset in the node where the HMAC gets inserted. yes, we need to know exactly where the HMAC lives, becauseβ¦hmacβ the returned HMAC. this is the output, bestie, she's a pointer to the goods. π«Ά
π DESCRIPTION π
okay so this function calculates a HMAC of a UBIFS node. the important detail β the HMAC is expected to be embedded into the node, so that area is not covered by the HMAC itself. makes sense, you can't sign the thing with the signature inside the signed thing, that's giving circular nonsense. π
also not covered: the UBIFS_NODE_MAGIC and the CRC of the node. those two are just vibing outside the HMAC's jurisdiction, periodt.
so, to recap the excluded zone: the embedded HMAC region itself, UBIFS_NODE_MAGIC, and the node's CRC. everything else is fair game. don't come for me, that's literally what the page says. π
π₯ SEE ALSO π₯
- Kernel file
./fs/ubifs/auth.cβ__ubifs_node_calc_hash(9),ubifs_hash_calc_hmac(9),ubifs_prepare_auth_node(9),__ubifs_hash_get_desc(9),ubifs_bad_hash(9),__ubifs_node_check_hash(9),ubifs_sb_verify_signature(9),ubifs_init_authentication(9),__ubifs_exit_authentication(9),__ubifs_node_insert_hmac(9),__ubifs_node_verify_hmac(9),ubifs_hmac_wkm(9)
the whole auth.c friend group, honestly. go read them, they're all slaying in their own way. π
aaaand that's the page, bestie! π
this manual page came from ./fs/ubifs and it's dated October 2026 β so yeah, future-coded of her. anyway, ubifs_node_calc_hmac(9), go off, and remember: the HMAC does not cover itself, the magic, or the CRC. iykyk. ππβ¨π¦πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms