-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Vendor command for signing SHA256 hash #395
Comments
I like it! I made an experiment in this direction a long time ago (see CTAPHID_PROBE command, we'd want to pick a different one). Perhaps you can open an "RFC issue" with a sketch of a plan? E.g., we'd definitely need to follow analogous "PIN rules" as elsewhere. Additional input: I'm a big fan of OpenBSD's (Just a nit, I'd ask that |
Interesting. I see that you choose to implement a new CTAPHID command. I was thinking of using CTAPHID_CBOR with a new vendor command. Not sure what are the pros and cons.
I could do that but I prefer to create a PoC first.
Yeah, P256 is the low-hanging fruit here but I am also interested into Ed25519 |
Regarding CTAPHID vs. CTAPHID_CBOR vendor command: I think I was just using the easiest way I saw back then (with little understanding). Probably if you are doing something that expects a CBOR map of arguments, it makes most sense to do it with CTAPHID_CBOR (and re-use the infrastructure). |
This patch adds new CTAP2 vendor command with command value 0x50. The command arguments are credentialId and user specified SHA256 hash. It returns a DER encoded signature of the given hash, using the key which corresponds to the specified credentialId. Example request: {1: <sha256_hash>, 2: {"id": <credential_id>, "type": "public-key"}} Example response: {1: <der_signature>} Issue: solokeys#395
I have the first PoC ready. You need to patch both solo and solo-python if you want to give it a try. I am also using the
|
This patch adds new CTAP2 vendor command with command value 0x50. The command arguments are credentialId and user specified SHA256 hash. It returns a DER encoded signature of the given hash, using the key which corresponds to the specified credentialId. Example request: {1: <sha256_hash>, 2: {"id": <credential_id>, "type": "public-key"}, 3: [pinAuth]} Example response: {1: <der_signature>} Issue: solokeys#395
I think this would be okay but I think it would have to enforce pinAuth if a PIN is set, otherwise this could be used to bypass PIN restrictions on normal FIDO2 transactions. |
Correct, I have added support for pinAuth in the last version of the PR. The |
btw might it not be nicer to have a hidden live prompt for the pin instead of giving it in the command itself (especially as most linux things I used so far keep a log of used commands which may end a bit well fun) |
This patch adds new CTAP2 vendor command with command value 0x50. The command arguments are credentialId and user specified SHA256 hash. It returns a DER encoded signature of the given hash, using the key which corresponds to the specified credentialId. Example request: {1: <sha256_hash>, 2: {"id": <credential_id>, "type": "public-key"}, 3: [pinAuth]} Example response: {1: <der_signature>} Issue: solokeys#395
I have implemented PGP signing with Solo and now I can sign git commits with my Solo Hacker! 🎉 @conorpp @nickray if you decide to go with this vendor command, I can work on adding the PGP stuff to |
You're awesome! Will dig in soon. |
totally sounds fun |
Had a good look now @rgerganov. This is exactly how I imagined this should work :) If you have the time/energy, would be great to add your two scripts to Regarding API, I'd suggest the following:
|
also when running PGP why not also add something to decrypt as well? so you can have some fun with encrypted PGP mails and stuff |
@My1, different topic. This is a vendor command to sign. |
Sure, will start working on this soon. |
Hey 1) is their a support for that product or a forum? if not can we create one? |
This patch adds new CTAP2 vendor command with command value 0x50. The command arguments are credentialId and user specified SHA256 hash. It returns a DER encoded signature of the given hash, using the key which corresponds to the specified credentialId. Example request: {1: <sha256_hash>, 2: {"id": <credential_id>, "type": "public-key"}, 3: [pinAuth]} Example response: {1: <der_signature>} Issue: solokeys#395
I wonder what others think about having a vendor command for signing an arbitrary SHA256 hash. The use case for this would be using a Solo key for file signing. The hash of the file will be computed on the host and then it will be passed to the key for signing. This is how it would look like from user perspective:
We cannot do that with the standard command for getting assertion but we can easily implement a new custom command.
Thoughts?
The text was updated successfully, but these errors were encountered: