Skip to content

Fix/encryption #24

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

Merged
merged 3 commits into from
Apr 1, 2025
Merged

Fix/encryption #24

merged 3 commits into from
Apr 1, 2025

Conversation

nozols
Copy link
Collaborator

@nozols nozols commented Apr 1, 2025

This PR fixes a couple issues with parsing DSMR frames:

  • A byte was missing in the DSMR header
  • Additional Authenticated Data (AAD) was not implemented

Some meters will have two keys:

  1. A normal encryption key
  2. An AAD

Others will use a default AAD (see luxmetering spec).

Please see the notes in the decryptFrameContents function on some details on AAD. When we have an invalid AAD, we're still able to decrypt the data. But we only know if the data is valid by checking if the decrypted data is a valid DSMR frame.

@nozols nozols requested a review from RobinBol April 1, 2025 12:26
@nozols nozols self-assigned this Apr 1, 2025
@nozols nozols merged commit 0c8e850 into master Apr 1, 2025
3 checks passed
@nozols nozols deleted the fix/encryption branch April 1, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants