dotnet / runtime

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

ECCurve does not exist in System.Security.Cryptography in netstandard 1.4 projects #26030

Closed Trolldemorted closed 4 years ago

Trolldemorted commented 6 years ago

Since windows phones want fancy encryption too, could you either support netstandard1.4 on W10M or make the elliptic curve classes available in netstandard1.4?

bartonjs commented 6 years ago

ECCurve wasn't added to .NET Framework until .NET Framework 4.7, so it can't be defined any earlier than netstandard1.6.

https://github.com/dotnet/standard/blob/master/docs/versions.md.

If you're on a Win10 mobile that should be the UWP identifier, which should support netstandard2.0.

Trolldemorted commented 6 years ago

The latest UWP version supports netstandard2.0 and I'd love to use that, but W10 mobile does not support the latest UWP version. When W10 desktops were upgraded to build 16299 (in the FCU) mobile devices were not, and are still unable to run UWP apps that target anything higher than 15254.

We are developing a library that has to work on mobile and desktop, so we are forced to stay with 1.4. Or are there hacks like statically linking/merging the newer .netstandard libraries into our library?

Naturally we would feel way more comfortable if .netstandard1.6+ would just work on W10m.

karelz commented 6 years ago

.NET Standard 2.0 support comes from the underlying platform (UWP in this case). In general, the implementation of .NET Standard 2.0 has dependency on new WinRT APIs or additional exposed Win32 APIs (which are not available on older UWP platforms). Therefore there is no way to make it work on older UWP platforms which do not have the APIs we depend on.

If our ECCurve implementation depends on new APIs available in UWP platform (something to check on), then the only option is to find and use other implementation of ECCuve which does not have that dependency.

bartonjs commented 5 years ago

Since there was only ever one request for this, and the requestor seems to have long since found a workaround; closing the issue.