Inconsistency with PKCS#11 v2.40 CKM_AES_KEY_WRAP_PAD
The PKCS#11 technical committee is currently working on standard version 3.0. You can find the latest working draft here: https://www.oasis-open.org/committees/download.php/64968/pkcs11-curr-v3.0-wd09.docx

In fact, reworked section "AES Key Wrap" (now 2.16) solves your problems:


It allows all mechanisms to be used with Encrypt&amp;Decrypt and Wrap&amp;Unwrap.
It clarifies that CKM_AES_KEY_WRAP and CKM_AES_KEY_WRAP_PAD actually refer to NIST SP800-38F section 6.2 ("KW"), which in fact require an 8 byte IV.
It introduces new CKM_AES_KEY_WRAP_KWP, which is algorithm KWP of NIST SP800-38F section 6.3 you are looking for.


Header files for the working draft can be found here: https://github.com/oasis-tcs/pkcs11/tree/master/working/3-00-wd-01