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

Add constant for AES_KEY_WRAP #8

Merged
merged 1 commit into from
Oct 18, 2018
Merged

Add constant for AES_KEY_WRAP #8

merged 1 commit into from
Oct 18, 2018

Conversation

mattburgess
Copy link

No description provided.

Copy link
Owner

@bentonstark bentonstark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So your code change (except for hsmenums.py) will break all other HSMs. The only HSM vendor that supports CKM_AES_KEY_WRAP based on my recent testing is Cavium. That's why CKM_AES_CBC_PAD is the default option for key wrapping. By changing these functions your solution will work for only Cavium HSMs by default and not work for the majority HSMs. What instead you need to do if you want to alter the code is your last edit which is to add AES_KEY_WRAP to the enumerators. Since Cavium is the outliner, you will need to specify the wrap_key_mech= HsmMech.AES_KEY_WRAP for your calls.

@mattburgess
Copy link
Author

Thanks for the quick review. I've pushed a fixup commit to remove the Cavium-specific mech from the wrapping calls.

@bentonstark bentonstark merged commit 4cd1a9b into bentonstark:master Oct 18, 2018
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

Successfully merging this pull request may close these issues.

2 participants