Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: gentoo-dev@l.g.o, Kristian Fiskerstrand <k_f@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: Thu, 05 Jul 2018 00:18:33
Message-Id: d215e2e4-02ee-e48a-004b-b74d26ea81d7@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH v2 07/11] glep-0063: Allow ECC, curve 25519 keys by Kristian Fiskerstrand
1 On 7/4/2018 7:22 PM, Kristian Fiskerstrand wrote:
2 > On 07/05/2018 01:07 AM, Joshua Kinard wrote:
3 >>> @@ -64,6 +66,8 @@ not be used to commit.
4 >>>
5 >>> b. RSA, >=2048 bits (OpenPGP v4 key format or later only)
6 >>>
7 >>> + c. ECC, curve 25519
8 >>> +
9 >>> 3. Key expiry: 5 years maximum
10 >>>
11 >>> 4. Upload your key to the SKS keyserver rotation before usage!
12 >>>
13 >> Add a minimum key size here for ECC. They have different bit sizes than
14 >> classic DSA/RSA keys. A quick read indicates that a 224-bit ECC key is roughly
15 >> equivalent to a 112-bit symmetric key, which is what a 2048-bit RSA key is
16 >> equivalent to, so the logical minimum for ECC looks like 'nistp256'. The
17 >> maximum is 521-bits on ECC (nistp521).
18 >>
19 >> Also move the mention of Ed25519 keys to their own bullet and clarify that they
20 >> don't allow for a key length, as I think that's hardcoded in some capacity.
21 >
22 > following the comma-style of the rest of the document, the ECC part
23 > should likely be read as curve25519 being the only acceptable curve,
24 > which is 256 bits (roughtly 128 bit shannon entropy equivalent)
25 >
26 > that said, I'm not aware of any curves defined with a lower security
27 > margin than this for OpenPGP in general. The known curves in the
28 > ecosystem are
29 >
30 > let oid_to_psize oid =
31 > let psize = match oid with
32 > | "\x2b\x81\x04\x00\x23" -> 521 (* nistp521 *)
33 > | "\x2b\x81\x04\x00\x22" -> 384 (* nistp384 *)
34 > | "\x2a\x86\x48\xce\x3d\x03\x01\x07" -> 256 (* nistp256 *)
35 > | "\x2b\x24\x03\x03\x02\x08\x01\x01\x07" -> 256 (* brainpoolP256r1 *)
36 > | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0b" -> 384 (* brainpoolP384r1 *)
37 > | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0d" -> 512 (* brainpoolP512r1 *)
38 > | "\x2b\x81\x04\x00\x0a" -> 256 (* secp256k1 *)
39 > | "\x2b\x06\x01\x04\x01\xda\x47\x0f\x01" -> 256 (* Ed25519 *)
40 > | _ -> failwith "Unknown OID"
41 >
42
43 By "only acceptable curve", do you mean we shouldn't allow the nistp* key
44 types, only Ed25519?
45
46 --
47 Joshua Kinard
48 Gentoo/MIPS
49 kumba@g.o
50 rsa6144/5C63F4E3F5C6C943 2015-04-27
51 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
52
53 "The past tempts us, the present confuses us, the future frightens us. And our
54 lives slip away, moment by moment, lost in that vast, terrible in-between."
55
56 --Emperor Turhan, Centauri Republic

Replies

Subject Author
Re: [gentoo-dev] [PATCH v2 07/11] glep-0063: Allow ECC, curve 25519 keys R0b0t1 <r030t1@×××××.com>