Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements RFC5649 as CKM_AES_KEY_WRAP_PAD but should actually be CKM_AES_KEY_WRAP_KWP #726

Open
space88man opened this issue Oct 10, 2023 · 0 comments

Comments

@space88man
Copy link
Contributor

space88man commented Oct 10, 2023

SoftHSMv2 does not list 0x210B CKM_AES_KEY_WRAP_KWP as a supported mechanism - when in fact it is implemented but misnamed as 0x210A.

PKCS11 v3.1: SoftHSMv2 implements RFC5649 but uses 0x210A CKM_AES_KEY_WRAP_PAD as the mechanism: it should be 0x210B CKM_AES_KEY_WRAP_KWP.

0x210A CKM_AES_KEY_WRAP_PAD is a different mechanism: the data is PKCS7-padded and then RFC3394 is applied. This mechanism is deprecated due to confusing implementations. The PKCS7-padded version is now 0x210C CKM_AES_KEY_WRAP_PKCS7 .

https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/os/pkcs11-spec-v3.1-os.html#_Toc111203510

This is not terribly serious in itself — the RFC5649 mechanism is simply (mis)named CKM_AES_KEY_WRAP_PAD — but it affects our code testing and interoperability with Thales Luna which uses *_KWP constants.

@space88man space88man changed the title Implements RFC5649 as CKM_AES_KEY_WRAP_PAD but should be CKM_AES_KEY_WRAP_KWP Implements RFC5649 as CKM_AES_KEY_WRAP_PAD but should actually be CKM_AES_KEY_WRAP_KWP Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant