Skip to content

[KeyVault] Update Keys with service version 7.6 #50510

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JonathanCrd
Copy link
Member

This PR addresses the comments on this API VIEW by moving the CkmAesKeyWrap algorithm to KeyWrapAlgorithm.

Additionally, this PR replaces preview version 7.6-preview.2 with 7.6.

@JonathanCrd JonathanCrd requested a review from vcolin7 June 10, 2025 08:52
@JonathanCrd JonathanCrd self-assigned this Jun 10, 2025
@JonathanCrd JonathanCrd changed the title [KeyVault] Prepare Keys for service version 7.6 [KeyVault] Update Keys with service version 7.6 Jun 10, 2025
Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.Security.KeyVault.Keys

Comment on lines +64 to +65
/// <summary>
/// Gets a 256-bit CKM AES Key Wrap <see cref="KeyWrapAlgorithm"/>.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// <summary>
/// Gets a 256-bit CKM AES Key Wrap <see cref="KeyWrapAlgorithm"/>.
/// <summary>
/// Gets a 256-bit CKM AES Key Wrap <see cref="KeyWrapAlgorithm"/>.

Comment on lines +21 to +22
public static readonly AesKw CkmAesKeyWrap = new AesKw("CKM_AES_KEY_WRAP", 192);
public static readonly AesKw CkmAesKeyWrapPad = new AesKw("CKM_AES_KEY_WRAP_PAD", 256, PaddingMode.PKCS7);
Copy link
Member

Choose a reason for hiding this comment

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

Why these fixed sizes? MHSM supports 128-bit symmetric keys and, to my knowledge, so do these algorithms. And how does PKCS7 padding work here? RFC 5649 describes a different padding method.

Copy link
Member Author

Choose a reason for hiding this comment

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

For the ones withouth paddings, I missed the other 2 possible values here: 128 and 256; Adding them.
Regarding the padding, yeah this is incorrect, I should not be using PKCS7. I got confused when I added these properties into the EncryptionAlgorithms class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

2 participants