You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use openssl to decrypt an encrypted epub file in Android environment. Firstly I will decompress the epub file, then let's say after the decompression, I have 4 html files that is encrypted:
titlepage.xhtml
index_split_000.html
index_split_001.html
toc.ncx
My function will decrypt these 4 files in order. It worked perfectly with titlepage.xhtml, but the next one, index_split_000.html, it still returned success but the decrypted result is wierd and unexpected. And so is index_split_001.html. Then to the toc.ncx, it worked fine again. I have tried to decrypt 2 index files using another tool and also the openssl command to decrypt, nothing was wrong then, the decrypted data is right what i want. So I think that the EVP_DecryptFinal_ex() function is working correctly.
This is the correct decrypted content of titlepage.xhtml.
Then when the program continue to the index_split_000.html, the same function that decrypt the last file correctly is broken.
but the result it returned is still 1, which mean success.
So is the index_split_001.html.
Then the process continues to the toc.ncx and it worked again.
Do notice that these 4 files share the same key and I have checked the 2 index files. There's nothing wrong with it, I use the key that decrypt titlepage.xhtml and toc.ncx successfully to decrypt 2 index files by another tool (still AES CBC 128 bit of course), and it generated the expected decrypt data.
Openssl Version: 3.3.0
Environment: Android Studio
MacOS Sonoma 14.4.1, Chip Apple M3
This discussion was converted from issue #24329 on May 06, 2024 00:43.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I use openssl to decrypt an encrypted epub file in Android environment. Firstly I will decompress the epub file, then let's say after the decompression, I have 4 html files that is encrypted:
My function will decrypt these 4 files in order. It worked perfectly with titlepage.xhtml, but the next one, index_split_000.html, it still returned success but the decrypted result is wierd and unexpected. And so is index_split_001.html. Then to the toc.ncx, it worked fine again. I have tried to decrypt 2 index files using another tool and also the openssl command to decrypt, nothing was wrong then, the decrypted data is right what i want. So I think that the EVP_DecryptFinal_ex() function is working correctly.
This is my decryption logic code :
This is the correct decrypted content of titlepage.xhtml.
Then when the program continue to the index_split_000.html, the same function that decrypt the last file correctly is broken.
but the result it returned is still 1, which mean success.
So is the index_split_001.html.
Then the process continues to the toc.ncx and it worked again.
Do notice that these 4 files share the same key and I have checked the 2 index files. There's nothing wrong with it, I use the key that decrypt titlepage.xhtml and toc.ncx successfully to decrypt 2 index files by another tool (still AES CBC 128 bit of course), and it generated the expected decrypt data.
Openssl Version: 3.3.0
Environment: Android Studio
MacOS Sonoma 14.4.1, Chip Apple M3
Beta Was this translation helpful? Give feedback.
All reactions