Bug 1038683 - golang appears to contain an ECC implementation
golang appears to contain an ECC implementation
Status: ASSIGNED
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
  Show dependency treegraph
 
Reported: 2013-12-05 10:47 EST by Bill Nottingham
Modified: 2016-06-17 04:33 EDT (History)
21 users (show)

See Also:
Fixed In Version: golang-1.2-3.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-28 22:02:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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():

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