-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: crypto/dsa: Implement crypto.Signer #27889
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
Comments
Any reason to support DSA at all in a new feature? Actually, can we drop support for DSA from
|
My personaly reason is mainly "I want to say that I support OpenPGP keys and feel more comfortable doing that, if I'm as close to what they support as reasonable". As for normative reasons, if we care about compliance with the spec we |
Respecting a spec Opened #27905 to track removal. |
I'm disappointed by this decision. I don't think DSA really adds significant complexity TBH - it works mostly identical to ECDSA and should be able to share almost all of the code. IMO a primitive being deprecated totally justifies not producing it any more - but consumption should still be possible. What's worse, by removing DSA from upstream, you are making it pretty much impossible to provide something even close to complete without forking the whole package, more than doubling the actual complexity. Anyway, obviously it's not my decision. But the fact that I was willing to invest time to make everyone's |
I disagree about complexity, as this issue proves it would have required changes all the way into the standard library to keep carrying support for DSA. As I mentioned on the issue, if enough users would find themselves needing a fork I am open to backing out the change. That's why I asked if you had a direct need for it yourself, or were carrying it just for completeness. (I would continue this discussion on #27905 as that's where feedback will collect.) I am really sorry you feel like your effort was wasted, and I wouldn't want you to be discouraged from contributing further. Saying no is definitely the hardest part of my job, but I believe it's important to stay true to the philosophy of these libraries. I believe reducing complexity is an outcome that does make everyone's code better :) By the way, gpg-agent support is something I strongly look forward to, so thank you for working on that. |
Given that #27905 was rejected, I think we should reopen this. Not having basic For example, the https://github.com/mozilla-services/pkcs7 package would ideally just take a Going forward there seem like two paths:
|
DSA is insecure. The overwhelming majority of the implementations only support 1024 bits keys, which like 1024 bit RSA keys are not secure anymore. No one should be using DSA. I will open a proposal to deprecate crypto/dsa.
That sounds great. In the Go standard library we can't remove things, but we can make them harder to use by not supporting them with nicer and newer APIs. You mention removing DSA support would be your preferred approach. We can't do that, but we can pretend it was removed for the purposes of further development, and other applications like PKCS7 can do the same. (For example they could drop support for this insecure key type, or failing that require wrapping the I am firmly in support of declining this proposal, but happy for it to go through the proper process now that it's more formalized. Thanks for reopening it. |
100% agree, and I'd endorse DSA deprcation. I think the status of this proposal should be linked to DSA's support in Go. If we deprecate it, we close this proposal. If we don't deprecate it, we accept this proposal.
This seems like the best way forward for these sorts of operations in general (not just the PKCS7 library). |
Based on the discussion above, this sounds like a likely decline (don't add more to crypto/dsa). |
No change in consensus, so declined. |
I would like to add an implementation of
crypto.Signer
to*dsa.PrivateKey
. It's simple to do, but a) is an API change and b) creates a new dependencycrypto/dsa -> encoding/asn1
, so I'm going through the proposal process.I am writing a package to use
gpgagent
for private-key operations. This proposal isn't directly related to that, but having theSigner
interface provides a nice complement to other existing public key ciphers. In particular, it feels a bit weird to implement acrypto.Signer
for a cipher, if the canonical package doesn't do it itself - unless there is a good reason to that I'm unaware of. There might also be some opportunity to simplifyx/crypto/openpgp
a bit, given that all supported ciphers implementcrypto.Signers
at that point.The text was updated successfully, but these errors were encountered: