STRUCT KPP_REQUEST(9)
β¨ struct kpp_request(9) β¨
okay so bestie, we're in the Kernel API Manual today and the main character is literally struct kpp_request β no cap, this is the struct you use when you're doing async crypto key-agreement stuff and you need to tell the kernel where your data lives and how big it is. it's giving "I'm the request object your crypto dreams are made of" π
π NAME π
struct kpp_request β the request struct for Key-agreement Protocol Primitives (KPP) async operations. it's the vibe check wrapper for your src/dst buffers and all the async crypto metadata. periodt.
π¦ SYNOPSIS π¦
struct kpp_request {
struct crypto_async_request base;
struct scatterlist *src;
struct scatterlist *dst;
unsigned int src_len;
unsigned int dst_len;
void *__ctx[];
};
like, look at her. iconic. five fields and a flexible array member, serving struct energy. π
π MEMBERS π
baseβ the common attributes for async crypto requests. think of it as the parent energy every async crypto request carries around β it's the shared DNA, the "we're all in this together" foundation. π«Άsrcβ source data. this is where your input lives. the stuff you're feeding in. the starting point. the "before" picture. π₯dstβ destination data. this is where the output goes. the result zone. the "after" picture. π€src_lenβ size of the input buffer. how many bytes of source data you're working with. gotta know how much you're bringing to the table. πdst_lenβ size of the output buffer. okay so this one is lowkey important: it needs to be at least as big as the expected result depending on the operation. after the operation runs, it gets updated with the actual size of the result. and if there's an error where thedstsgl size was insufficient? it gets updated to the size required for the operation. so basically it's a two-way street β you tell it how much room you have, it tells you how much room you actually needed. it's giving communication. it's giving feedback loop. πβ¨__ctxβ start of private context data. this is where the implementation-specific stuff lives. the private little corner. the VIP section. π
ngl bestie, that dst_len field is doing the most and we respect her for it. she's out here being both an input and an output. main character energy fr fr. π
π₯ SEE ALSO π₯
like, go read these too, they're all part of the same friend group:
- Kernel file
./include/crypto/kpp.h struct crypto_kpp(9)struct kpp_alg(9)Generic Key-agreement Protocol Primitives API(9)crypto_alloc_kpp(9)crypto_free_kpp(9)kpp_request_alloc(9)kpp_request_free(9)kpp_request_set_callback(9)kpp_request_set_input(9)kpp_request_set_output(9)struct kpp_secret(9)crypto_kpp_set_secret(9)crypto_kpp_generate_public_key(9)crypto_kpp_compute_shared_secret(9)crypto_kpp_maxsize(9)
and that's the whole vibe, bestie. this page lives in ./include/crypto, it's dated October 2026, and it's literally called struct kpp_request(9). go forth and request your KPP operations with confidence. you got this. ππ¦β¨
π¦ 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