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

Add GenerateDSAParameters and SupportsDSA functions #1421

Open
wants to merge 3 commits into
base: microsoft/main
Choose a base branch
from

Conversation

mertakman
Copy link
Contributor

No description provided.

@mertakman mertakman marked this pull request as draft November 26, 2024 17:13
@mertakman mertakman changed the title add initial DSA support Add GenerateDSAParameters and SupportsDSA functions Nov 27, 2024
@mertakman mertakman marked this pull request as ready for review November 27, 2024 14:57
@@ -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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

@dagood dagood Nov 27, 2024

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?

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

Successfully merging this pull request may close these issues.

3 participants