STRUCT TESTVEC_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” extra request_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 to src_divs if unset 🌸
  • iv_offset β€” misalignment of the IV in the range [0..MAX_ALGAPI_ALIGNMASK+1], where 0 is aligned to a 2*(MAX_ALGAPI_ALIGNMASK+1) byte boundary πŸ¦‹
  • key_offset β€” misalignment of the key, where 0 is default alignment πŸ”‘
  • iv_offset_relative_to_alignmask β€” if true, add the algorithm's alignmask to the iv_offset πŸ’–
  • key_offset_relative_to_alignmask β€” if true, add the algorithm's alignmask to the key_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 by nosimd_setkey or src_divs[].nosimd πŸ’€
  • nosimd_setkey β€” set the key (if applicable) with SIMD disabled? Requires !CRYPTO_TFM_REQ_MAY_SLEEP πŸ™ˆ
caveat bestie: both nosimd and nosimd_setkey require !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 πŸ”₯


signed off from the ./crypto corner of the kernel, October 2026 edition β€” struct testvec_config(9) πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from