Skip to content

CryptographicException : An internal consistency check failed. #129684

Open

Description

@VincentBu

Non-actionable Known Build Error. Windows CNG just internally erroring in a way we cannot diagnose.

Error message:

System.Security.Cryptography.CryptographicException : An internal consistency check failed.

Stack trace:

   at System.Security.Cryptography.CngKey.Create(CngAlgorithm algorithm, String keyName, CngKeyCreationParameters creationParameters) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Create.cs:line 49
   at System.Security.Cryptography.CngAlgorithmCore.GetOrGenerateKey(Int32 keySize, CngAlgorithm algorithm) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngAlgorithmCore.cs:line 73
   at System.Security.Cryptography.RSACng.get_Key() in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACng.Key.cs:line 24
   at System.Security.Cryptography.RSACng.ExportParameters(Boolean includePrivateParameters) in /_/src/libraries/Common/src/System/Security/Cryptography/RSACng.ImportExport.cs:line 183
   at System.Security.Cryptography.Rsa.Tests.RSAXml.FromToXml() in /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs:line 989
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 37
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

Known Issue Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "System.Security.Cryptography.CryptographicException : An internal consistency check failed.",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1474245
Error message validated: [System.Security.Cryptography.CryptographicException : An internal consistency check failed.]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 6/22/2026 3:29:49 PM UTC

Report

💡 View the full list in 🌐 Build Insights

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Activity

  1. added
    JitStress
    blocking-clean-ci-optional
    on Jun 22, 2026
  2. added
    untriaged
    on Jun 22, 2026
  3. dotnet-policy-service commented on Jun 22, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
    See info in area-owners.md if you want to be subscribed.

  4. vcsjones commented on Jun 22, 2026

    @vcsjones
    Member

    It's a "Internal consistency check failed" which lines up with Windows CNG just internally erroring in a way we cannot diagnose.

  5. removed
    untriaged
    on Jun 22, 2026
  6. added
    Known Build Error
    and removed
    JitStress
    blocking-clean-ci-optional
    on Jun 22, 2026
  7. reopened this on Jun 22, 2026
  8. added
    untriaged
    on Jun 22, 2026
  9. jkotas commented on Jun 22, 2026

    @jkotas
    Member

    This was filled and closed number of times. We should keep this open with Known Build Error pattern match.

  10. removed
    untriaged
    on Jun 22, 2026
  11. reopened this on Jun 22, 2026
  12. added
    untriaged
    on Jun 22, 2026
  13. changed the title [-]Test failure: System.Security.Cryptography.Rsa.Tests.RSAXml.FromToXml[/-] [+]CryptographicException : An internal consistency check failed.[/+] on Jun 22, 2026
  14. removed
    untriaged
    on Jun 22, 2026
  15. added this to the Future milestone on Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build Errorarea-System.Security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions