You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be interesting, since the webcrypto hashing functions are one shot, that is they do not support incremental hashing.
I suppose IncrementalHash could be supported by allowing one call to AppendData, and throw PNSE if multiple calls are made, to at least support using IncrementalHash non-incrementally..
If this "works" before webcrypto is used, it will not be able to move to webcrypto without accepting that limitation.
I suppose IncrementalHash could be supported by allowing one call to AppendData, and throw PNSE if multiple calls are made, to at least support using IncrementalHash non-incrementally..
Alternatively we could buffer the data and only call into the browser when the hash value is retrieved.
I'm not sure that IncrementalHash actually helps us as is, the problem is still that all the browser apis return a Promise and there is (by design) no way to synchronously wait on that Promise.
@marek-safar release/5.0-rc2 will be merged back into release/5.0 so this shouldn't be necessary (unless you want to have it for RC1 which as I understand is pretty much done).
Is SHA256 will be included ? im stuck since preview 6 with this exception (im currently in RC1)
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.↵ ---> System.PlatformNotSupportedException: System.Security.Cryptography.Algorithms is not supported on this platform.↵ at System.Security.Cryptography.SHA256..ctor()↵ at System.Security.Cryptography.SHA256Managed..ctor()↵
@marek-safar Any idea if the zip libraries will be supported? Currently unzipping a password protected zip gives the following exception. Looks like Rfc2898DeriveBytes is the issue:
Unhandled exception rendering component: System.Security.Cryptography is not supported on Browser.
System.PlatformNotSupportedException: System.Security.Cryptography is not supported on Browser.
at System.Security.Cryptography.DeriveBytes..ctor()
at System.Security.Cryptography.Rfc2898DeriveBytes..ctor(String password, Byte[] salt, Int32 iterations)
at Ionic.Zip.WinZipAesCrypto._GenerateCryptoBytes()
at Ionic.Zip.WinZipAesCrypto.get_GeneratedPV()
at Ionic.Zip.WinZipAesCrypto.ReadFromStream(String password, Int32 KeyStrengthInBits, Stream s)
at Ionic.Zip.ZipEntry.SetupCryptoForExtract(String password)
at Ionic.Zip.ZipEntry.EnsurePassword(String password)
at Ionic.Zip.ZipEntry.InternalExtractToStream(Stream outStream, String password, ZipContainer zipContainer, ZipEntrySource zipEntrySource, String fileName)
at Ionic.Zip.ZipEntry.Extract(Stream stream)
@marek-safar Thanks. Is there a plan for a fix for this? Does this mean it will be released end of 2021 for .net6 release or earlier within a .net 6 preview?
Will there be any browser encryption support in .NET 5 at all (AES, RSA, etc)? Or at least a commitment to address crypto related regressions from .NET Core 3.1 to .NET 5 in .NET 6? Right now it's very difficult to decide what to do with browser projects that cannot be transitioned from .NET Core 3.1 to .NET 5 because of this situation; if they are a dead end that should be abandoned, or it is just a temporary setback.
Activity
vcsjones commentedon Jul 29, 2020
This might be interesting, since the webcrypto hashing functions are one shot, that is they do not support incremental hashing.
I suppose
IncrementalHashcould be supported by allowing one call toAppendData, and throw PNSE if multiple calls are made, to at least support usingIncrementalHashnon-incrementally..If this "works" before webcrypto is used, it will not be able to move to webcrypto without accepting that limitation.
akoeplinger commentedon Jul 29, 2020
Alternatively we could buffer the data and only call into the browser when the hash value is retrieved.
lewing commentedon Jul 29, 2020
I'm not sure that IncrementalHash actually helps us as is, the problem is still that all the browser apis return a Promise and there is (by design) no way to synchronously wait on that Promise.
marek-safar commentedon Jul 29, 2020
It's not about helping but supporting that API in browser. This API looks to be used by for example Roslyn.
WASM: Add MD5 and SHA* hash functions
jeffhandley commentedon Aug 26, 2020
@marek-safar Should this still be in the 5.0.0 milestone or can this move to 6.0.0 since #40074 is in 6.0.0?
15 remaining items
akoeplinger commentedon Sep 3, 2020
@marek-safar release/5.0-rc2 will be merged back into release/5.0 so this shouldn't be necessary (unless you want to have it for RC1 which as I understand is pretty much done).
marek-safar commentedon Sep 3, 2020
I don't want to have this in RC1 but would like to have it in release/5.0 as soon as possible to increase the testing time
secana commentedon Sep 3, 2020
Will MD5 be included, too? Unfortunately it is heavily used in the industry branch I'm working in and as such needed.
akoeplinger commentedon Sep 3, 2020
@secana no unfortunately MD5 isn't and won't be included. You'd need to compile your own version of the MD5 algorithm into your app.
secana commentedon Sep 3, 2020
@akoeplinger thx for the fast reply. I guess that will work, too.
WASM: Add SHA* hash functions (#41761)
julienGrd commentedon Sep 15, 2020
Is SHA256 will be included ? im stuck since preview 6 with this exception (im currently in RC1)
guys please tell me is not reported to .NET 6...
marek-safar commentedon Sep 15, 2020
@julienGrd yes, it's supported but you wait for RC2
andersson09 commentedon Sep 15, 2020
@marek-safar Any idea if the zip libraries will be supported? Currently unzipping a password protected zip gives the following exception. Looks like Rfc2898DeriveBytes is the issue:
Unhandled exception rendering component: System.Security.Cryptography is not supported on Browser.
System.PlatformNotSupportedException: System.Security.Cryptography is not supported on Browser.
at System.Security.Cryptography.DeriveBytes..ctor()
at System.Security.Cryptography.Rfc2898DeriveBytes..ctor(String password, Byte[] salt, Int32 iterations)
at Ionic.Zip.WinZipAesCrypto._GenerateCryptoBytes()
at Ionic.Zip.WinZipAesCrypto.get_GeneratedPV()
at Ionic.Zip.WinZipAesCrypto.ReadFromStream(String password, Int32 KeyStrengthInBits, Stream s)
at Ionic.Zip.ZipEntry.SetupCryptoForExtract(String password)
at Ionic.Zip.ZipEntry.EnsurePassword(String password)
at Ionic.Zip.ZipEntry.InternalExtractToStream(Stream outStream, String password, ZipContainer zipContainer, ZipEntrySource zipEntrySource, String fileName)
at Ionic.Zip.ZipEntry.Extract(Stream stream)
marek-safar commentedon Sep 15, 2020
@andersson09 Rfc2898DeriveBytes won't be supported on the browser in .NET 5
https://github.com/dotnet/runtime/blob/master/src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs#L14
andersson09 commentedon Sep 15, 2020
@marek-safar Thanks. Is there a plan for a fix for this? Does this mean it will be released end of 2021 for .net6 release or earlier within a .net 6 preview?
lewing commentedon Sep 15, 2020
@andersson09 it won't be fixed in net5.0 we are hoping to have a solution for net6.0
volaru77 commentedon Sep 15, 2020
Will there be any browser encryption support in .NET 5 at all (AES, RSA, etc)? Or at least a commitment to address crypto related regressions from .NET Core 3.1 to .NET 5 in .NET 6? Right now it's very difficult to decide what to do with browser projects that cannot be transitioned from .NET Core 3.1 to .NET 5 because of this situation; if they are a dead end that should be abandoned, or it is just a temporary setback.
marek-safar commentedon Sep 15, 2020
@volaru77 no encryption support in .NET 5. For future version please follow up on #40074