-
-
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
Idea: command API for easy custom commands #266
Comments
Currently hmac-secret is implemented, so a 32 or 64 byte can be hmac'd using a credential secret. The input to the hmac would have to be hash'd down to a 32 byte value. Currently there isn't a CLI way to interface with this though, but examples of how to do it in python are here: Happy to accept pull requests. |
hmac was just an example to illustrate it without having to dive deep into complicated ideas. |
A custom application can be added to Solo and sit on the HID "bus" and reply to custom commands sent by Solo. https://github.com/solokeys/solo/blob/master/fido2/ctaphid.c#L579 See how the RNG command is implemented. Some generic options to specify in HEX what the HID command and payload should be should be pretty easy to add. |
that would be an Idea that sounds pretty useful |
We also integrated Don't forget https://github.com/solokeys/solo-python/blob/4375a292fd85330a5a555b7308fb21a8b91545d3/solo/cli/key.py#L275-L277 if you play with this. |
Another example I played with is hashes (admittedly not useful): https://github.com/solokeys/solo/blob/6c6a9bc5b697d957be3310cabd1d96f05130858d/fido2/ctaphid.c#L841-L878 If we want to do this systematically, we should allocate CTAPHID vendor commands in a somewhat systematic way. |
@My1 are you interested in implementing the HMAC? |
interested sure, capable, at least not currently. and while that simple hmac was just illustrative of what an application could do with custom commands, somehting slightly more sophisticated (also using HMAC, although with SHA1) is outlined here: |
the solo commandline software already does a few fun things like obviously programming a solo or putting it into bootloader/dfu, reset the key and whatnot.
couldn't this be leveraged to send custom commands to a hackersolo which then can directly respond.
for example one could have a simple firmware on it which just hmacs anything given to it with an internally stored key and defines a command let's just say "hmac" for it and then that person could open a command line, say
solo cmd hmac "whatever"
and get the hmac of whatever he sent along with the solo internal keybasically this would consist of 2 parts:
The text was updated successfully, but these errors were encountered: