You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i encrypt a string using the public and private key, it encrypts and decrypts fine.
When i try to decrypt an encrypted message created by GPG Suite (Max OS X) using the same public and private key, i get an "Incorrect Key" error.
I am able to decrypt the message successfully using GPG Suite,
It seems that the error is proceed by this line: if len(candidates) == 0 && len(symKeys) == 0 { return nil, errors.ErrKeyIncorrect }
So it seems that it cannot find the candidate key within the key entity.
Does openpgp behave differently than other PGP encryption software?
What would cause this problem?
The text was updated successfully, but these errors were encountered:
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.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 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/Nic/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qm/560cwsv13md0bc27cnbzz9qr0000gn/T/go-build407708586=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Decrypting a PGP MESSAGE that was created using GPG Suite
https://gpgtools.org
What did you expect to see?
Expected the decryption to be successful
What did you see instead?
Key incorrect error
More details:
If i encrypt a string using the public and private key, it encrypts and decrypts fine.
When i try to decrypt an encrypted message created by GPG Suite (Max OS X) using the same public and private key, i get an "Incorrect Key" error.
I am able to decrypt the message successfully using GPG Suite,
It seems that the error is proceed by this line:
if len(candidates) == 0 && len(symKeys) == 0 { return nil, errors.ErrKeyIncorrect }
So it seems that it cannot find the candidate key within the key entity.
Does openpgp behave differently than other PGP encryption software?
What would cause this problem?
The text was updated successfully, but these errors were encountered: