Skip to content
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

Board Review: Azure.Security.KeyVault.Keys #2221

Closed
heaths opened this issue Jan 8, 2021 · 2 comments
Closed

Board Review: Azure.Security.KeyVault.Keys #2221

heaths opened this issue Jan 8, 2021 · 2 comments
Assignees
Labels
architecture board-review Request for an Architectural Board Review KeyVault

Comments

@heaths
Copy link
Member

heaths commented Jan 8, 2021

Contacts and Timeline

About the Service

About the client library

  • Name of the client library: Azure.Security.KeyVault.Keys
  • Languages for this review: C#, Java

Artifacts required (per language)

Please read through “API Review” section here to understand how these artifacts are generated. It is critical that these artifacts are present and are in the right format. If not, the language architects cannot review them with the SDK Team’s API review tool.

.NET

byte[] Encrypt(KeyVaultKey key, byte[] plaintext)
{
  EncryptResult result = await _cryptographyClient.EncryptAsync(EncryptOptions.A256GcmOptions(plaintext), _cts.Token);
  return result.Ciphertext;
}

Java

EncryptOptions encryptOptions = EncryptOptions.createAes128CbcOptions(myPlainText, iv);
EncryptResult encryptedResult = cryptographyClient.encrypt(encryptOptions, context);

System.out.printf("Received encrypted content of length %d with algorithm %s \n",
    encryptedResult.getCipherText().length, encryptedResult.getAlgorithm().toString());

Additional notes

Effectively, we use factory methods to help enforce certain options for certain algorithms. For example, AES-GCM support takes optional "AdditionalAuthenticatedData", while AES-CBC and AES-CBCPAD take an optional IV (we generate one if not provided; IV is required by the service but treated as an nonce in some cases). This design had been previously discussed with @KrzysztofCwalina and reviewed by the Microsoft Crypto Board.

@heaths heaths added architecture KeyVault board-review Request for an Architectural Board Review labels Jan 8, 2021
@lilyjma
Copy link
Contributor

lilyjma commented Jan 12, 2021

scheduled for 1/14

@lilyjma
Copy link
Contributor

lilyjma commented Jan 14, 2021

Recording[MS INTERNAL ONLY]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture board-review Request for an Architectural Board Review KeyVault
Projects
None yet
Development

No branches or pull requests

2 participants