STRUCT TESTVEC_CONFIG(9)
β¨ NAME β¨
okay bestie, welcome to the kernel API manual for struct testvec_config(9) β yes, the crypto test vector config struct, and itβs kind of a big deal π
struct testvec_config β configuration for testing a crypto test vector π¦
π¦ SYNOPSIS π¦
hereβs the struct in all its glory, no cap β keep it exact:
struct testvec_config {
const char *name;
enum inplace_mode inplace_mode;
u32 req_flags;
struct test_sg_division src_divs[XBUFSIZE];
struct test_sg_division dst_divs[XBUFSIZE];
unsigned int iv_offset;
unsigned int key_offset;
bool iv_offset_relative_to_alignmask;
bool key_offset_relative_to_alignmask;
enum finalization_type finalization_type;
bool nosimd;
bool nosimd_setkey;
};
π Members π
nameβ name of this config, logged for debugging purposes if a test fails πinplace_modeβ whether and how to operate on the data in-place, if applicable π«Άreq_flagsβ extrarequest_flags, e.g.CRYPTO_TFM_REQ_MAY_SLEEPβ¨src_divsβ description of how to arrange the source scatterlist πdst_divsβ description of how to arrange the dst scatterlist, if applicable for the algorithm type. Defaults tosrc_divsif unset πΈiv_offsetβ misalignment of the IV in the range[0..MAX_ALGAPI_ALIGNMASK+1], where0is aligned to a2*(MAX_ALGAPI_ALIGNMASK+1)byte boundary π¦key_offsetβ misalignment of the key, where0is default alignment πiv_offset_relative_to_alignmaskβ if true, add the algorithm's alignmask to theiv_offsetπkey_offset_relative_to_alignmaskβ if true, add the algorithm's alignmask to thekey_offsetπfinalization_typeβ what finalization function to use for hashes πnosimdβ execute with SIMD disabled? Requires!CRYPTO_TFM_REQ_MAY_SLEEP. This applies to the parts of the operation that aren't controlled individually bynosimd_setkeyorsrc_divs[].nosimdπnosimd_setkeyβ set the key (if applicable) with SIMD disabled? Requires!CRYPTO_TFM_REQ_MAY_SLEEPπ
caveat bestie: bothnosimdandnosimd_setkeyrequire!CRYPTO_TFM_REQ_MAY_SLEEP, so donβt sleep on that detail π
πΈ Description πΈ
This struct describes the data layout and other parameters with which each crypto test vector can be tested. Itβs literally the vibe sheet for how the test vector gets set up and run π₯
π₯ SEE ALSO π₯
- Kernel file
./crypto/testmgr.c struct test_sg_division(9)build_test_sglist(9)
signed off from the ./crypto corner of the kernel, October 2026 edition β struct testvec_config(9) π«Άπβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms