dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

Remove EC_KEY from S.S.Cryptography.Native API #105173

Open krwq opened 1 month ago

krwq commented 1 month ago

Starting from https://github.com/dotnet/runtime/pull/104961 we don't really need to keep dependency on EC_KEY anymore and can base all Import/Export APIs solely on EVP_PKEY.

There are couple of advantages of doing this:

Some notes:

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones See info in area-owners.md if you want to be subscribed.

bartonjs commented 1 month ago

I updated the title to say something closer to the definition of success being removing EC_KEY* from the exported functions signatures.

If we can fully get rid of it, great/fine. But if we still need it to power the import/export APIs on the native side, that's still better than the export/import APIs being in terms of EC_KEY itself.