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:
Feature: Ulog encryption changed to combine the wrapped symmetric key and ulog data into one file (.ulge)
Documentation: docs.px4.io
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
Tested with fmu-v5. Log entry generated using 'logger on/off' commands. Log entry downloaded using QGC and decrypted with Tools/decrypt_ulog.py tool. Verified the ulog output by uploading it to Flight Review tool.
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: https://github.com/PX4/PX4-user_guide/pull/3468