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

x/crypto/openpgp: encrypt private key documentation missing #16994

Closed
acasajus opened this issue Sep 5, 2016 · 2 comments
Closed

x/crypto/openpgp: encrypt private key documentation missing #16994

acasajus opened this issue Sep 5, 2016 · 2 comments

Comments

@acasajus
Copy link

acasajus commented Sep 5, 2016

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.7 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/acasajus/Devel/gospace"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_m/s8xbjvsx05d7g5vm9b0wlsc00000gn/T/go-build341779350=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

Tried to encrypt a openpgp.packet.PrivateKey and dump it in a PGP armor.

What did you expect to see?

An example on how to do it. I haven't found any way to do it. I would like a pointer in how to export a private key encrypting it with a passphrase. The inverse of openpgp.packet.PrivateKey.Decrypt.

What did you see instead?

No information on how to do it.

@bradfitz bradfitz added this to the Go1.8 milestone Sep 5, 2016
@odeke-em odeke-em changed the title crypto: openpgp encrypt private key documentation missing x/crypto/openpgp: encrypt private key documentation missing Sep 8, 2016
@quentinmit quentinmit modified the milestones: Soon, Go1.8 Sep 29, 2016
@odeke-em
Copy link
Member

From #16664 it seems like encrypting Private keys is not yet implemented so IMO this issue is a feature request for something non-existent right now, thus we should merge it into #16664. What do y'all think?

@bradfitz bradfitz modified the milestones: Go1.9, Soon Feb 19, 2017
@bradfitz bradfitz modified the milestones: Unreleased, Go1.9 May 23, 2017
@FiloSottile
Copy link
Contributor

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 security@golang.org 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.

@golang golang locked and limited conversation to collaborators Mar 29, 2022
@rsc rsc unassigned agl Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants