Skip to content

Add support for PRF extension with passkeys - #13529

Open
varjolintu wants to merge 2 commits into
keepassxreboot:developfrom
varjolintu:feature/passkeys_prf
Open

Add support for PRF extension with passkeys#13529
varjolintu wants to merge 2 commits into
keepassxreboot:developfrom
varjolintu:feature/passkeys_prf

Conversation

@varjolintu

Copy link
Copy Markdown
Member

Adds support for PRF extension with the passkeys feature. It allows creating and using passkeys with sites that will not work without the PRF support.

The implementation supports three different ways to handle the PRF salt:

  1. Server asks only if PRF is supported in create, and provides the salt during get -> new secret is generated when retrieving a passkey.
  2. Server gives the salt right away in create -> new secret is generated and stored at this point. When retrieving a passkey, the PRF response is built using the previously generated secret.
  3. Server gives the salt right away in create, but is using evalByCredential to provide a credential ID that must be checked against the allowCredentials list. When the ID's match, the PRF response is built using that salt.

Retrieving a passkey had to be refactored to handle extensions after a credential has been selected in KeePassXC. The previously stored PRF secret must be retrieved for handling the PRF extension response.

Related browser side PR: keepassxreboot/keepassxc-browser#3048

References / specs:

https://www.w3.org/TR/webauthn-3/#prf-extension
https://developers.yubico.com/WebAuthn/Concepts/PRF_Extension/Developers_Guide_to_PRF.html
https://botan.randombit.net/handbook/api_ref/kdf.html
https://github.com/w3c/webauthn/blob/main/explainers/prf-extension.md

Testing strategy

Useful sites for testing:
https://www.passkeyprf.com
https://webauthn-passkeys-prf-demo.explore.corbado.com

Real sites for testing:
https://posteo.de/en
https://confer.to
https://vault.bitwarden.com/#/login

Automatic tests added.

Type of change

  • ✅ New feature (change that adds functionality)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for WebAuthn PRF extension for passkeys that are saved in KeePassXC

1 participant