We have a "working" implementation of SecureString on Unix, meaning that it'll run and provide the consumers with the expected inputs/outputs, but it doesn't actually encrypt any data in memory. We should investigate adding that. The implementation today does make other attempts at keeping the data confidential, such as using mlock to lock the pages in memory and using mprotect to remove read/write permissions from the pages.
We recently made the decision to leave SecureString without encryption on Unix, yes?
I don't believe that's been decided. @weshaggard?
https://github.com/dotnet/apireviews/tree/master/2015-07-14-securestring says SecureString should probably not be exposed in .NET Core
We are still working through the details but I believe we are landing in a place where we will be removing support for SecureString in .NET Core.
Closing this since dotnet/corefx#3536 removes System.Security.SecureString from .NetCore
Will .NET Core have an alternative to SecureString?
@Flavien we recently added SecureString back to ease back-compat. It lives in it's own assembly now: https://github.com/dotnet/corefx/tree/master/src/System.Security.SecureString.
@ianhays Does the aforementioned SecureString implementation perform encryption on the target in Unix, as originally suggested? I assume not but, frankly, I don't understand why this would be deprecated or moved into its own assembly at all. SecureString is a security-critical API and there is no alternative that I'm aware of.
@adamjstone the Unix implementation is here and explains what it does
https://github.com/dotnet/coreclr/blob/e74cdcb1ed6021eaf03eea5ee7f6ba3c6b403daf/src/mscorlib/corefx/System/Security/SecureString.Unix.cs
There was some older discussion here.
https://github.com/dotnet/corefx/pull/1388
Most helpful comment
@Flavien we recently added SecureString back to ease back-compat. It lives in it's own assembly now: https://github.com/dotnet/corefx/tree/master/src/System.Security.SecureString.