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

Support CKM_AES_CBC_PAD for the wrapping functions #405

Open
lingxiankong opened this issue Jul 5, 2018 · 8 comments · May be fixed by #657
Open

Support CKM_AES_CBC_PAD for the wrapping functions #405

lingxiankong opened this issue Jul 5, 2018 · 8 comments · May be fixed by #657
Labels
enhancement New or improved functionality
Milestone

Comments

@lingxiankong
Copy link

Could we implement CKM_AES_CBC_PAD for wrapping in order to support SoftHSM in OpenStack Barbican. Here is Barbican related code: https://github.com/openstack/barbican/blob/5dea5cec130b59ecfb8d46435cd7eb3212894b4c/barbican/plugin/crypto/pkcs11.py#L496

Or is there some solution could work around this?

@bellgrim
Copy link
Contributor

bellgrim commented Jul 5, 2018

As noted in #229, this mechanism is not implemented. But there are other wrapping mechanisms available. Keeping this issue open as a feature request.

@bellgrim bellgrim added the enhancement New or improved functionality label Jul 5, 2018
@lingxiankong
Copy link
Author

@bellgrim hi thanks for the reply. I'm not familiar with PKCS programing, do you mean I just need to replace CKM_AES_CBC_PAD with either CKM_AES_KEY_WRAP, CKM_AES_KEY_WRAP_PAD, CKM_RSA_PKCS, or CKM_RSA_PKCS_OAEP in the barbican code?

@bellgrim
Copy link
Contributor

bellgrim commented Jul 6, 2018

Yes, there are other wrapping mechanisms but it is probably not as easy as just swapping the name of the mechanism when doing the operation. I have not implemented them so I do not know the details of each method. You can find more information about the mechanisms in PKCS#11 v2.40. It then points to e.g. RFC5649 for CKM_AES_KEY_WRAP_PAD.

@bellgrim bellgrim added this to the Backlog milestone Jan 30, 2019
@zinoadidi
Copy link

Hello
Is it possible to get a link to sample implementation / how to switch to CKM_AES_KEY_WRAP_PAD in Java?

@rijswijk
Copy link
Contributor

rijswijk commented May 9, 2019

We generally don't provide programming examples, and are not familiar enough with Java to help you with that, we suggest you ask this question on StackExchange or a similar forum.

@pedrolamarao
Copy link

I would like to second this request. Using CKM_DES3_CBC or CKM_AES_CBC to encrypt/unwrap private keys is established practice. This is blocking integration of our applications with SoftHSM2.

@rijswijk
Copy link
Contributor

There are security reasons to use other mechanisms, we cannot promise that these older mechanisms will be implemented anytime soon, but we would welcome a pull request if that is an option.

threez pushed a commit to pace/SoftHSMv2 that referenced this issue Oct 29, 2021
@threez threez linked a pull request Oct 29, 2021 that will close this issue
@rajivmucheli
Copy link

Hi, is this issue resolved ?

Was anyone able to switch the wrapping mechanism of Openstack Barbican from CKM_AES_CBC_PAD to CKM_AES_KWP ?

@jschlyter jschlyter linked a pull request Nov 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants