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

Implement signing using FIDO sign extension and ARKG #14

Draft
wants to merge 37 commits into
base: funke
Choose a base branch
from

Conversation

emlun
Copy link

@emlun emlun commented Nov 14, 2024

This implements using our proposed WebAuthn sign extension to create credential keypairs and using them to sign credential issuances and presentations. This also implements using ARKG to generate public keys; this currently has no benefit since we still need to sign using the credential private key during the issuance flow, but we anticipate an updated OpenID4VCI profile where this signature will not be needed, enabling a much smoother user experience where public keys can be generated fully automatically even without the security key present.

If either the browser or the authenticator doesn't support the sign extension, the wallet falls back to using PRF based keys like before. Also, at the moment the ARKG implementation only works if there is exactly 1 ARKG-compatible key in the wallet. We'll need to decide what to do if there's more than one.

As of now, this imports the jose module as a submodule so that we can make the SignJWT.sign() function support a customizable signFunction parameter. I've pushed this branch of the jose repository into the wallet-frontend repo, so that we don't need any new repos just for this. So all you should need to do to get this initialized is:

$ git submodule update --init lib/jose/

In order to try/test this you'll also need a browser that supports the WebAuthn sign extension. I have a custom branch of Firefox that does that, I'll look into how I can best share that with y'all.

I haven't yet been able to test this in the Funke context, so it's possible that some things might break...

emlun added 30 commits November 14, 2024 16:13
Emacs struggles with very long lines, making it very cumbersome to work with the
file.
@emlun emlun force-pushed the sign-extension-arkg branch from fc90187 to b0165f9 Compare November 25, 2024 16:49
@emlun emlun requested a review from kkmanos November 25, 2024 16:49
This fixes possible issues with rotating the key immediately after creating it,
where otherwise it wouldn't be possible to re-wrap private keys without first
taking a detour through session storage to get `importMainKey` to add the
"unwrapKey" usage.
@emlun emlun force-pushed the sign-extension-arkg branch from 4a61cb5 to c3f160f Compare November 26, 2024 11:31
@emlun emlun marked this pull request as draft November 26, 2024 11:58
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.

1 participant