-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support factory reset #69
Comments
Hm, that's a tough one. I prefer Regarding the build AES key issue: could we just auto-trigger that silently? I.e., no error, no warning, just do it. Is there anything that we could be destroying by doing so? Intuitively I'd say no, as everything that requires those keys would have failed to begin with, but I may very well be missing something. I guess the only use case for an explicit rebuild command would be to render the data unretrievable. And for that we could go with an explicit Not sure, just a thought. |
Actually, I thought about that too, but decided not to bring up the issue as I’m not quite sure about the consequences. First of all, it would significantly increase the time needed for the command. Secondly, people who don’t use the PWS or the encrypted storage don’t need the key. But I think that’s both acceptable. But what came to my mind is whether it is a problem to generate the AES key while the default PINs are set. As far as I know, the AES key is stored on the smart card, is not derived from the PINs and cannot be retrieved even if the PINs are known, so it should not be a problem. But I’m not really sure about that. @szszszsz May I ask for your opinion on that? Does it make sense to always build an AES key after performing a factory reset? |
Hi! What the AES generation does (AFAIR), is it gets the random data from the smartcard, and sets both smartcard AES key and device's secret, hence the long execution time. Final AES key, used for EV/PWS, is created in the following way:
PSO:Decipher is an OpenPGP v2.1 command, which does AES decryption using the internally stored value. cc @jans23 |
Thanks everybody for getting us to a proper solution! :) The corresponding pull request has been merged. I take it there is nothing else to discuss on this front. Closing the issue. If I missed something feel free to reopen. |
I think we may have neglected the experience for new users when deciding to not support building AES keys without a factory reset. For many users – at least that was the case for me –, the first priority when buying a Nitrokey Pro is the OpenPGP smart card. So for me, the user experience with nitrocli would have been:
That’s not really satisfying. So my suggestion is to add a new option to the reset command, maybe |
I am fine with such an option. |
This patch adds an --only-aes-key option to the reset command to only build a new AES key without performing a full factory reset. Fixes d-e-s-o#69.
This patch adds an --only-aes-key option to the reset command to only build a new AES key without performing a full factory reset. Fixes #69
This patch adds an --only-aes-key option to the reset command to only build a new AES key without performing a full factory reset. Fixes #69
I’m unsure how to name the factory reset command: Based on the existing commands,
reset
is a fitting choice. On the other hand, it might be beneficial to have a name that is more explicit, likefactory-reset
. Given that we also have to name the command to build the AES key, we probably have to start using more complex command names anyway. What do you think?The text was updated successfully, but these errors were encountered: