ksmbd_crypt_rdma(9)
β¨ ksmbd_crypt_rdma(9) β¨
okay so bestie, you're looking at a page from the Kernel API Manual and honestly? it's a whole vibe. this one's called ksmbd_crypt_rdma and it's about encrypting or decrypting an SMB Direct data buffer. lowkey iconic. π¦
πΈ NAME πΈ
ksmbd_crypt_rdma β encrypt or decrypt an SMB Direct data buffer π
β SYNOPSIS β
int ksmbd_crypt_rdma (struct ksmbd_conn *conn , const u8 *key , void
*buf , unsigned int buflen , const u8 *nonce , unsigned int nonce_len ,
u8 *tag , unsigned int tag_len , bool enc );
like, that's the whole signature, no cap. nine arguments, main character energy fr fr π
π ARGUMENTS π
connβ the connection, and it's carrying the negotiated cipher. that's where the cipher lives, bestie.keyβ your session encryption or decryption key. guard it with your life π«Άbufβ the RDMA payload. heads up: it gets transformed in place, so don't be weird about it.buflenβ how long the payload is. also likeβ¦ the authentication tag is carried out of band, so it's not counted here. iykyk.nonceβ the transform nonce β¨nonce_lenβ the nonce length. yes, they're a matching set.tagβ the authentication tag. it's an output when you're encrypting and an input when you're decrypting. duality π«tag_lenβ the authentication tag length.encβtrueto encrypt,falseto decrypt. literally that simple, bestie.
π DESCRIPTION π
so SMB2_RDMA_CRYPTO_TRANSFORM carries the nonce and the authentication tag in the SMB2 message, while only the payload gets transferred through RDMA. the way that works is genuinely so cool.
because of that split, this thing uses AEAD without the normal SMB3 transform header as associated data. like, no transform header in the AAD. that's the whole tea. π΅
π₯ RETURN π₯
0 on success. otherwise a negative errno β so like, if it's not zero, something went sideways and you should go look at the errno. π
π SEE ALSO π
Kernel file ./fs/smb/server/auth.c plus all these besties:
ksmbd_auth_ntlmv2(9)ksmbd_decode_ntlmssp_auth_blob(9)ksmbd_decode_ntlmssp_neg_blob(9)ksmbd_build_ntlmssp_challenge_blob(9)ksmbd_sign_smb2_pdu(9)ksmbd_sign_smb3_pdu(9)ksmbd_init_rdma_sg(9)
and that's the page, babe π§ this one lives in ./fs/smb/server, dated October 2026, and it slayed. mwah ππ
π¦ 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