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

Delete app keys #33

Merged

Conversation

sosthene-nitrokey
Copy link
Contributor

Add delete_app_keys and delete_auth_keys syscalls.

  • delete_all_pins now doesn't affect application keys
  • delete_app_keys: delete all application keys. Getting them again after calling this will not yield the same key
  • delete_auth_data combines delete_all_pins and delete_app_keys

This is a breaking change and applications (trussed-secrets) relying on the old delete_all_pins behaviour will need to be fixed.

@sosthene-nitrokey
Copy link
Contributor Author

This was previously blocked by trussed-dev/littlefs2#35, but this edge-case was only triggered because of incorrect filesystem layout fixed in #31

src/lib.rs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
Comment on lines 16 to 20
- Add `delete_app_keys` and `delete_auth_keys` syscalls. ([#33][])

- `delete_all_pins` now doesn't affect application keys
- `delete_app_keys`: delete all application keys. Getting them again after calling this will not yield the same key
- `delete_auth_data` combines `delete_all_pins` and `delete_app_keys`
Copy link
Member

Choose a reason for hiding this comment

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

naming: reset_* is used in the code

Cargo.toml Outdated
@@ -28,4 +28,4 @@ trussed = { version = "0.1.0", features = ["serde-extensions", "virt"] }

[patch.crates-io]
littlefs2 = { git = "https://github.com/Nitrokey/littlefs2", tag = "v0.3.2-nitrokey-2" }
trussed = { git = "https://github.com/Nitrokey/trussed.git", tag = "v0.1.0-nitrokey-5" }
trussed = { git = "https://github.com/sosthene-nitrokey/trussed.git", branch = "remove-dir-all-where" }
Copy link
Member

Choose a reason for hiding this comment

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

Please port the change to Nitrokey/trussed to make it easier to integrate it.

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 merged it into upstream trussed too, so we can also point it to upstream trussed.

- `delete_all_pins` now doesn't affect application keys
- `reset_app_keys`: reset all application keys. Getting them again after calling this will not yield the same key
- `reset_auth_data` combines `delete_all_pins` and `reset_app_keys`

This is a breaking change and applications (trussed-secrets) relying on the old `delete_all_pins` behaviour will need to be fixed.
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