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: does not support pubkeys with EdDSA signature packets (algorithm 22) #23421

Closed
autarch opened this issue Jan 11, 2018 · 4 comments
Closed

Comments

@autarch
Copy link

@autarch autarch commented Jan 11, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.9.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/autarch/go"
GORACE=""
GOROOT="/usr/lib/go-1.9"
GOTOOLDIR="/usr/lib/go-1.9/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build061530537=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

See the program below:

package main

import (
	"log"
	"strings"

	"golang.org/x/crypto/openpgp"
)

const mattCaswell = `
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.6
Comment: Hostname: gpg.phillymesh.net

mQENBFGALsIBCADBkh6zfxbewW2KJjaMaishSrpxuiVaUyvWgpe6Moae7JNCW8ayhJbwAtsQ
69SGA4gUkyrR6PBvDMVYEiYqZwXB/3IErStESjcu+gkbmsa0XcwHpkE3iN7I8aU66yMt710n
GEmcrR5E4u4NuNoHtnOBKEh+RCLGp5mo6hwbUYUzG3eUI/zi2hLApPpaATXnD3ZkhgtHV3ln
3Z16nUWQAdIVToxYh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hmHiGdyTJUeQStnIrbakp5NVGyvLvQR/s3C/2+VOa
8BS5KiALlrjt3JLrqqmD5TZKYBxTZkj8C63eGR8ub6qGLjznsscQ+FFlq5fPCRgjDuMCq8CI
Y4r489gjLvEGEk2PQ153DnsaWA7NYnvxOZO7IR57GsGSQTjyxheO8E62kSx0ohTcDPAjkH0u
BspWLZ6npetgUdvUx/F7FbkBDQRRgC7CAQgAz2dQkASmxUFjAr3Y8/0yWjX961enomAEjryw
4InFPDMGttPMiV69VBepb3N04MPo5spyAY24b4bo3Cfng/oxxGl3Z3Giv1gD7JojTJPoJWeH
GxePBz++5Di0EAvq1+4wBdFUh4RWTbZwqTgckHrwiZcIJF3JGL0cgTmJOtkewcLiyMCyKuGV
zSjyFTeCqQqHYSHBrr5TyXM3HTqGgURnEhVG16jPWPMIciYXsRfO0RwMhqY7y5yRUoC4psmA
UaRTduS82BaVzw+DHi1FQ0kYLUsTidippITB57VKkD9V7CIM5uP3s+jMJMXNEJQEKdK9oCVO
ekD3ROc4Mftqv4vloQARAQABiQEfBBgBAgAJBQJRgC7CAhsMAAoJENnE0m0OYESRCzYH/3pc
H2HIWlf9uG7jVg2vudIDrl0OL134+Qyq8ummJyQbdVHjFdbLDMQlPDpbYM0zIU7qY611daA1
2AMXscpli8cGvqnK20sAw/sF9YG9Tthjn24qZRJzm+XQ3OxpJvHk8NJASRIgIsj7+EjC4Rc5
vpnuA6tfsXW7LzdOYcU46MPaYuXmKxTMWFotWTR9lJj6YKCDf+KdvBvyDfX3VhuTYt9ead1o
Sx0TMwutPSDrAiCbJvPpR1W5U99I8aXLRVZUAbWw084KkC4mk1Xr5XGt1WIDHe9A9vHdfOoM
VLUhKWd3SpL/tFfAy4UOlUf8EO/NByiKRaelFj+Wg8aRKDhMHto=
=1cGP
-----END PGP PUBLIC KEY BLOCK-----
`

func main() {
	keyring, err := openpgp.ReadArmoredKeyRing(strings.NewReader(mattCaswell))
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("%v", keyring)
}

This errors out because the key in question contains a packet for an "algorithm 22" signature (EDDSA).

What did you expect to see?

It seems like there should be an option to ignore unknown algorithms if it's possible to do so (I don't know the inner works of gpg well enough).

It'd also be good to add support for this algorithm.

What did you see instead?

2018/01/11 17:20:41 openpgp: unsupported feature: public key algorithm 22
exit status 1
@gopherbot gopherbot added this to the Unreleased milestone Jan 11, 2018
@autarch autarch changed the title x/crypto does not support pubkeys with EDDSA signature packets x/crypto does not support pubkeys with EDDSA signature packets (algorithm 22) Jan 11, 2018
@autarch
Copy link
Author

@autarch autarch commented Jan 11, 2018

Is this the same as #18576?

@bradfitz bradfitz changed the title x/crypto does not support pubkeys with EDDSA signature packets (algorithm 22) x/crypto/openpgp: does not support pubkeys with EDDSA signature packets (algorithm 22) Jan 11, 2018
@odeke-em odeke-em changed the title x/crypto/openpgp: does not support pubkeys with EDDSA signature packets (algorithm 22) x/crypto/openpgp: does not support pubkeys with EdDSA signature packets (algorithm 22) Jan 13, 2018
@gopherbot
Copy link

@gopherbot gopherbot commented Jan 13, 2020

Change https://golang.org/cl/214478 mentions this issue: opengpg: ignore unsupported signatures in addUserID if there are other, valid signatures

@kdomanski
Copy link

@kdomanski kdomanski commented Mar 16, 2020

The core problem that manifests itself here is that a key containing ANY signatures using unsupported algorithms is effectively impossible to process using golang.org/x/crypto

addUserID in openpgp/keys.go will return an error as soon as such a signature is encountered.

@FiloSottile Any chance you'll find time to review the change above?

@FiloSottile
Copy link
Contributor

@FiloSottile FiloSottile commented Mar 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants