top | item 42899421

(no title)

t_tsonev | 1 year ago

Recently I've got bitten by the comically poor cross-platform cryptography support in .NET

Just look at https://learn.microsoft.com/en-us/dotnet/standard/security/c... and https://learn.microsoft.com/en-us/dotnet/framework/network-p... for a sneak peek into this madness.

discuss

order

novaleaf|1 year ago

FYI, You are comparing the modern version of DotNet (the first link) with the old legacy version (the second link).

The modern version of DotNet, "Net Core" is effectively a reboot of DotNet, with a very cross platform focus and redesigned API's based on decades of experience.

LeFantome|1 year ago

The impressive thing between .NET Framework (original .NET) and .NET now (rebooted as .NET Core but now dropped the “Core”) in that they largely foxed the API while leaving almost all of it intact.

Library code you wrote in C# 10 years before .NET Core will often just compile and run. Even more than code the resides developer learning. The plumbing between ASP.NET MVC (old) and ASP.NET Core (new) was completely and radically different. Yet writing an application in it was very much the same.

Nuzzerino|1 year ago

The first link appears to be for .NET Standard, which has a common API compatible with both Framework and Core.

Though it might be worth checking Github to find example usages of the APIs. Maybe there's even some libraries that improve the developer experience with cryptography.

neonsunset|1 year ago

These limitations come from cryptographic implementations provided by specific platforms, not from .NET. Can you list specific algorithms you need that are not supported?

The second article uses the wrong link too (it's for Framework, not for .NET).

jeroenhd|1 year ago

As someone with no horse in this race, I must say that I'm a little disappointed in the way Linux "compatibility" deals with platform differences. Most parts of the crypto API seem to be marked as "works on Linux if/except when" which seems strange given that porting to macOS didn't seem to impose such restrictions. In some cases, the inner workings of the underlying library works differently and you get an exception when using certain functionality on Linux at all.

I though Microsoft did better porting dotnet to Linux. I knew they don't care about Linux GUI, but I hoped they'd at least do system libraries better.

littlecranky67|1 year ago

You should be good when using .NET 9 and openssl 3.0+?