Repository navigation
feat(keygen): enroll and download FIDO security keys - #347
Merged
Merged
Conversation
Add external sk-api enrollment and resident downloads, internal CTAP2 makeCredential and PIN credential management, and U2F registration. Verify signed attestations and enforce credential protection, bounded parsing, and safe key-file publication. Expose OpenSSH security-key types and options in bssh-keygen, preserving resident credentials with portable unique filenames. Document unsupported attestation export, credential-management requirements, and the ssh-key handle limit. Validate with security-key protocol/FFI tests, OpenSSH key-file parsing, CLI tests, and targeted clippy. Physical-authenticator validation remains pending because no device is available. Closes #337
inureyes
added a commit
that referenced
this pull request
Oct 22, 2026
Correct the compatibility ledger after #347: bssh-keygen now enrolls both SK algorithms and downloads resident credentials through either provider. Preserve the remaining WebAuthn and physical-device validation gaps and document the enrollment restrictions. Validation: compared the ledger with the merged implementation and man page; diff checks pass. Final integrated contract tests passed (31 Rust tests and 14 Python tests). Refs #337
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enroll
ed25519-skandecdsa-skcredentials and download resident keys withbssh-keygen -K, using either the built-in provider or an OpenSSH sk-api library. Add provider selection, PIN entry, supported-Ooptions, OpenSSH key files, and unique portable resident filenames.The built-in provider implements CTAP2 makeCredential, PIN protocols 1/2 with scoped credential-management tokens, and U2F registration. It verifies packed/U2F registration signatures, accepts unsigned
noneattestations as OpenSSH does, and enforces requested credential protection. External responses receive bounded validation and zeroizing cleanup.Built-in resident enrollment requires a PIN and credential management to avoid replacing an existing application/user credential.
write-attestationis explicitly unsupported; ssh-key limits serialized handles to 255 bytes. Documentation and CLI help describe these boundaries.Validation
ssh-keygenparsing of both algorithms.Closes #337