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

PoC: Add vendor command for signing an arbitrary SHA256 hash #397

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rgerganov
Copy link
Contributor

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: #395

@My1
Copy link
Contributor

My1 commented Mar 22, 2020

btw I tried this along with solokeys/solo1-cli#67 and it works, pretty neat idea.

@rgerganov
Copy link
Contributor Author

Rebased the patch and added support for pinAuth

@My1
Copy link
Contributor

My1 commented Mar 23, 2020

question is on what base we would run pin, basically force if available, or let the user decide some way on creating the credential or whatever

@rgerganov
Copy link
Contributor Author

question is on what base we would run pin, basically force if available, or let the user decide some way on creating the credential or whatever

I am trying to mimic the semantics of GetAssertion. If there is a PIN set, then platform needs to send pinAuth. Otherwise, only a button press is needed for signing.

@My1
Copy link
Contributor

My1 commented Mar 23, 2020

but get assertion has uv kinda optional as far as I read it in the document, depending on how the options.uv is set and it defaults to false

@My1
Copy link
Contributor

My1 commented Mar 27, 2020

okay considering this:
#395 (comment)
it makes totally sense to force pin if set

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
@rgerganov
Copy link
Contributor Author

I have rebased the patch on top of master

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.

None yet

2 participants