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

AzureSigner: import_ may return *unsupported* ecdsa-sha2-nistp521 scheme #764

Closed
lukpueh opened this issue Apr 3, 2024 · 0 comments · Fixed by #852
Closed

AzureSigner: import_ may return *unsupported* ecdsa-sha2-nistp521 scheme #764

lukpueh opened this issue Apr 3, 2024 · 0 comments · Fixed by #852
Labels

Comments

@lukpueh
Copy link
Member

lukpueh commented Apr 3, 2024

AzureSigner.import_ supports importing a public key on curve nistp521, and returns it as SSlibKey with scheme "ecdsa-sha2-nistp521".

elif key_vault_key.key.crv == KeyCurveName.p_521:
crv = ec.SECP521R1()

SSlibKey.verify_signature, however, only supports nistp256 and nistp384 key:

elif self.scheme in [
"ecdsa-sha2-nistp256",
"ecdsa-sha2-nistp384",
]:

Possible fixes

  • remove support for "ecdsa-sha2-nistp521" in AzureSigner.import_
  • add support for "ecdsa-sha2-nistp521" in SSlibKey.verify_signature
  • orthogonal: validate scheme in SSlibKey.__init__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant