1 ../dane/dane.go:494
2
3
4
5
6
7Internet Engineering Task Force (IETF) P. Wouters, Ed.
8Request for Comments: 7250 Red Hat
9Category: Standards Track H. Tschofenig, Ed.
10ISSN: 2070-1721 ARM Ltd.
11 J. Gilmore
12 Electronic Frontier Foundation
13 S. Weiler
14 Parsons
15 T. Kivinen
16 INSIDE Secure
17 June 2014
18
19
20 Using Raw Public Keys in Transport Layer Security (TLS)
21 and Datagram Transport Layer Security (DTLS)
22
23Abstract
24
25 This document specifies a new certificate type and two TLS extensions
26 for exchanging raw public keys in Transport Layer Security (TLS) and
27 Datagram Transport Layer Security (DTLS). The new certificate type
28 allows raw public keys to be used for authentication.
29
30Status of This Memo
31
32 This is an Internet Standards Track document.
33
34 This document is a product of the Internet Engineering Task Force
35 (IETF). It represents the consensus of the IETF community. It has
36 received public review and has been approved for publication by the
37 Internet Engineering Steering Group (IESG). Further information on
38 Internet Standards is available in Section 2 of RFC 5741.
39
40 Information about the current status of this document, any errata,
41 and how to provide feedback on it may be obtained at
42 http://www.rfc-editor.org/info/rfc7250.
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58Wouters, et al. Standards Track [Page 1]
59
60RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
61
62
63Copyright Notice
64
65 Copyright (c) 2014 IETF Trust and the persons identified as the
66 document authors. All rights reserved.
67
68 This document is subject to BCP 78 and the IETF Trust's Legal
69 Provisions Relating to IETF Documents
70 (http://trustee.ietf.org/license-info) in effect on the date of
71 publication of this document. Please review these documents
72 carefully, as they describe your rights and restrictions with respect
73 to this document. Code Components extracted from this document must
74 include Simplified BSD License text as described in Section 4.e of
75 the Trust Legal Provisions and are provided without warranty as
76 described in the Simplified BSD License.
77
78Table of Contents
79
80 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
81 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
82 3. Structure of the Raw Public Key Extension . . . . . . . . . . 4
83 4. TLS Client and Server Handshake Behavior . . . . . . . . . . 7
84 4.1. Client Hello . . . . . . . . . . . . . . . . . . . . . . 7
85 4.2. Server Hello . . . . . . . . . . . . . . . . . . . . . . 8
86 4.3. Client Authentication . . . . . . . . . . . . . . . . . . 9
87 4.4. Server Authentication . . . . . . . . . . . . . . . . . . 9
88 5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 10
89 5.1. TLS Server Uses a Raw Public Key . . . . . . . . . . . . 10
90 5.2. TLS Client and Server Use Raw Public Keys . . . . . . . . 11
91 5.3. Combined Usage of Raw Public Keys and X.509 Certificates 12
92 6. Security Considerations . . . . . . . . . . . . . . . . . . . 13
93 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
94 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14
95 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15
96 9.1. Normative References . . . . . . . . . . . . . . . . . . 15
97 9.2. Informative References . . . . . . . . . . . . . . . . . 15
98 Appendix A. Example Encoding . . . . . . . . . . . . . . . . . . 17
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114Wouters, et al. Standards Track [Page 2]
115
116RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
117
118
1191. Introduction
120
121 Traditionally, TLS client and server public keys are obtained in PKIX
122 containers in-band as part of the TLS handshake procedure and are
123 validated using trust anchors based on a [PKIX] certification
124 authority (CA). This method can add a complicated trust relationship
125 that is difficult to validate. Examples of such complexity can be
126 seen in [Defeating-SSL]. TLS is, however, also commonly used with
127 self-signed certificates in smaller deployments where the self-signed
128 certificates are distributed to all involved protocol endpoints out-
129 of-band. This practice does, however, still require the overhead of
130 the certificate generation even though none of the information found
131 in the certificate is actually used.
132
133 Alternative methods are available that allow a TLS client/server to
134 obtain the TLS server/client public key:
135
136 o The TLS client can obtain the TLS server public key from a DNSSEC-
137 secured resource record using DNS-Based Authentication of Named
138 Entities (DANE) [RFC6698].
139
140 o The TLS client or server public key is obtained from a [PKIX]
141 certificate chain from a Lightweight Directory Access Protocol
142 [LDAP] server or web page.
143
144 o The TLS client and server public key is provisioned into the
145 operating system firmware image and updated via software updates.
146 For example:
147
148 Some smart objects use the UDP-based Constrained Application
149 Protocol [CoAP] to interact with a Web server to upload sensor
150 data at regular intervals, such as temperature readings. CoAP can
151 utilize DTLS for securing the client-to-server communication. As
152 part of the manufacturing process, the embedded device may be
153 configured with the address and the public key of a dedicated CoAP
154 server, as well as a public/private key pair for the client
155 itself.
156
157 This document introduces the use of raw public keys in TLS/DTLS.
158 With raw public keys, only a subset of the information found in
159 typical certificates is utilized: namely, the SubjectPublicKeyInfo
160 structure of a PKIX certificate that carries the parameters necessary
161 to describe the public key. Other parameters found in PKIX
162 certificates are omitted. By omitting various certificate-related
163 structures, the resulting raw public key is kept fairly small in
164 comparison to the original certificate, and the code to process the
165 keys can be simpler. Only a minimalistic ASN.1 parser is needed;
166 code for certificate path validation and other PKIX-related
167
168
169
170Wouters, et al. Standards Track [Page 3]
171
172RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
173
174
175 processing is not required. Note, however, the SubjectPublicKeyInfo
176 structure is still in an ASN.1 format. To further reduce the size of
177 the exchanged information, this specification can be combined with
178 the TLS Cached Info extension [CACHED-INFO], which enables TLS peers
179 to exchange just fingerprints of their public keys.
180
181 The mechanism defined herein only provides authentication when an
182 out-of-band mechanism is also used to bind the public key to the
183 entity presenting the key.
184
185 Section 3 defines the structure of the two new TLS extensions,
186 client_certificate_type and server_certificate_type, which can be
187 used as part of an extended TLS handshake when raw public keys are to
188 be used. Section 4 defines the behavior of the TLS client and the
189 TLS server. Example exchanges are described in Section 5. Section 6
190 describes security considerations with this approach. Finally, in
191 Section 7 this document registers a new value to the IANA "TLS
192 Certificate Types" subregistry for the support of raw public keys.
193
1942. Terminology
195
196 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
197 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
198 document are to be interpreted as described in RFC 2119 [RFC2119].
199
200 We use the terms "TLS server" and "server" as well as "TLS client"
201 and "client" interchangeably.
202
2033. Structure of the Raw Public Key Extension
204
205 This section defines the two TLS extensions client_certificate_type
206 and server_certificate_type, which can be used as part of an extended
207 TLS handshake when raw public keys are used. Section 4 defines the
208 behavior of the TLS client and the TLS server using these extensions.
209
210 This specification uses raw public keys whereby the already available
211 encoding used in a PKIX certificate in the form of a
212 SubjectPublicKeyInfo structure is reused. To carry the raw public
213 key within the TLS handshake, the Certificate payload is used as a
214 container, as shown in Figure 1. The shown Certificate structure is
215 an adaptation of its original form [RFC5246].
216
217
218
219
220
221
222
223
224
225
226Wouters, et al. Standards Track [Page 4]
227
228RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
229
230
231 opaque ASN.1Cert<1..2^24-1>;
232
233 struct {
234 select(certificate_type){
235
236 // certificate type defined in this document.
237 case RawPublicKey:
238 opaque ASN.1_subjectPublicKeyInfo<1..2^24-1>;
239
240 // X.509 certificate defined in RFC 5246
241 case X.509:
242 ASN.1Cert certificate_list<0..2^24-1>;
243
244 // Additional certificate type based on
245 // "TLS Certificate Types" subregistry
246 };
247 } Certificate;
248
249 Figure 1: Certificate Payload as a Container for the Raw Public Key
250
251 The SubjectPublicKeyInfo structure is defined in Section 4.1 of RFC
252 5280 [PKIX] and not only contains the raw keys, such as the public
253 exponent and the modulus of an RSA public key, but also an algorithm
254 identifier. The algorithm identifier can also include parameters.
255 The SubjectPublicKeyInfo value in the Certificate payload MUST
256 contain the DER encoding [X.690] of the SubjectPublicKeyInfo. The
257 structure, as shown in Figure 2, therefore also contains length
258 information. An example is provided in Appendix A.
259
260 SubjectPublicKeyInfo ::= SEQUENCE {
261 algorithm AlgorithmIdentifier,
262 subjectPublicKey BIT STRING }
263
264 AlgorithmIdentifier ::= SEQUENCE {
265 algorithm OBJECT IDENTIFIER,
266 parameters ANY DEFINED BY algorithm OPTIONAL }
267
268 Figure 2: SubjectPublicKeyInfo ASN.1 Structure
269
270 The algorithm identifiers are Object Identifiers (OIDs). RFC 3279
271 [RFC3279] and RFC 5480 [RFC5480], for example, define the OIDs shown
272 in Figure 3. Note that this list is not exhaustive, and more OIDs
273 may be defined in future RFCs.
274
275
276
277
278
279
280
281
282Wouters, et al. Standards Track [Page 5]
283
284RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
285
286
287 Key Type | Document | OID
288 --------------------+----------------------------+-------------------
289 RSA | Section 2.3.1 of RFC 3279 | 1.2.840.113549.1.1
290 ....................|............................|...................
291 Digital Signature | |
292 Algorithm (DSA) | Section 2.3.2 of RFC 3279 | 1.2.840.10040.4.1
293 ....................|............................|...................
294 Elliptic Curve | |
295 Digital Signature | |
296 Algorithm (ECDSA) | Section 2 of RFC 5480 | 1.2.840.10045.2.1
297 --------------------+----------------------------+-------------------
298
299 Figure 3: Example Algorithm Object Identifiers
300
301 The extension format for extended client and server hellos, which
302 uses the "extension_data" field, is used to carry the
303 ClientCertTypeExtension and the ServerCertTypeExtension structures.
304 These two structures are shown in Figure 4. The CertificateType
305 structure is an enum with values taken from the "TLS Certificate
306 Types" subregistry of the "Transport Layer Security (TLS) Extensions"
307 registry [TLS-Ext-Registry].
308
309 struct {
310 select(ClientOrServerExtension) {
311 case client:
312 CertificateType client_certificate_types<1..2^8-1>;
313 case server:
314 CertificateType client_certificate_type;
315 }
316 } ClientCertTypeExtension;
317
318 struct {
319 select(ClientOrServerExtension) {
320 case client:
321 CertificateType server_certificate_types<1..2^8-1>;
322 case server:
323 CertificateType server_certificate_type;
324 }
325 } ServerCertTypeExtension;
326
327 Figure 4: CertTypeExtension Structure
328
329
330
331
332
333
334
335
336
337
338Wouters, et al. Standards Track [Page 6]
339
340RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
341
342
3434. TLS Client and Server Handshake Behavior
344
345 This specification extends the ClientHello and the ServerHello
346 messages, according to the extension procedures defined in [RFC5246].
347 It does not extend or modify any other TLS message.
348
349 Note: No new cipher suites are required to use raw public keys. All
350 existing cipher suites that support a key exchange method compatible
351 with the defined extension can be used.
352
353 The high-level message exchange in Figure 5 shows the
354 client_certificate_type and server_certificate_type extensions added
355 to the client and server hello messages.
356
357 client_hello,
358 client_certificate_type,
359 server_certificate_type ->
360
361 <- server_hello,
362 client_certificate_type,
363 server_certificate_type,
364 certificate,
365 server_key_exchange,
366 certificate_request,
367 server_hello_done
368 certificate,
369 client_key_exchange,
370 certificate_verify,
371 change_cipher_spec,
372 finished ->
373
374 <- change_cipher_spec,
375 finished
376
377 Application Data <-------> Application Data
378
379 Figure 5: Basic Raw Public Key TLS Exchange
380
3814.1. Client Hello
382
383 In order to indicate the support of raw public keys, clients include
384 the client_certificate_type and/or the server_certificate_type
385 extensions in an extended client hello message. The hello extension
386 mechanism is described in Section 7.4.1.4 of TLS 1.2 [RFC5246].
387
388 The client_certificate_type extension in the client hello indicates
389 the certificate types the client is able to provide to the server,
390 when requested using a certificate_request message.
391
392
393
394Wouters, et al. Standards Track [Page 7]
395
396RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
397
398
399 The server_certificate_type extension in the client hello indicates
400 the types of certificates the client is able to process when provided
401 by the server in a subsequent certificate payload.
402
403 The client_certificate_type and server_certificate_type extensions
404 sent in the client hello each carry a list of supported certificate
405 types, sorted by client preference. When the client supports only
406 one certificate type, it is a list containing a single element.
407
408 The TLS client MUST omit certificate types from the
409 client_certificate_type extension in the client hello if it does not
410 possess the corresponding raw public key or certificate that it can
411 provide to the server when requested using a certificate_request
412 message, or if it is not configured to use one with the given TLS
413 server. If the client has no remaining certificate types to send in
414 the client hello, other than the default X.509 type, it MUST omit the
415 client_certificate_type extension in the client hello.
416
417 The TLS client MUST omit certificate types from the
418 server_certificate_type extension in the client hello if it is unable
419 to process the corresponding raw public key or other certificate
420 type. If the client has no remaining certificate types to send in
421 the client hello, other than the default X.509 certificate type, it
422 MUST omit the entire server_certificate_type extension from the
423 client hello.
424
4254.2. Server Hello
426
427 If the server receives a client hello that contains the
428 client_certificate_type extension and/or the server_certificate_type
429 extension, then three outcomes are possible:
430
431 1. The server does not support the extension defined in this
432 document. In this case, the server returns the server hello
433 without the extensions defined in this document.
434
435 2. The server supports the extension defined in this document, but
436 it does not have any certificate type in common with the client.
437 Then, the server terminates the session with a fatal alert of
438 type "unsupported_certificate".
439
440 3. The server supports the extensions defined in this document and
441 has at least one certificate type in common with the client. In
442 this case, the processing rules described below are followed.
443
444 The client_certificate_type extension in the client hello indicates
445 the certificate types the client is able to provide to the server,
446 when requested using a certificate_request message. If the TLS
447
448
449
450Wouters, et al. Standards Track [Page 8]
451
452RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
453
454
455 server wants to request a certificate from the client (via the
456 certificate_request message), it MUST include the
457 client_certificate_type extension in the server hello. This
458 client_certificate_type extension in the server hello then indicates
459 the type of certificates the client is requested to provide in a
460 subsequent certificate payload. The value conveyed in the
461 client_certificate_type extension MUST be selected from one of the
462 values provided in the client_certificate_type extension sent in the
463 client hello. The server MUST also include a certificate_request
464 payload in the server hello message.
465
466 If the server does not send a certificate_request payload (for
467 example, because client authentication happens at the application
468 layer or no client authentication is required) or none of the
469 certificates supported by the client (as indicated in the
470 client_certificate_type extension in the client hello) match the
471 server-supported certificate types, then the client_certificate_type
472 payload in the server hello MUST be omitted.
473
474 The server_certificate_type extension in the client hello indicates
475 the types of certificates the client is able to process when provided
476 by the server in a subsequent certificate payload. If the client
477 hello indicates support of raw public keys in the
478 server_certificate_type extension and the server chooses to use raw
479 public keys, then the TLS server MUST place the SubjectPublicKeyInfo
480 structure into the Certificate payload. With the
481 server_certificate_type extension in the server hello, the TLS server
482 indicates the certificate type carried in the Certificate payload.
483 This additional indication enables avoiding parsing ambiguities since
484 the Certificate payload may contain either the X.509 certificate or a
485 SubjectPublicKeyInfo structure. Note that only a single value is
486 permitted in the server_certificate_type extension when carried in
487 the server hello.
488
4894.3. Client Authentication
490
491 When the TLS server has specified RawPublicKey as the
492 client_certificate_type, authentication of the TLS client to the TLS
493 server is supported only through authentication of the received
494 client SubjectPublicKeyInfo via an out-of-band method.
495
4964.4. Server Authentication
497
498 When the TLS server has specified RawPublicKey as the
499 server_certificate_type, authentication of the TLS server to the TLS
500 client is supported only through authentication of the received
501 client SubjectPublicKeyInfo via an out-of-band method.
502
503
504
505
506Wouters, et al. Standards Track [Page 9]
507
508RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
509
510
5115. Examples
512
513 Figures 6, 7, and 8 illustrate example exchanges. Note that TLS
514 ciphersuites using a Diffie-Hellman exchange offering forward secrecy
515 can be used with a raw public key, although this document does not
516 show the information exchange at that level with the subsequent
517 message flows.
518
5195.1. TLS Server Uses a Raw Public Key
520
521 This section shows an example where the TLS client indicates its
522 ability to receive and validate a raw public key from the server. In
523 this example, the client is quite restricted since it is unable to
524 process other certificate types sent by the server. It also does not
525 have credentials at the TLS layer it could send to the server and
526 therefore omits the client_certificate_type extension. Hence, the
527 client only populates the server_certificate_type extension with the
528 raw public key type, as shown in (1).
529
530 When the TLS server receives the client hello, it processes the
531 extension. Since it has a raw public key, it indicates in (2) that
532 it had chosen to place the SubjectPublicKeyInfo structure into the
533 Certificate payload (3).
534
535 The client uses this raw public key in the TLS handshake together
536 with an out-of-band validation technique, such as DANE, to verify it.
537
538 client_hello,
539 server_certificate_type=(RawPublicKey) // (1)
540 ->
541 <- server_hello,
542 server_certificate_type=RawPublicKey, // (2)
543 certificate, // (3)
544 server_key_exchange,
545 server_hello_done
546
547 client_key_exchange,
548 change_cipher_spec,
549 finished ->
550
551 <- change_cipher_spec,
552 finished
553
554 Application Data <-------> Application Data
555
556 Figure 6: Example with Raw Public Key Provided by the TLS Server
557
558
559
560
561
562Wouters, et al. Standards Track [Page 10]
563
564RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
565
566
5675.2. TLS Client and Server Use Raw Public Keys
568
569 This section shows an example where the TLS client as well as the TLS
570 server use raw public keys. This is one of the use cases envisioned
571 for smart object networking. The TLS client in this case is an
572 embedded device that is configured with a raw public key for use with
573 TLS and is also able to process a raw public key sent by the server.
574 Therefore, it indicates these capabilities in (1). As in the
575 previously shown example, the server fulfills the client's request,
576 indicates this via the RawPublicKey value in the
577 server_certificate_type payload (2), and provides a raw public key in
578 the Certificate payload back to the client (see (3)). The TLS server
579 demands client authentication, and therefore includes a
580 certificate_request (4). The client_certificate_type payload in (5)
581 indicates that the TLS server accepts a raw public key. The TLS
582 client, which has a raw public key pre-provisioned, returns it in the
583 Certificate payload (6) to the server.
584
585client_hello,
586client_certificate_type=(RawPublicKey) // (1)
587server_certificate_type=(RawPublicKey) // (1)
588 ->
589 <- server_hello,
590 server_certificate_type=RawPublicKey // (2)
591 certificate, // (3)
592 client_certificate_type=RawPublicKey // (5)
593 certificate_request, // (4)
594 server_key_exchange,
595 server_hello_done
596
597certificate, // (6)
598client_key_exchange,
599change_cipher_spec,
600finished ->
601
602 <- change_cipher_spec,
603 finished
604
605Application Data <-------> Application Data
606
607 Figure 7: Example with Raw Public Key provided by the TLS Server and
608 the Client
609
610
611
612
613
614
615
616
617
618Wouters, et al. Standards Track [Page 11]
619
620RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
621
622
6235.3. Combined Usage of Raw Public Keys and X.509 Certificates
624
625 This section shows an example combining a raw public key and an X.509
626 certificate. The client uses a raw public key for client
627 authentication, and the server provides an X.509 certificate. This
628 exchange starts with the client indicating its ability to process an
629 X.509 certificate, OpenPGP certificate, or a raw public key, if
630 provided by the server. It prefers a raw public key, since the
631 RawPublicKey value precedes the other values in the
632 server_certificate_type vector. Additionally, the client indicates
633 that it has a raw public key for client-side authentication (see
634 (1)). The server chooses to provide its X.509 certificate in (3) and
635 indicates that choice in (2). For client authentication, the server
636 indicates in (4) that it has selected the raw public key format and
637 requests a certificate from the client in (5). The TLS client
638 provides a raw public key in (6) after receiving and processing the
639 TLS server hello message.
640
641client_hello,
642server_certificate_type=(RawPublicKey, X.509, OpenPGP)
643client_certificate_type=(RawPublicKey) // (1)
644 ->
645 <- server_hello,
646 server_certificate_type=X.509 // (2)
647 certificate, // (3)
648 client_certificate_type=RawPublicKey // (4)
649 certificate_request, // (5)
650 server_key_exchange,
651 server_hello_done
652certificate, // (6)
653client_key_exchange,
654change_cipher_spec,
655finished ->
656
657 <- change_cipher_spec,
658 finished
659
660Application Data <-------> Application Data
661
662 Figure 8: Hybrid Certificate Example
663
664
665
666
667
668
669
670
671
672
673
674Wouters, et al. Standards Track [Page 12]
675
676RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
677
678
6796. Security Considerations
680
681 The transmission of raw public keys, as described in this document,
682 provides benefits by lowering the over-the-air transmission overhead
683 since raw public keys are naturally smaller than an entire
684 certificate. There are also advantages from a code-size point of
685 view for parsing and processing these keys. The cryptographic
686 procedures for associating the public key with the possession of a
687 private key also follows standard procedures.
688
689 However, the main security challenge is how to associate the public
690 key with a specific entity. Without a secure binding between
691 identifier and key, the protocol will be vulnerable to man-in-the-
692 middle attacks. This document assumes that such binding can be made
693 out-of-band, and we list a few examples in Section 1. DANE [RFC6698]
694 offers one such approach. In order to address these vulnerabilities,
695 specifications that make use of the extension need to specify how the
696 identifier and public key are bound. In addition to ensuring the
697 binding is done out-of-band, an implementation also needs to check
698 the status of that binding.
699
700 If public keys are obtained using DANE, these public keys are
701 authenticated via DNSSEC. Using pre-configured keys is another out-
702 of-band method for authenticating raw public keys. While pre-
703 configured keys are not suitable for a generic Web-based e-commerce
704 environment, such keys are a reasonable approach for many smart
705 object deployments where there is a close relationship between the
706 software running on the device and the server-side communication
707 endpoint. Regardless of the chosen mechanism for out-of-band public
708 key validation, an assessment of the most suitable approach has to be
709 made prior to the start of a deployment to ensure the security of the
710 system.
711
712 An attacker might try to influence the handshake exchange to make the
713 parties select different certificate types than they would normally
714 choose.
715
716 For this attack, an attacker must actively change one or more
717 handshake messages. If this occurs, the client and server will
718 compute different values for the handshake message hashes. As a
719 result, the parties will not accept each others' Finished messages.
720 Without the master_secret, the attacker cannot repair the Finished
721 messages, so the attack will be discovered.
722
723
724
725
726
727
728
729
730Wouters, et al. Standards Track [Page 13]
731
732RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
733
734
7357. IANA Considerations
736
737 IANA has registered a new value in the "TLS Certificate Types"
738 subregistry of the "Transport Layer Security (TLS) Extensions"
739 registry [TLS-Ext-Registry], as follows:
740
741 Value: 2
742 Description: Raw Public Key
743 Reference: RFC 7250
744
745 IANA has allocated two new TLS extensions, client_certificate_type
746 and server_certificate_type, from the "TLS ExtensionType Values"
747 subregistry defined in [RFC5246]. These extensions are used in both
748 the client hello message and the server hello message. The new
749 extension types are used for certificate type negotiation. The
750 values carried in these extensions are taken from the "TLS
751 Certificate Types" subregistry of the "Transport Layer Security (TLS)
752 Extensions" registry [TLS-Ext-Registry].
753
7548. Acknowledgements
755
756 The feedback from the TLS working group meeting at IETF 81 has
757 substantially shaped the document, and we would like to thank the
758 meeting participants for their input. The support for hashes of
759 public keys has been moved to [CACHED-INFO] after the discussions at
760 the IETF 82 meeting.
761
762 We would like to thank the following persons for their review
763 comments: Martin Rex, Bill Frantz, Zach Shelby, Carsten Bormann,
764 Cullen Jennings, Rene Struik, Alper Yegin, Jim Schaad, Barry Leiba,
765 Paul Hoffman, Robert Cragie, Nikos Mavrogiannopoulos, Phil Hunt, John
766 Bradley, Klaus Hartke, Stefan Jucker, Kovatsch Matthias, Daniel Kahn
767 Gillmor, Peter Sylvester, Hauke Mehrtens, Alexey Melnikov, Stephen
768 Farrell, Richard Barnes, and James Manger. Nikos Mavrogiannopoulos
769 contributed the design for reusing the certificate type registry.
770 Barry Leiba contributed guidance for the IANA Considerations text.
771 Stefan Jucker, Kovatsch Matthias, and Klaus Hartke provided
772 implementation feedback regarding the SubjectPublicKeyInfo structure.
773
774 Christer Holmberg provided the General Area (Gen-Art) review, Yaron
775 Sheffer provided the Security Directorate (SecDir) review, Bert
776 Greevenbosch provided the Applications Area Directorate review, and
777 Linda Dunbar provided the Operations Directorate review.
778
779 We would like to thank our TLS working group chairs, Eric Rescorla
780 and Joe Salowey, for their guidance and support. Finally, we would
781 like to thank Sean Turner, who is the responsible Security Area
782 Director for this work, for his review comments and suggestions.
783
784
785
786Wouters, et al. Standards Track [Page 14]
787
788RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
789
790
7919. References
792
7939.1. Normative References
794
795 [PKIX] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
796 Housley, R., and W. Polk, "Internet X.509 Public Key
797 Infrastructure Certificate and Certificate Revocation List
798 (CRL) Profile", RFC 5280, May 2008.
799
800 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
801 Requirement Levels", BCP 14, RFC 2119, March 1997.
802
803 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and
804 Identifiers for the Internet X.509 Public Key
805 Infrastructure Certificate and Certificate Revocation List
806 (CRL) Profile", RFC 3279, April 2002.
807
808 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
809 (TLS) Protocol Version 1.2", RFC 5246, August 2008.
810
811 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk,
812 "Elliptic Curve Cryptography Subject Public Key
813 Information", RFC 5480, March 2009.
814
815 [TLS-Ext-Registry]
816 IANA, "Transport Layer Security (TLS) Extensions",
817 <http://www.iana.org/assignments/
818 tls-extensiontype-values>.
819
820 [X.690] ITU-T, "Information technology - ASN.1 encoding rules:
821 Specification of Basic Encoding Rules (BER), Canonical
822 Encoding Rules (CER) and Distinguished Encoding Rules
823 (DER)", ITU-T Recommendation X.690, ISO/IEC 8825-1:2002,
824 2002.
825
8269.2. Informative References
827
828 [ASN.1-Dump]
829 Gutmann, P., "ASN.1 Object Dump Program", February 2013,
830 <http://www.cs.auckland.ac.nz/~pgut001/>.
831
832 [CACHED-INFO]
833 Santesson, S. and H. Tschofenig, "Transport Layer Security
834 (TLS) Cached Information Extension", Work in Progress,
835 February 2014.
836
837 [CoAP] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
838 Application Protocol (CoAP)", RFC 7252, June 2014.
839
840
841
842Wouters, et al. Standards Track [Page 15]
843
844RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
845
846
847 [Defeating-SSL]
848 Marlinspike, M., "New Tricks for Defeating SSL in
849 Practice", February 2009, <http://www.blackhat.com/
850 presentations/bh-dc-09/Marlinspike/
851 BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf>.
852
853 [LDAP] Sermersheim, J., "Lightweight Directory Access Protocol
854 (LDAP): The Protocol", RFC 4511, June 2006.
855
856 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
857 of Named Entities (DANE) Transport Layer Security (TLS)
858 Protocol: TLSA", RFC 6698, August 2012.
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898Wouters, et al. Standards Track [Page 16]
899
900RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
901
902
903Appendix A. Example Encoding
904
905 For example, the hex sequence shown in Figure 9 describes a
906 SubjectPublicKeyInfo structure inside the certificate payload.
907
908 0 1 2 3 4 5 6 7 8 9
909 +------+-----+-----+-----+-----+-----+-----+-----+-----+-----
910 1 | 0x30, 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48,
911 2 | 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81,
912 3 | 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xcd,
913 4 | 0xfd, 0x89, 0x48, 0xbe, 0x36, 0xb9, 0x95, 0x76, 0xd4, 0x13,
914 5 | 0x30, 0x0e, 0xbf, 0xb2, 0xed, 0x67, 0x0a, 0xc0, 0x16, 0x3f,
915 6 | 0x51, 0x09, 0x9d, 0x29, 0x2f, 0xb2, 0x6d, 0x3f, 0x3e, 0x6c,
916 7 | 0x2f, 0x90, 0x80, 0xa1, 0x71, 0xdf, 0xbe, 0x38, 0xc5, 0xcb,
917 8 | 0xa9, 0x9a, 0x40, 0x14, 0x90, 0x0a, 0xf9, 0xb7, 0x07, 0x0b,
918 9 | 0xe1, 0xda, 0xe7, 0x09, 0xbf, 0x0d, 0x57, 0x41, 0x86, 0x60,
919 10 | 0xa1, 0xc1, 0x27, 0x91, 0x5b, 0x0a, 0x98, 0x46, 0x1b, 0xf6,
920 11 | 0xa2, 0x84, 0xf8, 0x65, 0xc7, 0xce, 0x2d, 0x96, 0x17, 0xaa,
921 12 | 0x91, 0xf8, 0x61, 0x04, 0x50, 0x70, 0xeb, 0xb4, 0x43, 0xb7,
922 13 | 0xdc, 0x9a, 0xcc, 0x31, 0x01, 0x14, 0xd4, 0xcd, 0xcc, 0xc2,
923 14 | 0x37, 0x6d, 0x69, 0x82, 0xd6, 0xc6, 0xc4, 0xbe, 0xf2, 0x34,
924 15 | 0xa5, 0xc9, 0xa6, 0x19, 0x53, 0x32, 0x7a, 0x86, 0x0e, 0x91,
925 16 | 0x82, 0x0f, 0xa1, 0x42, 0x54, 0xaa, 0x01, 0x02, 0x03, 0x01,
926 17 | 0x00, 0x01
927
928 Figure 9: Example SubjectPublicKeyInfo Structure Byte Sequence
929
930 The decoded byte sequence shown in Figure 9 (for example, using Peter
931 Gutmann's ASN.1 decoder [ASN.1-Dump]) illustrates the structure, as
932 shown in Figure 10.
933
934 Offset Length Description
935 -------------------------------------------------------------------
936 0 3+159: SEQUENCE {
937 3 2+13: SEQUENCE {
938 5 2+9: OBJECT IDENTIFIER Value (1 2 840 113549 1 1 1)
939 : PKCS #1, rsaEncryption
940 16 2+0: NULL
941 : }
942 18 3+141: BIT STRING, encapsulates {
943 22 3+137: SEQUENCE {
944 25 3+129: INTEGER Value (1024 bit)
945 157 2+3: INTEGER Value (65537)
946 : }
947 : }
948 : }
949
950 Figure 10: Decoding of Example SubjectPublicKeyInfo Structure
951
952
953
954Wouters, et al. Standards Track [Page 17]
955
956RFC 7250 Using Raw Public Keys in TLS/DTLS June 2014
957
958
959Authors' Addresses
960
961 Paul Wouters (editor)
962 Red Hat
963
964 EMail: pwouters@redhat.com
965
966
967 Hannes Tschofenig (editor)
968 ARM Ltd.
969 6060 Hall in Tirol
970 Austria
971
972 EMail: Hannes.tschofenig@gmx.net
973 URI: http://www.tschofenig.priv.at
974
975
976 John Gilmore
977 Electronic Frontier Foundation
978 PO Box 170608
979 San Francisco, California 94117
980 USA
981
982 Phone: +1 415 221 6524
983 EMail: gnu@toad.com
984 URI: https://www.toad.com/
985
986
987 Samuel Weiler
988 Parsons
989 7110 Samuel Morse Drive
990 Columbia, Maryland 21046
991 US
992
993 EMail: weiler@tislabs.com
994
995
996 Tero Kivinen
997 INSIDE Secure
998 Eerikinkatu 28
999 Helsinki FI-00180
1000 FI
1001
1002 EMail: kivinen@iki.fi
1003
1004
1005
1006
1007
1008
1009
1010Wouters, et al. Standards Track [Page 18]
1011
1012