-
Notifications
You must be signed in to change notification settings - Fork 22
Implement generic data wrap/unwrap helper functions #226
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
Conversation
There was a problem hiding this 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_DataWrapandwh_Client_DataUnwrapfunctions 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.
There was a problem hiding this 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 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. |
No description provided.