tink-crypto / tink

Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
https://developers.google.com/tink
Apache License 2.0
13.5k stars 1.18k forks source link

AEADBadTagException when trying to decrypt #577

Closed prasclt closed 2 years ago

prasclt commented 2 years ago

Describe the bug:

AEADBadTagException when trying to decrypt a cipherText

What was the expected behaviour?

decrypt() method should have returned back with the plainText

Do you have any debugging information?

Our server code is written in C# and makes use of this library to perform encryption adhering to the WebPush protocol

Provide your version information:

Is there anything else you’d like to add?

Does Tink webpush expect the server also to use the same library, for the client to be able to decrypt? As our server is already built, has been running for years and successfully delivering push notifications to web clients, changing the encryption logic there is not an option. Can someone look into the encryption happening in this library and confirm if tink can decrypt a payload encrypted by it?

tholenst commented 2 years ago

I do not know what "Tink webpush" is.

Also, I do not know how you import the keys into Tink. I will close this because I don't have enough information.