-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add GenerateDSAParameters and SupportsDSA functions #1421
base: microsoft/main
Are you sure you want to change the base?
Conversation
a7df47e
to
dfcf6a2
Compare
@@ -854,6 +886,14 @@ index 00000000000000..08600a2c833ac7 | |||
+func VerifyEd25519(pub *PublicKeyEd25519, message, sig []byte) error { | |||
+ panic("cryptobackend: not available") | |||
+} | |||
+ | |||
+func SupportsDSA(l, n int) bool { | |||
+ return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why return false
rather than panic("cryptobackend: not available")
? (This is the only return
in the file.)
@@ -259,3 +259,11 @@ index 00000000000000..7c5fbeea717618 | |||
+func VerifyEd25519(pub *PublicKeyEd25519, message, sig []byte) error { | |||
+ panic("cryptobackend: not available") | |||
+} | |||
+ | |||
+func SupportsDSA(l, n int) bool { | |||
+ return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(On the other hand, this particular return does make sense, because it's tied to a backend that might work.)
@@ -467,6 +467,18 @@ index 00000000000000..3d3d13709de5ac | |||
+func VerifyEd25519(pub *PublicKeyEd25519, message, sig []byte) error { | |||
+ panic("cryptobackend: not available") | |||
+} | |||
+ | |||
+func SupportsDSA(l, n int) bool { | |||
+ return n != 224 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems unusual to me to support all sizes except for one... add a comment? Or add a cng.SupportsDSA
function to the CNG backend repo and call that to let it decide and document this instead?
No description provided.