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

dev_log: log encryption update #3468

Merged
merged 7 commits into from
Dec 11, 2024

Conversation

jnippula
Copy link
Contributor

@jnippula jnippula commented Nov 22, 2024

Documentation update to have combined .ulge file instead of separate .ulgc/ulgk files

@hamishwillee
Copy link
Collaborator

Thanks @jnippula

Looks great. Because the encryption doc was written after v1.15 but applies previous to v1.13 , this change will remove some useful information on the old approach. I've backported the original doc to v1.15 (should appear soon). YOu could, if you wish, link back to that for the original instructions.

I'm going to move this to draft so that I don't accidentally merge it. Can you move it back to live when the linked change in the autopilot happens?

@hamishwillee hamishwillee marked this pull request as draft November 27, 2024 01:56
@jnippula jnippula force-pushed the pr-dev-log-combined-enc-file branch from 3215733 to 15940c2 Compare November 27, 2024 07:51
@hamishwillee hamishwillee force-pushed the pr-dev-log-combined-enc-file branch from 15940c2 to e00d7de Compare December 5, 2024 03:26
@jnippula jnippula force-pushed the pr-dev-log-combined-enc-file branch from e00d7de to af38942 Compare December 5, 2024 08:10
@jnippula jnippula marked this pull request as ready for review December 5, 2024 08:18
@jnippula jnippula requested a review from hamishwillee December 5, 2024 08:19
combined .ulge file instead of separate .ulgc/ulgk files
@hamishwillee hamishwillee force-pushed the pr-dev-log-combined-enc-file branch from af38942 to d21192c Compare December 11, 2024 03:34
::: info
The encryption algorithm used is set in [SDLOG_ALGORITHM](../advanced_config/parameter_reference.md#SDLOG_ALGORITHM).
At time of writing, only `XChaCha20` is supported (AES can be selected, but there is no implementation).
::: tip
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, added this tip to note that the encryption has changed.


Note that both files will be downloaded with the `.ulg` suffix.
You can identify the symmetric key file, as it is usually much smaller than the log file (about 300 bytes)
When decrypting a `.uloge` file the script takes 3 arguments:
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, updated instructions to just be how you do it for uloge - makes things a bit simpler, which is the benefit of this whole approach.

I kept the command line instructions, but pushed them below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just minor comment, the encrypted file extension is .ulge, without the 'o' in the middle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed that

@@ -32,7 +32,10 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
- [Battery level estimation improvements](../config/battery.md) ([PX4-Autopilot#23205](https://github.com/PX4/PX4-Autopilot/pull/23205)).
- [Voltage-based estimation with load compensation](../config/battery.md#voltage-based-estimation-with-load-compensation) now uses a real-time estimate of the internal resistance of the battery to compensate voltage drops under load (with increased current), providing a better capacity estimate than with the raw measured voltage.
- Thrust-based load compensation has been removed (along with the `BATn_V_LOAD_DROP` parameters, where `n` is the battery number).

- [Log Encryption](../dev_log/log_encryption.html) now generates an encrypted log that contains the public-key-encrypted symmetric key that can be used to decrypt it, instead of putting the key into a separate file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, I also added this release note. Doing these as we go along makes the release process much less painful :-)

en/releases/main.md Outdated Show resolved Hide resolved
Copy link

No flaws found

@hamishwillee hamishwillee merged commit 773fd31 into PX4:main Dec 11, 2024
1 of 2 checks passed
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