Logger: combined encrypted ulog&key file #24024
Merged
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.
Solved Problem
When downloading the encrypted log files with QGC, there is no robust way to know which symmetric key files and encrypted ulog data files are related ones. Only way currently is to look at consecutive log files and assume that the smaller file (around 300bytes) is the key and the related ulog file is the next immediate file after that. This makes it a bit difficult to automate the log gathering.
Solution
To improve the situation, the encrypted/wrapped symmetric key data could be combine with the encrypted ulog data into one single file. Then the key is always kept in the same place with corresponding encrypted ulog data, so it cannot be mixed with other keys.
Changelog Entry
For release notes:
Alternatives
Change mavlink_log_handler to either combine the key&data files or align/change names of the key&data entries to make more reliable way to link them together after download.
Test coverage
Context
https://docs.px4.io/main/en/dev_log/log_encryption.html
documentation change PR: PX4/PX4-user_guide#3468