bpf_crypto_decrypt(9)
π bpf_crypto_decrypt β Kernel API Manual, bestie edition π
Okay so real talk, this one is <pink>bpf_crypto_decrypt(9) from the <purple>Kernel API Manual</purple>, and it's literally the glow-up-your-secret-bytes function. Sit down, hydrate, let's get into it. β¨
πΈ NAME πΈ
bpf_crypto_decrypt β decrypt a buffer using the configured context plus the IV data you hand it. That's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
__bpf_kfunc int bpf_crypto_decrypt (struct bpf_crypto_ctx *ctx , const
struct bpf_dynptr *src , const struct bpf_dynptr *dst , const struct
bpf_dynptr *siv__nullable );
Like, yes, the return type is __bpf_kfunc int, and yes, there are four args, and no, you cannot skip any of the first three. siv__nullable is the one with main character energy because it's allowed to be NULL. π
π ARGUMENTS π
ctxβ the crypto context you're working with. It must be a trusted pointer. No sketchy pointers, we don't do that here. π«srcβ abpf_dynptrpointing at the<hotpink>encrypted</hotpink>data (the locked little mystery box π¦). Must be a trusted pointer.dstβ abpf_dynptrto the buffer where the decrypted result gets stored. Must be a trusted pointer. This is where the reveal happens, bestie. β¨siv__nullableβ abpf_dynptrto the IV data and state data that the decryptor uses. May beNULL. Lowkey the only flexible one in the group chat. π
π₯ DESCRIPTION π₯
So it <rainbow>decrypts the buffer you gave it, using the IV data and the crypto context. The catch? The crypto context <yellow>must be configured first β like, you can't just roll up with an unconfigured context and expect results, that's not how any of this works. Set it up, then decrypt. Periodt. π
π«Ά SEE ALSO π«Ά
Kernel file ./kernel/bpf/crypto.c, and honestly the whole friend group:
struct bpf_crypto_params(9)struct bpf_crypto_ctx(9)bpf_crypto_ctx_create(9)bpf_crypto_ctx_acquire(9)bpf_crypto_ctx_release(9)bpf_crypto_encrypt(9)
ngl, go read the friends too βbpf_crypto_ctx_create(9) andbpf_crypto_ctx_acquire(9) are how you get a context worth using in the first place. π
That's the whole page, bestie β no gatekeeping. Sourced from ./kernel/bpf, dated October 2026, and it lives at bpf_crypto_decrypt(9) in the Kernel API Manual. Now go decrypt something iconic. ππ«π
π¦ 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