Skip to content

Conversation

@AlexLanzano
Copy link
Contributor

No description provided.

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 implements generic helper functions for wrapping and unwrapping arbitrary data objects using AES-GCM encryption. The implementation provides a client-side API for encrypting/decrypting data with server-managed keys.

Key changes:

  • Added wh_Client_DataWrap and wh_Client_DataUnwrap functions for generic data wrapping operations
  • Moved AES-GCM constants from implementation file to common header for reusability
  • Added comprehensive test coverage for the new data wrap/unwrap functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wolfhsm/wh_common.h Defines AES-GCM tag and IV size constants for use across modules
wolfhsm/wh_client.h Declares public API for data wrap/unwrap helper functions
src/wh_server_keystore.c Removes local constant definitions now available in common header
src/wh_client_keywrap.c Implements AES-GCM data wrap/unwrap functions and dispatcher logic
test/wh_test_keywrap.c Adds test functions for data wrap/unwrap and fixes error return values

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

AlexLanzano added a commit to AlexLanzano/wolfHSM that referenced this pull request Oct 24, 2025
@AlexLanzano AlexLanzano requested a review from bigbrett October 24, 2025 16:02
@bigbrett bigbrett marked this pull request as draft October 28, 2025 20:51
@AlexLanzano AlexLanzano marked this pull request as ready for review October 29, 2025 21:18
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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlexLanzano AlexLanzano marked this pull request as draft October 30, 2025 17:55
@bigbrett bigbrett marked this pull request as ready for review October 31, 2025 17:32
@bigbrett bigbrett assigned AlexLanzano and unassigned bigbrett Oct 31, 2025
@bigbrett
Copy link
Contributor

@AlexLanzano overall, do a full pass of all keywrap AND datawrap handling functions and ensure the server never returns error back to the server processing loop unless it is a true internal server error that should cause the server to crash due to being in some indeterminate state. Otherwise, all client-induced errors MUST be propagated back to the client. I fixed a few already on you branch but there are more.

@AlexLanzano AlexLanzano requested a review from bigbrett November 3, 2025 18:32
@bigbrett bigbrett merged commit 3f08169 into wolfSSL:main Nov 3, 2025
15 checks passed
billphipps pushed a commit to billphipps/wolfHSM that referenced this pull request Nov 3, 2025
rizlik pushed a commit to rizlik/wolfHSM that referenced this pull request Nov 7, 2025
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