Description
Starting in .NET 11, the HKDF class uses Windows' built-in HKDF implementation. The Windows implementation may be more restrictive on inputs than the previous implementation, causing inputs that worked in previous versions of .NET to no longer work in .NET 11.
This breaking change was introduced in .NET 11 preview 1.
Version
Other (please put exact version in description textbox)
Previous behavior
For Windows, HKDF.DeriveKey and HKDF.Expand accepted inputs of arbitrary size, so long as the inputs were permitted by the HKDF specification.
New behavior
For Windows, HKDF.DeriveKey and HKDF.Expand have limits on the maximum input length for keying material or pseudorandom key. Exceeding these limits will produce a CryptographicException. Both limits are currently 2048 bytes.
Type of breaking change
Reason for change
On Windows, .NET 11 changed from using a managed implementation to the implementation provided by Windows CNG. Using the platform implementation of a cryptographic algorithm is the preferred means for .NET to provide cryptographic functionality.
Recommended action
Typical uses of HKDF should not face these limits. Consider using smaller inputs when the limits are reached.
Feature area
Cryptography
Affected APIs
System.Security.Cryptography.HKDF.DeriveKey (all overloads)
System.Security.Cryptography.HKDF.Expand (all overloads)
Associated WorkItem - 630671
Description
Starting in .NET 11, the
HKDFclass uses Windows' built-in HKDF implementation. The Windows implementation may be more restrictive on inputs than the previous implementation, causing inputs that worked in previous versions of .NET to no longer work in .NET 11.This breaking change was introduced in .NET 11 preview 1.
Version
Other (please put exact version in description textbox)
Previous behavior
For Windows,
HKDF.DeriveKeyandHKDF.Expandaccepted inputs of arbitrary size, so long as the inputs were permitted by the HKDF specification.New behavior
For Windows,
HKDF.DeriveKeyandHKDF.Expandhave limits on the maximum input length for keying material or pseudorandom key. Exceeding these limits will produce aCryptographicException. Both limits are currently 2048 bytes.Type of breaking change
Reason for change
On Windows, .NET 11 changed from using a managed implementation to the implementation provided by Windows CNG. Using the platform implementation of a cryptographic algorithm is the preferred means for .NET to provide cryptographic functionality.
Recommended action
Typical uses of HKDF should not face these limits. Consider using smaller inputs when the limits are reached.
Feature area
Cryptography
Affected APIs
System.Security.Cryptography.HKDF.DeriveKey(all overloads)System.Security.Cryptography.HKDF.Expand(all overloads)Associated WorkItem - 630671