runtime icon indicating copy to clipboard operation
runtime copied to clipboard

CryptographicException in NonPowerOfTwoKeySizeOaepRoundtrip test

Open MihaZupan opened this issue 2 months ago • 2 comments

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1170333 Build error leg or test failing: System.Security.Cryptography.Rsa.Tests.EncryptDecrypt_TrySpan.NonPowerOfTwoKeySizeOaepRoundtrip Pull request: https://github.com/dotnet/runtime/pull/119673

Error Message

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

{
  "ErrorMessage": ["NonPowerOfTwoKeySizeOaepRoundtrip", "CryptographicException"],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}
System.Security.Cryptography.Rsa.Tests.EncryptDecrypt_TrySpan.NonPowerOfTwoKeySizeOaepRoundtrip(oaepPaddingMode: OaepSHA3-512) [FAIL]
      System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
      Stack Trace:
        /_/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EvpPkey.Rsa.cs(46,0): at Interop.Crypto.RsaGenerateKey(Int32 keySize)
        /_/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs(724,0): at System.Security.Cryptography.RSAOpenSsl.GenerateKey()
        /_/src/libraries/System.Private.CoreLib/src/System/Lazy.cs(327,0): at System.Lazy`1[[System.Security.Cryptography.SafeEvpPKeyHandle, System.Security.Cryptography, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].ViaFactory(LazyThreadSafetyMode mode)
        /_/src/libraries/System.Private.CoreLib/src/System/Lazy.cs(345,0): at System.Lazy`1[[System.Security.Cryptography.SafeEvpPKeyHandle, System.Security.Cryptography, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Lazy.cs(425,0): at System.Lazy`1[[System.Security.Cryptography.SafeEvpPKeyHandle, System.Security.Cryptography, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].CreateValue()
        /_/src/libraries/System.Private.CoreLib/src/System/Lazy.cs(505,0): at System.Lazy`1[[System.Security.Cryptography.SafeEvpPKeyHandle, System.Security.Cryptography, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].get_Value()
        /_/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs(712,0): at System.Security.Cryptography.RSAOpenSsl.GetKey()
        /_/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs(236,0): at System.Security.Cryptography.RSAOpenSsl.TryEncrypt(ReadOnlySpan`1 data, Span`1 destination, RSAEncryptionPadding padding, Int32& bytesWritten)
        /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs(52,0): at System.Security.Cryptography.Rsa.Tests.EncryptDecrypt_TrySpan.<>c__DisplayClass0_0.<Encrypt>b__0(Byte[] dest)
        /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs(62,0): at System.Security.Cryptography.Rsa.Tests.EncryptDecrypt_TrySpan.TryWithOutputArray(Func`2 func)
        /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.netcoreapp.cs(52,0): at System.Security.Cryptography.Rsa.Tests.EncryptDecrypt_TrySpan.Encrypt(RSA rsa, Byte[] data, RSAEncryptionPadding padding)
        /_/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs(701,0): at System.Security.Cryptography.Rsa.Tests.EncryptDecrypt.NonPowerOfTwoKeySizeOaepRoundtrip(RSAEncryptionPadding oaepPaddingMode)
           at System.Object.InvokeStub_EncryptDecrypt.NonPowerOfTwoKeySizeOaepRoundtrip(Object , Span`1 )
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(95,0): at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1170333 Error message validated: [at Interop.Crypto.RsaGenerateKey Error occurred during a cryptographic operation] Result validation: :x: Known issue did not match with the provided build. Validation performed at: 10/10/2025 6:00:46 PM UTC

Known issue validation

Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1170333 Error message validated: [NonPowerOfTwoKeySizeOaepRoundtrip CryptographicException] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 10/10/2025 6:23:48 PM UTC

Report

Build Definition Test Pull Request
1215787 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution
1215115 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#121800
1214633 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#122023
1213870 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#121998
1209886 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#121360
1208767 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#120330
1208585 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#121492
1207513 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution dotnet/runtime#121743
1206319 dotnet/runtime System.Security.Cryptography.Tests.WorkItemExecution

Summary

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

MihaZupan avatar Oct 10 '25 18:10 MihaZupan

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

I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):

  • https://github.com/dotnet/runtime/issues/29683

MihuBot avatar Oct 10 '25 18:10 MihuBot