-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
How to check if PublicKey is type of EC and p-256 curve? #1
Comments
The PublicKey property of X509Certificate2 seems somewhat deprecated, particularly for EC. You can validate this public key as follows:
|
Nice, thank you! Will add it!
/Anders (from phone)
On Wed, Aug 1, 2018 at 5:12 PM +0200, "Alex Seigler" <[email protected]> wrote:
The PublicKey property of X509Certificate2 seems somewhat deprecated, particularly for EC.
You can validate this public key as follows:
var pubKey = (ECDsaCng) cert.GetECDsaPublicKey();
if (CngAlgorithm.ECDsaP256 != pubKey.Key.Algorithm) throw new Fido2VerificationException();
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm able to check that a PubKey is of type ECC (same as EC as far as I understand) by checking the Name property, e.g.
But how do I check the Curve type, as required by the spec: https://www.w3.org/TR/webauthn/#fido-u2f-attestation
The text was updated successfully, but these errors were encountered: