sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget0/translations/zh_CN/crypto/libcrypto-blockciphermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/zh_TW/crypto/libcrypto-blockciphermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/it_IT/crypto/libcrypto-blockciphermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ja_JP/crypto/libcrypto-blockciphermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ko_KR/crypto/libcrypto-blockciphermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/pt_BR/crypto/libcrypto-blockciphermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/sp_SP/crypto/libcrypto-blockciphermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h)SPDX-License-Identifier: GPL-2.0-or-laterh]h)SPDX-License-Identifier: GPL-2.0-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhJ/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher.rsthKubhsection)}(hhh](htitle)}(h Block ciphersh]h Block ciphers}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hAESh]hAES}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h!Support for the AES block cipher.h]h!Support for the AES block cipher.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleaes_enckey (C struct) c.aes_enckeyhNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(h aes_enckeyh]hdesc_signature_line)}(hstruct aes_enckeyh](hdesc_sig_keyword)}(hstructh]hstruct}(hj"hhhNhNubah}(h]h ]kah"]h$]h&]uh1j hjhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKubhdesc_sig_space)}(h h]h }(hj4hhhNhNubah}(h]h ]wah"]h$]h&]uh1j2hjhhhj1hKubh desc_name)}(h aes_enckeyh]h desc_sig_name)}(hjh]h aes_enckey}(hjKhhhNhNubah}(h]h ]nah"]h$]h&]uh1jIhjEubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jChjhhhj1hKubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhj1hKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj1hKhjhhubh desc_content)}(hhh]h)}(h"An AES key prepared for encryptionh]h"An AES key prepared for encryption}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKIhjwhhubah}(h]h ]h"]h$]h&]uh1juhjhhhj1hKubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhhhNhNubh container)}(hX**Definition**:: struct aes_enckey { u32 len; u32 nrounds; u32 padding[2]; union aes_enckey_arch k; }; **Members** ``len`` Key length in bytes: 16 for AES-128, 24 for AES-192, 32 for AES-256. ``nrounds`` Number of rounds: 10 for AES-128, 12 for AES-192, 14 for AES-256. This is '6 + **len** / 4' and is cached so that AES implementations that need it don't have to recompute it for each en/decryption. ``padding`` Padding to make offsetof(**k**) be a multiple of 16, so that aligning this struct to a 16-byte boundary results in **k** also being 16-byte aligned. Users aren't required to align this struct to 16 bytes, but it may slightly improve performance. ``k`` This typically contains the AES round keys as an array of '**nrounds** + 1' groups of four u32 words. However, architecture-specific implementations of AES may store something else here, e.g. just the raw key if it's all they need.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKMhjubh literal_block)}(hestruct aes_enckey { u32 len; u32 nrounds; u32 padding[2]; union aes_enckey_arch k; };h]hestruct aes_enckey { u32 len; u32 nrounds; u32 padding[2]; union aes_enckey_arch k; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKOhjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKVhjubhdefinition_list)}(hhh](hdefinition_list_item)}(hM``len`` Key length in bytes: 16 for AES-128, 24 for AES-192, 32 for AES-256. h](hterm)}(h``len``h]hliteral)}(hjh]hlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKKhjubh definition)}(hhh]h)}(hDKey length in bytes: 16 for AES-128, 24 for AES-192, 32 for AES-256.h]hDKey length in bytes: 16 for AES-128, 24 for AES-192, 32 for AES-256.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKKhjubj)}(h``nrounds`` Number of rounds: 10 for AES-128, 12 for AES-192, 14 for AES-256. This is '6 + **len** / 4' and is cached so that AES implementations that need it don't have to recompute it for each en/decryption. h](j)}(h ``nrounds``h]j)}(hj7h]hnrounds}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKNhj1ubj)}(hhh]h)}(hNumber of rounds: 10 for AES-128, 12 for AES-192, 14 for AES-256. This is '6 + **len** / 4' and is cached so that AES implementations that need it don't have to recompute it for each en/decryption.h](hQNumber of rounds: 10 for AES-128, 12 for AES-192, 14 for AES-256. This is ‘6 + }(hjPhhhNhNubj)}(h**len**h]hlen}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubhs / 4’ and is cached so that AES implementations that need it don’t have to recompute it for each en/decryption.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKLhjMubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhjLhKNhjubj)}(hX``padding`` Padding to make offsetof(**k**) be a multiple of 16, so that aligning this struct to a 16-byte boundary results in **k** also being 16-byte aligned. Users aren't required to align this struct to 16 bytes, but it may slightly improve performance. h](j)}(h ``padding``h]j)}(hjh]hpadding}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKRhj}ubj)}(hhh]h)}(hPadding to make offsetof(**k**) be a multiple of 16, so that aligning this struct to a 16-byte boundary results in **k** also being 16-byte aligned. Users aren't required to align this struct to 16 bytes, but it may slightly improve performance.h](hPadding to make offsetof(}(hjhhhNhNubj)}(h**k**h]hk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhU) be a multiple of 16, so that aligning this struct to a 16-byte boundary results in }(hjhhhNhNubj)}(h**k**h]hk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh also being 16-byte aligned. Users aren’t required to align this struct to 16 bytes, but it may slightly improve performance.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKOhjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1jhjhKRhjubj)}(h``k`` This typically contains the AES round keys as an array of '**nrounds** + 1' groups of four u32 words. However, architecture-specific implementations of AES may store something else here, e.g. just the raw key if it's all they need.h](j)}(h``k``h]j)}(hjh]hk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKUhjubj)}(hhh]h)}(hThis typically contains the AES round keys as an array of '**nrounds** + 1' groups of four u32 words. However, architecture-specific implementations of AES may store something else here, e.g. just the raw key if it's all they need.h](h=This typically contains the AES round keys as an array of ‘}(hjhhhNhNubj)}(h **nrounds**h]hnrounds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh + 1’ groups of four u32 words. However, architecture-specific implementations of AES may store something else here, e.g. just the raw key if it’s all they need.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKUhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(h**Description**h]j)}(hj6h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKYhhhhubh)}(hX%Note that this struct is about half the size of struct aes_key. This is separate from struct aes_key so that modes that need only AES encryption (e.g. AES-GCM, AES-CTR, AES-CMAC, tweak key in AES-XTS) don't incur the time and space overhead of computing and caching the decryption round keys.h]hX'Note that this struct is about half the size of struct aes_key. This is separate from struct aes_key so that modes that need only AES encryption (e.g. AES-GCM, AES-CTR, AES-CMAC, tweak key in AES-XTS) don’t incur the time and space overhead of computing and caching the decryption round keys.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKVhhhhubh)}(hX0Note that there's no decryption-only equivalent (i.e. "struct aes_deckey"), since (a) it's rare that modes need decryption-only, and (b) some AES implementations use the same **k** for both encryption and decryption, either always or conditionally; in the latter case both **k** and **inv_k** are needed.h](hNote that there’s no decryption-only equivalent (i.e. “struct aes_deckey”), since (a) it’s rare that modes need decryption-only, and (b) some AES implementations use the same }(hj[hhhNhNubj)}(h**k**h]hk}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh] for both encryption and decryption, either always or conditionally; in the latter case both }(hj[hhhNhNubj)}(h**k**h]hk}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh and }(hj[hhhNhNubj)}(h **inv_k**h]hinv_k}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubh are needed.}(hj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhK[hhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j aes_key (C struct) c.aes_keyhNtauh1hhhhhhNhNubj)}(hhh](j)}(haes_keyh]j)}(hstruct aes_keyh](j!)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKcubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjhhhjhKcubjD)}(haes_keyh]jJ)}(hjh]haes_key}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjhhhjhKcubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihjhhhjhKcubah}(h]jah ](jmjneh"]h$]h&]jrjs)jthuh1jhjhKchjhhubjv)}(hhh]h)}(h1An AES key prepared for encryption and decryptionh]h1An AES key prepared for encryption and decryption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKihjhhubah}(h]h ]h"]h$]h&]uh1juhjhhhjhKcubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jhhhhhNhNubj)}(hX**Definition**:: struct aes_key { struct aes_enckey; union aes_invkey_arch inv_k; }; **Members** ``aes_enckey`` Common fields and the key prepared for encryption ``inv_k`` This generally contains the round keys for the AES Equivalent Inverse Cipher, as an array of '**nrounds** + 1' groups of four u32 words. However, architecture-specific implementations of AES may store something else here. For example, they may leave this field uninitialized if they use **k** for both encryption and decryption.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKmhjubj)}(hKstruct aes_key { struct aes_enckey; union aes_invkey_arch inv_k; };h]hKstruct aes_key { struct aes_enckey; union aes_invkey_arch inv_k; };}hj8sbah}(h]h ]h"]h$]h&]hhuh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKohjubh)}(h **Members**h]j)}(hjIh]hMembers}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKthjubj)}(hhh](j)}(hA``aes_enckey`` Common fields and the key prepared for encryption h](j)}(h``aes_enckey``h]j)}(hjhh]h aes_enckey}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKkhjbubj)}(hhh]h)}(h1Common fields and the key prepared for encryptionh]h1Common fields and the key prepared for encryption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hKkhj~ubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1jhj}hKkhj_ubj)}(hXT``inv_k`` This generally contains the round keys for the AES Equivalent Inverse Cipher, as an array of '**nrounds** + 1' groups of four u32 words. However, architecture-specific implementations of AES may store something else here. For example, they may leave this field uninitialized if they use **k** for both encryption and decryption.h](j)}(h ``inv_k``h]j)}(hjh]hinv_k}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKohjubj)}(hhh]h)}(hXJThis generally contains the round keys for the AES Equivalent Inverse Cipher, as an array of '**nrounds** + 1' groups of four u32 words. However, architecture-specific implementations of AES may store something else here. For example, they may leave this field uninitialized if they use **k** for both encryption and decryption.h](h`This generally contains the round keys for the AES Equivalent Inverse Cipher, as an array of ‘}(hjhhhNhNubj)}(h **nrounds**h]hnrounds}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh + 1’ groups of four u32 words. However, architecture-specific implementations of AES may store something else here. For example, they may leave this field uninitialized if they use }(hjhhhNhNubj)}(h**k**h]hk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$ for both encryption and decryption.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKlhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKohj_ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j aes_expandkey (C function)c.aes_expandkeyhNtauh1hhhhhhNhNubj)}(hhh](j)}(hVint aes_expandkey (struct crypto_aes_ctx *ctx, const u8 *in_key, unsigned int key_len)h]j)}(hUint aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, unsigned int key_len)h](hdesc_sig_keyword_type)}(hinth]hint}(hj!hhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKubj3)}(h h]h }(hj1hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjhhhj0hKubjD)}(h aes_expandkeyh]jJ)}(h aes_expandkeyh]h aes_expandkey}(hjChhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj?ubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjhhhj0hKubhdesc_parameterlist)}(hD(struct crypto_aes_ctx *ctx, const u8 *in_key, unsigned int key_len)h](hdesc_parameter)}(hstruct crypto_aes_ctx *ctxh](j!)}(hj$h]hstruct}(hjchhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj_ubj3)}(h h]h }(hjphhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj_ubh)}(hhh]jJ)}(hcrypto_aes_ctxh]hcrypto_aes_ctx}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj~ubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjEsbc.aes_expandkeyasbuh1hhj_ubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj_ubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj_ubjJ)}(hctxh]hctx}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjYubj^)}(hconst u8 *in_keyh](j!)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.aes_expandkeyasbuh1hhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubj)}(hjh]h*}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hin_keyh]hin_key}(hj9hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjYubj^)}(hunsigned int key_lenh](j )}(hunsignedh]hunsigned}(hjRhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjNubj3)}(h h]h }(hj`hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjNubj )}(hinth]hint}(hjnhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjNubj3)}(h h]h }(hj|hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjNubjJ)}(hkey_lenh]hkey_len}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjNubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjYubeh}(h]h ]h"]h$]h&]hhuh1jWhjhhhj0hKubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihjhhhj0hKubah}(h]jah ](jmjneh"]h$]h&]jrjs)jthuh1jhj0hKhjhhubjv)}(hhh]h)}(h,Expands the AES key as described in FIPS-197h]h,Expands the AES key as described in FIPS-197}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhjhhubah}(h]h ]h"]h$]h&]uh1juhjhhhj0hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhhhNhNubj)}(hX**Parameters** ``struct crypto_aes_ctx *ctx`` The location where the computed key will be stored. ``const u8 *in_key`` The supplied key. ``unsigned int key_len`` The length of the supplied key. **Description** Returns 0 on success. The function fails only if an invalid key size (or pointer) is supplied. The expanded key size is 240 bytes (max of 14 rounds with a unique 16 bytes key schedule plus a 16 bytes key which is used before the first round). The decryption key is prepared for the "Equivalent Inverse Cipher" as described in FIPS-197. The first slot (16 bytes) of each key (enc or dec) is for the initial combination, the second slot for the first round and so on.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhjubj)}(hhh](j)}(hS``struct crypto_aes_ctx *ctx`` The location where the computed key will be stored. h](j)}(h``struct crypto_aes_ctx *ctx``h]j)}(hjh]hstruct crypto_aes_ctx *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhjubj)}(hhh]h)}(h3The location where the computed key will be stored.h]h3The location where the computed key will be stored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h'``const u8 *in_key`` The supplied key. h](j)}(h``const u8 *in_key``h]j)}(hj.h]hconst u8 *in_key}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhj(ubj)}(hhh]h)}(hThe supplied key.h]hThe supplied key.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChKhjDubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhjChKhjubj)}(h9``unsigned int key_len`` The length of the supplied key. h](j)}(h``unsigned int key_len``h]j)}(hjgh]hunsigned int key_len}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhjaubj)}(hhh]h)}(hThe length of the supplied key.h]hThe length of the supplied key.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hKhj}ubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhj|hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhjubh)}(hXReturns 0 on success. The function fails only if an invalid key size (or pointer) is supplied. The expanded key size is 240 bytes (max of 14 rounds with a unique 16 bytes key schedule plus a 16 bytes key which is used before the first round). The decryption key is prepared for the "Equivalent Inverse Cipher" as described in FIPS-197. The first slot (16 bytes) of each key (enc or dec) is for the initial combination, the second slot for the first round and so on.h]hXReturns 0 on success. The function fails only if an invalid key size (or pointer) is supplied. The expanded key size is 240 bytes (max of 14 rounds with a unique 16 bytes key schedule plus a 16 bytes key which is used before the first round). The decryption key is prepared for the “Equivalent Inverse Cipher” as described in FIPS-197. The first slot (16 bytes) of each key (enc or dec) is for the initial combination, the second slot for the first round and so on.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j aes_preparekey (C function)c.aes_preparekeyhNtauh1hhhhhhNhNubj)}(hhh](j)}(hJint aes_preparekey (struct aes_key *key, const u8 *in_key, size_t key_len)h]j)}(hIint aes_preparekey(struct aes_key *key, const u8 *in_key, size_t key_len)h](j )}(hinth]hint}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM9ubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjhhhjhM9ubjD)}(haes_preparekeyh]jJ)}(haes_preparekeyh]haes_preparekey}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjhhhjhM9ubjX)}(h7(struct aes_key *key, const u8 *in_key, size_t key_len)h](j^)}(hstruct aes_key *keyh](j!)}(hj$h]hstruct}(hj$hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubj3)}(h h]h }(hj1hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj ubh)}(hhh]jJ)}(haes_keyh]haes_key}(hjBhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj?ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjDmodnameN classnameNjj)}j]j)}jj sbc.aes_preparekeyasbuh1hhj ubj3)}(h h]h }(hjbhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj ubj)}(hjh]h*}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjJ)}(hkeyh]hkey}(hj}hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubj^)}(hconst u8 *in_keyh](j!)}(hjh]hconst}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j^c.aes_preparekeyasbuh1hhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hin_keyh]hin_key}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubj^)}(hsize_t key_lenh](h)}(hhh]jJ)}(hsize_th]hsize_t}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j^c.aes_preparekeyasbuh1hhj ubj3)}(h h]h }(hj' hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj ubjJ)}(hkey_lenh]hkey_len}(hj5 hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubeh}(h]h ]h"]h$]h&]hhuh1jWhjhhhjhM9ubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihjhhhjhM9ubah}(h]jah ](jmjneh"]h$]h&]jrjs)jthuh1jhjhM9hjhhubjv)}(hhh]h)}(h0Prepare an AES key for encryption and decryptionh]h0Prepare an AES key for encryption and decryption}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM9hj\ hhubah}(h]h ]h"]h$]h&]uh1juhjhhhjhM9ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjw jjw jjjuh1jhhhhhNhNubj)}(hX**Parameters** ``struct aes_key *key`` (output) The key structure to initialize ``const u8 *in_key`` The raw AES key ``size_t key_len`` Length of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256. **Description** This prepares an AES key for both the encryption and decryption directions of the block cipher. Typically this involves expanding the raw key into both the standard round keys and the Equivalent Inverse Cipher round keys, but some architecture-specific implementations don't do the full expansion here. The caller is responsible for zeroizing both the struct aes_key and the raw key once they are no longer needed. If you don't need decryption support, use aes_prepareenckey() instead. **Return** 0 on success or -EINVAL if the given key length is invalid. No other errors are possible, so callers that always pass a valid key length don't need to check for errors. **Context** Any context.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM=hj{ ubj)}(hhh](j)}(hA``struct aes_key *key`` (output) The key structure to initialize h](j)}(h``struct aes_key *key``h]j)}(hj h]hstruct aes_key *key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM:hj ubj)}(hhh]h)}(h((output) The key structure to initializeh]h((output) The key structure to initialize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM:hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hM:hj ubj)}(h%``const u8 *in_key`` The raw AES key h](j)}(h``const u8 *in_key``h]j)}(hj h]hconst u8 *in_key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM;hj ubj)}(hhh]h)}(hThe raw AES keyh]hThe raw AES key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM;hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hM;hj ubj)}(h{``size_t key_len`` Length of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256. h](j)}(h``size_t key_len``h]j)}(hj h]hsize_t key_len}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM=hj ubj)}(hhh]h)}(hgLength of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256.h]hgLength of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256.}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM<hj( ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj' hM=hj ubeh}(h]h ]h"]h$]h&]uh1jhj{ ubh)}(h**Description**h]j)}(hjN h]h Description}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM?hj{ ubh)}(hX/This prepares an AES key for both the encryption and decryption directions of the block cipher. Typically this involves expanding the raw key into both the standard round keys and the Equivalent Inverse Cipher round keys, but some architecture-specific implementations don't do the full expansion here.h]hX1This prepares an AES key for both the encryption and decryption directions of the block cipher. Typically this involves expanding the raw key into both the standard round keys and the Equivalent Inverse Cipher round keys, but some architecture-specific implementations don’t do the full expansion here.}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM>hj{ ubh)}(hoThe caller is responsible for zeroizing both the struct aes_key and the raw key once they are no longer needed.h]hoThe caller is responsible for zeroizing both the struct aes_key and the raw key once they are no longer needed.}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMChj{ ubh)}(hFIf you don't need decryption support, use aes_prepareenckey() instead.h]hHIf you don’t need decryption support, use aes_prepareenckey() instead.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMFhj{ ubh)}(h **Return**h]j)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMHhj{ ubh)}(h0 on success or -EINVAL if the given key length is invalid. No other errors are possible, so callers that always pass a valid key length don't need to check for errors.h]h0 on success or -EINVAL if the given key length is invalid. No other errors are possible, so callers that always pass a valid key length don’t need to check for errors.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMIhj{ ubh)}(h **Context**h]j)}(hj h]hContext}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMMhj{ ubh)}(h Any context.h]h Any context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMMhj{ ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j aes_prepareenckey (C function)c.aes_prepareenckeyhNtauh1hhhhhhNhNubj)}(hhh](j)}(hPint aes_prepareenckey (struct aes_enckey *key, const u8 *in_key, size_t key_len)h]j)}(hOint aes_prepareenckey(struct aes_enckey *key, const u8 *in_key, size_t key_len)h](j )}(hinth]hint}(hj hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj hhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMRubj3)}(h h]h }(hj hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj hhhj hMRubjD)}(haes_prepareenckeyh]jJ)}(haes_prepareenckeyh]haes_prepareenckey}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChj hhhj hMRubjX)}(h:(struct aes_enckey *key, const u8 *in_key, size_t key_len)h](j^)}(hstruct aes_enckey *keyh](j!)}(hj$h]hstruct}(hj< hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj8 ubj3)}(h h]h }(hjI hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj8 ubh)}(hhh]jJ)}(h aes_enckeyh]h aes_enckey}(hjZ hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjW ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj\ modnameN classnameNjj)}j]j)}jj" sbc.aes_prepareenckeyasbuh1hhj8 ubj3)}(h h]h }(hjz hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj8 ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8 ubjJ)}(hkeyh]hkey}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj8 ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hj4 ubj^)}(hconst u8 *in_keyh](j!)}(hjh]hconst}(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubj3)}(h h]h }(hj hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj ubh)}(hhh]jJ)}(hu8h]hu8}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jv c.aes_prepareenckeyasbuh1hhj ubj3)}(h h]h }(hj hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjJ)}(hin_keyh]hin_key}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hj4 ubj^)}(hsize_t key_lenh](h)}(hhh]jJ)}(hsize_th]hsize_t}(hj! hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj# modnameN classnameNjj)}j]jv c.aes_prepareenckeyasbuh1hhj ubj3)}(h h]h }(hj? hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj ubjJ)}(hkey_lenh]hkey_len}(hjM hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hj4 ubeh}(h]h ]h"]h$]h&]hhuh1jWhj hhhj hMRubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihj hhhj hMRubah}(h]j ah ](jmjneh"]h$]h&]jrjs)jthuh1jhj hMRhj hhubjv)}(hhh]h)}(h&Prepare an AES key for encryption-onlyh]h&Prepare an AES key for encryption-only}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMRhjt hhubah}(h]h ]h"]h$]h&]uh1juhj hhhj hMRubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhhhNhNubj)}(hX **Parameters** ``struct aes_enckey *key`` (output) The key structure to initialize ``const u8 *in_key`` The raw AES key ``size_t key_len`` Length of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256. **Description** This prepares an AES key for only the encryption direction of the block cipher. Typically this involves expanding the raw key into only the standard round keys, resulting in a struct about half the size of struct aes_key. The caller is responsible for zeroizing both the struct aes_enckey and the raw key once they are no longer needed. Note that while the resulting prepared key supports only AES encryption, it can still be used for decrypting in a mode of operation that uses AES in only the encryption (forward) direction, for example counter mode. **Return** 0 on success or -EINVAL if the given key length is invalid. No other errors are possible, so callers that always pass a valid key length don't need to check for errors. **Context** Any context.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMVhj ubj)}(hhh](j)}(hD``struct aes_enckey *key`` (output) The key structure to initialize h](j)}(h``struct aes_enckey *key``h]j)}(hj h]hstruct aes_enckey *key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMShj ubj)}(hhh]h)}(h((output) The key structure to initializeh]h((output) The key structure to initialize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMShj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMShj ubj)}(h%``const u8 *in_key`` The raw AES key h](j)}(h``const u8 *in_key``h]j)}(hj h]hconst u8 *in_key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMThj ubj)}(hhh]h)}(hThe raw AES keyh]hThe raw AES key}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMThj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMThj ubj)}(h{``size_t key_len`` Length of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256. h](j)}(h``size_t key_len``h]j)}(hj* h]hsize_t key_len}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj( ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMVhj$ ubj)}(hhh]h)}(hgLength of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256.h]hgLength of the raw key in bytes. Should be either AES_KEYSIZE_128, AES_KEYSIZE_192, or AES_KEYSIZE_256.}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMUhj@ ubah}(h]h ]h"]h$]h&]uh1jhj$ ubeh}(h]h ]h"]h$]h&]uh1jhj? hMVhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjf h]h Description}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMXhj ubh)}(hThis prepares an AES key for only the encryption direction of the block cipher. Typically this involves expanding the raw key into only the standard round keys, resulting in a struct about half the size of struct aes_key.h]hThis prepares an AES key for only the encryption direction of the block cipher. Typically this involves expanding the raw key into only the standard round keys, resulting in a struct about half the size of struct aes_key.}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMWhj ubh)}(hrThe caller is responsible for zeroizing both the struct aes_enckey and the raw key once they are no longer needed.h]hrThe caller is responsible for zeroizing both the struct aes_enckey and the raw key once they are no longer needed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM[hj ubh)}(hNote that while the resulting prepared key supports only AES encryption, it can still be used for decrypting in a mode of operation that uses AES in only the encryption (forward) direction, for example counter mode.h]hNote that while the resulting prepared key supports only AES encryption, it can still be used for decrypting in a mode of operation that uses AES in only the encryption (forward) direction, for example counter mode.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM^hj ubh)}(h **Return**h]j)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMbhj ubh)}(h0 on success or -EINVAL if the given key length is invalid. No other errors are possible, so callers that always pass a valid key length don't need to check for errors.h]h0 on success or -EINVAL if the given key length is invalid. No other errors are possible, so callers that always pass a valid key length don’t need to check for errors.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMchj ubh)}(h **Context**h]j)}(hj h]hContext}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMghj ubh)}(h Any context.h]h Any context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMghj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j aes_encrypt (C function) c.aes_encrypthNtauh1hhhhhhNhNubj)}(hhh](j)}(hivoid aes_encrypt (aes_encrypt_arg key, u8 out[static AES_BLOCK_SIZE], const u8 in[static AES_BLOCK_SIZE])h]j)}(hhvoid aes_encrypt(aes_encrypt_arg key, u8 out[static AES_BLOCK_SIZE], const u8 in[static AES_BLOCK_SIZE])h](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMqubj3)}(h h]h }(hj&hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjhhhj%hMqubjD)}(h aes_encrypth]jJ)}(h aes_encrypth]h aes_encrypt}(hj8hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj4ubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjhhhj%hMqubjX)}(hX(aes_encrypt_arg key, u8 out[static AES_BLOCK_SIZE], const u8 in[static AES_BLOCK_SIZE])h](j^)}(haes_encrypt_arg keyh](h)}(hhh]jJ)}(haes_encrypt_argh]haes_encrypt_arg}(hjWhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjTubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjYmodnameN classnameNjj)}j]j)}jj:sb c.aes_encryptasbuh1hhjPubj3)}(h h]h }(hjwhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjPubjJ)}(hkeyh]hkey}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjPubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjLubj^)}(hu8 out[static AES_BLOCK_SIZE]h](h)}(hhh]jJ)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]js c.aes_encryptasbuh1hhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubjJ)}(houth]hout}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubj)}(h[h]h[}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(hstatich]hstatic}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hAES_BLOCK_SIZEh]hAES_BLOCK_SIZE}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]js c.aes_encryptasbuh1hhjubj)}(h]h]h]}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjLubj^)}(h"const u8 in[static AES_BLOCK_SIZE]h](j!)}(hjh]hconst}(hj?hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj;ubj3)}(h h]h }(hjLhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj;ubh)}(hhh]jJ)}(hu8h]hu8}(hj]hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjZubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_modnameN classnameNjj)}j]js c.aes_encryptasbuh1hhj;ubj3)}(h h]h }(hj{hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj;ubjJ)}(hinh]hin}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj;ubj)}(hjh]h[}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubj!)}(hjh]hstatic}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj;ubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj;ubh)}(hhh]jJ)}(hAES_BLOCK_SIZEh]hAES_BLOCK_SIZE}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]js c.aes_encryptasbuh1hhj;ubj)}(hj(h]h]}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjLubeh}(h]h ]h"]h$]h&]hhuh1jWhjhhhj%hMqubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihjhhhj%hMqubah}(h]j ah ](jmjneh"]h$]h&]jrjs)jthuh1jhj%hMqhj hhubjv)}(hhh]h)}(hEncrypt a single AES blockh]hEncrypt a single AES block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMqhjhhubah}(h]h ]h"]h$]h&]uh1juhj hhhj%hMqubeh}(h]h ](jfunctioneh"]h$]h&]jjjj!jj!jjjuh1jhhhhhNhNubj)}(hX^**Parameters** ``aes_encrypt_arg key`` The AES key, as a pointer to either an encryption-only key (struct aes_enckey) or a full, bidirectional key (struct aes_key). ``u8 out[static AES_BLOCK_SIZE]`` Buffer to store the ciphertext block ``const u8 in[static AES_BLOCK_SIZE]`` Buffer containing the plaintext block **Context** Any context.h](h)}(h**Parameters**h]j)}(hj+h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMuhj%ubj)}(hhh](j)}(h``aes_encrypt_arg key`` The AES key, as a pointer to either an encryption-only key (struct aes_enckey) or a full, bidirectional key (struct aes_key). h](j)}(h``aes_encrypt_arg key``h]j)}(hjJh]haes_encrypt_arg key}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMshjDubj)}(hhh]h)}(h}The AES key, as a pointer to either an encryption-only key (struct aes_enckey) or a full, bidirectional key (struct aes_key).h]h}The AES key, as a pointer to either an encryption-only key (struct aes_enckey) or a full, bidirectional key (struct aes_key).}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMrhj`ubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhj_hMshjAubj)}(hG``u8 out[static AES_BLOCK_SIZE]`` Buffer to store the ciphertext block h](j)}(h!``u8 out[static AES_BLOCK_SIZE]``h]j)}(hjh]hu8 out[static AES_BLOCK_SIZE]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMthj~ubj)}(hhh]h)}(h$Buffer to store the ciphertext blockh]h$Buffer to store the ciphertext block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMthjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1jhjhMthjAubj)}(hM``const u8 in[static AES_BLOCK_SIZE]`` Buffer containing the plaintext block h](j)}(h&``const u8 in[static AES_BLOCK_SIZE]``h]j)}(hjh]h"const u8 in[static AES_BLOCK_SIZE]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMuhjubj)}(hhh]h)}(h%Buffer containing the plaintext blockh]h%Buffer containing the plaintext block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMuhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMuhjAubeh}(h]h ]h"]h$]h&]uh1jhj%ubh)}(h **Context**h]j)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMwhj%ubh)}(h Any context.h]h Any context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMwhj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j aes_decrypt (C function) c.aes_decrypthNtauh1hhhhhhNhNubj)}(hhh](j)}(hovoid aes_decrypt (const struct aes_key *key, u8 out[static AES_BLOCK_SIZE], const u8 in[static AES_BLOCK_SIZE])h]j)}(hnvoid aes_decrypt(const struct aes_key *key, u8 out[static AES_BLOCK_SIZE], const u8 in[static AES_BLOCK_SIZE])h](j )}(hvoidh]hvoid}(hj=hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj9hhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM}ubj3)}(h h]h }(hjLhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj9hhhjKhM}ubjD)}(h aes_decrypth]jJ)}(h aes_decrypth]h aes_decrypt}(hj^hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjZubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChj9hhhjKhM}ubjX)}(h^(const struct aes_key *key, u8 out[static AES_BLOCK_SIZE], const u8 in[static AES_BLOCK_SIZE])h](j^)}(hconst struct aes_key *keyh](j!)}(hjh]hconst}(hjzhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjvubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjvubj!)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjvubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjvubh)}(hhh]jJ)}(haes_keyh]haes_key}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jj`sb c.aes_decryptasbuh1hhjvubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjvubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubjJ)}(hkeyh]hkey}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjvubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjrubj^)}(hu8 out[static AES_BLOCK_SIZE]h](h)}(hhh]jJ)}(hu8h]hu8}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j c.aes_decryptasbuh1hhjubj3)}(h h]h }(hj(hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubjJ)}(houth]hout}(hj6hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubj)}(hjh]h[}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(hjh]hstatic}(hjQhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hj^hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hAES_BLOCK_SIZEh]hAES_BLOCK_SIZE}(hjohhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjlubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjqmodnameN classnameNjj)}j]j c.aes_decryptasbuh1hhjubj)}(hj(h]h]}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjrubj^)}(h"const u8 in[static AES_BLOCK_SIZE]h](j!)}(hjh]hconst}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.aes_decryptasbuh1hhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubjJ)}(hinh]hin}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubj)}(hjh]h[}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(hjh]hstatic}(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hAES_BLOCK_SIZEh]hAES_BLOCK_SIZE}(hj(hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j c.aes_decryptasbuh1hhjubj)}(hj(h]h]}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjrubeh}(h]h ]h"]h$]h&]hhuh1jWhj9hhhjKhM}ubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihj5hhhjKhM}ubah}(h]j0ah ](jmjneh"]h$]h&]jrjs)jthuh1jhjKhM}hj2hhubjv)}(hhh]h)}(hDecrypt a single AES blockh]hDecrypt a single AES block}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM}hjlhhubah}(h]h ]h"]h$]h&]uh1juhj2hhhjKhM}ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhhhNhNubj)}(hX**Parameters** ``const struct aes_key *key`` The AES key, previously initialized by aes_preparekey() ``u8 out[static AES_BLOCK_SIZE]`` Buffer to store the plaintext block ``const u8 in[static AES_BLOCK_SIZE]`` Buffer containing the ciphertext block **Context** Any context..Sh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMhjubj)}(hhh](j)}(hV``const struct aes_key *key`` The AES key, previously initialized by aes_preparekey() h](j)}(h``const struct aes_key *key``h]j)}(hjh]hconst struct aes_key *key}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhM~hjubj)}(hhh]h)}(h7The AES key, previously initialized by aes_preparekey()h]h7The AES key, previously initialized by aes_preparekey()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM~hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM~hjubj)}(hF``u8 out[static AES_BLOCK_SIZE]`` Buffer to store the plaintext block h](j)}(h!``u8 out[static AES_BLOCK_SIZE]``h]j)}(hjh]hu8 out[static AES_BLOCK_SIZE]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMhjubj)}(hhh]h)}(h#Buffer to store the plaintext blockh]h#Buffer to store the plaintext block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hN``const u8 in[static AES_BLOCK_SIZE]`` Buffer containing the ciphertext block h](j)}(h&``const u8 in[static AES_BLOCK_SIZE]``h]j)}(hj"h]h"const u8 in[static AES_BLOCK_SIZE]}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMhjubj)}(hhh]h)}(h&Buffer containing the ciphertext blockh]h&Buffer containing the ciphertext block}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj8ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hj]h]hContext}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMhjubh)}(h Any context.h]h Any context.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:11: ./include/crypto/aes.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubeh}(h]aesah ]h"]aesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDESh]hDES}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hpSupport for the DES block cipher. This algorithm is obsolete and is supported only for backwards compatibility.h]hpSupport for the DES block cipher. This algorithm is obsolete and is supported only for backwards compatibility.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j des_expand_key (C function)c.des_expand_keyhNtauh1hhjhhhNhNubj)}(hhh](j)}(hLint des_expand_key (struct des_ctx *ctx, const u8 *key, unsigned int keylen)h]j)}(hKint des_expand_key(struct des_ctx *ctx, const u8 *key, unsigned int keylen)h](j )}(hinth]hint}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK"ubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjhhhjhK"ubjD)}(hdes_expand_keyh]jJ)}(hdes_expand_keyh]hdes_expand_key}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjhhhjhK"ubjX)}(h9(struct des_ctx *ctx, const u8 *key, unsigned int keylen)h](j^)}(hstruct des_ctx *ctxh](j!)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(hdes_ctxh]hdes_ctx}(hj$hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj&modnameN classnameNjj)}j]j)}jjsbc.des_expand_keyasbuh1hhjubj3)}(h h]h }(hjDhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubj)}(hjh]h*}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hctxh]hctx}(hj_hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubj^)}(h const u8 *keyh](j!)}(hjh]hconst}(hjxhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjtubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjtubh)}(hhh]jJ)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j@c.des_expand_keyasbuh1hhjtubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjtubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubjJ)}(hkeyh]hkey}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjtubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubj^)}(hunsigned int keylenh](j )}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubj )}(hinth]hint}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubjJ)}(hkeylenh]hkeylen}(hj hhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubeh}(h]h ]h"]h$]h&]hhuh1jWhjhhhjhK"ubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihjhhhjhK"ubah}(h]jah ](jmjneh"]h$]h&]jrjs)jthuh1jhjhK"hjhhubjv)}(hhh]h)}(h*Expand a DES input key into a key scheduleh]h*Expand a DES input key into a key schedule}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK"hjGhhubah}(h]h ]h"]h$]h&]uh1juhjhhhjhK"ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjbjjbjjjuh1jhhhjhNhNubj)}(hX(**Parameters** ``struct des_ctx *ctx`` the key schedule ``const u8 *key`` buffer containing the input key ``unsigned int keylen`` size of the buffer contents **Return** 0 on success, -EINVAL if the input key is rejected and -ENOKEY if the key is accepted but has been found to be weak.h](h)}(h**Parameters**h]j)}(hjlh]h Parameters}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK&hjfubj)}(hhh](j)}(h)``struct des_ctx *ctx`` the key schedule h](j)}(h``struct des_ctx *ctx``h]j)}(hjh]hstruct des_ctx *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK#hjubj)}(hhh]h)}(hthe key scheduleh]hthe key schedule}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK#hjubj)}(h2``const u8 *key`` buffer containing the input key h](j)}(h``const u8 *key``h]j)}(hjh]h const u8 *key}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK$hjubj)}(hhh]h)}(hbuffer containing the input keyh]hbuffer containing the input key}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK$hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK$hjubj)}(h4``unsigned int keylen`` size of the buffer contents h](j)}(h``unsigned int keylen``h]j)}(hjh]hunsigned int keylen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK%hjubj)}(hhh]h)}(hsize of the buffer contentsh]hsize of the buffer contents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK%hjubeh}(h]h ]h"]h$]h&]uh1jhjfubh)}(h **Return**h]j)}(hj8h]hReturn}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK'hjfubh)}(ht0 on success, -EINVAL if the input key is rejected and -ENOKEY if the key is accepted but has been found to be weak.h]ht0 on success, -EINVAL if the input key is rejected and -ENOKEY if the key is accepted but has been found to be weak.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK'hjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j  des3_ede_expand_key (C function)c.des3_ede_expand_keyhNtauh1hhjhhhNhNubj)}(hhh](j)}(hVint des3_ede_expand_key (struct des3_ede_ctx *ctx, const u8 *key, unsigned int keylen)h]j)}(hUint des3_ede_expand_key(struct des3_ede_ctx *ctx, const u8 *key, unsigned int keylen)h](j )}(hinth]hint}(hj}hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjyhhha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK-ubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjyhhhjhK-ubjD)}(hdes3_ede_expand_keyh]jJ)}(hdes3_ede_expand_keyh]hdes3_ede_expand_key}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ](j\j]eh"]h$]h&]hhuh1jChjyhhhjhK-ubjX)}(h>(struct des3_ede_ctx *ctx, const u8 *key, unsigned int keylen)h](j^)}(hstruct des3_ede_ctx *ctxh](j!)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubh)}(hhh]jJ)}(h des3_ede_ctxh]h des3_ede_ctx}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.des3_ede_expand_keyasbuh1hhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjJ)}(hctxh]hctx}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubj^)}(h const u8 *keyh](j!)}(hjh]hconst}(hj,hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj(ubj3)}(h h]h }(hj9hhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj(ubh)}(hhh]jJ)}(hu8h]hu8}(hjJhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjGubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjLmodnameN classnameNjj)}j]jc.des3_ede_expand_keyasbuh1hhj(ubj3)}(h h]h }(hjhhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hj(ubj)}(hjh]h*}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubjJ)}(hkeyh]hkey}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhj(ubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubj^)}(hunsigned int keylenh](j )}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubj )}(hinth]hint}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj3)}(h h]h }(hjhhhNhNubah}(h]h ]j?ah"]h$]h&]uh1j2hjubjJ)}(hkeylenh]hkeylen}(hjhhhNhNubah}(h]h ]jUah"]h$]h&]uh1jIhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j]hjubeh}(h]h ]h"]h$]h&]hhuh1jWhjyhhhjhK-ubeh}(h]h ]h"]h$]h&]hhjguh1jjhjihjuhhhjhK-ubah}(h]jpah ](jmjneh"]h$]h&]jrjs)jthuh1jhjhK-hjrhhubjv)}(hhh]h)}(h1Expand a triple DES input key into a key scheduleh]h1Expand a triple DES input key into a key schedule}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK-hjhhubah}(h]h ]h"]h$]h&]uh1juhjrhhhjhK-ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjhNhNubj)}(hX**Parameters** ``struct des3_ede_ctx *ctx`` the key schedule ``const u8 *key`` buffer containing the input key ``unsigned int keylen`` size of the buffer contents **Return** 0 on success, -EINVAL if the input key is rejected and -ENOKEY if the key is accepted but has been found to be weak. Note that weak keys will be rejected (and -EINVAL will be returned) when running in FIPS mode.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK1hjubj)}(hhh](j)}(h.``struct des3_ede_ctx *ctx`` the key schedule h](j)}(h``struct des3_ede_ctx *ctx``h]j)}(hj?h]hstruct des3_ede_ctx *ctx}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK.hj9ubj)}(hhh]h)}(hthe key scheduleh]hthe key schedule}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThK.hjUubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhjThK.hj6ubj)}(h2``const u8 *key`` buffer containing the input key h](j)}(h``const u8 *key``h]j)}(hjxh]h const u8 *key}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK/hjrubj)}(hhh]h)}(hbuffer containing the input keyh]hbuffer containing the input key}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK/hjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhjhK/hj6ubj)}(h4``unsigned int keylen`` size of the buffer contents h](j)}(h``unsigned int keylen``h]j)}(hjh]hunsigned int keylen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK0hjubj)}(hhh]h)}(hsize of the buffer contentsh]hsize of the buffer contents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK0hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK0hj6ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK2hjubh)}(h0 on success, -EINVAL if the input key is rejected and -ENOKEY if the key is accepted but has been found to be weak. Note that weak keys will be rejected (and -EINVAL will be returned) when running in FIPS mode.h]h0 on success, -EINVAL if the input key is rejected and -ENOKEY if the key is accepted but has been found to be weak. Note that weak keys will be rejected (and -EINVAL will be returned) when running in FIPS mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/crypto/libcrypto-blockcipher:19: ./include/crypto/des.hhK2hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]desah ]h"]desah$]h&]uh1hhhhhhhhKubeh}(h] block-ciphersah ]h"] block ciphersah$]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_handlerjKerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _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}(j%j"jjjju nametypes}(j%jjuh}(j"hjhj jjjjjjjj j j jj0j5jjjjjpjuu 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.