Skip to content

[ci-scan] Test failure: Android ChaCha20Poly1305 tag mismatch exception type #128888

@simonrozsival

Description

@simonrozsival

Note

This issue draft was prepared with GitHub Copilot assistance and should be reviewed before posting.

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1444966

Additional observed builds:

Build error leg or test failing: android-arm Release AllSubsets_CoreCLR - System.Security.Cryptography.Tests - System.Security.Cryptography.Tests.ChaCha20Poly1305Tests.EncryptTamperAADDecrypt(dataLength: 0, additionalDataLength: 1)

Error Details

ChaCha20Poly1305Tests.EncryptTamperAADDecrypt(dataLength: 0, additionalDataLength: 1) fails on Android Helix hardware because the Android implementation throws a general CryptographicException for an authentication tag mismatch instead of AuthenticationTagMismatchException.

Observed repro details from a representative official runtime-extra-platforms job:

Failure excerpt:

System.Security.Cryptography.Tests.ChaCha20Poly1305Tests.EncryptTamperAADDecrypt(dataLength: 0, additionalDataLength: 1)
Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.Security.Cryptography.AuthenticationTagMismatchException)
Actual:   typeof(System.Security.Cryptography.CryptographicException)
---- System.Security.Cryptography.CryptographicException : Error occurred during a cryptographic operation.
   at System.Security.Cryptography.ChaCha20Poly1305.DecryptCore(ReadOnlySpan`1 nonce, ReadOnlySpan`1 ciphertext, ReadOnlySpan`1 tag, Span`1 plaintext, ReadOnlySpan`1 associatedData)

Other official runtime-extra-platforms hits found in Helix testResults.xml:

Error Message

{
  "ErrorMessage": [
    "System.Security.Cryptography.Tests.ChaCha20Poly1305Tests.EncryptTamperAADDecrypt(dataLength: 0, additionalDataLength: 1)",
    "Assert.Throws() Failure: Exception type was not an exact match",
    "Expected: typeof(System.Security.Cryptography.AuthenticationTagMismatchException)",
    "Actual:   typeof(System.Security.Cryptography.CryptographicException)"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Duplicate search

No open issue was found that directly tracks this Android-specific implementation mismatch.

Closest related issue/PR:

Searches performed:

  • GitHub issue/PR searches for: ChaCha20Poly1305Tests.EncryptTamperAADDecrypt, AuthenticationTagMismatchException CryptographicException Android, ChaCha20Poly1305 AuthenticationTagMismatchException Android, EncryptTamperAADDecrypt Android, and ChaCha20Poly1305.DecryptCore CryptographicException.
  • Exact Known Build Error searches for: System.Security.Cryptography.Tests.ChaCha20Poly1305Tests.EncryptTamperAADDecrypt, ChaCha20Poly1305Tests.EncryptTamperAADDecrypt, Assert.Throws() Failure: Exception type was not an exact match + AuthenticationTagMismatchException, Actual: typeof(System.Security.Cryptography.CryptographicException), and ChaCha20Poly1305.DecryptCore.
  • Org-wide issue searches for the exact test and AuthenticationTagMismatchException / CryptographicException / Android.
  • Test source scan for existing [ActiveIssue] coverage around ChaCha20Poly1305Tests, EncryptTamperAADDecrypt, and AuthenticationTagMismatchException.

No open issue, closed issue, Known Build Error, or [ActiveIssue] entry was found for this exact Android ChaCha20Poly1305 exception-type failure.

AzDO / Helix history search

Recent public runtime-extra-platforms builds (definition 154) on main were searched for this signature. The important detail is that the xUnit failure text is not present in the AzDO job console logs; it is present in the Helix testResults.xml artifacts linked from those jobs.

  • Query window: recent builds from 1444966 (20260601.4) back through 1406427 (20260502.2).
  • Scope: 222 failed Android job console logs scanned, then 104 System.Security.Cryptography.Tests Helix work items inspected via testResults.xml where available.
  • Search strings: ChaCha20Poly1305Tests.EncryptTamperAADDecrypt, AuthenticationTagMismatchException, Actual: typeof(System.Security.Cryptography.CryptographicException), ChaCha20Poly1305.DecryptCore.
  • Result: 6 official runtime-extra-platforms Helix work items contained this failure.

Architecture coverage:

  • android-arm: 4 hits (AllSubsets_CoreCLR and one AllSubsets_Mono)
  • android-arm64: 2 hits (AllSubsets_CoreCLR)
  • android-x86: 0 hits in the inspected window
  • android-x64: 0 hits in the inspected window

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1444966
Error message validated: [System.Security.Cryptography.Tests.ChaCha20Poly1305Tests.EncryptTamperAADDecrypt(dataLength: 0, additionalDataLength: 1) Assert.Throws() Failure: Exception type was not an exact match Expected: typeof(System.Security.Cryptography.AuthenticationTagMismatchException) Actual: typeof(System.Security.Cryptography.CryptographicException)]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/2/2026 9:50:59 AM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions