-
Notifications
You must be signed in to change notification settings - Fork 429
NativeGCMCipherException on Android 8.1 #184
Comments
I can reproduce this exception too but only after save some input and update from Android 8.0 to 8.1 (I don't test the other cases, previous of 8.0). |
No news on this crash ? Because it's still present with the latest Android DP. Below, you can see my latest tests: Android 7.1
Update to 8.1 via OTA (build OOP6.171019.012)
Is somebody observe the same behaviour ? |
What is the library version that you are using? |
I'm already using 1.1.3... |
Are you using 128 or 256 bits to decrypt? It seems to be an issue in the library and not in the OS. |
I have a same problem.
|
In my case I encrypted the file again using the version 1.1.3 to solve this. |
Our product used 1.0.7 before. |
I am afraid this will not be fixed anytime soon. I know this because I encrypt the log file on the client side and I decrypt it using bouncy castle on server side to see the logs. Either way you will have to do some work to make this work. |
You can try a newer version and still use the same format.
Then you can call decrypt(...) with the complete byte[] or an input stream. I will check the log of commits to see if there was some bug that could be caused by differences in how OS behave (like always retrieving data in certain block sizes or not). UPDATE: If the data was encrypted with 1.0.x then you need to pass Entities created with In short:
Just guessing: what happens if |
any update to this? Still trying to find a smooth solution for users who upgraded from 8.0-8.1 to be able to read their old data. Don't have original file to re-encrypt. |
I experienced this issue after upgrading to Android 9. I fixed this by overriding the Entity class with two strategies. This way I could decrypt old data and encrypt using the "safer" UTF-8encoding, which does not mess up byte order. `public class Utf8Entity extends com.facebook.crypto.Entity {
}` `public class Utf16Entity extends com.facebook.crypto.Entity {
}` |
Hi,
I have installed the preview of Android 8.1 api 27 and it is failing to decrypt getting the error below:
The same process doesn't happen on on 8.0 and prior.
Crypto#decrypt
com.facebook.crypto.cipher.NativeGCMCipherException: The message could not be decrypted successfully.It has either been tampered with or the wrong resource is being decrypted.
I know that is still in a preview stage, but maybe you could take a look to check what is the reason.
Thank you.
The text was updated successfully, but these errors were encountered: