Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: robbat2@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v3 00/12] GLEP 63 update
Date: Thu, 05 Jul 2018 20:54:23
Message-Id: 20180705205403.6530-1-mgorny@gentoo.org
1 Hi,
2
3 Here's third version of the patches. I've incorporated the feedback
4 so far and reordered the patches (again) to restore their
5 degree-of-compatibility order. The full text is included below.
6
7
8 Michał Górny (12):
9 glep-0063: Use 'OpenPGP' as appropriate
10 glep-0063: RSAv4 -> OpenPGP v4 key format
11 glep-0063: 'Gentoo subkey' → 'Signing subkey'
12 glep-0063: Root key → primary key
13 glep-0063: Split out the signing subkey into a separation point
14 glep-0063: Explain minimal & recommended sections
15 glep-0063: Change the recommended RSA key size to 2048 bits
16 glep-0063: Allow ECC curve 25519 keys
17 glep-0063: Stop recommending DSA subkeys
18 glep-0063: Make 2-yearly expiration term mandatory
19 glep-0063: Require renewal 2 weeks before expiration
20 glep-0063: Disallow using DSA keys
21
22 glep-0063.rst | 97 +++++++++++++++++++++++++++++++++------------------
23 1 file changed, 64 insertions(+), 33 deletions(-)
24
25
26 ---
27 GLEP: 63
28 Title: Gentoo OpenPGP policies
29 Author: Robin H. Johnson <robbat2@g.o>,
30 Andreas K. Hüttel <dilfridge@g.o>,
31 Marissa Fischer <blogtodiffer@×××××.com>
32 Type: Standards Track
33 Status: Final
34 Version: 2
35 Created: 2013-02-18
36 Last-Modified: 2018-07-05
37 Post-History: 2013-11-10
38 Content-Type: text/x-rst
39 ---
40
41 Credits
42 =======
43
44 Many developers and external sources helped in this GLEP.
45
46 Abstract
47 ========
48
49 This GLEP provides both a minimum requirement and a recommended set of
50 OpenPGP key management policies for the Gentoo Linux distribution.
51
52 Changes
53 =======
54
55 v2
56 The distinct minimal and recommended expirations have been replaced
57 by a single requirement. The rules have been simplified to use
58 the same time of 2 years for both the primary key and subkeys.
59
60 An additional rule requesting key renewal 2 weeks before expiration
61 has been added. This is in order to give services and other developers time
62 to refresh the key.
63
64 The usage of DSA keys has been disallowed.
65
66 v1.1
67 The recommended RSA key size has been changed from 4096 bits
68 to 2048 bits to match the GnuPG recommendations [#GNUPG-FAQ-11-4]_.
69 The larger recommendation was unjustified and resulted in people
70 unnecessarily replacing their RSA-2048 keys.
71
72 Minimal specification has been amended to allow for ECC keys.
73
74 The option of using DSA subkey has been removed from recommendations.
75 The section now specifies a single recommendation of using RSA.
76
77 Motivation
78 ==========
79
80 Given the increasing use and importance of cryptographic protocols in internet
81 transactions of any kind, unified requirements for OpenPGP keys used in Gentoo
82 Linux development are sorely needed. This document provides both a set of
83 bare minimum requirements and a set of best practice recommendations for
84 the use of GnuPG (or other OpenPGP providers) by Gentoo Linux developers.
85 It is intended to provide a basis for future improvements such as, e.g.,
86 consistent ebuild or package signing and verifying by end users.
87
88 Specifications for OpenPGP keys
89 ===============================
90
91 Bare minimum requirements
92 -------------------------
93 This section specifies obligatory requirements for all OpenPGP keys used
94 to commit to Gentoo. Keys that do not conform to those requirements can
95 not be used to commit.
96
97 1. SHA2-series output digest (SHA1 digests internally permitted),
98 256bit or more::
99
100 personal-digest-preferences SHA256
101
102 2. Signing subkey that is different from the primary key, and does not
103 have any other capabilities enabled.
104
105 3. Primary key and the signing subkey are both of type EITHER:
106
107 a. RSA, >=2048 bits (OpenPGP v4 key format or later only)
108
109 b. ECC curve 25519
110
111 4. Expiration date on key and all subkeys set to at most 2 years
112
113 5. Key expiration date renewed at least 2 weeks before the previous
114 expiration date.
115
116 6. Upload your key to the SKS keyserver rotation before usage!
117
118 Recommendations
119 ---------------
120 This section specifies the best practices for Gentoo developers.
121 The developers should follow those practices unless there is a strong
122 technical reason not to (e.g. hardware limitations, necessity of replacing
123 their primary key).
124
125 1. Copy ``/usr/share/gnupg/gpg-conf.skel`` to ``~/.gnupg/gpg.conf``, append
126 the following block::
127
128 keyserver pool.sks-keyservers.net
129
130 emit-version
131
132 default-recipient-self
133
134 # -- All of the below portion from the RiseUp.net OpenPGP best practices, and
135 # -- many of them are also in the Debian GPG documentation.
136
137 # when outputting certificates, view user IDs distinctly from keys:
138 fixed-list-mode
139
140 # long keyids are more collision-resistant than short keyids (it's trivial to make a key
141 # with any desired short keyid)
142 # NOTE: this breaks kmail gnupg support!
143 keyid-format 0xlong
144
145 # when multiple digests are supported by all recipients, choose the strongest one:
146 personal-digest-preferences SHA512 SHA384 SHA256 SHA224
147
148 # preferences chosen for new keys should prioritize stronger algorithms:
149 default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 BZIP2 ZLIB ZIP Uncompressed
150
151 # If you use a graphical environment (and even if you don't) you should be using an agent:
152 # (similar arguments as https://www.debian-administration.org/users/dkg/weblog/64)
153 use-agent
154
155 # You should always know at a glance which User IDs gpg thinks are legitimately bound to
156 # the keys in your keyring:
157 verify-options show-uid-validity
158 list-options show-uid-validity
159
160 # include an unambiguous indicator of which key made a signature:
161 # (see http://thread.gmane.org/gmane.mail.notmuch.general/3721/focus=7234)
162 # (and http://www.ietf.org/mail-archive/web/openpgp/current/msg00405.html)
163 sig-notation issuer-fpr@×××××××××××××××××××××××××××××××.net=%g
164
165 # when making an OpenPGP certification, use a stronger digest than the default SHA1:
166 cert-digest-algo SHA256
167
168 2. Primary key and the signing subkey are both of type RSA, 2048 bits
169 (OpenPGP v4 key format or later)
170
171 3. Key expiration renewed annually
172
173 4. Create a revocation certificate & store it hardcopy offsite securely
174 (it's about ~300 bytes).
175
176 5. Encrypted backup of your secret keys.
177
178 Gentoo LDAP
179 ===========
180
181 All Gentoo developers must list the complete fingerprint for their primary
182 keys in the "``gpgfingerprint``" LDAP field. It must be exactly 40 hex digits,
183 uppercase, with optional spaces every 8 hex digits. Regular expression for
184 validation::
185
186 ^([[:space:]]*[[:xdigit:]]{8}){5}$
187
188 The prior "``gpgkey``" field will be removed, as it is a subset
189 of the fingerprint field. In any place that presently displays
190 the "``gpgkey``" field, the last 16 hex digits of the fingerprint should
191 be displayed instead.
192
193 Backwards Compatibility
194 =======================
195
196 There is no consistent standard for GPG usage in Gentoo to date. There is
197 conflicting information in the Devmanual [#DEVMANUAL-MANIFEST]_ and the GnuPG
198 Gentoo user guide [#GNUPG-USER]_. As there is little enforcement of Manifest
199 signing and very little commit signing to date, there are no backwards
200 compatibility concerns.
201
202 External documentation
203 ======================
204
205 Much of the above was driven by the following:
206
207 * NIST SP 800-57 recommendations [#NISTSP800571]_, [#NISTSP800572]_
208
209 * Debian GPG documentation [#DEBIANGPG]_
210
211 * RiseUp.net OpenPGP best practices [#RISEUP]_
212
213 * ENISA Algorithms, Key Sizes and Parameters Report 2013 [#ENISA2013]_
214
215 References
216 ==========
217
218 .. [#GNUPG-FAQ-11-4] GnuPG FAQ: Why doesn’t GnuPG default to using RSA-4096?
219 (https://www.gnupg.org/faq/gnupg-faq.html#no_default_of_rsa4096)
220
221 .. [#DEBIANGPG] Debian GPG documentation
222 (https://wiki.debian.org/Keysigning)
223
224 .. [#EKAIA] Ana's blog: Creating a new GPG key
225 (http://ekaia.org/blog/2009/05/10/creating-new-gpgkey/)
226
227 .. [#RISEUP] RiseUp.net OpenPGP best practices
228 (https://help.riseup.net/en/security/message-security/openpgp/best-practices)
229
230 .. [#DEVMANUAL-MANIFEST] Gentoo Development Guide: Manifest
231 (http://devmanual.gentoo.org/general-concepts/manifest/index.html)
232
233 .. [#GNUPG-USER] GnuPG Gentoo User Guide
234 (http://www.gentoo.org/doc/en/gnupg-user.xml)
235
236 .. [#NISTSP800571] NIST SP 800-57: Recommendation for Key Management:
237 Part 1: General (Revision 3)
238 (http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf)
239
240 .. [#NISTSP800572] NIST SP 800-57: Recommendation for Key Management:
241 Part 2: Best Practices for Key Management Organization
242 (http://csrc.nist.gov/publications/nistpubs/800-57/SP800-57-Part2.pdf)
243
244 .. [#ISSUER-ANNOTATE] Including the entire fingerprint of the issuer
245 in an OpenPGP certification
246 (http://thread.gmane.org/gmane.mail.notmuch.general/3721/focus=7234)
247
248 .. [#ENISA2013] ENISA Algorithms, Key Sizes and Parameters Report,
249 2013 recommendations, version 1.0 (October 2013)
250 (https://www.enisa.europa.eu/activities/identity-and-trust/library/deliverables/algorithms-key-sizes-and-parameters-report)
251
252 Copyright
253 =========
254 Copyright (c) 2013 by Robin Hugh Johnson, Andreas K. Hüttel, Marissa Fischer.
255
256 This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
257 Unported License. To view a copy of this license, visit
258 http://creativecommons.org/licenses/by-sa/3.0/.
259
260
261 --
262 Best regards,
263 Michał Górny
264
265 --
266 2.18.0

Replies