Skip to content
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 XMSS SSH Keys and Certificates #164

Open
geedo0 opened this issue Aug 6, 2024 · 3 comments
Open

Add support for XMSS SSH Keys and Certificates #164

geedo0 opened this issue Aug 6, 2024 · 3 comments

Comments

@geedo0
Copy link

geedo0 commented Aug 6, 2024

Upstream OpenSSH has support for XMSS-based SSH Keys and Certificates ref. Equivalent and interoperable support can be implemented in the OQS fork and liboqs's XMSS implementation. It would be good to implement this if issue #24 were to be picked up.

Implementation-wise this means adding an implementation of the sshkey interface for liboqs's sig_stfl API to ssh-oqs and adding a generator entry for XMSS.

@baentsch
Copy link
Member

baentsch commented Aug 7, 2024

Hmm -- generating certs looks like operating keygen and sigs for XMSS would be necessary, i.e., activating OQS_HAZARDOUS_EXPERIMENTAL_ENABLE_SIG_STFL_KEY_SIG_GEN and somewhat disregarding this concern. Do we really want this? How does upstream openssh handle this concern (and the XMSS state safely)?

@geedo0
Copy link
Author

geedo0 commented Aug 7, 2024

I don't feel strongly in favor of implementing this (on the contrary actually). I cut this issue to track the idea since Spencer brought it up during the standup. I'll see if I can answer how upstream OpenSSH deals with state as I'm also intrigued by it.

@geedo0
Copy link
Author

geedo0 commented Aug 7, 2024

There's a lot of overhead and custom logic (as expected) around managing state. They basically include the signature count into the serialized form of the SSH keys. This is then hydrated into the internal structs to select the correct signing key, enforce the signature limit, and whatever other logic is needed. I'm not sure what safeguards are in place to protect the integrity of that serialized state though. AFAICT it's all still considered "experimental" by the project is is not compiled by default.

That said, it would be complicated to get a liboqs version of this. Assuming liboqs delegates dealing with the state outside the library, we'd have to replace all the XMSS algorithm code with calls to liboqs. This won't align with the existing templating for stateless signatures so that's also all net-new to handle the specific XMSS insertion points.

Code pointers:

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

No branches or pull requests

2 participants