-
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
Clarify/document hotp-verification output for 6 Admin/User PINS and firmware version, lack of secret app Heads mechanism for 'secret' app reset/Admin PIN #36
Comments
@jans23 @nestire @daringer : seal-hotpkey get the output of gpg which in this case is a bit irrelevant since NK3 implement HOTP secret independently of GPG. The "age" being <1 month old is still valid for public key age, where card counters don't apply for NK3 HOTP secret validation. So technically, logic applied under seal-hotp-key to check HOTP counter (not Admin PIN related) is invalid as of today. |
It looks like the output of As Going this way the entire |
@daringer : could hotp-verification
|
will check
I suppose you mean it should report remaining tries, if so: will check
Don't understand this, can you elaborate what you mean here? Also please keep in mind we are talking about Generally, an example of the expected output of |
The first and second points should not be too complicated, @tlaurion could you please tell (note down an example) how you would like the |
Sorry I haven't looked into this. As of now the output doesn't make any sense providing info that are not even in releases notes so cannot even be crosslinked. I already referred to what code of heads do and where things could be adapted depending of what hotp-verification could provide. For the rest this is nitrokey problem, not mine I'm sorry. I would hope this is actioned upon without needing me to produce any ouput whatsoever: nitrokey changes should not break compatibility, or hotp-verification should be adapted to follow nitrokey changes. I make a statement here. I was told to stop working for free. That's what I'm doing. |
@daringer : maybe we have to flip this around and see what Heads official docs currently says at https://github.com/linuxboot/heads-wiki/blob/master/Installing-and-Configuring/configuring-keys.md rendered at https://osresearch.net/Configuring-Keys/#oem-factory-resetre-ownership Thinking points:
On hotp-verification output:
Let's start from there @daringer ? |
@daringer do you think we can do a crunch here and fix this issue prior of 2024-11-20 feature freeze of Heads at linuxboot/heads#1821 ? I had again an issue at #37 (comment) related to hotp-verification not reporting the good thing and therefore Heads doing wrong assumptions. Eg: |
This discussion needs answers to #36 (comment) to follow through @jans23 |
@tlaurion Could you paste / screenshot the result of It's looking for |
Repro: nk3a-minitest
reset:
Then from Heads:
nk3-nfctest:
reset
Heads collected ouput:
@JonathonHall-Purism yes, we could change regex (must: at least for linuxboot/heads#1821), even more if downstream plans to do one Heads release a year, maybe two).
|
Relevant line (same in both): It sounds like we are doing the right thing for the wrong reason. If no PIN is set, it doesn't make sense to try the default, but our message could be more precise, just by detecting this text. I don't have an NK3. Is it possible to seal HOTP in this state? What PIN is the user supposed to enter? Based on that, what should seal-hotpkey actually do? |
Would be better but still really problematic:
The 'secret' app gets its 'GPG Admin PIN" (Wrong naming...) set on first HOTP sealing. Exactly there (as of today, after reboot past oem-factory-reset run, which seals TPMTOTP secret through reverse HOTP in nk3 into its secret app):
But this hides another more important problem, as noted under #37 (comment), quoting:
This means....
We need:
Thoughts and plan of action @daringer @jans23 @JonathonHall-Purism @sosthene-nitrokey @szszszsz? |
To make the user re-ownership flow work:
If the PIN is set, do we get a valid attempt counter? |
Yes. since hotp-verification already sets the secret app Admin PIN, i do not think its a far stretch to have it implement what is needed here so that as nk2/librem key, the nk3 can support oem factory reset/reownership properly, while Heads will need to become interactive here so that new HOTP requirement of physical presence of nk3 (touching dongle) is clearly stated in oem-factory-reset script for OEM/user when comes the time to seal TPMTOP through reverse HOTP to the nk3.
As of now, first attempt of HOTP without PIN being set is managed by hotp-verification and sets the passphrase provided at prompt as secret app Admin PIN on first use, so no need to sail it with a dummy PIN. But there is a need for reset/passphrase change that is for sure, with same reasons as explained earlier, otherwise there is no transfer of ownership possible and nk3 is regression over nk2/librem keys for Heads attestation with transfer of ownership being at heart of the concept not anymore respected.
This adds to the current list : what is the User PIN here? |
I mean do a dummy HOTP seal with the real pin, but dummy HOTP secret of all-zeros or something. Effectively, just setting the secrets PIN. (Though a proper mechanism to just set the PIN would be much better.) If we eventually have forward-sealing, we could forward-seal at that time with the real PIN and real HOTP secret. |
Just did a test to see which counter (Admin/User) decrease when failing HOTP sealing. Surprise surprise, both are decremented on bad TPMTOTP reverse HOTP sealing over nk3?his is why I originally opened this issue with OP.
@daringer can you open independent issues to be worked on to fix this meta-issue, to be each individually addressed by PR once we agree on the problems exposed in this meta-issue? I would need some kind of a timeline to know if the needed fixes will land before 2024-11-20, if we need to move that deadline under linuxboot/heads#1821, otherwise landing in known issues of downstream releases until next releases. |
@daringer @jans23 @sosthene-nitrokey @szszszsz: ping. Please let me know that you have clear understanding of the problems at stake here as detailed, with screenshots, under #36 (comment) TLDR:
I cannot highlight enough that 'Nitrokey Admin PIN' can only be configured once, and does not warn that there is a PIN being set when it does so, leaving everyone thinking its part of oem-factory-reset with PINs set there. Therefore if user types it wrong the first time its set without warning, the user cannot seal HOTP and needs second computer to reset dongle |
please define priorities for the 4 newly created issues @tlaurion here - what needs to be there for a release (feature freeze) what doesn't. |
For feature freeze, we need re-ownership to work as intended so that OEM can seal HOTP and end user can define new secrets per re-ownership. This implies, in order or priority:
So in order of priority:
I do not think #40 is needed, but for users that know their HOTP PIN to change it before going abroad, or when they think someone saw them type HOTP sealing PIN on post firmware upgrade (wanted: at firmware upgrade), just so par with nk2/librem key which could be done through gpg before and now can't. |
okok, yeah #41 will not be possible, currently I do not support this overall, we will discuss this, but generally it is currently not an option. Also, given the firmware nature of this, this is independent to HEADS feature freeze. Even if I would greenlight this, a full firmware release for the nitrokey 3 takes time and is nothing to be pushed through within a week. So we'll focus on #38 and #39 .... please make sure all asked information to finalize the work is stated in the respective tickets |
Then #41 needs to be splitted into physical presence removal (firmware: later: that issue) and hotp-verification issue : heads need to be able to do équivalent of nitropy nk3 secret reset without requiring user to run nitropy/Nitrokey app on another computer. Please open missing issue. Commented at #41 (comment) |
End user reported issue linked to this just now https://matrix.to/#/!RNcjJXCGHiyxXCHpKv:matrix.org/$suNZxaOPK-1hUSNccluJABlNvEZTIPt_S1V2orNJsbw?via=matrix.org&via=nitro.chat&via=tchncs.de Please answer to premier support channel and understand how this is problematic please |
@sosthene-nitrokey just want to make sure we are at the same page:
Originally posted by @tlaurion in #38 (comment) |
Analysis under: #36 (comment)
Pictures under: #36 (comment)
Need:
Blocker for linuxboot/heads#1827
History: Wrongly reported under linuxboot/heads#1726
My answer at linuxboot/heads#1726 (comment)
@nestire answer (incomplete) at linuxboot/heads#1726 (comment)
--
End user asked clarifications under Dasharo Premier support at (answered by me): https://matrix.to/#/!RNcjJXCGHiyxXCHpKv:matrix.org/$A9IbvnjLuw1EaXAynHtvlrnewrkPqYpMA2kae5t1ONM?via=matrix.org&via=nitro.chat&via=matrix.3mdeb.com
The text was updated successfully, but these errors were encountered: