Add ChaCha20Poly1305 skeleton (#52030)
authorLevi Broderick <GrabYourPitchforks@users.noreply.github.com>
Wed, 5 May 2021 21:25:08 +0000 (14:25 -0700)
committerGitHub <noreply@github.com>
Wed, 5 May 2021 21:25:08 +0000 (14:25 -0700)
commita50dcc8d0db2ce4066fd65dc0d7e471edc09b06d
tree0b919448c01e10d55d5ecde93fa5b1349066238f
parent0ebcb6892bf3069ab3d2e3436ea359f786debfb1
Add ChaCha20Poly1305 skeleton (#52030)

- Also adds AesGcm.IsSupported and AesCcm.IsSupported
- The IsSupported APIs will return false on browser rather than throw PNSE

The current ChaCha20Poly1305 implementation only works on recent Win10 builds. However, we should be set up for somebody to add support for other OSes in the near future, assuming we can ride on top of other publicly-exposed implementations.
30 files changed:
src/libraries/Common/src/Interop/Windows/BCrypt/AEADBCryptHandles.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAeadHandleCache.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs
src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs
src/libraries/System.Security.Cryptography.Algorithms/src/ExcludeApiList.PNSE.Browser.txt
src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AeadCommon.Windows.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AeadCommon.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesAEAD.Windows.cs [deleted file]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesAEAD.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesCcm.Android.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesCcm.NotSupported.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesCcm.Unix.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesCcm.Windows.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesCcm.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesGcm.Android.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesGcm.NotSupported.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesGcm.Unix.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesGcm.Windows.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesGcm.cs
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ChaCha20Poly1305.NotSupported.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ChaCha20Poly1305.Windows.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ChaCha20Poly1305.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/tests/AesAEADTests.cs [deleted file]
src/libraries/System.Security.Cryptography.Algorithms/tests/AesCcmTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/AesGcmTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/ChaCha20Poly1305Tests.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/tests/CngUtility.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/tests/CommonAEADTests.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj