Skip to content

Conversation

@JacobBarthelmeh
Copy link
Contributor

No description provided.

@JacobBarthelmeh JacobBarthelmeh self-assigned this Aug 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Member

@LinuxJedi LinuxJedi left a comment

Choose a reason for hiding this comment

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

A couple of minor things I spotted on the PKCS11 side of things, I didn't dig into the STM32 side.

Copy link
Collaborator

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Rest looks great. Tested on Pi with real TPM.

@dgarske dgarske requested a review from LinuxJedi August 20, 2025 21:14
@dgarske dgarske removed their assignment Aug 20, 2025
@LinuxJedi LinuxJedi merged commit f8ed30d into wolfSSL:master Aug 21, 2025
63 of 64 checks passed
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.

4 participants