STM32U5 DHUK wrapping use#137
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds STM32U5 DHUK (Derived Hardware Unique Key) wrapping functionality to wolfPKCS11. It introduces device ID tracking per object to enable hardware-specific cryptographic operations, particularly for STM32U5 microcontrollers with dedicated hardware key wrapping capabilities.
- Adds device ID attribute support for PKCS11 objects to track which cryptographic hardware should be used
- Updates all cryptographic operations to use object-specific device IDs instead of session/slot device IDs
- Implements STM32U5 DHUK key wrapping with hardware acceleration support
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wolfpkcs11/pkcs11.h | Adds CKA_DEVID attribute definition and CK_INT typedef for device ID support |
| wolfpkcs11/internal.h | Declares new WP11_Object_GetDevId function |
| src/internal.c | Implements device ID tracking per object and updates all crypto operations to use object devId |
| src/crypto.c | Adds DHUK wrapping support and CKA_DEVID attribute handling |
| examples/stm32_dhuk_aes_key.c | Provides example implementation demonstrating DHUK key wrapping functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dgarske
requested changes
Aug 18, 2025
dgarske
requested changes
Aug 19, 2025
dgarske
requested changes
Aug 19, 2025
LinuxJedi
requested changes
Aug 20, 2025
Member
LinuxJedi
left a comment
There was a problem hiding this comment.
A couple of minor things I spotted on the PKCS11 side of things, I didn't dig into the STM32 side.
dgarske
requested changes
Aug 20, 2025
Member
dgarske
left a comment
There was a problem hiding this comment.
Rest looks great. Tested on Pi with real TPM.
dgarske
approved these changes
Aug 20, 2025
LinuxJedi
approved these changes
Aug 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.