PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.58k stars 13.56k forks source link

Logger: combined encrypted ulog&key file #24024

Open jnippula opened 1 week ago

jnippula commented 1 week ago

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:

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

Context

https://docs.px4.io/main/en/dev_log/log_encryption.html documentation change PR: https://github.com/PX4/PX4-user_guide/pull/3468