Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger: combined encrypted ulog&key file #24024

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

jnippula
Copy link
Contributor

@jnippula jnippula commented Nov 22, 2024

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

  • 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.

Context

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

Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I just remarked 2 minor cleanups.

Tools/decrypt_ulog.py Outdated Show resolved Hide resolved
Tools/decrypt_ulog.py Outdated Show resolved Hide resolved
@jnippula jnippula force-pushed the pr-logger-combined-enc-file branch from 20207c5 to a4537aa Compare December 4, 2024 13:59
Use one single .ulge file to store both wrapped symmetric key and
encrypted ulog data instead of creating separate .ulgk/ulgc files
@jnippula jnippula force-pushed the pr-logger-combined-enc-file branch from 3893bee to 6a7ad5a Compare December 4, 2024 14:04
@bkueng bkueng merged commit 814b243 into PX4:main Dec 5, 2024
53 of 58 checks passed
@jnippula jnippula deleted the pr-logger-combined-enc-file branch December 19, 2024 07:17
@jnippula jnippula restored the pr-logger-combined-enc-file branch December 19, 2024 07:17
@jnippula jnippula deleted the pr-logger-combined-enc-file branch December 19, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants