Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Verify "alg" parameter #94

Closed
Tracked by #78
DanielSanchezDiaz opened this issue Aug 3, 2021 · 2 comments
Closed
Tracked by #78

Verify "alg" parameter #94

DanielSanchezDiaz opened this issue Aug 3, 2021 · 2 comments

Comments

@DanielSanchezDiaz
Copy link

Hi all! Your library has been very helpful to me in understanding webauthn. I've been trying to implement webauthn as well as make sure all the steps for registering a credential are followed ("https://www.w3.org/TR/webauthn/#sctn-registering-a-new-credential"). Currently I am on step 16 "Verify that the "alg" parameter in the credential public key in authData matches the alg attribute of one of the items in options.pubKeyCredParams." I am having difficulty getting the "alg" parameter in credential public key. I noticed that in protocol/authenticator.go:46 that the credential public key is kept as bytes and not given a struct with fields. Should CredentialPublicKey have a corresponding struct?
I also noticed that the "alg" parameter in attestation statements is used for verification, such as in attestation_packed.go. Does this do what I am trying to do?
Thanks so much! :)

@aseigler
Copy link
Contributor

aseigler commented Aug 3, 2021

Check PublicKeyData struct protocol/webauthncose/webauthncose.go:27 and the rest of what's going on in that file, I think that will get you what you're looking for.

@DanielSanchezDiaz
Copy link
Author

DanielSanchezDiaz commented Aug 3, 2021

Awesome! Thanks so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants