Add HiSuite 14 PMS split AES-GCM support - #49
Open
RRoenn wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for newer HiSuite / LocalBackup application-data backups using the PMS split format.
This format was observed with HiSuite / LocalBackup 14.7.0.240 (
backupVersion=31) and stores application data as multiple encrypted TAR parts:The matching
BackupFileModuleInfoentry containsisPmsSplit=true.Encryption
For PMS split application data, each part is decrypted independently using:
encMsgV3Each part is authenticated with
decrypt_and_verify()before its plaintext is accepted.After successful authentication, the decrypted parts are concatenated to reconstruct the original TAR archive.
Behavior
<package>.tar.<number>together withisPmsSplit=true.-e, the reconstructed archive is written as:data/data/<package>.tar-e, the reconstructed TAR is extracted to:data/data/<package>/info.xmlfiles are skipped by the generic Multimedia XML parser, as they are backup metadata rather than Multimedia XML files.Tests
Added synthetic tests covering:
isPmsSplitAll tests pass:
The implementation was also validated end-to-end against a real HiSuite / LocalBackup 14.7.0.240 backup containing three PMS split application-data parts. All parts authenticated successfully and reconstructed into a valid TAR archive which was extracted successfully.