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 support for crypto/dsa #135

Merged
merged 24 commits into from
Sep 12, 2024
Merged

Add support for crypto/dsa #135

merged 24 commits into from
Sep 12, 2024

Conversation

qmuntal
Copy link
Collaborator

@qmuntal qmuntal commented Jan 12, 2024

This PR implements the necessary functions to support crypto/dsa.

@xnox
Copy link
Contributor

xnox commented May 8, 2024

Do we care, given DSA is now legacy and unapproved for most usecases?

@dagood
Copy link
Collaborator

dagood commented May 8, 2024

Do we care, given DSA is now legacy and unapproved for most usecases?

Unfortunately, with Microsoft Go we need to implement some legacy algorithms using CNG/OpenSSL because of how Microsoft's internal crypto policy and our fork's high compatibility goals interact. We don't think that this is something every fork needs to do, but we need this support in the library for our own fork.

It isn't a top priority for us at the moment, but it's something we currently do think we need to get done eventually.

/cc @gdams

@qmuntal qmuntal marked this pull request as ready for review September 2, 2024 07:51
Copy link
Collaborator

@karianna karianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some Q's because I don't understand Go that well :-) and some suggested nitpicks.

shims.h Outdated Show resolved Hide resolved
port_dsa.c Outdated Show resolved Hide resolved
port_dsa.c Outdated Show resolved Hide resolved
dsa_test.go Outdated Show resolved Hide resolved
dsa_test.go Outdated Show resolved Hide resolved
dsa_test.go Show resolved Hide resolved
dsa_test.go Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
dsa.go Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
dsa.go Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
@derekparker
Copy link
Contributor

@ueno would be great to have your eyes on this as well.

Copy link
Collaborator

@dagood dagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few surface-level suggestions.

dsa.go Outdated Show resolved Hide resolved
dsa.go Show resolved Hide resolved
dsa.go Show resolved Hide resolved
openssl.go Outdated Show resolved Hide resolved
@qmuntal qmuntal requested a review from dagood September 5, 2024 09:32
dsa.go Outdated Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
dsa.go Outdated Show resolved Hide resolved
qmuntal and others added 2 commits September 6, 2024 08:47
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
dsa.go Show resolved Hide resolved
Copy link
Collaborator

@ueno ueno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

return evpSign(priv.withKey, 0, 0, 0, hash)
}

// VerifyDSA verifiessig using the public key, pub.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"verifies sig" ?

@karianna
Copy link
Collaborator

@derekparker Can we get a re-review when you get a chance?

Copy link
Contributor

@derekparker derekparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karianna karianna merged commit dc8da3a into v2 Sep 12, 2024
25 checks passed
@qmuntal qmuntal deleted the dsa branch September 13, 2024 07:22
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.

7 participants