-
Notifications
You must be signed in to change notification settings - Fork 172
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
Systemic presence of extra byte for registration with eddsa #160
Comments
Hello @Gashmob, thank you for the thorough breakdown. I see in web-auth/webauthn-framework#436 that this is due to malformed I'm evaluating a potential fix for this issue in this library. Stay tuned. |
I've created #167 that should fix this issue. I'll let you know when it's released. |
@Gashmob Thank you for your patience. You'll be happy to hear that |
Wow, @Gashmob, I grabbed this response from web-auth/webauthn-framework#436... {
"id": "ma2Y7hbtrzJtoDR4N2PkazhnrO6_58gZ8mO8epx-6aCnR9Jtio8Ge1w0_msV7HniYmLIH9yxOW8Yu_9ze_y8oj-MehAozj1jFTsjlQUEc_dxdzG5uFJTn6_RnzhulEWCcZZwcvlNTYne99MpWAD31c-4IuEr-eRRV1DWSANcax0",
"rawId": "ma2Y7hbtrzJtoDR4N2PkazhnrO6_58gZ8mO8epx-6aCnR9Jtio8Ge1w0_msV7HniYmLIH9yxOW8Yu_9ze_y8oj-MehAozj1jFTsjlQUEc_dxdzG5uFJTn6_RnzhulEWCcZZwcvlNTYne99MpWAD31c-4IuEr-eRRV1DWSANcax0",
"response": {
"attestationObject": "o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVkBCRawLfvD1MyjfrwvZRZlmxIhDbnhAYq58TqWkGOOpv2oRQAAAAIvwFefgRNH6rEWu1qNuSAqAICZrZjuFu2vMm2gNHg3Y-RrOGes7r_nyBnyY7x6nH7poKdH0m2KjwZ7XDT-axXseeJiYsgf3LE5bxi7_3N7_LyiP4x6ECjOPWMVOyOVBQRz93F3Mbm4UlOfr9GfOG6URYJxlnBy-U1Nid730ylYAPfVz7gi4Sv55FFXUNZIA1xrHaMBY09LUAMnIGdFZDI1NTE5IZggCBjXGDcYzBgpGFwYlBgcGJYYTxjdGOYY8BjyGL4YPxg7GEgYfBh_GCIYKxhgChgmGIQYkhhQGH0Y1hjoGIk",
"clientDataJSON": "eyJjaGFsbGVuZ2UiOiJvcTF2cGc3NHUtVG1xVzNEdjJMd1VfakgwME5RZjY1T3FwTWhydnI3eVBZIiwib3JpZ2luIjoiaHR0cHM6Ly90dWxlYXAtd2ViLnR1bGVhcC1haW8tZGV2LmRvY2tlciIsInR5cGUiOiJ3ZWJhdXRobi5jcmVhdGUifQ"
},
"clientExtensionResults": {},
"type": "public-key"
} And the credential public key is actually pretty messed up:
What kind of authenticator did you say you got this from? A YubiKey? Running which firmware? Compare that with my YubiKey 5 running Firmware 5.4.3 - it returns what I'd expect given all of the other well-behaving authenticators I've interacted with thus far:
I kinda want to revert #167 and say, "that authenticator should never be asked for Ed25519 public keys." 🤔 |
Huh, wild, if you look at Section 8.2 in RFC8152 it apparently spells out the requirement that I wonder if EC2 and RSA public keys use numbers for https://www.w3.org/TR/webauthn-2/#sctn-encoded-credPubKey-examples
|
It looks like the RFC8152 is using
As far as I can tell, all actual values in the COSE registry (the "Value" and "Label" columns) seem to be integer typed. |
Thanks for wading in here @emlun. I thought the string names might be allowed since the type was, as you noted, |
From the "COSE Algorithms" section of https://www.iana.org/assignments/cose/cose.xhtml, "Strings of length greater than 2" are supposedly under "Expert Review", though I must admit I don't entirely know what that means. Personally I suspect the structure is contrived, and that the values should be integers. |
In goal to register a passkey on a website, I use a php library (https://github.com/web-auth/webauthn-framework). When I try to register a new credential with eddsa as 'prefered' algorithm, the load of passkey's response failed for presence of extra bytes in authentication data .If I comment the check then all is good.
I've tried to decompose the attestation object by hand and find that:
If we follow strictly the webauthn doc, yes, there is some extra bytes. So to check if the problem comes from the library I use, I decide to try another one (yours).
I've write this little script:
The file contains:
But your lib also raised an error
webauthn.helpers.exceptions.InvalidAuthenticatorDataStructure: Leftover bytes detected while parsing authenticator data
.So, did we really need to check that ?
I use a Yubikey 5 NFC (firmware 5.4.3) and have also opened an issue on the php lib web-auth/webauthn-framework#436
The text was updated successfully, but these errors were encountered: