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

Sync Crypto api usage #1022

Merged
merged 11 commits into from
Apr 28, 2021
Merged

Sync Crypto api usage #1022

merged 11 commits into from
Apr 28, 2021

Conversation

Wraith2
Copy link
Contributor

@Wraith2 Wraith2 commented Apr 6, 2021

Follow up from #887

This merges some of the crypto related files and moved platform specific crypto into a single file AlwaysEncryptedKeyConverter which now has Cng and CrossPlatform versions. It is not possible to use the cross platform version on all build targets for three reasons,

  1. netfx does not have a way to create RSA or ECDiffieHelman from their parameters types without using the Cng class constructors directly.
  2. netfx does not have the same ECDiffieHelman classes as the cross platform api does which means keys have to handled differently.
  3. netstandard2.0 does not have ECDiffieHelman at all

These differences are encapsulated in the AlwaysEncryptedKeyConverter class now and consumers should be able to use or extend that class instead of needing to spread different crypto usage throughout multiple classes.

These changes make it possible to share a lot of the enclave support classes which should make maintaining them easier.
I have no way to test a lot of this locally (beyond compiling) so we'll need to rely on the CI tests.

@cheenamalhotra cheenamalhotra added this to the 3.0.0-preview3 milestone Apr 28, 2021
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.

4 participants