sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/crypto/api-kppmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/crypto/api-kppmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/crypto/api-kppmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/crypto/api-kppmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/crypto/api-kppmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/pt_BR/crypto/api-kppmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/crypto/api-kppmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h'Key-agreement Protocol Primitives (KPP)h]h'Key-agreement Protocol Primitives (KPP)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhubjV)}(hhh]ju)}(hOuser-instantiated object which encapsulate algorithms and core processing logich]hOuser-instantiated object which encapsulate algorithms and core processing logic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK)hjhhubah}(h]h ]h"]h$]h&]uh1jUhj>hhhjVhK$ubeh}(h]h ](jcstructeh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhhhNhNubjo)}(h**Definition**:: struct crypto_kpp { unsigned int reqsize; struct crypto_tfm base; }; **Members** ``reqsize`` Request context size required by algorithm implementation ``base`` Common crypto API algorithm data structureh](ju)}(h**Definition**::h](j{)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK-hjubj)}(hLstruct crypto_kpp { unsigned int reqsize; struct crypto_tfm base; };h]hLstruct crypto_kpp { unsigned int reqsize; struct crypto_tfm base; };}hjsbah}(h]h ]h"]h$]h&]j?j@uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK/hjubju)}(h **Members**h]j{)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK4hjubj)}(hhh](j)}(hF``reqsize`` Request context size required by algorithm implementation h](j)}(h ``reqsize``h]j)}(hjh]hreqsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK.hjubj)}(hhh]ju)}(h9Request context size required by algorithm implementationh]h9Request context size required by algorithm implementation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK-hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hK.hjubj)}(h3``base`` Common crypto API algorithm data structureh](j)}(h``base``h]j)}(hj2h]hbase}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK.hj,ubj)}(hhh]ju)}(h*Common crypto API algorithm data structureh]h*Common crypto API algorithm data structure}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK/hjHubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhjGhK.hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hkpp_alg (C struct) c.kpp_alghNtauh1hhhhhhNhNubh)}(hhh](h)}(hkpp_algh]h)}(hstruct kpp_algh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjhhhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK5ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK5ubj")}(hkpp_algh]j()}(hjh]hkpp_alg}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjhhhjhK5ubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjhhhjhK5ubah}(h]jah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjhK5hjhhubjV)}(hhh]ju)}(h)generic key-agreement protocol primitivesh]h)generic key-agreement protocol primitives}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK7hjhhubah}(h]h ]h"]h$]h&]uh1jUhjhhhjhK5ubeh}(h]h ](jcstructeh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhhhNhNubjo)}(hXv**Definition**:: struct kpp_alg { int (*set_secret)(struct crypto_kpp *tfm, const void *buffer, unsigned int len); int (*generate_public_key)(struct kpp_request *req); int (*compute_shared_secret)(struct kpp_request *req); unsigned int (*max_size)(struct crypto_kpp *tfm); int (*init)(struct crypto_kpp *tfm); void (*exit)(struct crypto_kpp *tfm); struct crypto_alg base; }; **Members** ``set_secret`` Function invokes the protocol specific function to store the secret private key along with parameters. The implementation knows how to decode the buffer ``generate_public_key`` Function generate the public key to be sent to the counterpart. In case of error, where output is not big enough req->dst_len will be updated to the size required ``compute_shared_secret`` Function compute the shared secret as defined by the algorithm. The result is given back to the user. In case of error, where output is not big enough, req->dst_len will be updated to the size required ``max_size`` Function returns the size of the output buffer ``init`` Initialize the object. This is called only once at instantiation time. In case the cryptographic hardware needs to be initialized. Software fallback should be put in place here. ``exit`` Undo everything **init** did. ``base`` Common crypto API algorithm data structureh](ju)}(h**Definition**::h](j{)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK;hjubj)}(hXstruct kpp_alg { int (*set_secret)(struct crypto_kpp *tfm, const void *buffer, unsigned int len); int (*generate_public_key)(struct kpp_request *req); int (*compute_shared_secret)(struct kpp_request *req); unsigned int (*max_size)(struct crypto_kpp *tfm); int (*init)(struct crypto_kpp *tfm); void (*exit)(struct crypto_kpp *tfm); struct crypto_alg base; };h]hXstruct kpp_alg { int (*set_secret)(struct crypto_kpp *tfm, const void *buffer, unsigned int len); int (*generate_public_key)(struct kpp_request *req); int (*compute_shared_secret)(struct kpp_request *req); unsigned int (*max_size)(struct crypto_kpp *tfm); int (*init)(struct crypto_kpp *tfm); void (*exit)(struct crypto_kpp *tfm); struct crypto_alg base; };}hj sbah}(h]h ]h"]h$]h&]j?j@uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK=hjubju)}(h **Members**h]j{)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKGhjubj)}(hhh](j)}(h``set_secret`` Function invokes the protocol specific function to store the secret private key along with parameters. The implementation knows how to decode the buffer h](j)}(h``set_secret``h]j)}(hj;h]h set_secret}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKdst_len will be updated to the size required h](j)}(h``generate_public_key``h]j)}(hjuh]hgenerate_public_key}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK@hjoubj)}(hhh]ju)}(hFunction generate the public key to be sent to the counterpart. In case of error, where output is not big enough req->dst_len will be updated to the size requiredh]hFunction generate the public key to be sent to the counterpart. In case of error, where output is not big enough req->dst_len will be updated to the size required}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhK=hjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjhK@hj2ubj)}(h``compute_shared_secret`` Function compute the shared secret as defined by the algorithm. The result is given back to the user. In case of error, where output is not big enough, req->dst_len will be updated to the size required h](j)}(h``compute_shared_secret``h]j)}(hjh]hcompute_shared_secret}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKDhjubj)}(hhh]ju)}(hFunction compute the shared secret as defined by the algorithm. The result is given back to the user. In case of error, where output is not big enough, req->dst_len will be updated to the size requiredh]hFunction compute the shared secret as defined by the algorithm. The result is given back to the user. In case of error, where output is not big enough, req->dst_len will be updated to the size required}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKAhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKDhj2ubj)}(h<``max_size`` Function returns the size of the output buffer h](j)}(h ``max_size``h]j)}(hjh]hmax_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKEhjubj)}(hhh]ju)}(h.Function returns the size of the output bufferh]h.Function returns the size of the output buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKEhj2ubj)}(h``init`` Initialize the object. This is called only once at instantiation time. In case the cryptographic hardware needs to be initialized. Software fallback should be put in place here. h](j)}(h``init``h]j)}(hj"h]hinit}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKIhjubj)}(hhh]ju)}(hInitialize the object. This is called only once at instantiation time. In case the cryptographic hardware needs to be initialized. Software fallback should be put in place here.h]hInitialize the object. This is called only once at instantiation time. In case the cryptographic hardware needs to be initialized. Software fallback should be put in place here.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKFhj8ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7hKIhj2ubj)}(h'``exit`` Undo everything **init** did. h](j)}(h``exit``h]j)}(hj\h]hexit}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKJhjVubj)}(hhh]ju)}(hUndo everything **init** did.h](hUndo everything }(hjuhhhNhNubj{)}(h**init**h]hinit}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjuubh did.}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1jthjqhKJhjrubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjqhKJhj2ubj)}(h3``base`` Common crypto API algorithm data structureh](j)}(h``base``h]j)}(hjh]hbase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKKhjubj)}(hhh]ju)}(h*Common crypto API algorithm data structureh]h*Common crypto API algorithm data structure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKLhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKKhj2ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hkpp_secret (C struct) c.kpp_secrethNtauh1hhhhhhNhNubh)}(hhh](h)}(h kpp_secreth]h)}(hstruct kpp_secreth](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjhhhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhKRubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKRubj")}(h kpp_secreth]j()}(hjh]h kpp_secret}(hj!hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjhhhjhKRubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjhhhjhKRubah}(h]jah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjhKRhjhhubjV)}(hhh]ju)}(h&small header for packing secret bufferh]h&small header for packing secret buffer}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhMhj@hhubah}(h]h ]h"]h$]h&]uh1jUhjhhhjhKRubeh}(h]h ](jcstructeh"]h$]h&]jhjcjij[jjj[jkjljmuh1hhhhhhNhNubjo)}(hX **Definition**:: struct kpp_secret { unsigned short type; unsigned short len; }; **Members** ``type`` define type of secret. Each kpp type will define its own ``len`` specify the len of the secret, include the header, that follows the structh](ju)}(h**Definition**::h](j{)}(h**Definition**h]h Definition}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjcubh:}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhM hj_ubj)}(hGstruct kpp_secret { unsigned short type; unsigned short len; };h]hGstruct kpp_secret { unsigned short type; unsigned short len; };}hjsbah}(h]h ]h"]h$]h&]j?j@uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhMhj_ubju)}(h **Members**h]j{)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhMhj_ubj)}(hhh](j)}(hB``type`` define type of secret. Each kpp type will define its own h](j)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhM hjubj)}(hhh]ju)}(h8define type of secret. Each kpp type will define its ownh]h8define type of secret. Each kpp type will define its own}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubj)}(hR``len`` specify the len of the secret, include the header, that follows the structh](j)}(h``len``h]j)}(hjh]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:7: ./include/crypto/kpp.hhM hjubj)}(hhh]ju)}(hJspecify the len of the secret, include the header, that follows the structh]hJspecify the len of the secret, include the header, that follows the struct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubeh}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhhhhhNhNubeh}(h]Bkey-agreement-protocol-primitives-kpp-cipher-algorithm-definitionsah ]h"]Dkey-agreement protocol primitives (kpp) cipher algorithm definitionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h2Key-agreement Protocol Primitives (KPP) Cipher APIh]h2Key-agreement Protocol Primitives (KPP) Cipher API}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hhhhhK ubju)}(hfThe KPP API is used with the algorithm type CRYPTO_ALG_TYPE_KPP (listed as type "kpp" in /proc/crypto)h]hjThe KPP API is used with the algorithm type CRYPTO_ALG_TYPE_KPP (listed as type “kpp” in /proc/crypto)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:13: ./include/crypto/kpp.hhK\hj1hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hcrypto_alloc_kpp (C function)c.crypto_alloc_kpphNtauh1hhj1hhhNhNubh)}(hhh](h)}(hOstruct crypto_kpp * crypto_alloc_kpp (const char *alg_name, u32 type, u32 mask)h]h)}(hMstruct crypto_kpp *crypto_alloc_kpp(const char *alg_name, u32 type, u32 mask)h](h)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjfhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhKcubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfhhhjwhKcubh)}(hhh]j()}(h crypto_kpph]h crypto_kpp}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jcrypto_alloc_kppsbc.crypto_alloc_kppasbuh1hhjfhhhjwhKcubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfhhhjwhKcubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjfhhhjwhKcubj")}(hcrypto_alloc_kpph]j()}(hjh]hcrypto_alloc_kpp}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjfhhhjwhKcubhdesc_parameterlist)}(h*(const char *alg_name, u32 type, u32 mask)h](hdesc_parameter)}(hconst char *alg_nameh](h)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubhdesc_sig_keyword_type)}(hcharh]hchar}(hj hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j hjubj)}(h h]h }(hj! hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj/ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(halg_nameh]halg_name}(hj< hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hu32 typeh](h)}(hhh]j()}(hu32h]hu32}(hjX hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjU ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjZ modnameN classnameNjj)}j]jc.crypto_alloc_kppasbuh1hhjQ ubj)}(h h]h }(hjv hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ ubj()}(htypeh]htype}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjQ ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hu32 maskh](h)}(hhh]j()}(hu32h]hu32}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj modnameN classnameNjj)}j]jc.crypto_alloc_kppasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj()}(hmaskh]hmask}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubeh}(h]h ]h"]h$]h&]j?j@uh1jhjfhhhjwhKcubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjbhhhjwhKcubah}(h]j]ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjwhKchj_hhubjV)}(hhh]ju)}(hallocate KPP tfm handleh]hallocate KPP tfm handle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhKchj hhubah}(h]h ]h"]h$]h&]uh1jUhj_hhhjwhKcubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjij jjj jkjljmuh1hhhhj1hNhNubjo)}(hX**Parameters** ``const char *alg_name`` is the name of the kpp algorithm (e.g. "dh", "ecdh") ``u32 type`` specifies the type of the algorithm ``u32 mask`` specifies the mask for the algorithm **Description** Allocate a handle for kpp algorithm. The returned struct crypto_kpp is required for any following API invocation **Return** allocated handle in case of success; IS_ERR() is true in case of an error, PTR_ERR() returns the error code.h](ju)}(h**Parameters**h]j{)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj ubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhKghj ubj)}(hhh](j)}(hN``const char *alg_name`` is the name of the kpp algorithm (e.g. "dh", "ecdh") h](j)}(h``const char *alg_name``h]j)}(hj7 h]hconst char *alg_name}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5 ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhKdhj1 ubj)}(hhh]ju)}(h4is the name of the kpp algorithm (e.g. "dh", "ecdh")h]h(struct crypto_kpp *tfm, const void *buffer, unsigned int len)h](j)}(hstruct crypto_kpp *tfmh](h)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubj)}(h h]h }(hj- hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j()}(h crypto_kpph]h crypto_kpp}(hj> hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj; ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj@ modnameN classnameNjj)}j]j)}jj sbc.crypto_kpp_set_secretasbuh1hhj ubj)}(h h]h }(hj^ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hjl hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj()}(htfmh]htfm}(hjy hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubj)}(hconst void *bufferh](h)}(hjh]hconst}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj )}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj()}(hbufferh]hbuffer}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubj)}(hunsigned int lenh](j )}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj )}(hinth]hint}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj()}(hlenh]hlen}(hj'hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj ubeh}(h]h ]h"]h$]h&]j?j@uh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj hhhj hMubah}(h]j ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj hMhj hhubjV)}(hhh]ju)}(hInvoke kpp operationh]hInvoke kpp operation}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMhjNhhubah}(h]h ]h"]h$]h&]uh1jUhj hhhj hMubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijijjjijkjljmuh1hhhhj1hNhNubjo)}(hX&**Parameters** ``struct crypto_kpp *tfm`` tfm handle ``const void *buffer`` Buffer holding the packet representation of the private key. The structure of the packet key depends on the particular KPP implementation. Packing and unpacking helpers are provided for ECDH and DH (see the respective header files for those implementations). ``unsigned int len`` Length of the packet private key buffer. **Description** Function invokes the specific kpp operation for a given alg. **Return** zero on success; error code in case of errorh](ju)}(h**Parameters**h]j{)}(hjsh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjqubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMhjmubj)}(hhh](j)}(h&``struct crypto_kpp *tfm`` tfm handle h](j)}(h``struct crypto_kpp *tfm``h]j)}(hjh]hstruct crypto_kpp *tfm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMhjubj)}(hhh]ju)}(h tfm handleh]h tfm handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hX``const void *buffer`` Buffer holding the packet representation of the private key. The structure of the packet key depends on the particular KPP implementation. Packing and unpacking helpers are provided for ECDH and DH (see the respective header files for those implementations). h](j)}(h``const void *buffer``h]j)}(hjh]hconst void *buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMhjubj)}(hhh]ju)}(hXBuffer holding the packet representation of the private key. The structure of the packet key depends on the particular KPP implementation. Packing and unpacking helpers are provided for ECDH and DH (see the respective header files for those implementations).h]hXBuffer holding the packet representation of the private key. The structure of the packet key depends on the particular KPP implementation. Packing and unpacking helpers are provided for ECDH and DH (see the respective header files for those implementations).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h>``unsigned int len`` Length of the packet private key buffer. h](j)}(h``unsigned int len``h]j)}(hjh]hunsigned int len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMhjubj)}(hhh]ju)}(h(Length of the packet private key buffer.h]h(Length of the packet private key buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjmubju)}(h**Description**h]j{)}(hj@h]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj>ubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhM hjmubju)}(hint crypto_kpp_compute_shared_secret (struct kpp_request *req)h]h)}(h=int crypto_kpp_compute_shared_secret(struct kpp_request *req)h](j )}(hinth]hint}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_hhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhM=ubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_hhhjqhM=ubj")}(h crypto_kpp_compute_shared_secreth]j()}(h crypto_kpp_compute_shared_secreth]h crypto_kpp_compute_shared_secret}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj_hhhjqhM=ubj)}(h(struct kpp_request *req)h]j)}(hstruct kpp_request *reqh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h kpp_requesth]h kpp_request}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb"c.crypto_kpp_compute_shared_secretasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hreqh]hreq}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubah}(h]h ]h"]h$]h&]j?j@uh1jhj_hhhjqhM=ubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj[hhhjqhM=ubah}(h]jVah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjqhM=hjXhhubjV)}(hhh]ju)}(hInvoke kpp operationh]hInvoke kpp operation}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhM=hj hhubah}(h]h ]h"]h$]h&]uh1jUhjXhhhjqhM=ubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjij;jjj;jkjljmuh1hhhhj1hNhNubjo)}(h**Parameters** ``struct kpp_request *req`` kpp key request **Description** Function invokes the specific kpp operation for computing the shared secret for a given kpp algorithm. **Return** zero on success; error code in case of errorh](ju)}(h**Parameters**h]j{)}(hjEh]h Parameters}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjCubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMAhj?ubj)}(hhh]j)}(h,``struct kpp_request *req`` kpp key request h](j)}(h``struct kpp_request *req``h]j)}(hjdh]hstruct kpp_request *req}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMBhj^ubj)}(hhh]ju)}(hkpp key requesth]hkpp key request}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjyhMBhjzubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhjyhMBhj[ubah}(h]h ]h"]h$]h&]uh1jhj?ubju)}(h**Description**h]j{)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMDhj?ubju)}(hfFunction invokes the specific kpp operation for computing the shared secret for a given kpp algorithm.h]hfFunction invokes the specific kpp operation for computing the shared secret for a given kpp algorithm.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhM>hj?ubju)}(h **Return**h]j{)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMAhj?ubju)}(h,zero on success; error code in case of errorh]h,zero on success; error code in case of error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMDhj?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj1hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hcrypto_kpp_maxsize (C function)c.crypto_kpp_maxsizehNtauh1hhj1hhhNhNubh)}(hhh](h)}(h8unsigned int crypto_kpp_maxsize (struct crypto_kpp *tfm)h]h)}(h7unsigned int crypto_kpp_maxsize(struct crypto_kpp *tfm)h](j )}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMNubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMNubj )}(hinth]hint}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMNubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMNubj")}(hcrypto_kpp_maxsizeh]j()}(hcrypto_kpp_maxsizeh]hcrypto_kpp_maxsize}(hjHhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjDubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjhhhjhMNubj)}(h(struct crypto_kpp *tfm)h]j)}(hstruct crypto_kpp *tfmh](h)}(hjh]hstruct}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj`ubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubh)}(hhh]j()}(h crypto_kpph]h crypto_kpp}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]j)}jjJsbc.crypto_kpp_maxsizeasbuh1hhj`ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj()}(htfmh]htfm}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj`ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj\ubah}(h]h ]h"]h$]h&]j?j@uh1jhjhhhjhMNubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjhhhjhMNubah}(h]jah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjhMNhjhhubjV)}(hhh]ju)}(hGet len for output bufferh]hGet len for output buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMNhjhhubah}(h]h ]h"]h$]h&]uh1jUhjhhhjhMNubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhj1hNhNubjo)}(hXa**Parameters** ``struct crypto_kpp *tfm`` KPP tfm handle allocated with crypto_alloc_kpp() **Description** Function returns the output buffer size required for a given key. Function assumes that the key is already set in the transformation. If this function is called without a setkey or with a failed setkey, you will end up in a NULL dereference.h](ju)}(h**Parameters**h]j{)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMRhjubj)}(hhh]j)}(hL``struct crypto_kpp *tfm`` KPP tfm handle allocated with crypto_alloc_kpp() h](j)}(h``struct crypto_kpp *tfm``h]j)}(hj(h]hstruct crypto_kpp *tfm}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMUhj"ubj)}(hhh]ju)}(h0KPP tfm handle allocated with crypto_alloc_kpp()h]h0KPP tfm handle allocated with crypto_alloc_kpp()}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj=hMUhj>ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj=hMUhjubah}(h]h ]h"]h$]h&]uh1jhjubju)}(h**Description**h]j{)}(hjch]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjaubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMWhjubju)}(hFunction returns the output buffer size required for a given key. Function assumes that the key is already set in the transformation. If this function is called without a setkey or with a failed setkey, you will end up in a NULL dereference.h]hFunction returns the output buffer size required for a given key. Function assumes that the key is already set in the transformation. If this function is called without a setkey or with a failed setkey, you will end up in a NULL dereference.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:16: ./include/crypto/kpp.hhMOhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj1hhhNhNubeh}(h]0key-agreement-protocol-primitives-kpp-cipher-apiah ]h"]2key-agreement protocol primitives (kpp) cipher apiah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h=Key-agreement Protocol Primitives (KPP) Cipher Request Handleh]h=Key-agreement Protocol Primitives (KPP) Cipher Request Handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hkpp_request_alloc (C function)c.kpp_request_allochNtauh1hhjhhhNhNubh)}(hhh](h)}(hJstruct kpp_request * kpp_request_alloc (struct crypto_kpp *tfm, gfp_t gfp)h]h)}(hHstruct kpp_request *kpp_request_alloc(struct crypto_kpp *tfm, gfp_t gfp)h](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j()}(h kpp_requesth]h kpp_request}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]j)}jkpp_request_allocsbc.kpp_request_allocasbuh1hhjhhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj")}(hkpp_request_alloch]j()}(hjh]hkpp_request_alloc}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjhhhjhKubj)}(h#(struct crypto_kpp *tfm, gfp_t gfp)h](j)}(hstruct crypto_kpp *tfmh](h)}(hjh]hstruct}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj7ubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubh)}(hhh]j()}(h crypto_kpph]h crypto_kpp}(hjYhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjVubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj[modnameN classnameNjj)}j]jc.kpp_request_allocasbuh1hhj7ubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj()}(htfmh]htfm}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj7ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj3ubj)}(h gfp_t gfph](h)}(hhh]j()}(hgfp_th]hgfp_t}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]jc.kpp_request_allocasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hgfph]hgfp}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj3ubeh}(h]h ]h"]h$]h&]j?j@uh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjhhhjhKubah}(h]jah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjhKhjhhubjV)}(hhh]ju)}(hallocates kpp requesth]hallocates kpp request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjhhhjhKubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhjhNhNubjo)}(h**Parameters** ``struct crypto_kpp *tfm`` KPP tfm handle allocated with crypto_alloc_kpp() ``gfp_t gfp`` allocation flags **Return** allocated handle in case of success or NULL in case of an error.h](ju)}(h**Parameters**h]j{)}(hj&h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj$ubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj ubj)}(hhh](j)}(hL``struct crypto_kpp *tfm`` KPP tfm handle allocated with crypto_alloc_kpp() h](j)}(h``struct crypto_kpp *tfm``h]j)}(hjEh]hstruct crypto_kpp *tfm}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj?ubj)}(hhh]ju)}(h0KPP tfm handle allocated with crypto_alloc_kpp()h]h0KPP tfm handle allocated with crypto_alloc_kpp()}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjZhKhj[ubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhjZhKhj<ubj)}(h``gfp_t gfp`` allocation flags h](j)}(h ``gfp_t gfp``h]j)}(hj~h]h gfp_t gfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjxubj)}(hhh]ju)}(hallocation flagsh]hallocation flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhKhjubah}(h]h ]h"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]uh1jhjhKhj<ubeh}(h]h ]h"]h$]h&]uh1jhj ubju)}(h **Return**h]j{)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj ubju)}(h@allocated handle in case of success or NULL in case of an error.h]h@allocated handle in case of success or NULL in case of an error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hkpp_request_free (C function)c.kpp_request_freehNtauh1hhjhhhNhNubh)}(hhh](h)}(h/void kpp_request_free (struct kpp_request *req)h]h)}(h.void kpp_request_free(struct kpp_request *req)h](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hKubj")}(hkpp_request_freeh]j()}(hkpp_request_freeh]hkpp_request_free}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjhhhj hKubj)}(h(struct kpp_request *req)h]j)}(hstruct kpp_request *reqh](h)}(hjh]hstruct}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj7ubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubh)}(hhh]j()}(h kpp_requesth]h kpp_request}(hjYhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjVubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj[modnameN classnameNjj)}j]j)}jj!sbc.kpp_request_freeasbuh1hhj7ubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj()}(hreqh]hreq}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj7ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj3ubah}(h]h ]h"]h$]h&]j?j@uh1jhjhhhj hKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjhhhj hKubah}(h]jah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj hKhjhhubjV)}(hhh]ju)}(hzeroize and free kpp requesth]hzeroize and free kpp request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjhhhj hKubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhjhNhNubjo)}(h=**Parameters** ``struct kpp_request *req`` request to freeh](ju)}(h**Parameters**h]j{)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]j)}(h+``struct kpp_request *req`` request to freeh](j)}(h``struct kpp_request *req``h]j)}(hjh]hstruct kpp_request *req}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]ju)}(hrequest to freeh]hrequest to free}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h%kpp_request_set_callback (C function)c.kpp_request_set_callbackhNtauh1hhjhhhNhNubh)}(hhh](h)}(hgvoid kpp_request_set_callback (struct kpp_request *req, u32 flgs, crypto_completion_t cmpl, void *data)h]h)}(hfvoid kpp_request_set_callback(struct kpp_request *req, u32 flgs, crypto_completion_t cmpl, void *data)h](j )}(hvoidh]hvoid}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjUhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhhjghKubj")}(hkpp_request_set_callbackh]j()}(hkpp_request_set_callbackh]hkpp_request_set_callback}(hjzhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjvubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjUhhhjghKubj)}(hI(struct kpp_request *req, u32 flgs, crypto_completion_t cmpl, void *data)h](j)}(hstruct kpp_request *reqh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h kpp_requesth]h kpp_request}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]j)}jj|sbc.kpp_request_set_callbackasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hreqh]hreq}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hu32 flgsh](h)}(hhh]j()}(hu32h]hu32}(hj hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj modnameN classnameNjj)}j]jc.kpp_request_set_callbackasbuh1hhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hflgsh]hflgs}(hj7hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hcrypto_completion_t cmplh](h)}(hhh]j()}(hcrypto_completion_th]hcrypto_completion_t}(hjShhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjPubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjUmodnameN classnameNjj)}j]jc.kpp_request_set_callbackasbuh1hhjLubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj()}(hcmplh]hcmpl}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjLubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(h void *datah](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hdatah]hdata}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubeh}(h]h ]h"]h$]h&]j?j@uh1jhjUhhhjghKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjQhhhjghKubah}(h]jLah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjghKhjNhhubjV)}(hhh]ju)}(hSets an asynchronous callback.h]hSets an asynchronous callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjNhhhjghKubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhjhNhNubjo)}(hXr**Parameters** ``struct kpp_request *req`` request that the callback will be set for ``u32 flgs`` specify for instance if the operation may backlog ``crypto_completion_t cmpl`` callback which will be called ``void *data`` private data used by the caller **Description** Callback will be called when an asynchronous operation on a given request is finished.h](ju)}(h**Parameters**h]j{)}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj ubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh](j)}(hF``struct kpp_request *req`` request that the callback will be set for h](j)}(h``struct kpp_request *req``h]j)}(hj,h]hstruct kpp_request *req}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj&ubj)}(hhh]ju)}(h)request that the callback will be set forh]h)request that the callback will be set for}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjAhKhjBubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhjAhKhj#ubj)}(h?``u32 flgs`` specify for instance if the operation may backlog h](j)}(h ``u32 flgs``h]j)}(hjeh]hu32 flgs}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj_ubj)}(hhh]ju)}(h1specify for instance if the operation may backlogh]h1specify for instance if the operation may backlog}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjzhKhj{ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhjzhKhj#ubj)}(h;``crypto_completion_t cmpl`` callback which will be called h](j)}(h``crypto_completion_t cmpl``h]j)}(hjh]hcrypto_completion_t cmpl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]ju)}(hcallback which will be calledh]hcallback which will be called}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj#ubj)}(h/``void *data`` private data used by the caller h](j)}(h``void *data``h]j)}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]ju)}(hprivate data used by the callerh]hprivate data used by the caller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj#ubeh}(h]h ]h"]h$]h&]uh1jhjubju)}(h**Description**h]j{)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubju)}(hVCallback will be called when an asynchronous operation on a given request is finished.h]hVCallback will be called when an asynchronous operation on a given request is finished.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h"kpp_request_set_input (C function)c.kpp_request_set_inputhNtauh1hhjhhhNhNubh)}(hhh](h)}(hgvoid kpp_request_set_input (struct kpp_request *req, struct scatterlist *input, unsigned int input_len)h]h)}(hfvoid kpp_request_set_input(struct kpp_request *req, struct scatterlist *input, unsigned int input_len)h](j )}(hvoidh]hvoid}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjShhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjehKubj")}(hkpp_request_set_inputh]j()}(hkpp_request_set_inputh]hkpp_request_set_input}(hjxhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjtubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjShhhjehKubj)}(hL(struct kpp_request *req, struct scatterlist *input, unsigned int input_len)h](j)}(hstruct kpp_request *reqh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h kpp_requesth]h kpp_request}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]j)}jjzsbc.kpp_request_set_inputasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hreqh]hreq}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hstruct scatterlist *inputh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h scatterlisth]h scatterlist}(hj$hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj!ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj&modnameN classnameNjj)}j]jc.kpp_request_set_inputasbuh1hhjubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(hinputh]hinput}(hj]hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubj)}(hunsigned int input_lenh](j )}(hunsignedh]hunsigned}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj )}(hinth]hint}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj()}(h input_lenh]h input_len}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjrubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjubeh}(h]h ]h"]h$]h&]j?j@uh1jhjShhhjehKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjOhhhjehKubah}(h]jJah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjehKhjLhhubjV)}(hhh]ju)}(hSets input bufferh]hSets input buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjLhhhjehKubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhjhNhNubjo)}(h**Parameters** ``struct kpp_request *req`` kpp request ``struct scatterlist *input`` ptr to input scatter list ``unsigned int input_len`` size of the input scatter list **Description** Sets parameters required by generate_public_keyh](ju)}(h**Parameters**h]j{)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh](j)}(h(``struct kpp_request *req`` kpp request h](j)}(h``struct kpp_request *req``h]j)}(hjh]hstruct kpp_request *req}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]ju)}(h kpp requesth]h kpp request}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj.hKhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj.hKhjubj)}(h8``struct scatterlist *input`` ptr to input scatter list h](j)}(h``struct scatterlist *input``h]j)}(hjRh]hstruct scatterlist *input}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjLubj)}(hhh]ju)}(hptr to input scatter listh]hptr to input scatter list}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjghKhjhubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjghKhjubj)}(h:``unsigned int input_len`` size of the input scatter list h](j)}(h``unsigned int input_len``h]j)}(hjh]hunsigned int input_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]ju)}(hsize of the input scatter listh]hsize of the input scatter list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubju)}(h**Description**h]j{)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubju)}(h/Sets parameters required by generate_public_keyh]h/Sets parameters required by generate_public_key}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h#kpp_request_set_output (C function)c.kpp_request_set_outputhNtauh1hhjhhhNhNubh)}(hhh](h)}(hjvoid kpp_request_set_output (struct kpp_request *req, struct scatterlist *output, unsigned int output_len)h]h)}(hivoid kpp_request_set_output(struct kpp_request *req, struct scatterlist *output, unsigned int output_len)h](j )}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj")}(hkpp_request_set_outputh]j()}(hkpp_request_set_outputh]hkpp_request_set_output}(hj,hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj(ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hjhhhjhKubj)}(hN(struct kpp_request *req, struct scatterlist *output, unsigned int output_len)h](j)}(hstruct kpp_request *reqh](h)}(hjh]hstruct}(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjDubj)}(h h]h }(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubh)}(hhh]j()}(h kpp_requesth]h kpp_request}(hjfhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjcubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjhmodnameN classnameNjj)}j]j)}jj.sbc.kpp_request_set_outputasbuh1hhjDubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj()}(hreqh]hreq}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjDubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj@ubj)}(hstruct scatterlist *outputh](h)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j()}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetjmodnameN classnameNjj)}j]jc.kpp_request_set_outputasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj()}(houtputh]houtput}(hjhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj@ubj)}(hunsigned int output_lenh](j )}(hunsignedh]hunsigned}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj )}(hinth]hint}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj()}(h output_lenh]h output_len}(hjbhhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj&ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj@ubeh}(h]h ]h"]h$]h&]j?j@uh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhjhhhjhKubah}(h]jah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjhKhjhhubjV)}(hhh]ju)}(hSets output bufferh]hSets output buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jUhjhhhjhKubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijjjjjkjljmuh1hhhhjhNhNubjo)}(h**Parameters** ``struct kpp_request *req`` kpp request ``struct scatterlist *output`` ptr to output scatter list ``unsigned int output_len`` size of the output scatter list **Description** Sets parameters required by kpp operationh](ju)}(h**Parameters**h]j{)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh](j)}(h(``struct kpp_request *req`` kpp request h](j)}(h``struct kpp_request *req``h]j)}(hjh]hstruct kpp_request *req}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubj)}(hhh]ju)}(h kpp requesth]h kpp request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h:``struct scatterlist *output`` ptr to output scatter list h](j)}(h``struct scatterlist *output``h]j)}(hj h]hstruct scatterlist *output}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj ubj)}(hhh]ju)}(hptr to output scatter listh]hptr to output scatter list}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h<``unsigned int output_len`` size of the output scatter list h](j)}(h``unsigned int output_len``h]j)}(hj? h]hunsigned int output_len}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj= ubah}(h]h ]h"]h$]h&]uh1jhS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhj9 ubj)}(hhh]ju)}(hsize of the output scatter listh]hsize of the output scatter list}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjT hKhjU ubah}(h]h ]h"]h$]h&]uh1jhj9 ubeh}(h]h ]h"]h$]h&]uh1jhjT hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubju)}(h**Description**h]j{)}(hjz h]h Description}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjx ubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubju)}(h)Sets parameters required by kpp operationh]h)Sets parameters required by kpp operation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jthS/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:22: ./include/crypto/kpp.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhjhhhNhNubeh}(h];key-agreement-protocol-primitives-kpp-cipher-request-handleah ]h"]=key-agreement protocol primitives (kpp) cipher request handleah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hECDH Helper Functionsh]hECDH Helper Functions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubju)}(h_To use ECDH with the KPP cipher API, the following data structure and functions should be used.h]h_To use ECDH with the KPP cipher API, the following data structure and functions should be used.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:28: ./include/crypto/ecdh.hhK hj hhubju)}(hRThe ECC curves known to the ECDH implementation are specified in this header file.h]hRThe ECC curves known to the ECDH implementation are specified in this header file.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:28: ./include/crypto/ecdh.hhKhj hhubju)}(hTo use ECDH with KPP, the following functions should be used to operate on an ECDH private key. The packet private key that can be set with the KPP API function call of crypto_kpp_set_secret.h]hTo use ECDH with KPP, the following functions should be used to operate on an ECDH private key. The packet private key that can be set with the KPP API function call of crypto_kpp_set_secret.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:28: ./include/crypto/ecdh.hhKhj hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hecdh (C struct)c.ecdhhNtauh1hhj hhhNhNubh)}(hhh](h)}(hecdhh]h)}(h struct ecdhh](h)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj!hhhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj!hKubj")}(hecdhh]j()}(hj h]hecdh}(hj%!hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj!!ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj!hhhj!hKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj hhhj!hKubah}(h]j ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj!hKhj hhubjV)}(hhh]ju)}(hdefine an ECDH private keyh]hdefine an ECDH private key}(hjG!hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK hjD!hhubah}(h]h ]h"]h$]h&]uh1jUhj hhhj!hKubeh}(h]h ](jcstructeh"]h$]h&]jhjcjij_!jjj_!jkjljmuh1hhhhj hNhNubjo)}(h**Definition**:: struct ecdh { char *key; unsigned short key_size; }; **Members** ``key`` Private ECDH key ``key_size`` Size of the private ECDH keyh](ju)}(h**Definition**::h](j{)}(h**Definition**h]h Definition}(hjk!hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjg!ubh:}(hjg!hhhNhNubeh}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK$hjc!ubj)}(h#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK+hj;#hhubah}(h]h ]h"]h$]h&]uh1jUhj<"hhhjU"hK+ubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijV#jjjV#jkjljmuh1hhhhj hNhNubjo)}(hX$**Parameters** ``const struct ecdh *params`` private ECDH key **Description** This function returns the packet ECDH key size. A caller can use that with the provided ECDH private key reference to obtain the required memory size to hold a packet key. **Return** size of the key in bytesh](ju)}(h**Parameters**h]j{)}(hj`#h]h Parameters}(hjb#hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj^#ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK/hjZ#ubj)}(hhh]j)}(h/``const struct ecdh *params`` private ECDH key h](j)}(h``const struct ecdh *params``h]j)}(hj#h]hconst struct ecdh *params}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}#ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK,hjy#ubj)}(hhh]ju)}(hprivate ECDH keyh]hprivate ECDH key}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#hK,hj#ubah}(h]h ]h"]h$]h&]uh1jhjy#ubeh}(h]h ]h"]h$]h&]uh1jhj#hK,hjv#ubah}(h]h ]h"]h$]h&]uh1jhjZ#ubju)}(h**Description**h]j{)}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj#ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK.hjZ#ubju)}(hThis function returns the packet ECDH key size. A caller can use that with the provided ECDH private key reference to obtain the required memory size to hold a packet key.h]hThis function returns the packet ECDH key size. A caller can use that with the provided ECDH private key reference to obtain the required memory size to hold a packet key.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK-hjZ#ubju)}(h **Return**h]j{)}(hj#h]hReturn}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj#ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK1hjZ#ubju)}(hsize of the key in bytesh]hsize of the key in bytes}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK2hjZ#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h#crypto_ecdh_encode_key (C function)c.crypto_ecdh_encode_keyhNtauh1hhj hhhNhNubh)}(hhh](h)}(hNint crypto_ecdh_encode_key (char *buf, unsigned int len, const struct ecdh *p)h]h)}(hMint crypto_ecdh_encode_key(char *buf, unsigned int len, const struct ecdh *p)h](j )}(hinth]hint}(hj&$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"$hhhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK7ubj)}(h h]h }(hj5$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"$hhhj4$hK7ubj")}(hcrypto_ecdh_encode_keyh]j()}(hcrypto_ecdh_encode_keyh]hcrypto_ecdh_encode_key}(hjG$hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjC$ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj"$hhhj4$hK7ubj)}(h3(char *buf, unsigned int len, const struct ecdh *p)h](j)}(h char *bufh](j )}(hcharh]hchar}(hjc$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_$ubj)}(h h]h }(hjq$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_$ubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_$ubj()}(hbufh]hbuf}(hj$hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj_$ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj[$ubj)}(hunsigned int lenh](j )}(hunsignedh]hunsigned}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj )}(hinth]hint}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj()}(hlenh]hlen}(hj$hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj$ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj[$ubj)}(hconst struct ecdh *ph](h)}(hjh]hconst}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj$ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubh)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj$ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubh)}(hhh]j()}(hecdhh]hecdh}(hj/%hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj,%ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj1%modnameN classnameNjj)}j]j)}jjI$sbc.crypto_ecdh_encode_keyasbuh1hhj$ubj)}(h h]h }(hjO%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(hjh]h*}(hj]%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj()}(hjh]hp}(hjj%hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj$ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj[$ubeh}(h]h ]h"]h$]h&]j?j@uh1jhj"$hhhj4$hK7ubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj$hhhj4$hK7ubah}(h]j$ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj4$hK7hj$hhubjV)}(hhh]ju)}(hencode the private keyh]hencode the private key}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK7hj%hhubah}(h]h ]h"]h$]h&]uh1jUhj$hhhj4$hK7ubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjij%jjj%jkjljmuh1hhhhj hNhNubjo)}(hX**Parameters** ``char *buf`` Buffer allocated by the caller to hold the packet ECDH private key. The buffer should be at least crypto_ecdh_key_len bytes in size. ``unsigned int len`` Length of the packet private key buffer ``const struct ecdh *p`` Buffer with the caller-specified private key **Description** The ECDH implementations operate on a packet representation of the private key. **Return** -EINVAL if buffer has insufficient size, 0 on successh](ju)}(h**Parameters**h]j{)}(hj%h]h Parameters}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj%ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK;hj%ubj)}(hhh](j)}(h``char *buf`` Buffer allocated by the caller to hold the packet ECDH private key. The buffer should be at least crypto_ecdh_key_len bytes in size. h](j)}(h ``char *buf``h]j)}(hj%h]h char *buf}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK:hj%ubj)}(hhh]ju)}(hBuffer allocated by the caller to hold the packet ECDH private key. The buffer should be at least crypto_ecdh_key_len bytes in size.h]hBuffer allocated by the caller to hold the packet ECDH private key. The buffer should be at least crypto_ecdh_key_len bytes in size.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK8hj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%hK:hj%ubj)}(h=``unsigned int len`` Length of the packet private key buffer h](j)}(h``unsigned int len``h]j)}(hj&h]hunsigned int len}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj &ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK;hj&ubj)}(hhh]ju)}(h'Length of the packet private key bufferh]h'Length of the packet private key buffer}(hj'&hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#&hK;hj$&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj#&hK;hj%ubj)}(hF``const struct ecdh *p`` Buffer with the caller-specified private key h](j)}(h``const struct ecdh *p``h]j)}(hjG&h]hconst struct ecdh *p}(hjI&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE&ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKhj%ubju)}(hOThe ECDH implementations operate on a packet representation of the private key.h]hOThe ECDH implementations operate on a packet representation of the private key.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK=hj%ubju)}(h **Return**h]j{)}(hj&h]hReturn}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj&ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhK@hj%ubju)}(h5-EINVAL if buffer has insufficient size, 0 on successh]h5-EINVAL if buffer has insufficient size, 0 on success}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKAhj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h#crypto_ecdh_decode_key (C function)c.crypto_ecdh_decode_keyhNtauh1hhj hhhNhNubh)}(hhh](h)}(hNint crypto_ecdh_decode_key (const char *buf, unsigned int len, struct ecdh *p)h]h)}(hMint crypto_ecdh_decode_key(const char *buf, unsigned int len, struct ecdh *p)h](j )}(hinth]hint}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&hhhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKFubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhj&hKFubj")}(hcrypto_ecdh_decode_keyh]j()}(hcrypto_ecdh_decode_keyh]hcrypto_ecdh_decode_key}(hj'hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj 'ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj&hhhj&hKFubj)}(h3(const char *buf, unsigned int len, struct ecdh *p)h](j)}(hconst char *bufh](h)}(hjh]hconst}(hj+'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj''ubj)}(h h]h }(hj8'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj''ubj )}(hcharh]hchar}(hjF'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj''ubj)}(h h]h }(hjT'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj''ubj)}(hjh]h*}(hjb'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj''ubj()}(hbufh]hbuf}(hjo'hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj''ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj#'ubj)}(hunsigned int lenh](j )}(hunsignedh]hunsigned}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj )}(hinth]hint}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj()}(hlenh]hlen}(hj'hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj'ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj#'ubj)}(hstruct ecdh *ph](h)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubh)}(hhh]j()}(hecdhh]hecdh}(hj'hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj'ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj'modnameN classnameNjj)}j]j)}jj'sbc.crypto_ecdh_decode_keyasbuh1hhj'ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(hjh]h*}(hj%(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj()}(hjh]hp}(hj2(hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj'ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj#'ubeh}(h]h ]h"]h$]h&]j?j@uh1jhj&hhhj&hKFubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj&hhhj&hKFubah}(h]j&ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj&hKFhj&hhubjV)}(hhh]ju)}(hdecode a private keyh]hdecode a private key}(hj[(hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKFhjX(hhubah}(h]h ]h"]h$]h&]uh1jUhj&hhhj&hKFubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijs(jjjs(jkjljmuh1hhhhj hNhNubjo)}(hX**Parameters** ``const char *buf`` Buffer holding a packet key that should be decoded ``unsigned int len`` Length of the packet private key buffer ``struct ecdh *p`` Buffer allocated by the caller that is filled with the unpacked ECDH private key. **Description** The unpacking obtains the private key by pointing **p** to the correct location in **buf**. Thus, both pointers refer to the same memory. **Return** -EINVAL if buffer has insufficient size, 0 on successh](ju)}(h**Parameters**h]j{)}(hj}(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj{(ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKJhjw(ubj)}(hhh](j)}(hG``const char *buf`` Buffer holding a packet key that should be decoded h](j)}(h``const char *buf``h]j)}(hj(h]hconst char *buf}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKGhj(ubj)}(hhh]ju)}(h2Buffer holding a packet key that should be decodedh]h2Buffer holding a packet key that should be decoded}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj(hKGhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKGhj(ubj)}(h=``unsigned int len`` Length of the packet private key buffer h](j)}(h``unsigned int len``h]j)}(hj(h]hunsigned int len}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKHhj(ubj)}(hhh]ju)}(h'Length of the packet private key bufferh]h'Length of the packet private key buffer}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj(hKHhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hKHhj(ubj)}(he``struct ecdh *p`` Buffer allocated by the caller that is filled with the unpacked ECDH private key. h](j)}(h``struct ecdh *p``h]j)}(hj)h]hstruct ecdh *p}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj )ubah}(h]h ]h"]h$]h&]uh1jhT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKJhj)ubj)}(hhh]ju)}(hQBuffer allocated by the caller that is filled with the unpacked ECDH private key.h]hQBuffer allocated by the caller that is filled with the unpacked ECDH private key.}(hj')hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKIhj$)ubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhj#)hKJhj(ubeh}(h]h ]h"]h$]h&]uh1jhjw(ubju)}(h**Description**h]j{)}(hjJ)h]h Description}(hjL)hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjH)ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKLhjw(ubju)}(hThe unpacking obtains the private key by pointing **p** to the correct location in **buf**. Thus, both pointers refer to the same memory.h](h2The unpacking obtains the private key by pointing }(hj`)hhhNhNubj{)}(h**p**h]hp}(hjh)hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj`)ubh to the correct location in }(hj`)hhhNhNubj{)}(h**buf**h]hbuf}(hjz)hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj`)ubh/. Thus, both pointers refer to the same memory.}(hj`)hhhNhNubeh}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKKhjw(ubju)}(h **Return**h]j{)}(hj)h]hReturn}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj)ubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKNhjw(ubju)}(h5-EINVAL if buffer has insufficient size, 0 on successh]h5-EINVAL if buffer has insufficient size, 0 on success}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jthT/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:31: ./include/crypto/ecdh.hhKOhjw(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj hhhNhNubeh}(h]ecdh-helper-functionsah ]h"]ecdh helper functionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDH Helper Functionsh]hDH Helper Functions}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhK#ubju)}(h]To use DH with the KPP cipher API, the following data structure and functions should be used.h]h]To use DH with the KPP cipher API, the following data structure and functions should be used.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jthy~R/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:37: ./include/crypto/dh.hhK hj)hhubju)}(hTo use DH with KPP, the following functions should be used to operate on a DH private key. The packet private key that can be set with the KPP API function call of crypto_kpp_set_secret.h]hTo use DH with KPP, the following functions should be used to operate on a DH private key. The packet private key that can be set with the KPP API function call of crypto_kpp_set_secret.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:37: ./include/crypto/dh.hhKhj)hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h dh (C struct)c.dhhNtauh1hhj)hhhNhNubh)}(hhh](h)}(hdhh]h)}(h struct dhh](h)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj *hhhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj *hhhj*hKubj")}(hdhh]j()}(hj *h]hdh}(hj1*hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj-*ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj *hhhj*hKubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj *hhhj*hKubah}(h]j*ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj*hKhj*hhubjV)}(hhh]ju)}(hdefine a DH private keyh]hdefine a DH private key}(hjS*hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhjP*hhubah}(h]h ]h"]h$]h&]uh1jUhj*hhhj*hKubeh}(h]h ](jcstructeh"]h$]h&]jhjcjijk*jjjk*jkjljmuh1hhhhj)hNhNubjo)}(hX**Definition**:: struct dh { const void *key; const void *p; const void *g; unsigned int key_size; unsigned int p_size; unsigned int g_size; }; **Members** ``key`` Private DH key ``p`` Diffie-Hellman parameter P ``g`` Diffie-Hellman generator G ``key_size`` Size of the private DH key ``p_size`` Size of DH parameter P ``g_size`` Size of DH generator Gh](ju)}(h**Definition**::h](j{)}(h**Definition**h]h Definition}(hjw*hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjs*ubh:}(hjs*hhhNhNubeh}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhjo*ubj)}(hstruct dh { const void *key; const void *p; const void *g; unsigned int key_size; unsigned int p_size; unsigned int g_size; };h]hstruct dh { const void *key; const void *p; const void *g; unsigned int key_size; unsigned int p_size; unsigned int g_size; };}hj*sbah}(h]h ]h"]h$]h&]j?j@uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhjo*ubju)}(h **Members**h]j{)}(hj*h]hMembers}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj*ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK&hjo*ubj)}(hhh](j)}(h``key`` Private DH key h](j)}(h``key``h]j)}(hj*h]hkey}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhj*ubj)}(hhh]ju)}(hPrivate DH keyh]hPrivate DH key}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj*hKhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hKhj*ubj)}(h!``p`` Diffie-Hellman parameter P h](j)}(h``p``h]j)}(hj*h]hp}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhj*ubj)}(hhh]ju)}(hDiffie-Hellman parameter Ph]hDiffie-Hellman parameter P}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj+hKhj+ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj+hKhj*ubj)}(h!``g`` Diffie-Hellman generator G h](j)}(h``g``h]j)}(hj2+h]hg}(hj4+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0+ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhj,+ubj)}(hhh]ju)}(hDiffie-Hellman generator Gh]hDiffie-Hellman generator G}(hjK+hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjG+hKhjH+ubah}(h]h ]h"]h$]h&]uh1jhj,+ubeh}(h]h ]h"]h$]h&]uh1jhjG+hKhj*ubj)}(h(``key_size`` Size of the private DH key h](j)}(h ``key_size``h]j)}(hjk+h]hkey_size}(hjm+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhji+ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhje+ubj)}(hhh]ju)}(hSize of the private DH keyh]hSize of the private DH key}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj+hKhj+ubah}(h]h ]h"]h$]h&]uh1jhje+ubeh}(h]h ]h"]h$]h&]uh1jhj+hKhj*ubj)}(h"``p_size`` Size of DH parameter P h](j)}(h ``p_size``h]j)}(hj+h]hp_size}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhj+ubj)}(hhh]ju)}(hSize of DH parameter Ph]hSize of DH parameter P}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj+hKhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hKhj*ubj)}(h!``g_size`` Size of DH generator Gh](j)}(h ``g_size``h]j)}(hj+h]hg_size}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhj+ubj)}(hhh]ju)}(hSize of DH generator Gh]hSize of DH generator G}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hKhj*ubeh}(h]h ]h"]h$]h&]uh1jhjo*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj)hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hcrypto_dh_key_len (C function)c.crypto_dh_key_lenhNtauh1hhj)hhhNhNubh)}(hhh](h)}(h8unsigned int crypto_dh_key_len (const struct dh *params)h]h)}(h7unsigned int crypto_dh_key_len(const struct dh *params)h](j )}(hunsignedh]hunsigned}(hj7,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3,hhhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK*ubj)}(h h]h }(hjF,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3,hhhjE,hK*ubj )}(hinth]hint}(hjT,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3,hhhjE,hK*ubj)}(h h]h }(hjb,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3,hhhjE,hK*ubj")}(hcrypto_dh_key_lenh]j()}(hcrypto_dh_key_lenh]hcrypto_dh_key_len}(hjt,hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjp,ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj3,hhhjE,hK*ubj)}(h(const struct dh *params)h]j)}(hconst struct dh *paramsh](h)}(hjh]hconst}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubh)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubh)}(hhh]j()}(hdhh]hdh}(hj,hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj,ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj,modnameN classnameNjj)}j]j)}jjv,sbc.crypto_dh_key_lenasbuh1hhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(hjh]h*}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj()}(hparamsh]hparams}(hj-hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj,ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhj,ubah}(h]h ]h"]h$]h&]j?j@uh1jhj3,hhhjE,hK*ubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj/,hhhjE,hK*ubah}(h]j*,ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhjE,hK*hj,,hhubjV)}(hhh]ju)}(h%Obtain the size of the private DH keyh]h%Obtain the size of the private DH key}(hj.-hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK*hj+-hhubah}(h]h ]h"]h$]h&]uh1jUhj,,hhhjE,hK*ubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjijF-jjjF-jkjljmuh1hhhhj)hNhNubjo)}(hX**Parameters** ``const struct dh *params`` private DH key **Description** This function returns the packet DH key size. A caller can use that with the provided DH private key reference to obtain the required memory size to hold a packet key. **Return** size of the key in bytesh](ju)}(h**Parameters**h]j{)}(hjP-h]h Parameters}(hjR-hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjN-ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK.hjJ-ubj)}(hhh]j)}(h+``const struct dh *params`` private DH key h](j)}(h``const struct dh *params``h]j)}(hjo-h]hconst struct dh *params}(hjq-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm-ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK+hji-ubj)}(hhh]ju)}(hprivate DH keyh]hprivate DH key}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj-hK+hj-ubah}(h]h ]h"]h$]h&]uh1jhji-ubeh}(h]h ]h"]h$]h&]uh1jhj-hK+hjf-ubah}(h]h ]h"]h$]h&]uh1jhjJ-ubju)}(h**Description**h]j{)}(hj-h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj-ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK-hjJ-ubju)}(hThis function returns the packet DH key size. A caller can use that with the provided DH private key reference to obtain the required memory size to hold a packet key.h]hThis function returns the packet DH key size. A caller can use that with the provided DH private key reference to obtain the required memory size to hold a packet key.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK,hjJ-ubju)}(h **Return**h]j{)}(hj-h]hReturn}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj-ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK0hjJ-ubju)}(hsize of the key in bytesh]hsize of the key in bytes}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK1hjJ-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj)hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h!crypto_dh_encode_key (C function)c.crypto_dh_encode_keyhNtauh1hhj)hhhNhNubh)}(hhh](h)}(hOint crypto_dh_encode_key (char *buf, unsigned int len, const struct dh *params)h]h)}(hNint crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params)h](j )}(hinth]hint}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK6ubj)}(h h]h }(hj%.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj$.hK6ubj")}(hcrypto_dh_encode_keyh]j()}(hcrypto_dh_encode_keyh]hcrypto_dh_encode_key}(hj7.hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj3.ubah}(h]h ](j:j;eh"]h$]h&]j?j@uh1j!hj.hhhj$.hK6ubj)}(h6(char *buf, unsigned int len, const struct dh *params)h](j)}(h char *bufh](j )}(hcharh]hchar}(hjS.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjO.ubj)}(h h]h }(hja.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO.ubj)}(hjh]h*}(hjo.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO.ubj()}(hbufh]hbuf}(hj|.hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hjO.ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjK.ubj)}(hunsigned int lenh](j )}(hunsignedh]hunsigned}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj )}(hinth]hint}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj()}(hlenh]hlen}(hj.hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj.ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjK.ubj)}(hconst struct dh *paramsh](h)}(hjh]hconst}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubh)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj.ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubh)}(hhh]j()}(hdhh]hdh}(hj/hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj/ubah}(h]h ]h"]h$]h&] refdomainjcreftypej reftargetj!/modnameN classnameNjj)}j]j)}jj9.sbc.crypto_dh_encode_keyasbuh1hhj.ubj)}(h h]h }(hj?/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(hjh]h*}(hjM/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj()}(hparamsh]hparams}(hjZ/hhhNhNubah}(h]h ]j3ah"]h$]h&]uh1j'hj.ubeh}(h]h ]h"]h$]h&]noemphj?j@uh1jhjK.ubeh}(h]h ]h"]h$]h&]j?j@uh1jhj.hhhj$.hK6ubeh}(h]h ]h"]h$]h&]j?j@jGuh1hjHjIhj.hhhj$.hK6ubah}(h]j .ah ](jMjNeh"]h$]h&]jRjS)jThuh1hhj$.hK6hj .hhubjV)}(hhh]ju)}(hencode the private keyh]hencode the private key}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK6hj/hhubah}(h]h ]h"]h$]h&]uh1jUhj .hhhj$.hK6ubeh}(h]h ](jcfunctioneh"]h$]h&]jhjcjij/jjj/jkjljmuh1hhhhj)hNhNubjo)}(hX**Parameters** ``char *buf`` Buffer allocated by the caller to hold the packet DH private key. The buffer should be at least crypto_dh_key_len bytes in size. ``unsigned int len`` Length of the packet private key buffer ``const struct dh *params`` Buffer with the caller-specified private key **Description** The DH implementations operate on a packet representation of the private key. **Return** -EINVAL if buffer has insufficient size, 0 on successh](ju)}(h**Parameters**h]j{)}(hj/h]h Parameters}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj/ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK:hj/ubj)}(hhh](j)}(h``char *buf`` Buffer allocated by the caller to hold the packet DH private key. The buffer should be at least crypto_dh_key_len bytes in size. h](j)}(h ``char *buf``h]j)}(hj/h]h char *buf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK9hj/ubj)}(hhh]ju)}(hBuffer allocated by the caller to hold the packet DH private key. The buffer should be at least crypto_dh_key_len bytes in size.h]hBuffer allocated by the caller to hold the packet DH private key. The buffer should be at least crypto_dh_key_len bytes in size.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK7hj/ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhj/hK9hj/ubj)}(h=``unsigned int len`` Length of the packet private key buffer h](j)}(h``unsigned int len``h]j)}(hj/h]hunsigned int len}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK:hj/ubj)}(hhh]ju)}(h'Length of the packet private key bufferh]h'Length of the packet private key buffer}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj0hK:hj0ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhj0hK:hj/ubj)}(hI``const struct dh *params`` Buffer with the caller-specified private key h](j)}(h``const struct dh *params``h]j)}(hj80h]hconst struct dh *params}(hj:0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj60ubah}(h]h ]h"]h$]h&]uh1jhR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK;hj20ubj)}(hhh]ju)}(h,Buffer with the caller-specified private keyh]h,Buffer with the caller-specified private key}(hjQ0hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjM0hK;hjN0ubah}(h]h ]h"]h$]h&]uh1jhj20ubeh}(h]h ]h"]h$]h&]uh1jhjM0hK;hj/ubeh}(h]h ]h"]h$]h&]uh1jhj/ubju)}(h**Description**h]j{)}(hjs0h]h Description}(hju0hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjq0ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK=hj/ubju)}(hMThe DH implementations operate on a packet representation of the private key.h]hMThe DH implementations operate on a packet representation of the private key.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhK3hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj:3ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKKhji2ubju)}(hThe unpacking obtains the private key by pointing **p** to the correct location in **buf**. Thus, both pointers refer to the same memory.h](h2The unpacking obtains the private key by pointing }(hjR3hhhNhNubj{)}(h**p**h]hp}(hjZ3hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjR3ubh to the correct location in }(hjR3hhhNhNubj{)}(h**buf**h]hbuf}(hjl3hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjR3ubh/. Thus, both pointers refer to the same memory.}(hjR3hhhNhNubeh}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKJhji2ubju)}(h **Return**h]j{)}(hj3h]hReturn}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhj3ubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKMhji2ubju)}(h5-EINVAL if buffer has insufficient size, 0 on successh]h5-EINVAL if buffer has insufficient size, 0 on success}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jthR/var/lib/git/docbuild/linux/Documentation/crypto/api-kpp:40: ./include/crypto/dh.hhKNhji2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jnhj)hhhNhNubeh}(h]dh-helper-functionsah ]h"]dh helper functionsah$]h&]uh1hhhhhhhhK#ubeh}(h]%key-agreement-protocol-primitives-kppah ]h"]'key-agreement protocol primitives (kpp)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj3error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j3j3j.j+jjj j j)j)j3j3u nametypes}(j3j.jj j)j3uh}(j3hj+hhhj<jAjjjjjj1j]jbjC jH j j jjjVj[jjj jjjjjjLjQjJjOjjj)j j j j:"j?"j$j$j&j&j3j)j*j *j*,j/,j .j.j0j0u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.