Skip to content

Conversation

@Bowlerr
Copy link
Contributor

@Bowlerr Bowlerr commented Mar 20, 2025

Description

Improves error handling for cryptographic operations by adding specific handling for AEADBadTagException. This exception occurs during AES-GCM decryption when the authentication tag verification fails, indicating possible data corruption or tampering.

currently unhandled: #730

Changes

  • Added explicit handling for javax.crypto.AEADBadTagException in CipherStorageBase
  • Improved error message to better describe the cause and potential solutions
  • Added CryptoFailedException to @Throws annotation

Error Message Changes

Previous generic error handling is now replaced with a specific message for authentication failures:
"Decryption failed: Authentication tag verification failed. This usually indicates that the encrypted data was modified, corrupted, or is being decrypted with the wrong key."

Only improves error handling and messaging.

@DorianMazur DorianMazur merged commit 0f7f94f into oblador:master Mar 22, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants