<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.5.24 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="pre5378Trust200902" docName="draft-ietf-cose-hpke-02" category="std">
  <front>
    <title abbrev="COSE HPKE">Use of Hybrid Public-Key Encryption (HPKE) with CBOR Object Signing and Encryption (COSE)</title>

    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization>Arm Limited</organization>
      <address>
        <email>hannes.tschofenig@arm.com</email>
      </address>
    </author>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security">Vigil Security, LLC</organization>
      <address>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <author initials="B." surname="Moran" fullname="Brendan Moran">
      <organization>Arm Limited</organization>
      <address>
        <email>Brendan.Moran@arm.com</email>
      </address>
    </author>

    <date year="2022" month="July" day="11"/>

    <area>Security</area>
    <workgroup>COSE</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This specification defines hybrid public-key encryption (HPKE) for use with 
CBOR Object Signing and Encryption (COSE). HPKE offers a variant of
public-key encryption of arbitrary-sized plaintexts for a recipient public key.</t>

<t>HPKE works for any combination of an asymmetric key encapsulation mechanism (KEM),
key derivation function (KDF), and authenticated encryption with
additional data (AEAD) encryption function. Authentication for HPKE in COSE is
provided by COSE-native security mechanisms.</t>



    </abstract>



  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>Hybrid public-key encryption (HPKE) <xref target="RFC9180"/> is a scheme that 
provides public key encryption of arbitrary-sized plaintexts given a 
recipient’s public key. HPKE utilizes a non-interactive ephemeral-static 
Diffie-Hellman exchange to establish a shared secret. The motivation for
standardizing a public key encryption scheme is explained in the introduction
of <xref target="RFC9180"/>.</t>

<t>The HPKE specification defines several features for use with public key encryption
and a subset of those features is applied to COSE <xref target="RFC8152"/>. Since COSE provides
constructs for authentication, those are not re-used from the HPKE specification.
This specification uses the “base” mode, as it is called in HPKE specification
language.</t>

</section>
<section anchor="conventions-and-terminology" title="Conventions and Terminology">

<t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this
document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.</t>

<t>This specification uses the following abbreviations and terms:
- Content-encryption key (CEK), a term defined in CMS <xref target="RFC2630"/>.
- Hybrid Public Key Encryption (HPKE) is defined in <xref target="RFC9180"/>.
- pkR is the public key of the recipient, as defined in <xref target="RFC9180"/>.
- skR is the private key of the recipient, as defined in <xref target="RFC9180"/>.</t>

</section>
<section anchor="hpke-for-cose" title="HPKE for COSE">

<section anchor="overview" title="Overview">

<t>This specification supports two uses of HPKE in COSE, namely</t>

<t><list style="symbols">
  <t>HPKE in a single sender - single recipient setup.
This use cases uses a one layer structure for efficiency. 
<xref target="one-layer"/> provides the details.</t>
  <t>HPKE in a single sender - multiple recipient setup. 
This use case requires a two layer structure.  <xref target="two-layer"/> 
provides the details.</t>
</list></t>

<t>HPKE in “base” mode requires little information to be exchanged between 
a sender and a recipient, namely</t>

<t><list style="symbols">
  <t>algorithm information,</t>
  <t>the ephemeral public key, and</t>
  <t>an identifier of the static recipient key.</t>
</list></t>

<t>In the subsections below we explain how this information is carried
inside the COSE_Encrypt0 and the COSE_Encrypt1 for the one layer and the
two layer structure, respectively.</t>

<section anchor="one-layer" title="One Layer Structure">

<t>With the one layer structure the information carried inside the 
COSE_recipient structure is embedded inside the COSE_Encrypt0.</t>

<t>HPKE is used to directly encrypt the plaintext. The resulting ciphertext
may be included in the COSE_Encrypt0 or may be detached.</t>

<t>A sender MUST set the alg parameter in the protected header, which
indicates the use of HPKE. The values for the alg parameter MUST be 
taken from <xref target="cose-algo"/>, or values registered in the future with the
COSE_ALG_HPKE_* prefix.</t>

<t>The sender MUST place the kid and ephemeral public key into the unprotected
header.</t>

<t><xref target="cddl-hpke-one-layer"/> shows the COSE_Encrypt0 CDDL structure.</t>

<figure title="CDDL for HPKE-based COSE_Encrypt0 Structure" anchor="cddl-hpke-one-layer"><artwork><![CDATA[
COSE_Encrypt0_Tagged = #6.16(COSE_Encrypt0)

; Layer 0
COSE_Encrypt0 = [
    Headers,
    ciphertext : bstr / nil,
]
]]></artwork></figure>

<t>The COSE_Encrypt0 MAY be tagged or untagged.</t>

<t>An example is shown in <xref target="one-layer-example"/>.</t>

<section anchor="hpke-encryption-with-sealbase" title="HPKE Encryption with SealBase">

<t>The SealBase(pkR, info, aad, pt) function is used to encrypt a plaintext pt to
a recipient’s public key (pkR).</t>

<t>For use in COSE_Encrypt0, the plaintext “pt” passed into the SealBase
is the raw plaintext.</t>

<t>In the absence of an application profile standard specifying
otherwise a COSE-HPKE-compliant application MUST use an empty “info” parameter. The 
Enc_structure, defined in Section 5.3 of <xref target="RFC8152"/>, is used as input to the “aad” 
parameter.</t>

<t>The CDDL fragment is defined as:</t>

<figure><artwork><![CDATA[
   Enc_structure = [
       context : "Encrypt0",
       protected : empty_or_serialized_map,
       external_aad : bstr
   ]
]]></artwork></figure>

<t>The “external_aad” is empty, unless an application profile standard specifies
otherwise.</t>

<t>If SealBase() is successful, it will output a ciphertext “ct” and an encapsulated
key “enc”.  The content of enc is the ephemeral public key.</t>

</section>
<section anchor="hpke-decryption-with-openbase" title="HPKE Decryption with OpenBase">

<t>The recipient will use the OpenBase(enc, skR, info, aad, ct) function with the enc and
ct parameters received from the sender.</t>

<t>In the absence of an application profile standard specifying
otherwise a COSE-HPKE-compliant application MUST use an empty “info” parameter. The 
Enc_structure, defined in Section 5.3 of <xref target="RFC8152"/>, is used as input to the “aad” 
parameter. The CDDL fragment is shown in the previous section.</t>

<t>The OpenBase function will, if successful, decrypt “ct”. When decrypted, the result
is the raw plaintext.</t>

</section>
</section>
</section>
<section anchor="one-layer-example" title="One Layer Example">

<t>This example shows a COSE_Encrypt0 structure. 
HPKE was used to encrypt plaintext with AES-128-GCM.
The ephemeral NIST P-256 key key generated by 
the HPKE SealBase().</t>

<figure title="COSE_Encrypt0 Example for HPKE" anchor="hpke-example-one"><artwork><![CDATA[
96(
    [
        / algorithm id TBD1 for COSE_ALG_HPKE_AES_128_GCM /
        << {1: TBD1} >>, 
        {
            / ephemeral public key structure /
            -1: << {
                / kty set to EC2  /
                1: 2,
                                / crv set to P-256 /
                -1: 1,
                                / x-coordinate /
                -2: h'985E2FDE3E67E1F7146AB305AA98FE89
                      B1CFE545965B6CFB066C0BB19DE7E489',
                                / y-coordinate /
                -3: h'4AC5E777A7C96CB5D70B8A40E2951562
                      F20C21DB021AAD12E54A8DBE7EF9DF10'
                } >>,
             4: 'kid-2'
        },
        / encrypted plaintext /
        h'4123E7C3CD992723F0FA1CD3A903A588
          42B1161E02D8E7FD842C4DA3B984B9CF'
    ]
)
]]></artwork></figure>

<section anchor="two-layer" title="Two Layer Structure">

<t>With the two layer structure the HPKE information is conveyed in the COSE_recipient structure, i.e. one
COSE_recipient structure per recipient.</t>

<t>In this approach the following layers are involved:</t>

<t><list style="symbols">
  <t>Layer 0 (corresponding to the COSE_Encrypt structure) contains content (plaintext)
encrypted with the CEK. This ciphertext may be detached. If not detached, then
it is included in the COSE_Encrypt structure.</t>
  <t>Layer 1 (corresponding to a recipient structure) contains parameters needed for 
HPKE to generate a shared secret used to encrypt the CEK. This layer conveys the 
encrypted CEK in the encCEK structure. The protected header MUST contain the algorithm
information and the unprotected header MUST contain the ephemeral public key and the
key id (kid) of the static recipient public key.</t>
</list></t>

<t>This two-layer structure is used to encrypt content that can also be shared with
multiple parties at the expense of a single additional encryption operation.
As stated above, the specification uses a CEK to encrypt the content at layer 0.</t>

<t>For example, the content encrypted at layer 0 may be a firmware image.  The
same ciphertext firmware image is processed by all of the recipients;
however, each recipient uses their own private key to obtain the CEK.</t>

<t>The COSE_recipient structure shown in <xref target="cddl-hpke"/> is repeated for each
recipient.</t>

<figure title="CDDL for HPKE-based COSE_Encrypt Structure" anchor="cddl-hpke"><artwork><![CDATA[
COSE_Encrypt_Tagged = #6.96(COSE_Encrypt)
 
/ Layer 0 /
COSE_Encrypt = [
  Headers,
  ciphertext : bstr / nil,
  recipients : + COSE_recipient
]

/ Layer 1 /
COSE_recipient = [
  protected   : bstr .cbor header_map,
  unprotected : header_map,
  encCEK      : bstr,
]

header_map = {
  Generic_Headers,
  * label => values,
}
]]></artwork></figure>

<t>The COSE_Encrypt MAY be tagged or untagged.</t>

<t>HPKE algorithms take an info parameter that can be used to influence the generation of 
keys (e.g., to fold in identity information) and an aad parameter that provides additional
authenticated data to the AEAD algorithm in use.</t>

<t>An example is shown in <xref target="two-layer-example"/>.</t>

<section anchor="hpke-encryption-with-sealbase-1" title="HPKE Encryption with SealBase">

<t>The SealBase(pkR, info, aad, pt) function is used to encrypt a plaintext pt to
a recipient’s public key (pkR).</t>

<t>For use in COSE_Encrypt, the plaintext “pt” passed into the 
SealBase is the CEK. The CEK is a random byte sequence of length 
appropriate for the encryption algorithm selected in layer 0. For 
example, AES-128-GCM requires a 16 byte key and the CEK would 
therefore be 16 bytes long.</t>

<t>In the absence of an application profile standard specifying otherwise, a COSE-HPKE-compliant
implementation MUST leave the info and the aad parameters empty when used with the two layer structure.</t>

<t>If SealBase() is successful, it will output a ciphertext “ct” and an encapsulated
key “enc”.  The content of enc is the ephemeral public key.</t>

</section>
<section anchor="hpke-decryption-with-openbase-1" title="HPKE Decryption with OpenBase">

<t>The recipient will use the OpenBase(enc, skR, info, aad, ct) function with the enc and
ct parameters received from the sender. The “aad” and the “info” parameters are obtained
via the context of the usage.</t>

<t>In the absence of an application profile standard specifying otherwise, a COSE-HPKE-compliant
implementation MUST leave the info and the aad parameters empty when used with the two layer structure.</t>

<t>The OpenBase function will, if successful, decrypt “ct”. When decrypted, the result
will be the CEK. The CEK is the symmetric key used to decrypt 
the ciphertext in layer 0 of the COSE_Encrypt structure.</t>

</section>
<section anchor="two-layer-example" title="Two Layer Examples">

<t>An example of the COSE_Encrypt structure using the HPKE scheme is
shown in <xref target="hpke-example-two"/>. Line breaks and comments have been
inserted for better readability. It uses the following algorithm
combination:</t>

<t><list style="symbols">
  <t>AES-GCM-128 for encryption of detached ciphertext in layer 0.</t>
  <t>Encryption of the CEK in layer 1 utilizing HPKE with NIST P-256
and HKDF-SHA256 as a Key Encapsulation Mechanism (KEM).</t>
</list></t>

<t>The algorithm selection is based on the registry of the values offered
by the alg parameters (see <xref target="IANA"/>).</t>

<figure title="COSE_Encrypt Example for HPKE" anchor="hpke-example-two"><artwork><![CDATA[
96_0([
    / protected header /
    << {
             / alg set to AES-GCM-128 /
             1: 1
           } 
        >>,
    / unprotected header /
    { 
           / nonce value /
           5: h'938b528516193cc7123ff037809f4c2a'
        },
    / detached ciphertext /
    null,
    / recipient structure /
    [
        / algorithm id TBD4 for COSE_ALG_HPKE_AES_128_GCM /
        << {1: TBD4} >>,
        / unprotected header /
        {
            / ephemeral public key structure /
            -1: << {
                            / kty set to EC2  / 
                1: 2,
                                / crv set to P-256 /
                -1: 1,
                                / x-coordinate /
                -2: h'985E2FDE3E67E1F7146AB305AA98FE89
                      B1CFE545965B6CFB066C0BB19DE7E489',
                                / y-coordinate /
                -3: h'4AC5E777A7C96CB5D70B8A40E2951562
                      F20C21DB021AAD12E54A8DBE7EF9DF10'
                } >>,
             4: 'kid-2'
        },
        / encrypted CEK /
        h'9aba6fa44e9b2cef9d646614dcda670dbdb31a3b9d37c7a
          65b099a8152533062',
    ],
])
]]></artwork></figure>

<t>To offer authentication of the sender the payload in <xref target="hpke-example-two"/>
is signed with a COSE_Sign1 wrapper, which is shown in <xref target="hpke-example-sign"/>.
The payload in <xref target="hpke-example-sign"/> corresponds to the content shown in
<xref target="hpke-example-two"/>.</t>

<figure title="COSE_Encrypt Example for HPKE" anchor="hpke-example-sign"><artwork><![CDATA[
18(
  [
    / protected / h'a10126' / {
            \ alg \ 1:-7 \ ECDSA 256 \
          } / ,
    / unprotected / {
          / kid / 4:'sender@example.com'
        },
    / payload /     h'AA19...B80C',
    / signature /   h'E3B8...25B8'
  ]
)
]]></artwork></figure>

</section>
</section>
</section>
</section>
<section anchor="sec-cons" title="Security Considerations">

<t>This specification is based on HPKE and the security considerations of HPKE
<xref target="RFC9180"/> are therefore applicable also to this specification.</t>

<t>HPKE assumes the sender is in possession of the public key of the recipient and
HPKE COSE makes the same assumptions. Hence, some form of public key distribution
mechanism is assumed to exist.</t>

<t>HPKE relies on a source of randomness to be available on the device. Additionally, 
with the two layer structure the CEK is randomly generated and the it MUST be
ensured that the guidelines for random number generations are followed.</t>

<t>The COSE_Encrypt structure MUST be authenticated using COSE constructs like 
COSE_Sign, COSE_Sign1, COSE_MAC, or COSE_MAC0.</t>

<t>When COSE_Encrypt or COSE_Encrypt0 is used with a detached ciphertext then the
subsequently applied integrity protection via COSE_Sign, COSE_Sign1, COSE_MAC, 
or COSE_MAC0 does not cover this detached ciphertext. Implementers MUST ensure
that the detached ciphertext also experiences integrity protection. This is, for
example, the case when an AEAD cipher is used to produce the detached ciphertext
but may not be guaranteed by non-AEAD ciphers.</t>

</section>
<section anchor="IANA" title="IANA Considerations">

<t>This document requests IANA to add new values to the COSE Algorithms registry
and to the COSE Elliptic Curves registry, defined in <xref target="RFC8152"/> (in the Standards 
Action With Expert Review category).</t>

<section anchor="cose-algo" title="COSE Algorithms Registry">

<section anchor="cosealghpkeaes128gcm" title="COSE_ALG_HPKE_AES_128_GCM">

<t><list style="symbols">
  <t>Name: COSE_ALG_HPKE_AES_128_GCM</t>
  <t>Value: TBD1</t>
  <t>Description: HPKE with AES-128-GCM</t>
  <t>Capabilities: [kty]</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
<section anchor="cosealghpkeaes256gcm" title="COSE_ALG_HPKE_AES_256_GCM">

<t><list style="symbols">
  <t>Name: COSE_ALG_HPKE_AES_256_GCM</t>
  <t>Value: TBD2</t>
  <t>Description: HPKE with AES-256-GCM</t>
  <t>Capabilities: [kty]</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
<section anchor="cosealghpkechacha20poly1305" title="COSE_ALG_HPKE_CHACHA20_POLY1305">

<t><list style="symbols">
  <t>Name: COSE_ALG_HPKE_CHACHA20_POLY1305</t>
  <t>Value: TBD3</t>
  <t>Description: HPKE with CHACHA20-POLY1305</t>
  <t>Capabilities: [kty]</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
</section>
<section anchor="cose-elliptic-curves-registry" title="COSE Elliptic Curves Registry">

<section anchor="cosecrvhpkep256sha256" title="COSE_CRV_HPKE_P256_SHA256">

<t><list style="symbols">
  <t>Name: COSE_CRV_HPKE_P256_SHA256</t>
  <t>Value: TBD4</t>
  <t>Key Type:</t>
  <t>Description: NIST P256 and SHA256 for use with HPKE</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
<section anchor="cosecrvhpkep384sha384" title="COSE_CRV_HPKE_P384_SHA384">

<t><list style="symbols">
  <t>Name: COSE_CRV_HPKE_P384_SHA384</t>
  <t>Value: TBD5</t>
  <t>Key Type:</t>
  <t>Description: NIST P384 and SHA384 for use with HPKE</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
<section anchor="cosecrvhpkep521sha512" title="COSE_CRV_HPKE_P521_SHA512">

<t><list style="symbols">
  <t>Name: COSE_CRV_HPKE_P521_SHA512</t>
  <t>Value: TBD6</t>
  <t>Key Type:</t>
  <t>Description: NIST P521 and SHA512 for use with HPKE</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
<section anchor="cosecrvhpkex25519sha256" title="COSE_CRV_HPKE_X25519_SHA256">

<t><list style="symbols">
  <t>Name: COSE_CRV_HPKE_X25519_SHA256</t>
  <t>Value: TBD7</t>
  <t>Key Type:</t>
  <t>Description: X25519 and SHA256 for use with HPKE</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
<section anchor="cosecrvhpkex448sha512" title="COSE_CRV_HPKE_X448_SHA512">

<t><list style="symbols">
  <t>Name: COSE_CRV_HPKE_X448_SHA512</t>
  <t>Value: TBD8</t>
  <t>Key Type:</t>
  <t>Description: X448 and SHA512 for use with HPKE</t>
  <t>Change Controller: IESG</t>
  <t>Reference:  [[TBD: This RFC]]</t>
  <t>Recommended: Yes</t>
</list></t>

</section>
</section>
</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference anchor='RFC2119' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author fullname='S. Bradner' initials='S.' surname='Bradner'><organization/></author>
<date month='March' year='1997'/>
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference anchor='RFC8174' target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author fullname='B. Leiba' initials='B.' surname='Leiba'><organization/></author>
<date month='May' year='2017'/>
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>



<reference anchor='RFC9180' target='https://www.rfc-editor.org/info/rfc9180'>
<front>
<title>Hybrid Public Key Encryption</title>
<author fullname='R. Barnes' initials='R.' surname='Barnes'><organization/></author>
<author fullname='K. Bhargavan' initials='K.' surname='Bhargavan'><organization/></author>
<author fullname='B. Lipp' initials='B.' surname='Lipp'><organization/></author>
<author fullname='C. Wood' initials='C.' surname='Wood'><organization/></author>
<date month='February' year='2022'/>
<abstract><t>This document describes a scheme for hybrid public key encryption (HPKE). This scheme provides a variant of public key encryption of arbitrary-sized plaintexts for a recipient public key. It also includes three authenticated variants, including one that authenticates possession of a pre-shared key and two optional ones that authenticate possession of a key encapsulation mechanism (KEM) private key. HPKE works for any combination of an asymmetric KEM, key derivation function (KDF), and authenticated encryption with additional data (AEAD) encryption function. Some authenticated variants may not be supported by all KEMs. We provide instantiations of the scheme using widely used and efficient primitives, such as Elliptic Curve Diffie-Hellman (ECDH) key agreement, HMAC-based key derivation function (HKDF), and SHA2.</t><t>This document is a product of the Crypto Forum Research Group (CFRG) in the IRTF.</t></abstract>
</front>
<seriesInfo name='RFC' value='9180'/>
<seriesInfo name='DOI' value='10.17487/RFC9180'/>
</reference>



<reference anchor='RFC8152' target='https://www.rfc-editor.org/info/rfc8152'>
<front>
<title>CBOR Object Signing and Encryption (COSE)</title>
<author fullname='J. Schaad' initials='J.' surname='Schaad'><organization/></author>
<date month='July' year='2017'/>
<abstract><t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size.  There is a need for the ability to have basic security services defined for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol.  This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization.  This specification additionally describes how to represent cryptographic keys using CBOR.</t></abstract>
</front>
<seriesInfo name='RFC' value='8152'/>
<seriesInfo name='DOI' value='10.17487/RFC8152'/>
</reference>




    </references>

    <references title='Informative References'>





<reference anchor='RFC8937' target='https://www.rfc-editor.org/info/rfc8937'>
<front>
<title>Randomness Improvements for Security Protocols</title>
<author fullname='C. Cremers' initials='C.' surname='Cremers'><organization/></author>
<author fullname='L. Garratt' initials='L.' surname='Garratt'><organization/></author>
<author fullname='S. Smyshlyaev' initials='S.' surname='Smyshlyaev'><organization/></author>
<author fullname='N. Sullivan' initials='N.' surname='Sullivan'><organization/></author>
<author fullname='C. Wood' initials='C.' surname='Wood'><organization/></author>
<date month='October' year='2020'/>
<abstract><t>Randomness is a crucial ingredient for Transport Layer Security (TLS) and related security protocols.  Weak or predictable &quot;cryptographically secure&quot; pseudorandom number generators (CSPRNGs) can be abused or exploited for malicious purposes. An initial entropy source that seeds a CSPRNG might be weak or broken as well, which can also lead to critical and systemic security problems. This document describes a way for security protocol implementations to augment their CSPRNGs using long-term private keys. This improves randomness from broken or otherwise subverted CSPRNGs.</t><t>This document is a product of the Crypto Forum Research Group (CFRG) in the IRTF.</t></abstract>
</front>
<seriesInfo name='RFC' value='8937'/>
<seriesInfo name='DOI' value='10.17487/RFC8937'/>
</reference>



<reference anchor='RFC2630' target='https://www.rfc-editor.org/info/rfc2630'>
<front>
<title>Cryptographic Message Syntax</title>
<author fullname='R. Housley' initials='R.' surname='Housley'><organization/></author>
<date month='June' year='1999'/>
<abstract><t>This document describes the Cryptographic Message Syntax.  This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary messages.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='2630'/>
<seriesInfo name='DOI' value='10.17487/RFC2630'/>
</reference>




    </references>


<section anchor="acknowledgements" title="Acknowledgements">

<t>We would like to thank Goeran Selander, John Mattsson and Ilari Liusvaara for their review feedback.</t>

</section>


  </back>

<!-- ##markdown-source:
H4sIAHhizGIAA+1beW/jRpb/X4C+Q0ENbNtZSRZ1S5kE0eV2b9vtXttJJkga
RoksyRxTpIa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