Adding Brainpool curves support to crypto/elliptic or golang.org/x/crypto

527 views
Skip to first unread message

ja...@keyba.se

unread,
Mar 6, 2016, 11:47:33 PM3/6/16
to golang-dev, a...@imperialviolet.org
I'd be interested in adding the Brainpool curves P-256, P-384, and P-512 to the crypto/elliptic package (or a new package golang.org/x/crypto/{elliptic or brainpool}) for use in golang.org/x/crypto/openpgp (and elsewhere).

Would these be welcomed additions? Which package location would be preferred?

(CC: AGL) 

Jacob Haven
Keybase Software Engineer

ja...@keyba.se

unread,
Mar 9, 2016, 11:19:20 PM3/9/16
to golang-dev, a...@imperialviolet.org
To follow up, made a PR to the Keybase fork of golang.org/x/crypto adding a brainpool package with support for P-{256,384,512}{t1,r1} and added the additional logic needed for full ECDSA and brainpool key support in golang.org/x/crypto/openpgp. If there's interest, we can work on porting this back to the golang.org/x/crypto stdlib.

Take a look at that initial PR here: https://github.com/keybase/go-crypto/pull/18

Cheers,
Jacob Haven
Keybase Software Engineer

Jacob Haven

unread,
Mar 10, 2016, 3:11:19 PM3/10/16
to Adam Langley, golang-dev
That's fair. It's really just needed because of the new ECC support in GnuPG 2.1.

What do you think of adding full ECDSA signing support to golang.org/x/crypto/openpgp? (The second necessary half of that PR)

On Thu, Mar 10, 2016 at 11:59 AM, Adam Langley <a...@imperialviolet.org> wrote:
On Sun, Mar 6, 2016 at 9:47 AM,  <ja...@keyba.se> wrote:
> I'd be interested in adding the Brainpool curves P-256, P-384, and P-512 to
> the crypto/elliptic package (or a new package golang.org/x/crypto/{elliptic
> or brainpool}) for use in golang.org/x/crypto/openpgp (and elsewhere).

I'm afraid that I don't believe that Brainpool curves are sufficiently
widely useful to warrant inclusion in the standard libraries. That, of
course, doesn't preclude you making the code available yourself.


Cheers

AGL

--
Adam Langley a...@imperialviolet.org https://www.imperialviolet.org



--
Jacob H. Haven
Keybase Software Engineer

Adam Langley

unread,
Mar 10, 2016, 3:45:38 PM3/10/16
to Jacob Haven, golang-dev
On Thu, Mar 10, 2016 at 12:11 PM, Jacob Haven <ja...@keyba.se> wrote:
> That's fair. It's really just needed because of the new ECC support in GnuPG
> 2.1.
>
> What do you think of adding full ECDSA signing support to
> golang.org/x/crypto/openpgp? (The second necessary half of that PR)

I'm hoping to spend tomorrow doing Go reviews and ECC support in
openpgp sounds welcome if you can upload it to Gerrit and tag me as
the reviewer.

Adam Langley

unread,
Mar 10, 2016, 3:45:39 PM3/10/16
to ja...@keyba.se, golang-dev
On Sun, Mar 6, 2016 at 9:47 AM, <ja...@keyba.se> wrote:
> I'd be interested in adding the Brainpool curves P-256, P-384, and P-512 to
> the crypto/elliptic package (or a new package golang.org/x/crypto/{elliptic
> or brainpool}) for use in golang.org/x/crypto/openpgp (and elsewhere).

I'm afraid that I don't believe that Brainpool curves are sufficiently
widely useful to warrant inclusion in the standard libraries. That, of
course, doesn't preclude you making the code available yourself.


Reply all
Reply to author
Forward
0 new messages