-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add a get_application_key method #21
Conversation
66dfb26
to
34137a7
Compare
Close #20 |
What's the ETA on this? |
34137a7
to
ab526e4
Compare
Only needs review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is counter-intuitive that delete_all_pins
also affects the pin-less application key. We should either rename the syscall or change it to only reset the PINs and introduce a separate syscall to clear all data.
Ok, I'll make
|
Hurh, trussed's filestore doesn't have a |
And now I'm finding bugs in the littlefs bindings and trussed |
See trussed-dev/littlefs2#36 (review), which is required to properly implement But this also mean we will have to have a new release of littlefs2 and merge trussed-dev/trussed#96 to benefit from it |
We’re still using a patched littlefs2 in nitrokey-3-firmware so we should be able to cherry-pick the fix for our fork: https://github.com/Nitrokey/littlefs2 |
@sosthene-nitrokey @robin-nitrokey |
Just tested and now it works, without changing anything additionally, specifically |
This method is meant to encrypt data stored on the external flash so that it can't be accessed just but plugging into it.
Multiple keys can be obtained with an
info
parameter.This adds one step after the
get_app_key
step described in #10 to add a per-application salt and an info parameter:HMAC(application_key, application_salt || len(info) || info)
.With the
application_key
being the result ofget_app_key
and the salt being a per-application salt, that is deleted withdelete_all_pins
, so that the keys change.