s3drive / app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E2E encryption: unable to decrypt files

jaimedelano opened this issue · comments

Android app (version 1.2.13) does not decrypt files.
I unable to open files encrypted with S3Drive.

Hi @jaimedelano,
Thank you for your report. Can you let me know what's the file extension of your file that you try to open?

What happen exactly when you use: "Open" function?
The app shall display the download progress and once file is downloaded locally, app shall open the Android intent to select the application that you would like to use.

Can you try "Download" or "Preview" function instead and let me know if it works for you?

Did you try "Open" function with E2E disabled for an unencrypted file?
What's your phone model?

Does the decryption work if you connect from the desktop app (provided that the exact same encryption key is configured on both devices)?

When you go to the "About" page, please long tap on version number to open the application logs. I would appreciate if you could check if there is any Warning/Error of some sort which may explain the issue that you're experiencing.

If you're not comfortable posting above details publicly, please send it over to: support@s3drive.app

Thanks !

Open function: I choose an app to open file, but no application can open the file;
Download (example a PDF): OK, but I can't open it, I get error message saying the file is corrupted;
Preview: [PDF] Can't open file, Cause: null | [Image] Gallery app shows a placeholder/broken picture.

Decryption does not work on desktop (Windows 11).

There is no error or warning message.

If decryption has failed you would've received different error message. This message indicates that file is corrupted.

Since we use authenticated cipher if decryption had failed you would see: InvalidCipherTextException

There are at least two options that possible options. Either file was already corrupted before encryption or corruption occurred during encryption process.

Can you please compare the size of the unencrypted and encrypted PDF? Is there any difference?

Same file size: unencrypted/encrypted = 1,31MB

I have tested it with a new file.
The file size is similar, but not the same.
Original: 293,302 bytes
Encrypted: 293,318 bytes

Size difference is expected. 16 bytes accounts for a verification and is appended to the encrypted blob. During decryption this 16 bytes verifies authenticity of a file and after successful decryption is no longer present in the unencrypted form.
More on that: https://stackoverflow.com/questions/67028762/why-aes-256-with-gcm-adds-16-bytes-to-the-ciphertext-size

May I ask what's the error that you receive during decryption of this 293,318 bytes file?

I confirm v1.4.1 has fixed it. Thanks!

That's great to hear, thanks for letting me know !