-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: x/crypto/openpgp: add support for more features #29301
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
@bradfitz says if these are small, non-breaking API changes then go ahead and send them. Otherwise please explain the changes in more detail. Thanks. |
@rsc, @bradfitz These are fairly small changes and do not break the existing API (rather adds new API Entity.AddSubKey(), Entity.RevokeKey(), Subkey.Revoke() and Identity.RevokeSignature()). A short explanation for the aforementioned API's is as follows:
Please let me know if any further details/ design document is required. |
@FiloSottile @bradfitz The code changes are pending review in https://go-review.googlesource.com/c/crypto/+/161817. The code changes are not API breaking and have breadth tests added for the newly introduced APIs. Please let me know if any more information is needed about the changes and I'll be happy to address any issues. Thanks |
Change https://golang.org/cl/161817 mentions this issue: |
Hi everyone, Changes in https://go-review.googlesource.com/c/crypto/+/161817 are pending reviews since April. Since @bradfitz is on leave right now, who else would be the right person to review and potentially merge these changes? |
@syadav2015 The crypto/openpgp situation is... unfortunate. The bottom line is that the library is not-deprecated-but-also-somewhat-frozen and it doesn't have a maintainer in the Go team. There's a lenghty discussion at #30141 (search for openpgp in that page). You should also read Filippo's message at https://groups.google.com/forum/#!topic/golang-openpgp/_P6AmeCmD9w Maybe write/ping that mailing list for your proposal. |
@ALTree Thanks for the input. I have added the proposal to the thread for now. Let's see how it goes :) |
The existing implementation does not support operations on subkeys using the library, so the following changes have been made to support subkey interactions as per RFC 4880 (https://tools.ietf.org/html/rfc4880). 1. AddSubkey adds support for generating new subkeys associated with an Entity. It also adds support for adding signing subkeys. 2. RevokeKey generates a 0x20 key revocation signature against the entity. 3. RevokeSubkey generates a 0x28 subkey revocation signature for a subkey. 4. Add Revocation reason subpacket and EmbeddedSignature subpacket to output subpackets with corresponding tests. 5. Re-sign the embedded signatures for subkeys in entity.SerializePrivate(). Fixes golang/go#29301 Change-Id: If8ee111e825c17ccaa19e4afbac4a756671d9bf5
…ionSubkey methods to Entity (#53) The existing implementation does not support operations on subkeys using the library, so the following changes have been made to support subkey interactions as per RFC 4880 (https://tools.ietf.org/html/rfc4880). 1. AddSigningSubkey and AddEncryptionSubkey add support for generating new subkeys associated with an entity. 2. RevokeKey generates a key revocation signature for an entity. 3. RevokeSubkey generates a subkey revocation signature for a subkey. 4. Add Revocation reason subpacket and EmbeddedSignature subpacket to output subpackets with corresponding tests. 5. Re-sign the embedded signatures for subkeys in entity.SerializePrivate(). Fixes golang/go#29301 Change-Id: If8ee111e825c17ccaa19e4afbac4a756671d9bf5
Per the accepted #44226 proposal and due to lack of maintenance, the golang.org/x/crypto/openpgp package is now frozen and deprecated. No new changes will be accepted except for security fixes. The package will not be removed. If this is a security issue, please email [email protected] and we will assess it and provide a fix. If you're looking for alternatives, consider the crypto/ed25519 package for simple signatures, golang.org/x/mod/sumdb/note for inline signatures, or filippo.io/age for encryption. You can read a summary of OpenPGP issues and alternatives here. If you are required to interoperate with OpenPGP systems and need a maintained package, we suggest considering one of multiple community forks of golang.org/x/crypto/openpgp. We don't endorse any specific one. |
The current implementation of openpgp/crypto package does not allow the following operations on an openpgp.Entity object:
P.S: I've noticed we have a lot of these functionalities are present in ReadEntity e.g supporting subkeys and revocation certificates, but there seems no way to do these operations in the library on an entity directly using the library. After going over #27889 and considering @FiloSottile's opinion to keep things simple here, it would be great if we could filter out the aforementioned proposals that we can keep in the openpgp package while the rest can be implemented in a separate package.
The text was updated successfully, but these errors were encountered: