Skip to content

algorithms: add support for SkEd25519, SkEcdsaSha2NistP256 - #8

Merged
jclulow merged 3 commits into
oxidecomputer:mainfrom
mvo5:add-support-for-SkEd25519
Aug 31, 2026
Merged

algorithms: add support for SkEd25519, SkEcdsaSha2NistP256#8
jclulow merged 3 commits into
oxidecomputer:mainfrom
mvo5:add-support-for-SkEd25519

Conversation

@mvo5

@mvo5 mvo5 commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

[build on top of https://github.com//pull/7 as there are conflicts otherwise]

Small commit to add support for the SkEd25519, SkEcdsaSha2NistP256 algorithms that
are used by e.g. nitro keys.

Note that because this is a hardware key trying to use the privkey for it will error. I added the explicit arms for symmetry mostly, we could also just let them fall-through but I felt its slightly nicer being explicit. Happy to change that of course.

@pothos

pothos commented Feb 27, 2026

Copy link
Copy Markdown

I've tested it with sk-ssh-ed25519@openssh.com and it worked.

@mvo5

mvo5 commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

Friendly ping, anything that can be done to help this along?

mvo5 added a commit to mvo5/varlink-http-bridge that referenced this pull request Jun 2, 2026
This commit moves the sshauth crate to
https://github.com/mvo5/sshauth/tree/add-support-for-SkEd25519
until oxidecomputer/sshauth#8 is merged.

With that we get support for the SkEd25519, SkEcdsaSha2NistP256
algorithms that are used by e.g. nitro keys.
mvo5 added a commit to mvo5/varlink-http-bridge that referenced this pull request Jul 10, 2026
This commit moves the sshauth crate to
https://github.com/mvo5/sshauth/tree/add-support-for-SkEd25519
until oxidecomputer/sshauth#8 is merged.

With that we get support for the SkEd25519, SkEcdsaSha2NistP256
algorithms that are used by e.g. nitro keys.
keszybz pushed a commit to mvo5/varlink-http-bridge that referenced this pull request Jul 10, 2026
This commit moves the sshauth crate to
https://github.com/mvo5/sshauth/tree/add-support-for-SkEd25519
until oxidecomputer/sshauth#8 is merged.

With that we get support for the SkEd25519, SkEcdsaSha2NistP256
algorithms that are used by e.g. nitro keys.
mvo5 added a commit to mvo5/varlink-http-bridge that referenced this pull request Jul 10, 2026
This commit moves the sshauth crate to
https://github.com/mvo5/sshauth/tree/add-support-for-SkEd25519
until oxidecomputer/sshauth#8 is merged.

With that we get support for the SkEd25519, SkEcdsaSha2NistP256
algorithms that are used by e.g. nitro keys.
mvo5 added a commit to mvo5/varlink-http-bridge that referenced this pull request Jul 30, 2026
This commit moves the sshauth crate to
https://github.com/mvo5/sshauth/tree/add-support-for-SkEd25519
until oxidecomputer/sshauth#8 is merged.

With that we get support for the SkEd25519, SkEcdsaSha2NistP256
algorithms that are used by e.g. nitro keys.

@jclulow jclulow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With my apologies for our delay in getting to this: it looks basically good, just want to trim out a few pieces and then we can get it integrated.

Thanks!

Comment thread src/signer.rs Outdated
bail!("unsupported key algorithm");
bail!(
"unsupported key algorithm {}",
privkey.algorithm()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
privkey.algorithm()
privkey.algorithm(),

Comment thread src/signer.rs Outdated
Algorithm::Ecdsa { curve: EcdsaCurve::NistP256 }
| Algorithm::Ed25519 => (),
Algorithm::SkEd25519 | Algorithm::SkEcdsaSha2NistP256 => {
// this should never happen but lets be prepared

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine without the comment.

Suggested change
// this should never happen but lets be prepared

Comment thread src/signer.rs Outdated
Comment on lines +303 to +310
Algorithm::SkEd25519 | Algorithm::SkEcdsaSha2NistP256 => {
// this should never happen but lets be prepared
bail!(
"key algorithm {} requires a hardware token \
and cannot sign directly; use an SSH agent",
privkey.algorithm(),
);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Algorithm::SkEd25519 | Algorithm::SkEcdsaSha2NistP256 => {
// this should never happen but lets be prepared
bail!(
"key algorithm {} requires a hardware token \
and cannot sign directly; use an SSH agent",
privkey.algorithm(),
);
}

I don't think we need a special case here. The comment below about unreachability applies also for this case; i.e., the constrained builder prevents us from getting here.

@jclulow jclulow changed the title algorithms: add support for SkEd25519,SkEcdsaSha2NistP256 algorithms: add support for SkEd25519, SkEcdsaSha2NistP256 Aug 31, 2026
@mvo5
mvo5 force-pushed the add-support-for-SkEd25519 branch from afd9b4e to 0246b53 Compare August 31, 2026 07:50
mvo5 and others added 3 commits August 31, 2026 05:15
Small commit to add support for the SkEd25519 algorithm that
is used by e.g. nitro key.
This mirrors the previous commit and adds SkEcdsaSha2NistP256.
@jclulow
jclulow force-pushed the add-support-for-SkEd25519 branch from 0246b53 to 61b2f60 Compare August 31, 2026 12:26
@jclulow

jclulow commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the changes!

@jclulow
jclulow merged commit 495ebe3 into oxidecomputer:main Aug 31, 2026
@jclulow

jclulow commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

I will look at #11 from @plotnick tomorrow and once that lands we'll cut a new release that includes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants