Gentoo Archives: gentoo-dev

From: Kristian Fiskerstrand <k_f@g.o>
To: gentoo-dev@l.g.o, Joshua Kinard <kumba@g.o>, "Michał Górny" <mgorny@g.o>
Cc: robbat2@g.o
Subject: Re: [gentoo-dev] [PATCH v2 07/11] glep-0063: Allow ECC, curve 25519 keys
Date: Wed, 04 Jul 2018 23:22:58
Message-Id: b70347f6-bd22-6ef1-9449-0dbdddb18269@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH v2 07/11] glep-0063: Allow ECC, curve 25519 keys by Joshua Kinard
1 On 07/05/2018 01:07 AM, Joshua Kinard wrote:
2 >> @@ -64,6 +66,8 @@ not be used to commit.
3 >>
4 >> b. RSA, >=2048 bits (OpenPGP v4 key format or later only)
5 >>
6 >> + c. ECC, curve 25519
7 >> +
8 >> 3. Key expiry: 5 years maximum
9 >>
10 >> 4. Upload your key to the SKS keyserver rotation before usage!
11 >>
12 > Add a minimum key size here for ECC. They have different bit sizes than
13 > classic DSA/RSA keys. A quick read indicates that a 224-bit ECC key is roughly
14 > equivalent to a 112-bit symmetric key, which is what a 2048-bit RSA key is
15 > equivalent to, so the logical minimum for ECC looks like 'nistp256'. The
16 > maximum is 521-bits on ECC (nistp521).
17 >
18 > Also move the mention of Ed25519 keys to their own bullet and clarify that they
19 > don't allow for a key length, as I think that's hardcoded in some capacity.
20
21 following the comma-style of the rest of the document, the ECC part
22 should likely be read as curve25519 being the only acceptable curve,
23 which is 256 bits (roughtly 128 bit shannon entropy equivalent)
24
25 that said, I'm not aware of any curves defined with a lower security
26 margin than this for OpenPGP in general. The known curves in the
27 ecosystem are
28
29 let oid_to_psize oid =
30 let psize = match oid with
31 | "\x2b\x81\x04\x00\x23" -> 521 (* nistp521 *)
32 | "\x2b\x81\x04\x00\x22" -> 384 (* nistp384 *)
33 | "\x2a\x86\x48\xce\x3d\x03\x01\x07" -> 256 (* nistp256 *)
34 | "\x2b\x24\x03\x03\x02\x08\x01\x01\x07" -> 256 (* brainpoolP256r1 *)
35 | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0b" -> 384 (* brainpoolP384r1 *)
36 | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0d" -> 512 (* brainpoolP512r1 *)
37 | "\x2b\x81\x04\x00\x0a" -> 256 (* secp256k1 *)
38 | "\x2b\x06\x01\x04\x01\xda\x47\x0f\x01" -> 256 (* Ed25519 *)
39 | _ -> failwith "Unknown OID"
40
41 --
42 Kristian Fiskerstrand
43 OpenPGP keyblock reachable at hkp://pool.sks-keyservers.net
44 fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies