fix(sdk): Support kas keys with extended EC methods #344
fix(sdk): Support kas keys with extended EC methods #344elizabethhealy merged 3 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the SDK version across two core Java files, Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the hardcoded SDK version in two Java files from 0.12.0 to 0.13.0. However, the version in the pom.xml files remains 0.12.0. This inconsistency can lead to confusion and issues during the build and release process. I've added comments with suggestions to centralize version management using the pom.xml as the single source of truth, which is a standard practice in Maven projects. This will make versioning more robust and less error-prone.
X-Test Failure Report |
|
passing test: https://github.com/opentdf/java-sdk/actions/runs/22642027336/job/65624476161 -- successful run |
X-Test Results✅ go-main |
|
/gemini review |
|
/gemini summary |
There was a problem hiding this comment.
Code Review
This pull request refactors the EC key wrapping logic to correctly support key algorithms specified by the Key Access Server (KAS). The changes modify the createECWrappedKey method to derive the EC curve from the KeyType provided by the KAS, rather than relying on the default wrappingKeyType from the TDF configuration. This ensures that when a KAS provides a key with a specific EC algorithm, the SDK uses the correct curve for key wrapping. The implementation is correct and effectively addresses the described issue.
|
Summary of ChangesThis pull request addresses an issue in the SDK's key wrapping mechanism, specifically for Key Access Server (KAS) keys utilizing extended Elliptic Curve (EC) methods. The changes ensure that the correct elliptic curve type is consistently applied when creating EC wrapped keys, thereby improving the robustness and correctness of cryptographic operations. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
|
X-Test Results✅ go-v0.13.0 |



This pull request addresses an issue in the SDK's key wrapping mechanism, specifically for Key Access Server (KAS) keys utilizing extended Elliptic Curve (EC) methods. The changes ensure that the correct elliptic curve type is consistently applied when creating EC wrapped keys, thereby improving the robustness and correctness of cryptographic operations.
Highlights
createKeyAccessmethod to explicitly determine theKeyTypefrom the algorithm and pass this specific type to thecreateECWrappedKeyfunction, ensuring accurate context for EC key operations.createECWrappedKeySignature Update: Updated thecreateECWrappedKeymethod signature to directly accept theKeyTypeobject, allowing for the correct derivation of the elliptic curve name based on the provided key type.