RFC 5081

Using OpenPGP Keys for Transport Layer Security (TLS) Authentication

๐Ÿ“… published November 2007, from ietf

RFC 5081 ๐ŸŽ€ Using OpenPGP Keys for Transport Layer Security (TLS) Authentication

Network Working Group ๐ŸŒธ Author: N. Mavrogiannopoulos (Independent) ๐Ÿ’… Category: Experimental ๐Ÿงช ยท Date: November 2007 ๐Ÿ“… Obsoletes / Updates: the title block doesn't list any RFCs it obsoletes or updates ๐Ÿ™ˆ


Status of This Memo

okay so this memo is an Experimental protocol for the Internet community ๐Ÿงช. it is NOT an Internet standard of any kind, so chill ๐Ÿ˜Œ. they're literally asking for feedback and suggestions to make it better, and distribution is unlimited ๐Ÿ’œ.

Abstract

this memo is basically a glow-up for TLS ๐Ÿ’– it proposes extensions so TLS can use the OpenPGP key format โœจ. the extensions include a certificate type negotiation mechanism and the required modifications to the TLS Handshake Protocol ๐Ÿฆ‹.

Table of Contents

1. Introduction ....................................................2
2. Terminology .....................................................2
3. Changes to the Handshake Message Contents .......................2
   3.1. Client Hello ...............................................2
   3.2. Server Hello ...............................................3
   3.3. Server Certificate .........................................3
   3.4. Certificate Request ........................................4
   3.5. Client Certificate .........................................5
   3.6. Other Handshake Messages ...................................5
4. Security Considerations .........................................5
5. IANA Considerations .............................................6
6. Acknowledgements ................................................6
7. References ......................................................6
   7.1. Normative References .......................................6
   7.2. Informative References .....................................7

1. Introduction โœจ

okay bestie, so the IETF has two sets of standards for public key certificates ๐Ÿ”‘. one set is for X.509 certificates [PKIX] and the other is for OpenPGP certificates [OpenPGP] ๐Ÿ’…. at the time of writing, TLS [TLS] standards only use X.509 certificates ๐Ÿ™ƒ. this doc is all about negotiating OpenPGP certificates for a TLS session, and it explains how to send OpenPGP certificates over TLS ๐ŸŽ€. the best part? the extensions are backward compatible with the current TLS spec ๐Ÿซถ, so existing client and server implementations that use X.509 certificates are not affected at all ๐Ÿ˜ญโœจ.

2. Terminology ๐Ÿงš

the term "OpenPGP key" is used here the same way the OpenPGP specification [OpenPGP] uses it ๐Ÿ“–. we say "OpenPGP certificate" when we mean OpenPGP keys that are enabled for authentication ๐Ÿ”.

this document uses the same notation and terminology as the TLS Protocol specification [TLS] ๐Ÿ’œ.

the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] ๐ŸŒˆ.

3. Changes to the Handshake Message Contents ๐Ÿค

this section is the tea โ˜• on what changes in the TLS handshake message contents when OpenPGP certificates are used for authentication.

3.1. Client Hello ๐Ÿ‘‹

so to show that it supports multiple certificate types, a client MUST include an extension of type "cert_type" (see Section 5) in the extended client hello message ๐Ÿ™Œ. the hello extension mechanism is described in [TLSEXT] ๐Ÿ“Ž.

this extension carries a list of the certificate types the client can use, sorted by client preference ๐Ÿ“‹. this extension MUST be omitted if the client only supports X.509 certificates ๐Ÿ™…โ€โ™€๏ธ. the "extension_data" field of this extension contains a CertificateTypeExtension structure ๐Ÿงฉ. here's the vibe check:

   enum { client, server } ClientOrServerExtension;

   enum { X.509(0), OpenPGP(1), (255) } CertificateType;

   struct {
      select(ClientOrServerExtension) {
         case client:
            CertificateType certificate_types<1..2^8-1>;
         case server:
            CertificateType certificate_type;
      }
   } CertificateTypeExtension;

no new cipher suites are required to use OpenPGP certificates ๐Ÿฅณ. all the existing cipher suites that support a key exchange method compatible with the key can be used together with OpenPGP certificates ๐Ÿ’–.

3.2. Server Hello ๐Ÿฆ‹

if the server gets a client hello that has the "cert_type" extension, and it picks a cipher suite that needs a certificate, there are two outcomes ๐Ÿ‘€. the server MUST either select a certificate type from the certificate_types field in the extended client hello, or end the connection with a fatal alert of type unsupported_certificate ๐Ÿ’€.

the certificate type the server picks is encoded in a CertificateTypeExtension structure, and that goes into the extended server hello message using an extension of type "cert_type" ๐ŸŽ€. servers that only support X.509 certificates MAY leave out the "cert_type" extension in the extended server hello ๐ŸŒธ.

3.3. Server Certificate ๐Ÿงพ

the stuff inside the certificate message sent from server to client (and the other way around) depends on the negotiated certificate type and the key exchange algorithm of the selected cipher suite โœจ.

if the OpenPGP certificate type is negotiated, then it is required to present an OpenPGP certificate in the certificate message ๐Ÿ”. the certificate must contain a public key that matches the selected key exchange algorithm, as the table below shows ๐Ÿ‘‡:

   Key Exchange Algorithm  OpenPGP Certificate Type

   RSA                     RSA public key that can be used for
                           encryption.

   DHE_DSS                 DSS public key that can be used for
                           authentication.

   DHE_RSA                 RSA public key that can be used for
                           authentication.

an OpenPGP certificate in the certificate message is sent using the binary OpenPGP format ๐Ÿ’พ. the certificate MUST contain all the elements required by Section 11.1 of [OpenPGP] ๐Ÿซก.

you're also allowed to send an OpenPGP fingerprint instead of the whole certificate ๐Ÿช„. the process of fingerprint generation is described in Section 12.2 of [OpenPGP] ๐Ÿ“–. the peer shall respond with a certificate_unobtainable fatal alert if the certificate with the given fingerprint can't be found ๐Ÿ˜ฌ. the certificate_unobtainable fatal alert is defined in Section 4 of [TLSEXT] ๐Ÿ“Ž.

here's the grammar for all of that ๐Ÿงฉ:

   enum {
        cert_fingerprint (0), cert (1), (255)
   } OpenPGPCertDescriptorType;

   opaque OpenPGPCertFingerprint<16..20>;

   opaque OpenPGPCert<0..2^24-1>;

   struct {
        OpenPGPCertDescriptorType descriptorType;
        select (descriptorType) {
             case cert_fingerprint: OpenPGPCertFingerprint;
             case cert: OpenPGPCert;
        }
   } Certificate;

3.4. Certificate Request ๐Ÿ“ฎ

the semantics of this message stay the same as in the TLS spec ๐Ÿ™†โ€โ™€๏ธ. BUT, if this message is sent and the negotiated certificate type is OpenPGP, the "certificate_authorities" list MUST be empty ๐Ÿšซ.

3.5. Client Certificate ๐Ÿ™‹โ€โ™€๏ธ

this message is only sent in response to the certificate request message ๐Ÿ”. the client certificate message uses the same formatting as the server certificate message, and it is also required to present a certificate that matches the negotiated certificate type ๐Ÿ“œ. if OpenPGP certificates were selected and the client has no certificate available, then a certificate structure containing an empty OpenPGPCert vector MUST be sent ๐Ÿซณ. the server SHOULD respond with a "handshake_failure" fatal alert if client authentication is required ๐Ÿ˜ค.

3.6. Other Handshake Messages ๐ŸŒˆ

all the other handshake messages are identical to the TLS spec, so nothing new to see there โœจ.


more coming in part 2, including the Security Considerations, IANA Considerations, Acknowledgements, and References ๐Ÿงš๐Ÿ’œ

Author's Address ๐Ÿ’–

okay bestie, here's where you can find our author ๐Ÿงš Nikos Mavrogiannopoulos is Independent (no company, just skills ๐Ÿ’…) and lives in Halandri, Attiki, Greece. Here's the exact address:

Nikos Mavrogiannopoulos
Independent
Arkadias 8
Halandri, Attiki  15234
Greece

EMail: nmav@gnutls.org
URI:   http://www.gnutls.org/

the legal bit, and it matters ngl ๐Ÿซถ the copyright is owned by Copyright (C) The IETF Trust (2007). this document is covered by the rights, licenses and restrictions in BCP 78. except for what BCP 78 says, the authors keep all their own rights ๐Ÿ’œ

the document and everything in it is handed over on an "AS IS" basis. the contributor, the organization they represent or are sponsored by (if any), the Internet Society, the IETF Trust, and the Internet Engineering Task Force all say no warranties ๐Ÿ™ˆ that's express or implied, including no promise that using the info won't infringe any rights, and no implied promise of merchantability or fitness for a particular purpose. literally no guarantees, so keep that in mind ๐Ÿ’€


Intellectual Property ๐Ÿฆ‹

the IETF doesn't take a position on whether any Intellectual Property Rights (or other rights someone might claim) are valid or how far they reach, and it doesn't say whether licenses for them are available. it also doesn't claim to have searched for those rights on its own ๐Ÿ” if you want to learn how rights work for RFC documents, check BCP 78 and BCP 79.

copies of IPR disclosures sent to the IETF Secretariat, any assurances that licenses will be available, and the results of any attempt to get a general license or permission for implementers or users of this spec can be found in the IETF's online IPR repository at http://www.ietf.org/ipr ๐ŸŒธ

and the IETF invites anyone who's interested to flag any copyrights, patents, patent applications, or other proprietary rights that might cover technology needed to implement this standard. send that info to the IETF at ietf-ipr@ietf.org ๐Ÿงšโœจ

๐Ÿ“ฆ where this page comes from