Internet Engineering Task Force (IETF)                   P. Wouters, Ed.
Request for Comments: 7250                                       Red Hat
Category: Standards Track                             H. Tschofenig, Ed.
ISSN: 2070-1721                                                 ARM Ltd.
                                                              J. Gilmore
                                          Electronic Frontier Foundation
                                                               S. Weiler
                                                                 Parsons
                                                              T. Kivinen
                                                           INSIDE Secure
                                                               June 2014
        
Internet Engineering Task Force (IETF)                   P. Wouters, Ed.
Request for Comments: 7250                                       Red Hat
Category: Standards Track                             H. Tschofenig, Ed.
ISSN: 2070-1721                                                 ARM Ltd.
                                                              J. Gilmore
                                          Electronic Frontier Foundation
                                                               S. Weiler
                                                                 Parsons
                                                              T. Kivinen
                                                           INSIDE Secure
                                                               June 2014
        

Using Raw Public Keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)

在传输层安全性(TLS)和数据报传输层安全性(DTLS)中使用原始公钥

Abstract

摘要

This document specifies a new certificate type and two TLS extensions for exchanging raw public keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS). The new certificate type allows raw public keys to be used for authentication.

本文档指定了一种新的证书类型和两个TLS扩展,用于在传输层安全性(TLS)和数据报传输层安全性(DTLS)中交换原始公钥。新的证书类型允许使用原始公钥进行身份验证。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7250.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7250.

Copyright Notice

版权公告

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2014 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Structure of the Raw Public Key Extension . . . . . . . . . .   4
   4.  TLS Client and Server Handshake Behavior  . . . . . . . . . .   7
     4.1.  Client Hello  . . . . . . . . . . . . . . . . . . . . . .   7
     4.2.  Server Hello  . . . . . . . . . . . . . . . . . . . . . .   8
     4.3.  Client Authentication . . . . . . . . . . . . . . . . . .   9
     4.4.  Server Authentication . . . . . . . . . . . . . . . . . .   9
   5.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .  10
     5.1.  TLS Server Uses a Raw Public Key  . . . . . . . . . . . .  10
     5.2.  TLS Client and Server Use Raw Public Keys . . . . . . . .  11
     5.3.  Combined Usage of Raw Public Keys and X.509 Certificates   12
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  13
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  14
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  14
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  15
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .  15
     9.2.  Informative References  . . . . . . . . . . . . . . . . .  15
   Appendix A.  Example Encoding . . . . . . . . . . . . . . . . . .  17
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Structure of the Raw Public Key Extension . . . . . . . . . .   4
   4.  TLS Client and Server Handshake Behavior  . . . . . . . . . .   7
     4.1.  Client Hello  . . . . . . . . . . . . . . . . . . . . . .   7
     4.2.  Server Hello  . . . . . . . . . . . . . . . . . . . . . .   8
     4.3.  Client Authentication . . . . . . . . . . . . . . . . . .   9
     4.4.  Server Authentication . . . . . . . . . . . . . . . . . .   9
   5.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .  10
     5.1.  TLS Server Uses a Raw Public Key  . . . . . . . . . . . .  10
     5.2.  TLS Client and Server Use Raw Public Keys . . . . . . . .  11
     5.3.  Combined Usage of Raw Public Keys and X.509 Certificates   12
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  13
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  14
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  14
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  15
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .  15
     9.2.  Informative References  . . . . . . . . . . . . . . . . .  15
   Appendix A.  Example Encoding . . . . . . . . . . . . . . . . . .  17
        
1. Introduction
1. 介绍

Traditionally, TLS client and server public keys are obtained in PKIX containers in-band as part of the TLS handshake procedure and are validated using trust anchors based on a [PKIX] certification authority (CA). This method can add a complicated trust relationship that is difficult to validate. Examples of such complexity can be seen in [Defeating-SSL]. TLS is, however, also commonly used with self-signed certificates in smaller deployments where the self-signed certificates are distributed to all involved protocol endpoints out-of-band. This practice does, however, still require the overhead of the certificate generation even though none of the information found in the certificate is actually used.

传统上,作为TLS握手过程的一部分,TLS客户端和服务器公钥在带内的PKIX容器中获得,并使用基于[PKIX]证书颁发机构(CA)的信任锚进行验证。该方法可以添加难以验证的复杂信任关系。这种复杂性的例子可以在[击败SSL]中看到。但是,TLS也常用于较小部署中的自签名证书,其中自签名证书在带外分发到所有相关的协议端点。然而,这种做法仍然需要证书生成的开销,即使证书中的所有信息都没有被实际使用。

Alternative methods are available that allow a TLS client/server to obtain the TLS server/client public key:

允许TLS客户端/服务器获取TLS服务器/客户端公钥的替代方法可用:

o The TLS client can obtain the TLS server public key from a DNSSEC-secured resource record using DNS-Based Authentication of Named Entities (DANE) [RFC6698].

o TLS客户端可以使用基于DNS的命名实体身份验证(DANE)从DNSSEC安全资源记录中获取TLS服务器公钥[RFC6698]。

o The TLS client or server public key is obtained from a [PKIX] certificate chain from a Lightweight Directory Access Protocol [LDAP] server or web page.

o TLS客户端或服务器公钥是从轻型目录访问协议[LDAP]服务器或网页的[PKIX]证书链中获取的。

o The TLS client and server public key is provisioned into the operating system firmware image and updated via software updates. For example:

o TLS客户端和服务器公钥被提供到操作系统固件映像中,并通过软件更新进行更新。例如:

Some smart objects use the UDP-based Constrained Application Protocol [CoAP] to interact with a Web server to upload sensor data at regular intervals, such as temperature readings. CoAP can utilize DTLS for securing the client-to-server communication. As part of the manufacturing process, the embedded device may be configured with the address and the public key of a dedicated CoAP server, as well as a public/private key pair for the client itself.

一些智能对象使用基于UDP的受限应用程序协议[CoAP]与Web服务器交互,以定期上传传感器数据,如温度读数。CoAP可以利用DTL来保护客户端到服务器的通信。作为制造过程的一部分,嵌入式设备可以配置专用CoAP服务器的地址和公钥,以及用于客户端本身的公钥/私钥对。

This document introduces the use of raw public keys in TLS/DTLS. With raw public keys, only a subset of the information found in typical certificates is utilized: namely, the SubjectPublicKeyInfo structure of a PKIX certificate that carries the parameters necessary to describe the public key. Other parameters found in PKIX certificates are omitted. By omitting various certificate-related structures, the resulting raw public key is kept fairly small in comparison to the original certificate, and the code to process the keys can be simpler. Only a minimalistic ASN.1 parser is needed; code for certificate path validation and other PKIX-related

本文档介绍了原始公钥在TLS/DTL中的使用。对于原始公钥,仅使用典型证书中的信息子集:即PKIX证书的SubjectPublicKeyInfo结构,该结构包含描述公钥所需的参数。忽略PKIX证书中的其他参数。通过省略各种与证书相关的结构,与原始证书相比,生成的原始公钥保持得相当小,并且处理密钥的代码可以更简单。只需要一个最小的ASN.1解析器;证书路径验证和其他PKIX相关的代码

processing is not required. Note, however, the SubjectPublicKeyInfo structure is still in an ASN.1 format. To further reduce the size of the exchanged information, this specification can be combined with the TLS Cached Info extension [CACHED-INFO], which enables TLS peers to exchange just fingerprints of their public keys.

不需要处理。但是请注意,SubjectPublicKeyInfo结构仍然是ASN.1格式。为了进一步减小交换信息的大小,该规范可以与TLS缓存信息扩展[Cached-Info]相结合,该扩展允许TLS对等方仅交换其公钥的指纹。

The mechanism defined herein only provides authentication when an out-of-band mechanism is also used to bind the public key to the entity presenting the key.

本文定义的机制仅在带外机制还用于将公钥绑定到呈现密钥的实体时提供认证。

Section 3 defines the structure of the two new TLS extensions, client_certificate_type and server_certificate_type, which can be used as part of an extended TLS handshake when raw public keys are to be used. Section 4 defines the behavior of the TLS client and the TLS server. Example exchanges are described in Section 5. Section 6 describes security considerations with this approach. Finally, in Section 7 this document registers a new value to the IANA "TLS Certificate Types" subregistry for the support of raw public keys.

第3节定义了两个新的TLS扩展的结构,即客户端证书类型和服务器证书类型,当使用原始公钥时,它们可以用作扩展TLS握手的一部分。第4节定义了TLS客户端和TLS服务器的行为。第5节描述了示例交换。第6节描述了这种方法的安全注意事项。最后,在第7节中,本文件向IANA“TLS证书类型”子区注册了一个新值,以支持原始公钥。

2. Terminology
2. 术语

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 RFC 2119 [RFC2119].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。

We use the terms "TLS server" and "server" as well as "TLS client" and "client" interchangeably.

我们交替使用术语“TLS服务器”和“服务器”以及“TLS客户端”和“客户端”。

3. Structure of the Raw Public Key Extension
3. 原始公钥扩展的结构

This section defines the two TLS extensions client_certificate_type and server_certificate_type, which can be used as part of an extended TLS handshake when raw public keys are used. Section 4 defines the behavior of the TLS client and the TLS server using these extensions.

本节定义了两个TLS扩展客户端证书类型和服务器证书类型,当使用原始公钥时,它们可以作为扩展TLS握手的一部分。第4节定义了使用这些扩展的TLS客户端和TLS服务器的行为。

This specification uses raw public keys whereby the already available encoding used in a PKIX certificate in the form of a SubjectPublicKeyInfo structure is reused. To carry the raw public key within the TLS handshake, the Certificate payload is used as a container, as shown in Figure 1. The shown Certificate structure is an adaptation of its original form [RFC5246].

此规范使用原始公钥,从而重用PKIX证书中以SubjectPublicKeyInfo结构形式使用的现有编码。为了在TLS握手中携带原始公钥,证书有效负载被用作容器,如图1所示。所示的证书结构是对其原始形式[RFC5246]的改编。

   opaque ASN.1Cert<1..2^24-1>;
        
   opaque ASN.1Cert<1..2^24-1>;
        
   struct {
       select(certificate_type){
        
   struct {
       select(certificate_type){
        
            // certificate type defined in this document.
            case RawPublicKey:
              opaque ASN.1_subjectPublicKeyInfo<1..2^24-1>;
        
            // certificate type defined in this document.
            case RawPublicKey:
              opaque ASN.1_subjectPublicKeyInfo<1..2^24-1>;
        
           // X.509 certificate defined in RFC 5246
           case X.509:
             ASN.1Cert certificate_list<0..2^24-1>;
        
           // X.509 certificate defined in RFC 5246
           case X.509:
             ASN.1Cert certificate_list<0..2^24-1>;
        
           // Additional certificate type based on
           // "TLS Certificate Types" subregistry
       };
   } Certificate;
        
           // Additional certificate type based on
           // "TLS Certificate Types" subregistry
       };
   } Certificate;
        

Figure 1: Certificate Payload as a Container for the Raw Public Key

图1:作为原始公钥容器的证书有效负载

The SubjectPublicKeyInfo structure is defined in Section 4.1 of RFC 5280 [PKIX] and not only contains the raw keys, such as the public exponent and the modulus of an RSA public key, but also an algorithm identifier. The algorithm identifier can also include parameters. The SubjectPublicKeyInfo value in the Certificate payload MUST contain the DER encoding [X.690] of the SubjectPublicKeyInfo. The structure, as shown in Figure 2, therefore also contains length information. An example is provided in Appendix A.

RFC 5280[PKIX]第4.1节定义了SubjectPublicKeyInfo结构,它不仅包含原始密钥,如RSA公钥的公钥指数和模,还包含算法标识符。算法标识符还可以包括参数。证书有效负载中的SubjectPublicKeyInfo值必须包含SubjectPublicKeyInfo的DER编码[X.690]。因此,如图2所示,该结构还包含长度信息。附录A中提供了一个示例。

      SubjectPublicKeyInfo  ::=  SEQUENCE  {
           algorithm               AlgorithmIdentifier,
           subjectPublicKey        BIT STRING  }
        
      SubjectPublicKeyInfo  ::=  SEQUENCE  {
           algorithm               AlgorithmIdentifier,
           subjectPublicKey        BIT STRING  }
        
      AlgorithmIdentifier   ::=  SEQUENCE  {
           algorithm               OBJECT IDENTIFIER,
           parameters              ANY DEFINED BY algorithm OPTIONAL  }
        
      AlgorithmIdentifier   ::=  SEQUENCE  {
           algorithm               OBJECT IDENTIFIER,
           parameters              ANY DEFINED BY algorithm OPTIONAL  }
        

Figure 2: SubjectPublicKeyInfo ASN.1 Structure

图2:SubjectPublicKeyInfo ASN.1结构

The algorithm identifiers are Object Identifiers (OIDs). RFC 3279 [RFC3279] and RFC 5480 [RFC5480], for example, define the OIDs shown in Figure 3. Note that this list is not exhaustive, and more OIDs may be defined in future RFCs.

算法标识符是对象标识符(OID)。例如,RFC 3279[RFC3279]和RFC 5480[RFC5480]定义了图3所示的OID。请注意,此列表并非详尽无遗,未来RFC中可能会定义更多OID。

   Key Type            | Document                   | OID
   --------------------+----------------------------+-------------------
   RSA                 | Section 2.3.1 of RFC 3279  | 1.2.840.113549.1.1
   ....................|............................|...................
   Digital Signature   |                            |
   Algorithm (DSA)     | Section 2.3.2 of RFC 3279  | 1.2.840.10040.4.1
   ....................|............................|...................
   Elliptic Curve      |                            |
   Digital Signature   |                            |
   Algorithm (ECDSA)   | Section 2 of RFC 5480      | 1.2.840.10045.2.1
   --------------------+----------------------------+-------------------
        
   Key Type            | Document                   | OID
   --------------------+----------------------------+-------------------
   RSA                 | Section 2.3.1 of RFC 3279  | 1.2.840.113549.1.1
   ....................|............................|...................
   Digital Signature   |                            |
   Algorithm (DSA)     | Section 2.3.2 of RFC 3279  | 1.2.840.10040.4.1
   ....................|............................|...................
   Elliptic Curve      |                            |
   Digital Signature   |                            |
   Algorithm (ECDSA)   | Section 2 of RFC 5480      | 1.2.840.10045.2.1
   --------------------+----------------------------+-------------------
        

Figure 3: Example Algorithm Object Identifiers

图3:示例算法对象标识符

The extension format for extended client and server hellos, which uses the "extension_data" field, is used to carry the ClientCertTypeExtension and the ServerCertTypeExtension structures. These two structures are shown in Figure 4. The CertificateType structure is an enum with values taken from the "TLS Certificate Types" subregistry of the "Transport Layer Security (TLS) Extensions" registry [TLS-Ext-Registry].

扩展客户端和服务器hellos的扩展格式使用“extension_data”字段,用于承载ClientCertTypeExtension和ServerCertTypeExtension结构。这两种结构如图4所示。CertificateType结构是一个枚举,其值取自“传输层安全性(TLS)扩展”注册表[TLS Ext注册表]的“TLS证书类型”子注册表。

   struct {
           select(ClientOrServerExtension) {
               case client:
                 CertificateType client_certificate_types<1..2^8-1>;
               case server:
                 CertificateType client_certificate_type;
           }
   } ClientCertTypeExtension;
        
   struct {
           select(ClientOrServerExtension) {
               case client:
                 CertificateType client_certificate_types<1..2^8-1>;
               case server:
                 CertificateType client_certificate_type;
           }
   } ClientCertTypeExtension;
        
   struct {
           select(ClientOrServerExtension) {
               case client:
                 CertificateType server_certificate_types<1..2^8-1>;
               case server:
                 CertificateType server_certificate_type;
           }
   } ServerCertTypeExtension;
        
   struct {
           select(ClientOrServerExtension) {
               case client:
                 CertificateType server_certificate_types<1..2^8-1>;
               case server:
                 CertificateType server_certificate_type;
           }
   } ServerCertTypeExtension;
        

Figure 4: CertTypeExtension Structure

图4:CertTypeExtension结构

4. TLS Client and Server Handshake Behavior
4. TLS客户端和服务器握手行为

This specification extends the ClientHello and the ServerHello messages, according to the extension procedures defined in [RFC5246]. It does not extend or modify any other TLS message.

本规范根据[RFC5246]中定义的扩展过程扩展ClientHello和ServerHello消息。它不会扩展或修改任何其他TLS消息。

Note: No new cipher suites are required to use raw public keys. All existing cipher suites that support a key exchange method compatible with the defined extension can be used.

注意:使用原始公钥不需要新的密码套件。可以使用支持与定义的扩展兼容的密钥交换方法的所有现有密码套件。

The high-level message exchange in Figure 5 shows the client_certificate_type and server_certificate_type extensions added to the client and server hello messages.

图5中的高级消息交换显示了添加到客户机和服务器hello消息中的客户机证书类型和服务器证书类型扩展。

client_hello, client_certificate_type, server_certificate_type ->

客户端\你好,客户端\证书\类型,服务器\证书\类型->

<- server_hello, client_certificate_type, server_certificate_type, certificate, server_key_exchange, certificate_request, server_hello_done certificate, client_key_exchange, certificate_verify, change_cipher_spec, finished ->

<-服务器\你好,客户端\证书\类型,服务器\证书\类型,证书,服务器\密钥\交换,证书\请求,服务器\你好\完成证书,客户端\密钥\交换,证书\验证,更改\密码\规范,完成->

<- change_cipher_spec, finished

<-更改密码规格,完成

   Application Data        <------->     Application Data
        
   Application Data        <------->     Application Data
        

Figure 5: Basic Raw Public Key TLS Exchange

图5:基本原始公钥TLS交换

4.1. Client Hello
4.1. 客户你好

In order to indicate the support of raw public keys, clients include the client_certificate_type and/or the server_certificate_type extensions in an extended client hello message. The hello extension mechanism is described in Section 7.4.1.4 of TLS 1.2 [RFC5246].

为了指示对原始公钥的支持,客户端在扩展的客户端hello消息中包括客户端证书类型和/或服务器证书类型扩展。TLS 1.2[RFC5246]第7.4.1.4节描述了hello扩展机制。

The client_certificate_type extension in the client hello indicates the certificate types the client is able to provide to the server, when requested using a certificate_request message.

client hello中的client_certificate_type扩展指示当使用证书请求消息请求时,客户端能够向服务器提供的证书类型。

The server_certificate_type extension in the client hello indicates the types of certificates the client is able to process when provided by the server in a subsequent certificate payload.

客户机hello中的server_certificate_type扩展指示当服务器在后续证书有效负载中提供时,客户机能够处理的证书类型。

The client_certificate_type and server_certificate_type extensions sent in the client hello each carry a list of supported certificate types, sorted by client preference. When the client supports only one certificate type, it is a list containing a single element.

在client hello中发送的client_certificate_type和server_certificate_type扩展都包含一个受支持的证书类型列表,并按客户机首选项排序。当客户端仅支持一种证书类型时,它是一个包含单个元素的列表。

The TLS client MUST omit certificate types from the client_certificate_type extension in the client hello if it does not possess the corresponding raw public key or certificate that it can provide to the server when requested using a certificate_request message, or if it is not configured to use one with the given TLS server. If the client has no remaining certificate types to send in the client hello, other than the default X.509 type, it MUST omit the client_certificate_type extension in the client hello.

如果TLS客户端不具有使用证书请求消息请求时可提供给服务器的相应原始公钥或证书,或者如果未配置为与给定TLS服务器一起使用,则TLS客户端必须从客户端hello中的客户端证书类型扩展中省略证书类型。如果客户机在客户机hello中没有要发送的剩余证书类型(默认的X.509类型除外),则必须在客户机hello中省略客户机证书类型扩展。

The TLS client MUST omit certificate types from the server_certificate_type extension in the client hello if it is unable to process the corresponding raw public key or other certificate type. If the client has no remaining certificate types to send in the client hello, other than the default X.509 certificate type, it MUST omit the entire server_certificate_type extension from the client hello.

如果TLS客户端无法处理相应的原始公钥或其他证书类型,则必须从客户端hello中的server_certificate_type扩展中省略证书类型。如果客户端除了默认的X.509证书类型之外,没有剩余的证书类型可发送到客户端hello中,则必须从客户端hello中省略整个服务器证书类型扩展。

4.2. Server Hello
4.2. 服务器你好

If the server receives a client hello that contains the client_certificate_type extension and/or the server_certificate_type extension, then three outcomes are possible:

如果服务器接收到包含客户端证书类型扩展和/或服务器证书类型扩展的客户端hello,则可能出现三种结果:

1. The server does not support the extension defined in this document. In this case, the server returns the server hello without the extensions defined in this document.

1. 服务器不支持此文档中定义的扩展。在这种情况下,服务器返回服务器hello,而不返回本文档中定义的扩展名。

2. The server supports the extension defined in this document, but it does not have any certificate type in common with the client. Then, the server terminates the session with a fatal alert of type "unsupported_certificate".

2. 服务器支持此文档中定义的扩展,但它没有与客户端相同的任何证书类型。然后,服务器使用类型为“unsupported_certificate”的致命警报终止会话。

3. The server supports the extensions defined in this document and has at least one certificate type in common with the client. In this case, the processing rules described below are followed.

3. 服务器支持此文档中定义的扩展,并且至少有一种证书类型与客户端相同。在这种情况下,遵循下面描述的处理规则。

The client_certificate_type extension in the client hello indicates the certificate types the client is able to provide to the server, when requested using a certificate_request message. If the TLS

client hello中的client_certificate_type扩展指示当使用证书请求消息请求时,客户端能够向服务器提供的证书类型。如果TLS

server wants to request a certificate from the client (via the certificate_request message), it MUST include the client_certificate_type extension in the server hello. This client_certificate_type extension in the server hello then indicates the type of certificates the client is requested to provide in a subsequent certificate payload. The value conveyed in the client_certificate_type extension MUST be selected from one of the values provided in the client_certificate_type extension sent in the client hello. The server MUST also include a certificate_request payload in the server hello message.

服务器想要从客户端请求证书(通过证书请求消息),它必须在服务器hello中包含客户端证书类型扩展。然后,服务器hello中的客户机证书类型扩展指示在后续证书负载中请求客户机提供的证书类型。客户端证书类型扩展中传递的值必须从客户端hello中发送的客户端证书类型扩展中提供的值中选择。服务器还必须在服务器hello消息中包含证书请求负载。

If the server does not send a certificate_request payload (for example, because client authentication happens at the application layer or no client authentication is required) or none of the certificates supported by the client (as indicated in the client_certificate_type extension in the client hello) match the server-supported certificate types, then the client_certificate_type payload in the server hello MUST be omitted.

如果服务器未发送证书\u请求有效负载(例如,因为客户端身份验证发生在应用层或不需要客户端身份验证),或者客户端支持的证书(如客户端hello中的客户端证书类型扩展中所示)均与服务器支持的证书类型不匹配,然后必须省略服务器hello中的客户端证书类型有效负载。

The server_certificate_type extension in the client hello indicates the types of certificates the client is able to process when provided by the server in a subsequent certificate payload. If the client hello indicates support of raw public keys in the server_certificate_type extension and the server chooses to use raw public keys, then the TLS server MUST place the SubjectPublicKeyInfo structure into the Certificate payload. With the server_certificate_type extension in the server hello, the TLS server indicates the certificate type carried in the Certificate payload. This additional indication enables avoiding parsing ambiguities since the Certificate payload may contain either the X.509 certificate or a SubjectPublicKeyInfo structure. Note that only a single value is permitted in the server_certificate_type extension when carried in the server hello.

客户机hello中的server_certificate_type扩展指示当服务器在后续证书有效负载中提供时,客户机能够处理的证书类型。如果客户端hello表示支持服务器证书类型扩展中的原始公钥,并且服务器选择使用原始公钥,那么TLS服务器必须将SubjectPublicKeyInfo结构放入证书负载中。通过服务器hello中的server_certificate_type扩展,TLS服务器指示证书负载中携带的证书类型。由于证书负载可能包含X.509证书或SubjectPublicKeyInfo结构,此附加指示可避免解析歧义。请注意,在服务器hello中携带时,服务器证书类型扩展中只允许一个值。

4.3. Client Authentication
4.3. 客户端身份验证

When the TLS server has specified RawPublicKey as the client_certificate_type, authentication of the TLS client to the TLS server is supported only through authentication of the received client SubjectPublicKeyInfo via an out-of-band method.

当TLS服务器将RawPublicKey指定为客户端证书类型时,只有通过带外方法对接收到的客户端SubjectPublicKeyInfo进行身份验证,才能支持TLS客户端到TLS服务器的身份验证。

4.4. Server Authentication
4.4. 服务器身份验证

When the TLS server has specified RawPublicKey as the server_certificate_type, authentication of the TLS server to the TLS client is supported only through authentication of the received client SubjectPublicKeyInfo via an out-of-band method.

当TLS服务器将RawPublicKey指定为服务器证书类型时,只有通过带外方法对接收到的客户端SubjectPublicKeyInfo进行身份验证,才能支持TLS服务器对TLS客户端的身份验证。

5. Examples
5. 例子

Figures 6, 7, and 8 illustrate example exchanges. Note that TLS ciphersuites using a Diffie-Hellman exchange offering forward secrecy can be used with a raw public key, although this document does not show the information exchange at that level with the subsequent message flows.

图6、7和8展示了示例交换。请注意,使用Diffie-Hellman交换提供前向保密的TLS密码套件可以与原始公钥一起使用,尽管本文档未显示该级别的信息交换以及后续消息流。

5.1. TLS Server Uses a Raw Public Key
5.1. TLS服务器使用原始公钥

This section shows an example where the TLS client indicates its ability to receive and validate a raw public key from the server. In this example, the client is quite restricted since it is unable to process other certificate types sent by the server. It also does not have credentials at the TLS layer it could send to the server and therefore omits the client_certificate_type extension. Hence, the client only populates the server_certificate_type extension with the raw public key type, as shown in (1).

本节显示了一个示例,其中TLS客户端指示其从服务器接收和验证原始公钥的能力。在本例中,客户端受到很大限制,因为它无法处理服务器发送的其他证书类型。它在TLS层也没有可以发送到服务器的凭据,因此省略了客户端证书类型扩展。因此,客户端仅使用原始公钥类型填充服务器证书类型扩展,如(1)所示。

When the TLS server receives the client hello, it processes the extension. Since it has a raw public key, it indicates in (2) that it had chosen to place the SubjectPublicKeyInfo structure into the Certificate payload (3).

当TLS服务器接收到客户机hello时,它将处理扩展。由于它有一个原始公钥,它在(2)中指示它已选择将SubjectPublicKeyInfo结构放入证书有效负载(3)中。

The client uses this raw public key in the TLS handshake together with an out-of-band validation technique, such as DANE, to verify it.

客户端在TLS握手中使用此原始公钥,并使用带外验证技术(如DANE)对其进行验证。

  client_hello,
  server_certificate_type=(RawPublicKey) // (1)
                         ->
                         <- server_hello,
                            server_certificate_type=RawPublicKey, // (2)
                            certificate, // (3)
                            server_key_exchange,
                            server_hello_done
        
  client_hello,
  server_certificate_type=(RawPublicKey) // (1)
                         ->
                         <- server_hello,
                            server_certificate_type=RawPublicKey, // (2)
                            certificate, // (3)
                            server_key_exchange,
                            server_hello_done
        

client_key_exchange, change_cipher_spec, finished ->

客户端密钥交换,更改密码规格,完成->

<- change_cipher_spec, finished

<-更改密码规格,完成

  Application Data       <-------> Application Data
        
  Application Data       <-------> Application Data
        

Figure 6: Example with Raw Public Key Provided by the TLS Server

图6:TLS服务器提供的原始公钥示例

5.2. TLS Client and Server Use Raw Public Keys
5.2. TLS客户端和服务器使用原始公钥

This section shows an example where the TLS client as well as the TLS server use raw public keys. This is one of the use cases envisioned for smart object networking. The TLS client in this case is an embedded device that is configured with a raw public key for use with TLS and is also able to process a raw public key sent by the server. Therefore, it indicates these capabilities in (1). As in the previously shown example, the server fulfills the client's request, indicates this via the RawPublicKey value in the server_certificate_type payload (2), and provides a raw public key in the Certificate payload back to the client (see (3)). The TLS server demands client authentication, and therefore includes a certificate_request (4). The client_certificate_type payload in (5) indicates that the TLS server accepts a raw public key. The TLS client, which has a raw public key pre-provisioned, returns it in the Certificate payload (6) to the server.

本节显示了TLS客户端和TLS服务器使用原始公钥的示例。这是为智能对象网络设想的用例之一。在这种情况下,TLS客户端是一个嵌入式设备,配置了原始公钥用于TLS,并且还能够处理服务器发送的原始公钥。因此,它在(1)中指出了这些能力。如前面所示的示例中所示,服务器满足客户端的请求,通过服务器证书类型有效负载(2)中的RawPublicKey值指示这一点,并在证书有效负载中向客户端提供原始公钥(请参见(3))。TLS服务器要求客户端身份验证,因此包含证书请求(4)。(5)中的客户端证书类型有效负载表示TLS服务器接受原始公钥。预先设置了原始公钥的TLS客户端将其在证书有效负载(6)中返回给服务器。

client_hello,
client_certificate_type=(RawPublicKey) // (1)
server_certificate_type=(RawPublicKey) // (1)
                         ->
                         <-  server_hello,
                             server_certificate_type=RawPublicKey // (2)
                             certificate, // (3)
                             client_certificate_type=RawPublicKey // (5)
                             certificate_request, // (4)
                             server_key_exchange,
                             server_hello_done
        
client_hello,
client_certificate_type=(RawPublicKey) // (1)
server_certificate_type=(RawPublicKey) // (1)
                         ->
                         <-  server_hello,
                             server_certificate_type=RawPublicKey // (2)
                             certificate, // (3)
                             client_certificate_type=RawPublicKey // (5)
                             certificate_request, // (4)
                             server_key_exchange,
                             server_hello_done
        

certificate, // (6) client_key_exchange, change_cipher_spec, finished ->

证书,//(6)客户端密钥交换,更改密码规格,完成->

<- change_cipher_spec, finished

<-更改密码规格,完成

Application Data        <------->     Application Data
        
Application Data        <------->     Application Data
        

Figure 7: Example with Raw Public Key provided by the TLS Server and the Client

图7:TLS服务器和客户端提供的原始公钥示例

5.3. Combined Usage of Raw Public Keys and X.509 Certificates
5.3. 原始公钥和X.509证书的组合使用

This section shows an example combining a raw public key and an X.509 certificate. The client uses a raw public key for client authentication, and the server provides an X.509 certificate. This exchange starts with the client indicating its ability to process an X.509 certificate, OpenPGP certificate, or a raw public key, if provided by the server. It prefers a raw public key, since the RawPublicKey value precedes the other values in the server_certificate_type vector. Additionally, the client indicates that it has a raw public key for client-side authentication (see (1)). The server chooses to provide its X.509 certificate in (3) and indicates that choice in (2). For client authentication, the server indicates in (4) that it has selected the raw public key format and requests a certificate from the client in (5). The TLS client provides a raw public key in (6) after receiving and processing the TLS server hello message.

本节展示了一个结合原始公钥和X.509证书的示例。客户端使用原始公钥进行客户端身份验证,服务器提供X.509证书。此交换从客户端开始,指示其处理X.509证书、OpenPGP证书或原始公钥(如果由服务器提供)的能力。它更喜欢原始公钥,因为RawPublicKey值优先于服务器证书类型向量中的其他值。此外,客户端指示它具有用于客户端身份验证的原始公钥(请参见(1))。服务器选择在(3)中提供其X.509证书,并在(2)中指出该选择。对于客户端身份验证,服务器在(4)中指示它已选择原始公钥格式,并在(5)中从客户端请求证书。TLS客户端在接收和处理TLS服务器hello消息后,在(6)中提供原始公钥。

client_hello,
server_certificate_type=(RawPublicKey, X.509, OpenPGP)
client_certificate_type=(RawPublicKey) // (1)
                         ->
                         <-  server_hello,
                             server_certificate_type=X.509 // (2)
                             certificate, // (3)
                             client_certificate_type=RawPublicKey // (4)
                             certificate_request, // (5)
                             server_key_exchange,
                             server_hello_done
certificate, // (6)
client_key_exchange,
change_cipher_spec,
finished                  ->
        
client_hello,
server_certificate_type=(RawPublicKey, X.509, OpenPGP)
client_certificate_type=(RawPublicKey) // (1)
                         ->
                         <-  server_hello,
                             server_certificate_type=X.509 // (2)
                             certificate, // (3)
                             client_certificate_type=RawPublicKey // (4)
                             certificate_request, // (5)
                             server_key_exchange,
                             server_hello_done
certificate, // (6)
client_key_exchange,
change_cipher_spec,
finished                  ->
        

<- change_cipher_spec, finished

<-更改密码规格,完成

Application Data        <------->     Application Data
        
Application Data        <------->     Application Data
        

Figure 8: Hybrid Certificate Example

图8:混合证书示例

6. Security Considerations
6. 安全考虑

The transmission of raw public keys, as described in this document, provides benefits by lowering the over-the-air transmission overhead since raw public keys are naturally smaller than an entire certificate. There are also advantages from a code-size point of view for parsing and processing these keys. The cryptographic procedures for associating the public key with the possession of a private key also follows standard procedures.

如本文档所述,原始公钥的传输通过降低空中传输开销提供了好处,因为原始公钥自然小于整个证书。从代码大小的角度来看,解析和处理这些键也有好处。将公钥与私钥的拥有相关联的加密过程也遵循标准过程。

However, the main security challenge is how to associate the public key with a specific entity. Without a secure binding between identifier and key, the protocol will be vulnerable to man-in-the-middle attacks. This document assumes that such binding can be made out-of-band, and we list a few examples in Section 1. DANE [RFC6698] offers one such approach. In order to address these vulnerabilities, specifications that make use of the extension need to specify how the identifier and public key are bound. In addition to ensuring the binding is done out-of-band, an implementation also needs to check the status of that binding.

然而,主要的安全挑战是如何将公钥与特定实体相关联。如果标识符和密钥之间没有安全绑定,协议将容易受到中间人攻击。本文档假设这种绑定可以在带外进行,我们在第1节中列出了一些示例。丹麦[RFC6698]提供了一种这样的方法。为了解决这些漏洞,使用扩展的规范需要指定如何绑定标识符和公钥。除了确保绑定在带外完成外,实现还需要检查绑定的状态。

If public keys are obtained using DANE, these public keys are authenticated via DNSSEC. Using pre-configured keys is another out-of-band method for authenticating raw public keys. While pre-configured keys are not suitable for a generic Web-based e-commerce environment, such keys are a reasonable approach for many smart object deployments where there is a close relationship between the software running on the device and the server-side communication endpoint. Regardless of the chosen mechanism for out-of-band public key validation, an assessment of the most suitable approach has to be made prior to the start of a deployment to ensure the security of the system.

如果使用DANE获得公钥,则通过DNSSEC对这些公钥进行身份验证。使用预先配置的密钥是另一种用于验证原始公钥的带外方法。虽然预配置的密钥不适用于基于Web的通用电子商务环境,但对于设备上运行的软件与服务器端通信端点之间存在密切关系的许多智能对象部署,此类密钥是一种合理的方法。无论选择何种带外公钥验证机制,都必须在开始部署之前对最合适的方法进行评估,以确保系统的安全性。

An attacker might try to influence the handshake exchange to make the parties select different certificate types than they would normally choose.

攻击者可能试图影响握手交换,使双方选择不同于通常选择的证书类型。

For this attack, an attacker must actively change one or more handshake messages. If this occurs, the client and server will compute different values for the handshake message hashes. As a result, the parties will not accept each others' Finished messages. Without the master_secret, the attacker cannot repair the Finished messages, so the attack will be discovered.

对于此攻击,攻击者必须主动更改一条或多条握手消息。如果发生这种情况,客户端和服务器将为握手消息哈希计算不同的值。因此,双方将不接受对方已完成的消息。如果没有master_secret,攻击者无法修复完成的消息,因此将发现攻击。

7. IANA Considerations
7. IANA考虑

IANA has registered a new value in the "TLS Certificate Types" subregistry of the "Transport Layer Security (TLS) Extensions" registry [TLS-Ext-Registry], as follows:

IANA已在“传输层安全(TLS)扩展”注册表[TLS Ext注册表]的“TLS证书类型”子注册表中注册了一个新值,如下所示:

Value: 2 Description: Raw Public Key Reference: RFC 7250

值:2说明:原始公钥引用:RFC 7250

IANA has allocated two new TLS extensions, client_certificate_type and server_certificate_type, from the "TLS ExtensionType Values" subregistry defined in [RFC5246]. These extensions are used in both the client hello message and the server hello message. The new extension types are used for certificate type negotiation. The values carried in these extensions are taken from the "TLS Certificate Types" subregistry of the "Transport Layer Security (TLS) Extensions" registry [TLS-Ext-Registry].

IANA已从[RFC5246]中定义的“TLS ExtensionType Values”子区分配了两个新的TLS扩展,即客户端证书类型和服务器证书类型。这些扩展用于客户端hello消息和服务器hello消息。新的扩展类型用于证书类型协商。这些扩展中包含的值取自“传输层安全性(TLS)扩展”注册表[TLS Ext注册表]的“TLS证书类型”子注册表。

8. Acknowledgements
8. 致谢

The feedback from the TLS working group meeting at IETF 81 has substantially shaped the document, and we would like to thank the meeting participants for their input. The support for hashes of public keys has been moved to [CACHED-INFO] after the discussions at the IETF 82 meeting.

在IETF 81上召开的TLS工作组会议的反馈意见实质上形成了该文件,我们要感谢与会者的投入。在IETF 82会议讨论之后,对公钥哈希的支持已移至[CACHED-INFO]。

We would like to thank the following persons for their review comments: Martin Rex, Bill Frantz, Zach Shelby, Carsten Bormann, Cullen Jennings, Rene Struik, Alper Yegin, Jim Schaad, Barry Leiba, Paul Hoffman, Robert Cragie, Nikos Mavrogiannopoulos, Phil Hunt, John Bradley, Klaus Hartke, Stefan Jucker, Kovatsch Matthias, Daniel Kahn Gillmor, Peter Sylvester, Hauke Mehrtens, Alexey Melnikov, Stephen Farrell, Richard Barnes, and James Manger. Nikos Mavrogiannopoulos contributed the design for reusing the certificate type registry. Barry Leiba contributed guidance for the IANA Considerations text. Stefan Jucker, Kovatsch Matthias, and Klaus Hartke provided implementation feedback regarding the SubjectPublicKeyInfo structure.

我们要感谢以下人士的评论:马丁·雷克斯、比尔·弗兰茨、扎克·谢尔比、卡斯滕·鲍曼、卡伦·詹宁斯、雷内·斯特鲁克、阿尔珀·耶金、吉姆·沙德、巴里·莱巴、保罗·霍夫曼、罗伯特·克雷吉、尼科斯·马夫罗吉安诺普洛斯、菲尔·亨特、约翰·布拉德利、克劳斯·哈特克、斯特凡·朱克、科瓦奇·马提亚斯、丹尼尔·卡恩·吉尔莫、,彼得·西尔维斯特、豪克·梅尔滕斯、阿列克西·梅尔尼科夫、斯蒂芬·法雷尔、理查德·巴恩斯和詹姆斯·马格。Nikos Mavrogiannopoulos为重用证书类型注册表的设计做出了贡献。Barry Leiba为IANA考虑事项文本提供了指导。Stefan Jucker、Kovatsch Matthias和Klaus Hartke提供了关于主题PublicKeyInfo结构的实现反馈。

Christer Holmberg provided the General Area (Gen-Art) review, Yaron Sheffer provided the Security Directorate (SecDir) review, Bert Greevenbosch provided the Applications Area Directorate review, and Linda Dunbar provided the Operations Directorate review.

Christer Holmberg提供一般区域(Gen Art)审查,Yaron Sheffer提供安全理事会(SecDir)审查,Bert Greevenbosch提供应用区域理事会审查,Linda Dunbar提供运营理事会审查。

We would like to thank our TLS working group chairs, Eric Rescorla and Joe Salowey, for their guidance and support. Finally, we would like to thank Sean Turner, who is the responsible Security Area Director for this work, for his review comments and suggestions.

我们要感谢TLS工作组主席Eric Rescorla和Joe Salowey的指导和支持。最后,我们要感谢负责这项工作的安全区域主任Sean Turner的审查意见和建议。

9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[PKIX] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, May 2008.

[PKIX]Cooper,D.,Santesson,S.,Farrell,S.,Boeyen,S.,Housley,R.,和W.Polk,“Internet X.509公钥基础设施证书和证书撤销列表(CRL)配置文件”,RFC 52802008年5月。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279, April 2002.

[RFC3279]Bassham,L.,Polk,W.,和R.Housley,“互联网X.509公钥基础设施证书和证书撤销列表(CRL)配置文件的算法和标识符”,RFC 3279,2002年4月。

[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008.

[RFC5246]Dierks,T.和E.Rescorla,“传输层安全(TLS)协议版本1.2”,RFC 5246,2008年8月。

[RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, "Elliptic Curve Cryptography Subject Public Key Information", RFC 5480, March 2009.

[RFC5480]Turner,S.,Brown,D.,Yiu,K.,Housley,R.,和T.Polk,“椭圆曲线加密主题公钥信息”,RFC 54802009年3月。

[TLS-Ext-Registry] IANA, "Transport Layer Security (TLS) Extensions", <http://www.iana.org/assignments/ tls-extensiontype-values>.

[TLS Ext Registry]IANA,“传输层安全(TLS)扩展”<http://www.iana.org/assignments/ tls扩展类型值>。

[X.690] ITU-T, "Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)", ITU-T Recommendation X.690, ISO/IEC 8825-1:2002, 2002.

[X.690]ITU-T,“信息技术-ASN.1编码规则:基本编码规则(BER)、规范编码规则(CER)和区分编码规则(DER)规范”,ITU-T建议X.690,ISO/IEC 8825-1:2002。

9.2. Informative References
9.2. 资料性引用

[ASN.1-Dump] Gutmann, P., "ASN.1 Object Dump Program", February 2013, <http://www.cs.auckland.ac.nz/~pgut001/>.

[ASN.1-Dump]Gutmann,P.,“ASN.1对象转储程序”,2013年2月<http://www.cs.auckland.ac.nz/~pgut001/>。

[CACHED-INFO] Santesson, S. and H. Tschofenig, "Transport Layer Security (TLS) Cached Information Extension", Work in Progress, February 2014.

[CACHED-INFO]Santesson,S.和H.Tschofenig,“传输层安全(TLS)缓存信息扩展”,正在进行的工作,2014年2月。

[CoAP] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained Application Protocol (CoAP)", RFC 7252, June 2014.

[CoAP]Shelby,Z.,Hartke,K.和C.Bormann,“受限应用协议(CoAP)”,RFC 72522014年6月。

[Defeating-SSL] Marlinspike, M., "New Tricks for Defeating SSL in Practice", February 2009, <http://www.blackhat.com/ presentations/bh-dc-09/Marlinspike/ BlackHat-DC-09-Marlinspike-Defeating-SSL.pdf>.

[击败SSL]Marlinspike,M.,“在实践中击败SSL的新技巧”,2009年2月<http://www.blackhat.com/ 演示文稿/bh-dc-09/Marlinspike/BlackHat-dc-09-Marlinspike-detaching-SSL.pdf>。

[LDAP] Sermersheim, J., "Lightweight Directory Access Protocol (LDAP): The Protocol", RFC 4511, June 2006.

[LDAP]Sermersheim,J.,“轻量级目录访问协议(LDAP):协议”,RFC45112006年6月。

[RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA", RFC 6698, August 2012.

[RFC6698]Hoffman,P.和J.Schlyter,“基于DNS的命名实体认证(DANE)传输层安全(TLS)协议:TLSA”,RFC 6698,2012年8月。

Appendix A. Example Encoding
附录A.编码示例

For example, the hex sequence shown in Figure 9 describes a SubjectPublicKeyInfo structure inside the certificate payload.

例如,图9所示的十六进制序列描述了证书负载内的SubjectPublicKeyInfo结构。

          0     1     2     3     4     5     6     7     8     9
      +------+-----+-----+-----+-----+-----+-----+-----+-----+-----
   1  | 0x30, 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48,
   2  | 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81,
   3  | 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xcd,
   4  | 0xfd, 0x89, 0x48, 0xbe, 0x36, 0xb9, 0x95, 0x76, 0xd4, 0x13,
   5  | 0x30, 0x0e, 0xbf, 0xb2, 0xed, 0x67, 0x0a, 0xc0, 0x16, 0x3f,
   6  | 0x51, 0x09, 0x9d, 0x29, 0x2f, 0xb2, 0x6d, 0x3f, 0x3e, 0x6c,
   7  | 0x2f, 0x90, 0x80, 0xa1, 0x71, 0xdf, 0xbe, 0x38, 0xc5, 0xcb,
   8  | 0xa9, 0x9a, 0x40, 0x14, 0x90, 0x0a, 0xf9, 0xb7, 0x07, 0x0b,
   9  | 0xe1, 0xda, 0xe7, 0x09, 0xbf, 0x0d, 0x57, 0x41, 0x86, 0x60,
   10 | 0xa1, 0xc1, 0x27, 0x91, 0x5b, 0x0a, 0x98, 0x46, 0x1b, 0xf6,
   11 | 0xa2, 0x84, 0xf8, 0x65, 0xc7, 0xce, 0x2d, 0x96, 0x17, 0xaa,
   12 | 0x91, 0xf8, 0x61, 0x04, 0x50, 0x70, 0xeb, 0xb4, 0x43, 0xb7,
   13 | 0xdc, 0x9a, 0xcc, 0x31, 0x01, 0x14, 0xd4, 0xcd, 0xcc, 0xc2,
   14 | 0x37, 0x6d, 0x69, 0x82, 0xd6, 0xc6, 0xc4, 0xbe, 0xf2, 0x34,
   15 | 0xa5, 0xc9, 0xa6, 0x19, 0x53, 0x32, 0x7a, 0x86, 0x0e, 0x91,
   16 | 0x82, 0x0f, 0xa1, 0x42, 0x54, 0xaa, 0x01, 0x02, 0x03, 0x01,
   17 | 0x00, 0x01
        
          0     1     2     3     4     5     6     7     8     9
      +------+-----+-----+-----+-----+-----+-----+-----+-----+-----
   1  | 0x30, 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48,
   2  | 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81,
   3  | 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xcd,
   4  | 0xfd, 0x89, 0x48, 0xbe, 0x36, 0xb9, 0x95, 0x76, 0xd4, 0x13,
   5  | 0x30, 0x0e, 0xbf, 0xb2, 0xed, 0x67, 0x0a, 0xc0, 0x16, 0x3f,
   6  | 0x51, 0x09, 0x9d, 0x29, 0x2f, 0xb2, 0x6d, 0x3f, 0x3e, 0x6c,
   7  | 0x2f, 0x90, 0x80, 0xa1, 0x71, 0xdf, 0xbe, 0x38, 0xc5, 0xcb,
   8  | 0xa9, 0x9a, 0x40, 0x14, 0x90, 0x0a, 0xf9, 0xb7, 0x07, 0x0b,
   9  | 0xe1, 0xda, 0xe7, 0x09, 0xbf, 0x0d, 0x57, 0x41, 0x86, 0x60,
   10 | 0xa1, 0xc1, 0x27, 0x91, 0x5b, 0x0a, 0x98, 0x46, 0x1b, 0xf6,
   11 | 0xa2, 0x84, 0xf8, 0x65, 0xc7, 0xce, 0x2d, 0x96, 0x17, 0xaa,
   12 | 0x91, 0xf8, 0x61, 0x04, 0x50, 0x70, 0xeb, 0xb4, 0x43, 0xb7,
   13 | 0xdc, 0x9a, 0xcc, 0x31, 0x01, 0x14, 0xd4, 0xcd, 0xcc, 0xc2,
   14 | 0x37, 0x6d, 0x69, 0x82, 0xd6, 0xc6, 0xc4, 0xbe, 0xf2, 0x34,
   15 | 0xa5, 0xc9, 0xa6, 0x19, 0x53, 0x32, 0x7a, 0x86, 0x0e, 0x91,
   16 | 0x82, 0x0f, 0xa1, 0x42, 0x54, 0xaa, 0x01, 0x02, 0x03, 0x01,
   17 | 0x00, 0x01
        

Figure 9: Example SubjectPublicKeyInfo Structure Byte Sequence

图9:SubjectPublicKeyInfo结构字节序列示例

The decoded byte sequence shown in Figure 9 (for example, using Peter Gutmann's ASN.1 decoder [ASN.1-Dump]) illustrates the structure, as shown in Figure 10.

图9所示的解码字节序列(例如,使用Peter Gutmann的ASN.1解码器[ASN.1-Dump])说明了该结构,如图10所示。

   Offset  Length   Description
   -------------------------------------------------------------------
      0     3+159:   SEQUENCE {
      3      2+13:     SEQUENCE {
      5       2+9:      OBJECT IDENTIFIER Value (1 2 840 113549 1 1 1)
                 :             PKCS #1, rsaEncryption
     16       2+0:      NULL
                 :      }
     18     3+141:    BIT STRING, encapsulates {
     22     3+137:      SEQUENCE {
     25     3+129:        INTEGER Value (1024 bit)
    157       2+3:        INTEGER Value (65537)
                 :        }
                 :      }
                 :    }
        
   Offset  Length   Description
   -------------------------------------------------------------------
      0     3+159:   SEQUENCE {
      3      2+13:     SEQUENCE {
      5       2+9:      OBJECT IDENTIFIER Value (1 2 840 113549 1 1 1)
                 :             PKCS #1, rsaEncryption
     16       2+0:      NULL
                 :      }
     18     3+141:    BIT STRING, encapsulates {
     22     3+137:      SEQUENCE {
     25     3+129:        INTEGER Value (1024 bit)
    157       2+3:        INTEGER Value (65537)
                 :        }
                 :      }
                 :    }
        

Figure 10: Decoding of Example SubjectPublicKeyInfo Structure

图10:示例SubjectPublicKeyInfo结构的解码

Authors' Addresses

作者地址

Paul Wouters (editor) Red Hat

保罗·沃特斯(编辑)红帽

   EMail: pwouters@redhat.com
        
   EMail: pwouters@redhat.com
        

Hannes Tschofenig (editor) ARM Ltd. 6060 Hall in Tirol Austria

Hannes Tschofenig(编辑)ARM有限公司位于奥地利蒂罗尔的6060大厅

   EMail: Hannes.tschofenig@gmx.net
   URI:   http://www.tschofenig.priv.at
        
   EMail: Hannes.tschofenig@gmx.net
   URI:   http://www.tschofenig.priv.at
        

John Gilmore Electronic Frontier Foundation PO Box 170608 San Francisco, California 94117 USA

约翰·吉尔摩电子前沿基金会邮政信箱170608旧金山,加利福尼亚,美国94117

   Phone: +1 415 221 6524
   EMail: gnu@toad.com
   URI:   https://www.toad.com/
        
   Phone: +1 415 221 6524
   EMail: gnu@toad.com
   URI:   https://www.toad.com/
        

Samuel Weiler Parsons 7110 Samuel Morse Drive Columbia, Maryland 21046 US

塞缪尔·韦勒·帕森斯7110美国马里兰州哥伦比亚塞缪尔·莫尔斯大道21046号

   EMail: weiler@tislabs.com
        
   EMail: weiler@tislabs.com
        

Tero Kivinen INSIDE Secure Eerikinkatu 28 Helsinki FI-00180 FI

Tero Kivinen Inkinkatu 28赫尔辛基FI-00180 FI

   EMail: kivinen@iki.fi
        
   EMail: kivinen@iki.fi