Add support for SP800-108 CTR Key Derivation Function
authorKevin Jones <kevin@vcsjones.com>
Tue, 7 Feb 2023 17:25:31 +0000 (12:25 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Feb 2023 17:25:31 +0000 (09:25 -0800)
commitd7bf603064bbbf86e37f70b7ddf44d85f3c31b1d
treec9af144e1756e18efc91b57819fa8812d1ea143e
parent32ea33964de6e6188aa62afcbc4b1f17f1dbf1ff
Add support for SP800-108 CTR Key Derivation Function

This introduces a class for producing values per the "KDF in Counter Mode" section in NIST Special Publication 800-108r1 (Recommendation for Key Derivation Using Pseudorandom Functions).

The `SP800108HmacCounterKdf` class is part of the inbox cryptography library on .NET 8.  Based on demonstrated need for older TFMs, the type is also being exposed via a NuGet package: Microsoft.Bcl.Cryptography.  This package may, in the future, contain other types that belong as part of inbox cryptography but have a demonstrated need to be available to older TFMs.
30 files changed:
src/libraries/Common/src/Interop/Windows/BCrypt/Interop.BCryptAlgPseudoHandle.cs
src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs [new file with mode: 0644]
src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationBase.cs [new file with mode: 0644]
src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs [new file with mode: 0644]
src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs [new file with mode: 0644]
src/libraries/Common/src/System/Security/Cryptography/Utf8DataEncoding.cs [new file with mode: 0644]
src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.ArgValidation.cs [new file with mode: 0644]
src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.Functional.cs [new file with mode: 0644]
src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.Helpers.cs [new file with mode: 0644]
src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.ThreadSafety.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/Microsoft.Bcl.Cryptography.sln [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.Forwards.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/ref/Microsoft.Bcl.Cryptography.csproj [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/Resources/Strings.resx [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/HashAlgorithmNames.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdf.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs [new file with mode: 0644]
src/libraries/Microsoft.Bcl.Cryptography/tests/Microsoft.Bcl.Cryptography.Tests.csproj [new file with mode: 0644]
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
src/libraries/System.Security.Cryptography/src/Resources/Strings.resx
src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdf.Managed.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdf.Windows.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj