-
Notifications
You must be signed in to change notification settings - Fork 7
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 support for sk- (hardware-backed) ed25519 keys #35
Comments
The bigger issue here is that sops also needs to support the yubikey for encryption, which is currently not the case: getsops/sops#1103 |
I see, and apologies, I've now found #25, which I missed in an initial search of the repo, asking for the same functionality.
I'm confused though - the public key is entirely stored in a file on my computer ( Or is the issue that the public key types don't match up? Why does the user in getsops/sops#1103 have a Is it an additional problem that Or alternatively to all that, do you agree with the way forward laid out in #25 (comment), and we should just use a plugin based approach with sops instead? :) |
Sops cannot decrypt because it would have to reach out for the yubikey, which is not implemented. I am not sure what you mean by a plugin based approach. |
Right, that part makes sense to me. Thanks for responding. I'll wait on that front first then. Feel free to leave this issue open in the meantime or close it if you like. |
I'll keep it open because otherwise someone else will just come again with the same issue. |
OpenSSH 8.2 or higher supports hardware-backed variants of ed25519 and ecdsa SSH key types, otherwise known as "secure key" (sk) variants.
I have a Yubikey and use its FIDO2 support to store a
sk-ed25519
SSH key on the device. It is not (supposedly) possible to get access to the private keys of this variant, but you can access the public key of course.I use this key to authenticate to my servers, and I'd like to use it with sops-nix as well. However, it appears that
ssh-to-age
does not support the-sk
variant of ed25519 keys, so I get an error:which I believe is due to the check for the
"ssh-"
prefix here:ssh-to-age/convert.go
Lines 99 to 103 in 3d775f6
If we expand it to:
then we predictably get:
due to:
ssh-to-age/convert.go
Lines 107 to 110 in 3d775f6
if we then expand that code to:
we then get:
which makes sense.
ssh.skEd25519PublicKey
does not implementssh.CryptoPublicKey
, whilessh.ed25519PublicKey
does.I'm wondering if it's still possible to get the elliptic curve points out of
pk
and convert it to an age key regardless? Or am I barking up the wrong tree and should go pester to go devs to implementssh.CryptoPublicKey
onssh.skEd25519PublicKey
? :)The text was updated successfully, but these errors were encountered: