Bug 1038683 - golang appears to contain an ECC implementation
golang appears to contain an ECC implementation
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: golang (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Čajka
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: FE-Legal ecc 1379484
  Show dependency treegraph
 
Reported: 2013-12-05 10:47 EST by Bill Nottingham
Modified: 2016-11-29 22:52 EST (History)
31 users (show)

See Also:
Fixed In Version: golang-1.2-3.el6 golang-1.7.3-2.fc25 golang-1.5.4-4.fc23 golang-1.6.3-4.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-24 11:29:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2013-12-05 10:47:27 EST
Description of problem:

At least, I would assume that's what is in go/src/pkg/crypto/elliptic/.
In Fedora, we only ship certain reviewed curves.

Version-Release number of selected component (if applicable):

1.2-1

How reproducible:

100%

Steps to Reproduce:
1. look at golang's crypto code

Actual results:

Hey, that looks like ECC, and it appears to have been always included.
Comment 1 Vincent Batts 2013-12-05 11:09:19 EST
This will take a bit of work/consideration on which curves are not allowed.

From just stdlib alone, the following libraries import from crypto/elliptic:
* crypto/ecdsa
* crypto/x509
 - also imports from crypto/ecdsa
* crypto/tls
 - also imports from crypto/ecdsa
 - also imports from crypto/x509
Comment 2 Vincent Batts 2013-12-05 11:13:43 EST
per http://golang.org/src/pkg/crypto/ecdsa/ecdsa.go, the ecdsa implementation is to spec of the Suite B guide for FIPS 186-3
Comment 9 Vincent Batts 2013-12-20 12:54:29 EST
I've pushed a patched build to rawhide, to bake for a bit. http://koji.fedoraproject.org/koji/buildinfo?buildID=485741
Comment 10 Fedora Update System 2014-01-20 21:18:47 EST
golang-1.2-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/golang-1.2-3.fc19
Comment 11 Fedora Update System 2014-01-20 21:19:54 EST
golang-1.2-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-1.2-3.fc20
Comment 12 Fedora Update System 2014-01-20 21:21:02 EST
golang-1.2-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/golang-1.2-3.el6
Comment 13 Fedora Update System 2014-01-21 00:21:18 EST
Package golang-1.2-3.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing golang-1.2-3.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-0257/golang-1.2-3.el6
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2014-01-28 22:02:44 EST
golang-1.2-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2014-01-29 22:36:38 EST
golang-1.2-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2014-02-05 14:25:23 EST
golang-1.2-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Daniel Walsh 2016-06-15 16:13:45 EDT
Reopening this bug as this patch is now causing docker builds to fail.
Comment 18 Daniel Walsh 2016-06-15 16:16:30 EDT
Can we revisit this decision, has anything changed in the last few years.  Can we implement just the elyptical curves that the NSA has licenses for?
Comment 19 Daniel Walsh 2016-06-15 16:18:23 EDT
hack/make.sh dynbinary
# WARNING! I don't seem to be running in a Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#

bundles/1.12.0-dev already exists. Removing.

---> Making bundle: dynbinary (in bundles/1.12.0-dev/dynbinary)
Building: bundles/1.12.0-dev/dynbinary-client/docker-1.12.0-dev
Created binary: bundles/1.12.0-dev/dynbinary-client/docker-1.12.0-dev
Building: bundles/1.12.0-dev/dynbinary-daemon/dockerd-1.12.0-dev
# github.com/google/certificate-transparency/go/x509
vendor/src/github.com/google/certificate-transparency/go/x509/x509.go:342: undefined: elliptic.P224
vendor/src/github.com/google/certificate-transparency/go/x509/x509.go:355: undefined: elliptic.P224
vendor/src/github.com/google/certificate-transparency/go/x509/x509.go:1461: undefined: elliptic.P224
[Exit 1]
Comment 20 Tom "spot" Callaway 2016-06-15 17:33:59 EDT
I'm checking into this.
Comment 21 Antonio Murdaca 2016-06-17 04:33:20 EDT
if this isn't doable, however we can use this patch:

diff --git a/vendor/src/github.com/google/certificate-transparency/go/x509/x509.go b/vendor/src/github.com/google/certificate-transparency/go/x509/x509.go
old mode 100755
new mode 100644
index cda7220..d879b91
--- a/vendor/src/github.com/google/certificate-transparency/go/x509/x509.go
+++ b/vendor/src/github.com/google/certificate-transparency/go/x509/x509.go
@@ -330,7 +330,6 @@ func getPublicKeyAlgorithmFromOID(oid asn1.ObjectIdentifier) PublicKeyAlgorithm
 //
 // NB: secp256r1 is equivalent to prime256v1
 var (
-	oidNamedCurveP224 = asn1.ObjectIdentifier{1, 3, 132, 0, 33}
 	oidNamedCurveP256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7}
 	oidNamedCurveP384 = asn1.ObjectIdentifier{1, 3, 132, 0, 34}
 	oidNamedCurveP521 = asn1.ObjectIdentifier{1, 3, 132, 0, 35}
@@ -338,8 +337,6 @@ var (
 
 func namedCurveFromOID(oid asn1.ObjectIdentifier) elliptic.Curve {
 	switch {
-	case oid.Equal(oidNamedCurveP224):
-		return elliptic.P224()
 	case oid.Equal(oidNamedCurveP256):
 		return elliptic.P256()
 	case oid.Equal(oidNamedCurveP384):
@@ -352,8 +349,6 @@ func namedCurveFromOID(oid asn1.ObjectIdentifier) elliptic.Curve {
 
 func oidFromNamedCurve(curve elliptic.Curve) (asn1.ObjectIdentifier, bool) {
 	switch curve {
-	case elliptic.P224():
-		return oidNamedCurveP224, true
 	case elliptic.P256():
 		return oidNamedCurveP256, true
 	case elliptic.P384():
@@ -1458,7 +1453,7 @@ func CreateCertificate(rand io.Reader, template, parent *Certificate, pub interf
 		hashFunc = crypto.SHA1
 	case *ecdsa.PrivateKey:
 		switch priv.Curve {
-		case elliptic.P224(), elliptic.P256():
+		case elliptic.P256():
 			hashFunc = crypto.SHA256
 			signatureAlgorithm.Algorithm = oidSignatureECDSAWithSHA256
 		case elliptic.P384():
Comment 22 Dan Williams 2016-08-26 10:53:56 EDT
Any resolution on this?  Upstream Kubernetes no longer builds due to the same github.com/google/certificate-transparency/go/x509/x509.go issues.
Comment 26 Ken Stailey 2016-09-11 16:59:13 EDT
This affects building Google Cloud Print CUPS proxy for Android.

Once I patched out the references to elliptic.P224 I was able to build gcp-connector-util and print from my Android smartphone.
Comment 31 Tom "spot" Callaway 2016-11-17 16:29:44 EST
The NIST P-224 curve is now permissible in Fedora. I'm rebuilding golang to enable it now.
Comment 32 Tom "spot" Callaway 2016-11-17 16:32:15 EST
This is now done in Fedora 25+. For other branches, I'll leave the changes to the maintainers.
Comment 33 Fedora Update System 2016-11-18 04:57:39 EST
golang-1.7.3-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0aae3021b3
Comment 36 Fedora Update System 2016-11-18 09:51:16 EST
golang-1.6.3-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0eb27fee7a
Comment 37 Fedora Update System 2016-11-18 09:59:19 EST
golang-1.5.4-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-109c7b5f68
Comment 38 Fedora Update System 2016-11-18 15:26:55 EST
golang-1.7.3-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0aae3021b3
Comment 39 Fedora Update System 2016-11-18 16:37:39 EST
golang-1.7.3-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1300e04b7c
Comment 40 Fedora Update System 2016-11-19 02:48:19 EST
golang-1.7.3-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1300e04b7c
Comment 41 Fedora Update System 2016-11-19 03:56:42 EST
golang-1.5.4-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-109c7b5f68
Comment 42 Fedora Update System 2016-11-19 13:50:41 EST
golang-1.6.3-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0eb27fee7a
Comment 43 Fedora Update System 2016-11-24 11:29:59 EST
golang-1.7.3-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 44 Fedora Update System 2016-11-29 18:53:00 EST
golang-1.5.4-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 45 Fedora Update System 2016-11-29 22:52:16 EST
golang-1.6.3-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.