<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-hallambaker-earl-01" indexInclude="false" ipr="trust200902" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true" version="3" xml:lang="en"><front>
<title abbrev="Encrypted Authenticated Resource Locator">Encrypted Authenticated Resource Locator</title>
<seriesInfo name="draft-hallambaker-earl-01" value="draft-hallambaker-earl" stream="independent"/>
<author fullname="Phillip Hallam-Baker" initials="P. M." surname="Hallam-Baker"><organization>ThresholdSecrets.com</organization>
<address>
<email>phill@hallambaker.com</email>
</address>
</author>
<date day="6" month="October" year="2025"/>
<area/>
<workgroup/>
<keyword>Cryptography</keyword>
<keyword>Digest Function</keyword>
<keyword>Encryption</keyword>
<abstract>
<t>This document describes the Encrypted Authenticated Resource Locator (EARL) URI scheme and the encoding and decoding of the associated content data. An EARL is a bearer token that allows an encrypted data object to be located, decrypted and authenticated using a compact URI form designed for human readability. A range of work factors is supported from 2<sup>112</sup> to 2<sup>252</sup>.</t>
<t>The plaintext data format consists of an initial header section containing metadata describing the payload, the payload itself and an optional section containing signature data.</t>
</abstract>
</front>
<middle>
<section title="Introduction" anchor="n-introduction"><t>This document describes the Encrypted Authenticated Resource Locator (EARL) URI scheme. An EARL is a bearer token that allows a data object to be located, decrypted and authenticated using a compact URI form designed for human readability.</t>
<t>This document specifies three URI schemes using EARL construction and resolution:</t>
<ul>
<li>earl: A generic URI scheme for exchange of any type of data.</li>
<li>contact: An application specific URI scheme for exchange of contact card information (e.g. JSContact or vCard information).</li>
<li>device: An application specific URI scheme for exchange of device description information.</li>
</ul>
<t>The processing and resolution schemes for generic and application specific schemes are identical. Use of an application specific form in a QR code or NFC transmission allows the URI to indicate which type of application should be used to process the associated data.</t>
<t>Additional application specific schemes <bcp14>MAY</bcp14> be defined in the future by registering the URI scheme prefix and specifying this document as the reference.</t>
<t>The following are examples of EARL URIs:</t>
<sourcecode>earl://example.com/eluv-woab-g7ih-onix-ybns-qdxk-rzqs
earl:eluv-woab-g7ih-onix-ybns-qdxk-rzqs
jscontact://example.com/eluv-woab-g7ih-onix-ybns-qdxk-rzqs</sourcecode>
<t>All three forms refer to the exact same data object. The first two forms are URLs that indicate that the corresponding ciphertext MAY be retreived via HTTPS at: </t>
<sourcecode>https://example.com/.well-known/earl/-utAO8IYsdcqmVGk2W15PCLDAFT1HL7M
    fWCWQ-s9qYU.earl</sourcecode>
<section title="Construction" anchor="n-construction"><t>An EARL is a URI that contains a UDF value expressed as a Base32D string that specifies a multipurpose key that can be used to locate, decrypt (if necessary) and authenticate an associated data sequence presented as either plaintext or ciphertext.</t>
<t>The data sequence format <bcp14>MAY</bcp14> be the data object itself (verbatim) or the data object <bcp14>MAY</bcp14> be wrapped in an envelope format to provide content metadata or to apply additional security enhancements (signature, encryption) using public key cryptography.</t>
<t>The UDF value is an octet sequence whose leading octets are a Type Identifier indicating the authentication algorithm, the encryption algorithm (if the octet sequence is encrypted) and the data sequence format.</t>
<ul>
<li>All the EARLs specified in this document use digests from the SHA-3 family for authentication of the associated octet sequence, to form the locator and for derivation of the key and nonce (for ciphertext data sequences). </li>
<li>All the encrypted EARLs specified in this document use AES-GCM to encrypted ciphertext data sequences.</li>
<li>Two data sequence formats are specified, verbatim and wrapped in a DARE Envelope as specified in <xref target="draft-hallambaker-dare"></xref>.</li>
</ul>
<t>A Type Identifier is a variable length octet sequence in which every octet is odd (bit 0 is set) except for the last. Four Type Identifiers are defined in this document:</t>
<dl>
<dt>[32] </dt>
<dd>
<t>Verbatim, Encrypted, </t>
</dd>
<dt>[34]</dt>
<dd>
<t>Enveloped, Encrypted, </t>
</dd>
<dt>[80]</dt>
<dd>
<t>Verbatim, Plaintext</t>
</dd>
<dt>[82]</dt>
<dd>
<t>Enveloped, Plaintext</t>
</dd>
</dl>
<t>To prevent recovery of the content payload from the multi-purpose key through brute force attack, use of the enveloped encrypted format is preferred for applications where confidentiality is required. In such cases, the DARE envelope <bcp14>SHOULD</bcp14> include an unguessable salt value that is sufficiently large to achieve the desired work factor.</t>
</section>
<section title="Publication" anchor="n-publication"><t>Publication of enveloped data using an EARL is a three-step process:</t>
<dl>
<dt>Derive multipurpose key</dt>
<dd>
<t>The multipurpose key is calculated over the DARE envelope octets by means of a first digest function, the result being truncated to a multiple of 20 bits to achieve the desired work factor and the leading octets being replaced by the Type Identifier.</t>
</dd>
<dt>Encryption (optional)</dt>
<dd>
<t>The enveloped plaintext data is encrypted under a key derived from the multi-purpose key by means of a key derivation function computed a second digest function, the result being the ciphertext data.</t>
</dd>
<dt>Publish</dt>
<dd>
<t>The ciphertext data is published by a mechanism that allows retrieval by means of an authentication token derived from the multipurpose key by means of a third digest function and a locator derived by applying the applying the third digest function to the authenticator, the leading octets of the result being replaced by the Type Identifier and a precision specifier.</t>
<t>The default means of publishing the ciphertext data is through the HTTPS well-known service <tt>earl</tt> with the path being the locator value in base64url encoding <xref target="RFC4648"></xref>.</t>
</dd>
</dl>
<t>This construction establishes the EARL as a 'bearer token' that may be used to locate, decrypt and authenticate the associated payload and metadata.</t>
</section>
<section title="URI Format" anchor="n-uri-format"><t>The URI is formed according to the usual URI syntax <xref target="RFC4648"></xref> as follows:</t>
<dl>
<dt>Scheme</dt>
<dd>
<t>The scheme component of the URI, this <bcp14>MAY</bcp14> be either <tt>earl</tt> or an application specific scheme (e.g. <tt>contact</tt>).</t>
</dd>
<dt>Authority (optional)</dt>
<dd>
<t>If the ciphertext data is to be retrieved using the earl well-known service, the authority section <bcp14>MUST</bcp14> be present and specify the host from which the ciphertext data <bcp14>MAY</bcp14> be retrieved.</t>
</dd>
<dt>Path</dt>
<dd>
<t>The path value is the multipurpose key in BASE32-D encoding as specified in this document.</t>
</dd>
<dt>Query</dt>
<dd>
<t>An EARL URI <bcp14>MAY</bcp14> contain a query component to provide information to the application that uses the EARL. If present, the query component <bcp14>MUST</bcp14> comply with the requirements of <xref target="RFC4648"></xref> but the interpretation of this data is outside the scope of this document.</t>
</dd>
</dl>
<t>Since the recovered payload is authenticated by means of the multi-purpose key, the source from which the ciphertext is obtained is immaterial. Ciphertexts <bcp14>MAY</bcp14> be cached for later retrieval. The double digest construction of the locator allows the result of the first pass to be used to authenticate retrieval requests by a party that does not have the ability to decrypt.</t>
</section>
<section title="Resolution" anchor="n-resolution"><t>Resolution of an EARL follows the same pattern as construction except that the ciphertext data is decrypted to recover the enveloped data and the resolver <bcp14>MUST</bcp14> verify that the digest value of the recovered enveloped data is consistent with the value of the key.</t>
</section>
<section title="Applications" anchor="n-applications"><t>The EARL scheme is designed to support a wide range of applications including:</t>
<ul>
<li>A laboratory provides pathology results to a doctor in paper form which are in turn passed to a consultant who requires the results in electronic form for further analysis. Attaching a QR code containing an EARL allows the consultant to obtain the electronic form from the printed document without compromise to patient confidentiality. The paper document is a bearer token that can be exchanged for a paper form of itself</li>
<li>A device carries a QR code containing an EARL linking to a description of the device for use in onboarding.</li>
<li>A protocol requires that a trust anchor be passed as a compact URI without reliance on a Trusted Third Party. This is of particular concern when Post Quantum Cryptographic algorithms requiring very large public keys are involved.</li>
</ul>
</section>
<section title="JSContact" anchor="n-jscontact"><t>One important application of EARLs is to support the exchange of JSContact documents so that the trust context in which the contact is exchanged is preserved. Thus, ensuring that any cryptographic keys or trust anchors have the benefit of that context.</t>
<t>For example, Alice might print a QR code containing an EARL linking to her JSContact data on her business card. When she hands the card to Bob, he can scan the card to obtain Alice's OpenPGP, SSH, S/MIME etc. credentials.</t>
<t>Use of the JSContact URI scheme for this application allows a camera application reading the QR code to hand off processing of the URI to a contacts application registered as the handler for the JSContact scheme.</t>
<t>Alternatively, if Alice and Bob are unable to meet in person, Alice might publish the JSContact URI as a prefixed TXT entry in her personal DNS Handle @alice.example.com. If Alice's DNS domain is secured by means of DNSSEC, Bob has a degree of third-party attestation to the binding of the contact data to the domain.</t>
<t>In either case, the JSContact data <bcp14>MAY</bcp14> contain information specifying how updates <bcp14>MAY</bcp14> be received and validated by means of a digital signature contained within the enveloped plaintext data. Once established, the trust relationship is maintained end-to-end between Alice and Bob without the need to rely on any third party.</t>
</section>
<section title="Issues to fix before -01" anchor="n-issues-to-fix-before-01"><ul>
<li>Present udf value in lower case.</li>
<li>Update code to produce new examples, in particular, apply prefix to locator, generate examples for all four formats from this draft. DARE signature examples.</li>
<li>Convert jscontact URI method to contact throughout.</li>
<li>Remove this section</li>
<li>Audit the defined terms and ensure that they match those used in the text.</li>
<li>Github link to the reference code.</li>
<li>Fix up the section forward references.</li>
</ul>
</section>
</section>
<section title="Definitions" anchor="n-definitions"><t>This section presents the related specifications and standards, the terms that are used as terms of art within the documents and the terms used as requirements language.</t>
<section title="Requirements Language" anchor="n-requirements-language"><t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in <xref target="RFC2119"></xref>.</t>
</section>
<section title="Defined Terms" anchor="n-defined-terms"><t>The following words and phrases are used as terms of art with the specified meanings within this document:</t>
<dl>
<dt>Cryptographic Digest Function</dt>
<dd>
<t>A hash function that has the properties required for use as a cryptographic hash function. These include collision resistance, first pre-image resistance and second pre-image resistance. </t>
</dd>
<dt>Media Type</dt>
<dd>
<t>An identifier indicating how a Data Value is to be interpreted as specified in the IANA registry Media Types.</t>
</dd>
<dt>Data Value</dt>
<dd>
<t>The binary octet stream that is the input to the digest function used to calculate a digest value.</t>
</dd>
<dt>Data Object</dt>
<dd>
<t>A Data Value and its associated Content Type</t>
</dd>
<dt>Digest Algorithm</dt>
<dd>
<t>A synonym for Cryptographic Digest Function</t>
</dd>
<dt>Digest Value</dt>
<dd>
<t>The output of a Cryptographic Digest Function</t>
</dd>
<dt>Data Digest Value</dt>
<dd>
<t>The output of a Cryptographic Digest Function for a given Data Value input.</t>
</dd>
<dt>Work Factor</dt>
<dd>
<t>A measure of computational effort required to perform an attack against some security property.</t>
</dd>
</dl>
</section>
<section title="Related Specifications" anchor="n-related-specifications"><t>This specification makes use of Base32 <xref target="RFC4648"></xref> encoding, the SHA-3 <xref target="SHA-3"></xref> digest function and AES-GCM encryption mode <xref target="RFC5288"></xref>.</t>
<t>The DARE Envelope used to wrap the content payload and metadata is described in <xref target="draft-hallambaker-dare"></xref></t>
<t>The URI scheme follows the approach described in <xref target="RFC3986"></xref>.</t>
<t>The resource location scheme makes use of the Well-Known Resource scheme described in <xref target="RFC8615"></xref>.</t>
<t>This work is based on the work originally presented in the Mathematical Mesh UDF <xref target="draft-hallambaker-mesh-udf"></xref>. </t>
</section>
<section title="Implementation Status" anchor="n-implementation-status"><t>All the examples in this document were produced using the Mathematical Mesh Reference Library.</t>
</section>
</section>
<section title="Architecture" anchor="n-architecture"><t>An EARL is a bearer token that allows a data object to be located, decrypted and authenticated using a compact URI form designed for human readability.</t>
<t>The usability approach is based on the Uniform Data Fingerprint proposal <xref target="draft-hallambaker-mesh-udf"></xref> originally intended to extend and generalize the OpenPGP fingerprint format to allow greater compactness through use of Base32 encoding, algorithm agility by means of an embedded algorithm identifier and allow it to be applied to a wider field of application without the risk of semantic substitution through the incorporation of content metadata.</t>
<t>The UDF format is intended to support a wide range of cryptographic uses including:</t>
<ul>
<li>Nonces</li>
<li>Symmetric keys</li>
<li>Symmetric Shared Secret values</li>
<li>Seeds used to generate private keys</li>
</ul>
<t>These additional applications are outside the scope of this document.</t>
<section title="Uniform Data Fingerprint (UDF)" anchor="n-uniform-data-fingerprint-udf"><t>A Uniform Data Fingerprint (UDF) is a sequence of octets that begins with a type identifier octet sequence. </t>
<t>In cases where a text representation is required, UDF values are presented in Base32 format with dashes separating each group of four characters (Base32D).</t>
<t>UDF values <bcp14>MAY</bcp14> be used as a component of a URI scheme. An EARL is a URI that contains a Multipurpose Key expressed as a UDF value.</t>
<t>The use of UDF values and type identifiers is not limited to EARL, additional applications of the UDF scheme that have been explored on an experimental basis include:</t>
<section title="UDF Type Identifier Sequence" anchor="n-udf-type-identifier-sequence"><t>Type Identifiers are a sequence of zero or more odd octets (bit 0 is set) terminated by a single even octet (bit 0 is clear). This definition allows for an unlimited number of type identifiers to be defined.</t>
<t>Use of short Type Identifiers of one or two octets requires a Standards Action. Use of longer Type Identifiers (3 octets or more) is unrestricted.</t>
</section>
</section>
<section title="URI Syntax" anchor="n-uri-syntax"><t>Two URI forms are defined: Name Form and Locator Form.</t>
<t>In each case the scheme name <bcp14>MUST</bcp14> be specified. This <bcp14>MAY</bcp14> be the base scheme name 'earl' or a separately registered sub-scheme name used to specify a particular disposition for the referenced content.</t>
<t>For example, a QR code containing a contact record might specify a scheme name indicating that the linked data is contact data so that the content can be passed to the user's contacts application.</t>
<section title="Name Form" anchor="n-name-form"><t>The name form of the EARL URI consists of the scheme name (e.g. earl) and a path value constructed from the Base32-D encoding of the key. For example:</t>
<sourcecode>earl:eluv-woab-g7ih-onix-ybns-qdxk-rzqs</sourcecode>
<t>The name form of the EARL allows a single URI to be used to decrypt the associated ciphertext and authenticate the resulting payload and metadata. It does not specify the means for retrieving the ciphertext.</t>
</section>
<section title="Locator Form" anchor="n-locator-form"><t>The locator form of the EARL URI consists of the scheme name (e.g. earl), an authority section specifying a host name and a path value constructed from the Base32-D encoding of the key. For example:</t>
<sourcecode>earl://example.com/eluv-woab-g7ih-onix-ybns-qdxk-rzqs</sourcecode>
<t>The locator form of the EARL allows a single URI to be used to retrieve the associated ciphertext, decrypt it and authenticate the resulting payload and metadata.</t>
</section>
<section title="Type Identifiers" anchor="n-type-identifiers"><t>The following type identifiers are currently defined:</t>
<table><thead>
<tr>
<th>
Type</th>
<th>
Initial</th>
<th>
1st, 2nd Digest</th>
<th>
3rd Digest</th>
<th>
Encryption</th>
<th>
Format</th>
</tr>
</thead>
<tbody>
<tr>
<td>
[32]</td>
<td>
E</td>
<td>
SHAKE-256</td>
<td>
SHA-3-512</td>
<td>
AES-GCM 256 </td>
<td>
Verbatim</td>
</tr>
<tr>
<td>
[34]</td>
<td>
E</td>
<td>
SHAKE-256</td>
<td>
SHA-3-512</td>
<td>
AES-GCM 256 </td>
<td>
DARE Envelope</td>
</tr>
<tr>
<td>
[80]</td>
<td>
K</td>
<td>
SHAKE-256</td>
<td>
SHA-3-512</td>
<td>
none</td>
<td>
Verbatim</td>
</tr>
<tr>
<td>
[82]</td>
<td>
K</td>
<td>
SHAKE-256</td>
<td>
SHA-3-512</td>
<td>
none</td>
<td>
DARE Envelope</td>
</tr>
</tbody>
</table><t></t>
<t>The Type identifiers are chosen to provide a convenient mnemonic distinguishing ciphertext data sequences (Encrypted) from data authenticated with a digest (Keccak) when presented in Base32. </t>
<t>The digest code point is also chosen to avoid confusion with OpenPGP key fingerprints which can never begin with a K.</t>
</section>
</section>
<section title="Multipurpose Key Derivation" anchor="n-multipurpose-key-derivation"><t>The enveloped plaintext data is processed with the first digest. The first bytes are replaced by the type identifier byte sequence, and the result is presented as a Base32-dash string with enough 4-character segments to reach the desired work factor.</t>
<t>The Base32-dash encoded form is only used to create the path segment of the EARL URI. The locator and encryption key are derived from the binary form of the multi-purpose key obtained by decoding the key.</t>
<t>The content digest of the envelope shown in the first example is computed using SHAK256: </t>
<sourcecode>
  81 E9 5B 38  01 37 D0 77  35 17 C0 5B  28 0E EA 8E
  61 23 F5 B5  D1 B1 54 91  BC 88 C4 18  29 71 AD 07</sourcecode>
<t>The first byte of the result is set to the type identifier 34, truncated to the desired precision (140 bits): </t>
<sourcecode>
  22 E9 5B 38  01 37 D0 77  35 17 C0 5B  28 0E EA 8E
  61 23</sourcecode>
<t>The multipurpose key presentation is the result presented in Base32 with the characters  grouped into sets of four with dashes: </t>
<sourcecode>eluv-woab-g7ih-onix-ybns-qdxk-rzqs</sourcecode>
<t>Note that since there is an odd number of 20-bit segments in this example, only  the upper half of the last byte is recorded in the key: </t>
<sourcecode>
  22 E9 5B 38  01 37 D0 77  35 17 C0 5B  28 0E EA 8E
  61 20</sourcecode>
<t>The EARL forms consist of the scheme name, authority section (if specified) and the  presentation form of the multi-purpose key: </t>
<sourcecode>earl://example.com/eluv-woab-g7ih-onix-ybns-qdxk-rzqs
earl:eluv-woab-g7ih-onix-ybns-qdxk-rzqs
jscontact://example.com/eluv-woab-g7ih-onix-ybns-qdxk-rzqs</sourcecode>
<section title="Nonces" anchor="n-nonces"><t>If a low entropy payload is encoded, an attacker might be able to recover the payload content through a brute force attack. To prevent this attack, the metadata segment <bcp14>SHOULD</bcp14> include a nonce property containing a string containing a sufficient degree of unguessable information.</t>
<t>If a different nonce is specified in the metadata: </t>
<sourcecode>{
  "Nonce": "NCZ2-C6BE-IFM3-GHDN-LFDD-XZZ4-76KP",
  "cty": "text/plain"}</sourcecode>
<t>A different multi-purpose key is derived: </t>
<sourcecode>earl://example.com/eknc-x6cs-de3a-25vb-73si-2k6x-ni4a</sourcecode>
</section>
</section>
<section title="Encryption" anchor="n-encryption"><t>The enveloped payload is encrypted under a key and nonce derived from the multi-purpose key using the key derivation function.</t>
<t>Since the encryption algorithm is AES-GCM with a 96 nonce and a 256 bit key, it is necessary to generate 44 bytes to encrypt the enveloped data. </t>
<t>The key derrivation function, SHAKE-256 is applied to the multi-purpose key  of the first example to obtain 44 bytes of output: </t>
<sourcecode>
  3C BA 88 A8  5B AC 99 E1  E5 D2 A3 28  40 9E F2 67
  A9 D3 C2 0B  24 04 7B B0  C4 30 63 EA  23 45 B4 F2
  DF D7 06 31  50 4D 2D EF  E8 82 79 93</sourcecode>
<t>The first 32 bytes of the result are the AES-GCM encryption key: </t>
<sourcecode>encryption key =

  3C BA 88 A8  5B AC 99 E1  E5 D2 A3 28  40 9E F2 67
  A9 D3 C2 0B  24 04 7B B0  C4 30 63 EA  23 45 B4 F2</sourcecode>
<t>The final 12 bytes of the result are the AES-GCM nonce: </t>
<sourcecode>encryption nonce =

  DF D7 06 31  50 4D 2D EF  E8 82 79 93</sourcecode>
<t>The enveloped plaintext data is encrypted under AES-GCM with the specified key and  nonce to produce the ciphertext: </t>
<sourcecode>ciphertext =

  BC 46 D1 67  A2 08 D2 4B  2D F7 27 18  3B 1B 27 EF
  88 23 EF E3  68 8C EA 53  A8 FB 0C CB  72 EB D3 11
  74</sourcecode>
</section>
<section title="Publication" anchor="n-publication-0"><t>The ciphertext <bcp14>MAY</bcp14> be published through the HTTPS well-known service <tt>earl</tt>.</t>
<t>The host for the HTTP service is specified by the authority section of the EARL URI. The final path section is the base64url encoding of the result of passing the multi-purpose key through the locator digest function twice and replacing the initial octets of the result with the Type Identifier or the EARL and a precision indicator byte calculated by dividing the length of the UDF value in bits by 20.</t>
<t>For example, a EARL using the verbatim SHA-3 encoding (type [80]) with a UDF of 140 bits will present a work factor of 2<sup>132</sup>, the text encoding of the UDF will consist of seven, four character segments separated by six dashes for a total of 34 characters. Therefore, initial two bytes of the locator digest value will be replaced by the sequence [80, 07]. </t>
<t>Including the type identifier and precision indicator in the locator digest allows the UDF of a plaintext EARL to be recovered from the locator digest. This in turn enables the use of the locator digest as an implicit authenticator as described in section XX below. </t>
<t>The first locator value is computed from the multi-purpose key using the  locator digest function, in this case SHA-3-256: </t>
<sourcecode>locator1 =

  59 34 18 96  A1 60 AD 9C  13 DF A4 33  8A 2A 72 DD
  E7 EB DD 3F  6A DC 8D 0D  18 39 EB 51  2F 22 8C 03</sourcecode>
<t>The locator value is computed from the first locator value using the  locator digest function, in this case SHA-3-256: </t>
<sourcecode>locator =

  59 34 18 96  A1 60 AD 9C  13 DF A4 33  8A 2A 72 DD
  E7 EB DD 3F  6A DC 8D 0D  18 39 EB 51  2F 22 8C 03</sourcecode>
<t>The locator URI is a HTTPS well-known service in which the final element of the path is the base64url encoded locator value. </t>
<sourcecode>EARL =
https://example.com/.well-known/earl/-utAO8IYsdcqmVGk2W15PCLDAFT1HL7M
    fWCWQ-s9qYU.earl</sourcecode>
<t>Note that publication using HTTPS is only one possible method of retrieval. Any retrieval method that recovers a plaintext sequence consistent with the UDF authenticator value <bcp14>MAY</bcp14> be used.</t>
<section title="Access Authenticator" anchor="n-access-authenticator"><t>The first locator value <bcp14>MAY</bcp14> be used to authenticate access to the ciphertext. The first locator value is Base32 encoded without dashes to derive an access authenticator that can be used for password type authentication.</t>
<t>The same string is used as the username if the authentication mechanism requires one to be specified.</t>
<sourcecode>access authenticator =
LE2BRFVBMCWZYE67UQZYUKTS3XT6XXJ7NLOI2DIYHHVVCLZCRQBQ</sourcecode>
<t>Use of the first locator value is preferred over the multi-purpose key because the first locator value cannot be used to decrypt the ciphertext. Thus, a repository of ciphertext values can be provided with the access authenticator to implement access control without granting the ability to decrypt.</t>
</section>
<section title="Additional Derived Properties" anchor="n-additional-derived-properties"><t>Use of the multi-purpose key is not limited to the applications specified in this document. The multi-purpose key <bcp14>MAY</bcp14> be used to derive any additional information that is needed in an application.</t>
<t>For example, a wireless device using a QR encoded EARL to provide a device description to be used for onboarding might support use of the multi-purpose key to derive a wireless network identifier and access credentials to enable initial access to the device.</t>
<t>The means by which these parameters are derived is outside the scope of this document, but any such applications <bcp14>MUST</bcp14> ensure that the mechanism employed does not disclose the multi-purpose key or access authenticator values.</t>
</section>
</section>
<section title="Recovery" anchor="n-recovery"><t>If the ciphertext is published as a HTTPS well-known service, recovery of the ciphertext is achieved by performing a HTTPS GET method on the specified host and path.</t>
<section title="Decryption and Authentication" anchor="n-decryption-and-authentication"><t>To recover the enveloped plaintext data from the ciphertext, the encryption key and nonce are derived from the EARL from the multi-purpose key in the same fashion as before and the content digest of the result verified against the original multi-purpose key.</t>
<t>Applications <bcp14>MUST</bcp14> authenticate the recovered plaintext against the multi-purpose key. This step is necessary even in the case that an authenticated encryption scheme such as AES GCM is used as anyone with knowledge of the multi-purpose key can create a ciphertext with a valid GCM tag.</t>
</section>
</section>
<section title="Signed and Encrypted Envelopes" anchor="n-signed-and-encrypted-envelopes"><t>The DARE envelope format allows public key cryptography to be used to encrypt and sign the content payload and associated metadata. This security is orthogonal to the encryption and authentication enhancements provided by EARL allowing additional security controls to be provided.</t>
<t>For example, Alice includes a signature verification key in her profile for verifying updates to her contact information. She is also a member of a secret club whose membership is not to be disclosed to anyone else and she uses a separate contact card for this whose payload is encrypted using a service that only provides the decryption means to members. This ensures that Alice's membership of the secret club is not disclosed even if she accidentally shows the wrong QR code to someone.</t>
</section>
<section title="Using the Well-Known Service Form as an Implicit Authenticator." anchor="n-using-the-wellknown-service-form-as-an-implicit-authenticator"><t>EARLs provide a means of providing a compact, authenticated link to a static data resource. For example, a JSContact card might use 50-byte EARLs to specify a collection of a dozen 1184 byte PQC credentials without loss of authenticity, but this information is only available to clients that support the EARL format.</t>
<t>This is a particular problem with Web browsers where there is a recurring need to enable integrity checking but only the elements deemed to be most critical support the integrity tag. A self-authenticating URI form that renders content inaccessible to even 0.1% of users is likely to be unacceptable.</t>
<t>Use of the Locator URI to link to authenticated content provides full backwards compatibility. The locator URI can be resolved by any Web browser supporting TLS. Clients that understand the semantics of the earl .well-known service can verify that the content returned is authentic. The probability that the publisher of the document did not intend for the linked content to be authenticated in this way is the same as the probability for an incidental digest collision.</t>
</section>
</section>
<section title="Security Considerations" anchor="n-security-considerations"><section title="Confidentiality" anchor="n-confidentiality"><t>EARLs provide a mechanism for exchange of data objects with the option of applying encryption at three different levels:</t>
<dl>
<dt>At the transport layer, retrieving the data sequence via HTTPS.</dt>
<dd>
<t>TLS encryption provides protection against traffic analysis attacks by third parties unrelated to the originator, publisher or recipient of the data.</t>
</dd>
<dt>Encrypting the data sequence under the multipurpose key.</dt>
<dd>
<t>An EARL with an encrypted data sequence serves as a bearer token for the plaintext data sequence. The set of parties with access to the plaintext data sequence is exactly the same as the set of parties with access to the corresponding EARL.</t>
</dd>
<dt>Encrypting the Content Metadata and Payload within an enveloped data sequence.</dt>
<dd>
<t>Encrypting the Content Metadata and Payload allows additional confidentiality controls to be imposed, restricting access to specific parties with access to the EARL.</t>
</dd>
</dl>
<t>Each layer provides different security enhancements and these should be considered complimentary rather than being mutually exclusive.</t>
<t>For example, Alice might have two contact cards that she distributes by means of a QR code on her business card, the first intended for a general audience, the second restricted for use by her business associates. Both are published through a cloud service. Use of an encrypted EARL effectively eliminates the risk of disclosure by the cloud service provider: they have no access to the plaintext. Encrypting the content payload in the second contact under a key effectively controlled by a confidential content management system, allows Alice to avoid the risk of unintended disclosure of the contact information by presenting the wrong QR code.</t>
</section>
<section title="Integrity" anchor="n-integrity"><t>Implementations <bcp14>MUST</bcp14> verify that the recovered plaintext data sequence is consistent with the UDF value specified in the EARL.</t>
<t>Verification of the recovered plaintext data sequence is <bcp14>REQUIRED</bcp14> even if the content metadata and payload is signed.</t>
<t>Failure to perform the verification attack allows an attacker with access to a publication host to perform a range of substitution attacks.</t>
<t>For example, Alice publishes her contact EARL through a service hosted by Mallet. When Bob attempts to retrieve Alice's latest contact information using a faulty client, Mallet sends him her obsolete contact card that omit the public key credentials she has added to it since. The subterfuge works despite the fact that Alice signed both contacts. As a result, Bob attempts to contact Alice through an insecure channel rather than using the available security controls.</t>
</section>
<section title="Availability" anchor="n-availability"><t>The EARL publication service may be unavailable. Deployments <bcp14>SHOULD</bcp14> carefully consider the possibility of service availability being lost due to equipment failure, misconfiguration, insufficiency of resources and external denial of service attack.</t>
</section>
<section title="Semantic Substitution" anchor="n-semantic-substitution"><t>Many applications record the fact that a data item is trusted, rather fewer record the circumstances in which the data item is trusted. This results in a semantic substitution vulnerability which an attacker may exploit by presenting the trusted data item in the wrong context.</t>
<t>The DARE envelope format allows the linked data object to be accompanied by metadata describing the intended semantics. For example, by specifying the IANA media type.</t>
</section>
<section title="QR Code Scanning" anchor="n-qr-code-scanning"><t>The applications used to scan QR codes raise security concerns. Scanning a QR code with a poorly designed or implemented application can cause consequences unintended by the user or compromise the end point device itself.</t>
<t>The act of scanning a QR code <bcp14>SHOULD</bcp14> be considered equivalent to clicking on an unlabeled hypertext link.</t>
</section>
<section title="User Intentionality" anchor="n-user-intentionality"><t>Since QR codes are scanned in many different contexts, the mere act of scanning a QR code <bcp14>MUST NOT</bcp14> be interpreted as constituting an affirmative acceptance of terms or conditions or as creating an electronic signature.If such semantics are required in the context of an application, these <bcp14>MUST</bcp14> be established by secondary user actions made subsequent to the scanning of the QR code. </t>
<t>There is a risk that use of QR codes to automate processes such as payment will lead to abusive practices such as presentation of fraudulent invoices for goods not ordered or delivered. It is therefore important to ensure that such requests are subject to adequate accountability controls. </t>
<t>For example, a payment protocol allows a user to pay money to a person by scanning a QR code. Mallet creates a QR code that causes him to be paid $500 every time it is clicked, he visits local restaurants and pastes his labels over the QR codes used to download the menu.</t>
<section title="Malware Vector" anchor="n-malware-vector"><t>QR codes can be used as a means of distributing malware. It is therefore essential that all applications processing content obtained by means of an EARL perform all the usual precautions against maliciously constructed content including checking for buffer overrun conditions, integer overflow and underflow, semantic substitution attacks, etc.</t>
<t>For example, Mallet knows that Alice is using an outdated browser with a vulnerability that allows a maliciously constructed image file to cause a stack buffer overflow. He presents his contact card to Alice with a link to maliciously constructed content exploiting this vulnerability to gain control over Alice's device.</t>
</section>
</section>
</section>
<section title="IANA Considerations" anchor="n-iana-considerations"><t>Registrations are requested in the following registries:</t>
<ul>
<li>well-known URI registry</li>
<li>Uniform Resource Identifier (URI) Schemes</li>
</ul>
<t>In addition, the creation of the following registry is requested: Uniform Data Fingerprint Type Identifier Registry.</t>
<section title="Well Known" anchor="n-well-known"><t>The following registration is requested in the well-known URI registry in accordance with <xref target="RFC5785"></xref></t>
<dl>
<dt>URI suffix</dt>
<dd>
<t>earl</t>
</dd>
<dt>Change controller</dt>
<dd>
<t>Phillip Hallam-Baker, phill@hallambaker.com</t>
</dd>
<dt>Specification document(s):</dt>
<dd>
<t>[This document]</t>
</dd>
<dt>Related information</dt>
<dd>
</dd>
</dl>
</section>
<section title="URI Registration" anchor="n-uri-registration"><t>The following registration is requested in the Uniform Resource Identifier (URI) Schemes registry in accordance with <xref target="RFC7595"></xref></t>
<dl>
<dt>Scheme name:</dt>
<dd>
<t>earl</t>
</dd>
<dt>Status:</dt>
<dd>
<t>Provisional</t>
</dd>
<dt>Applications/protocols that use this scheme name:</dt>
<dd>
<t>TBS</t>
</dd>
<dt>Contact:</dt>
<dd>
<t>Phillip Hallam-Baker mailto:phill@hallambaker.com</t>
</dd>
<dt>Change controller:</dt>
<dd>
<t>Phillip Hallam-Baker</t>
</dd>
<dt>References:</dt>
<dd>
<t>[This document]</t>
</dd>
</dl>
</section>
<section title="URI Registration" anchor="n-uri-registration-0"><t>The following registration is requested in the Uniform Resource Identifier (URI) Schemes registry in accordance with <xref target="RFC7595"></xref></t>
<dl>
<dt>Scheme name:</dt>
<dd>
<t>jscontact</t>
</dd>
<dt>Status:</dt>
<dd>
<t>Provisional</t>
</dd>
<dt>Applications/protocols that use this scheme name:</dt>
<dd>
<t>TBS</t>
</dd>
<dt>Contact:</dt>
<dd>
<t>Phillip Hallam-Baker mailto:phill@hallambaker.com</t>
</dd>
<dt>Change controller:</dt>
<dd>
<t>Phillip Hallam-Baker</t>
</dd>
<dt>References:</dt>
<dd>
<t>[This document]</t>
</dd>
</dl>
</section>
<section title="Uniform Data Fingerprint Type Identifier Registry" anchor="n-uniform-data-fingerprint-type-identifier-registry"><t>This document describes a new extensible data format employing fixed length version identifiers for UDF types.</t>
<section title="The name of the registry" anchor="n-the-name-of-the-registry"><t>Uniform Data Fingerprint Type Identifier Registry</t>
</section>
<section title="Required information for registrations" anchor="n-required-information-for-registrations"><t>Registrants must specify the Type identifier code(s) requested, description and RFC number for the corresponding standards action document.</t>
<t>The standards document must specify the means of generating and interpreting the UDF Data Sequence Value and the purpose(s) for which it is proposed. </t>
<t>Since the initial letter of the Base32 presentation provides a mnemonic function in UDFs, the standards document must explain why the proposed Type Identifier and associated initial letter are appropriate. In cases where a new initial letter is to be created, there must be an explanation of why this is appropriate. If an existing initial letter is to be created, there must be an explanation of why this is appropriate and/or acceptable.</t>
</section>
<section title="Applicable registration policy" anchor="n-applicable-registration-policy"><t>Due to the intended field of use (human data entry), the code space is severely constrained. Accordingly, it is intended that code point registrations be as infrequent as possible. </t>
<t>Registration of new digest algorithms is strongly discouraged and should not occur unless, (1) there is a known security vulnerability in one of the two schemes specified in the original assignment and (2) the proposed algorithm has been subjected to rigorous peer review, preferably in the form of an open, international competition and (3) the proposed algorithm has been adopted as a preferred algorithm for use in IETF protocols.</t>
<t>Accordingly, the applicable registration policy is Standards Action.</t>
</section>
<section title="Size, format, and syntax of registry entries" anchor="n-size-format-and-syntax-of-registry-entries"><t>Each registry entry consists of an integer code.</t>
</section>
<section title="Initial assignments and reservations" anchor="n-initial-assignments-and-reservations"><t>The following entries should be added to the registry as initial assignments:</t>
<table><thead>
<tr>
<th>
Code  </th>
<th>
Description                               </th>
<th>
Reference</th>
</tr>
</thead>
<tbody>
<tr>
<td>
34</td>
<td>
EARL-AES-SHA3 </td>
<td>
[This document]</td>
</tr>
<tr>
<td>
104</td>
<td>
Nonce</td>
<td>
[This document]</td>
</tr>
</tbody>
</table><t></t>
</section>
</section>
</section>
<section title="Acknowledgements" anchor="n-acknowledgements"></section>
<section title="Appendix A: Base32-D" anchor="n-appendix-a-base32d"><t>Base32 in lower case with dashes between blocks of 4 characters, no padding.</t>
<t>The output is always an integer multiple of 20 bits.</t>
<sourcecode>     Value Encoding  Value Encoding  Value Encoding  Value Encoding</sourcecode>
<sourcecode>
         0 a             9 j            18 s            27 3</sourcecode>
<sourcecode>
         1 b            10 k            19 t            28 4</sourcecode>
<sourcecode>
         2 c            11 l            20 u            29 5</sourcecode>
<sourcecode>
         3 d            12 m            21 v            30 6</sourcecode>
<sourcecode>
         4 e            13 n            22 w            31 7</sourcecode>
<sourcecode>
         5 f            14 o            23 x</sourcecode>
<sourcecode>
         6 g            15 p            24 y</sourcecode>
<sourcecode>
         7 h            16 q            25 z</sourcecode>
<sourcecode>
         8 i            17 r            26 2</sourcecode>
</section>
<section title="Appendix B: UDF Type Identifier Encoding" anchor="n-appendix-b-udf-type-identifier-encoding"><t>A Uniform Data Fingerprint is a Base32-D encoded binary string in which the initial octets specify the </t>
</section>
</middle>
<back>
<references title="Normative References"><reference anchor="SHA-3"><front>
<title>SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</title>
<author fullname="Morris J. Dworkin" initials="M. J." surname="Dworkin"><organization>NIST</organization>
<address>
</address>
</author>
<date month="August" year="2015"/>
</front>
<format type="pdf" target="https://dx.doi.org/10.6028/NIST.FIPS.202"/>
</reference>
<reference anchor="RFC3986"><front>
<title>Uniform Resource Identifier (URI): Generic Syntax</title>
<author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee"><organization/>
<address>
</address>
</author>
<author fullname="R. Fielding" initials="R." surname="Fielding"><organization/>
<address>
</address>
</author>
<author fullname="L. Masinter" initials="L." surname="Masinter"><organization/>
<address>
</address>
</author>
<date month="January" year="2005"/>
</front>
<seriesInfo name="STD" value="66"/>
<seriesInfo name="RFC" value="3986"/>
<seriesInfo name="DOI" value="10.17487/RFC3986"/>
</reference>
<reference anchor="RFC4648"><front>
<title>The Base16, Base32, and Base64 Data Encodings</title>
<author fullname="S. Josefsson" initials="S." surname="Josefsson"><address>
</address>
</author>
<date month="October" year="2006"/>
</front>
<seriesInfo name="RFC" value="4648"/>
<seriesInfo name="DOI" value="10.17487/RFC4648"/>
</reference>
<reference anchor="RFC2119"><front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author fullname="S. Bradner" initials="S." surname="Bradner"><address>
</address>
</author>
<date month="March" year="1997"/>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>
<reference anchor="RFC5288"><front>
<title>AES Galois Counter Mode (GCM) Cipher Suites for TLS</title>
<author fullname="J. Salowey" initials="J." surname="Salowey"><address>
</address>
</author>
<author fullname="A. Choudhury" initials="A." surname="Choudhury"><address>
</address>
</author>
<author fullname="D. McGrew" initials="D." surname="McGrew"><address>
</address>
</author>
<date month="August" year="2008"/>
</front>
<seriesInfo name="RFC" value="5288"/>
<seriesInfo name="DOI" value="10.17487/RFC5288"/>
</reference>
<reference anchor="RFC8615"><front>
<title>Well-Known Uniform Resource Identifiers (URIs)</title>
<author fullname="M. Nottingham" initials="M." surname="Nottingham"><address>
</address>
</author>
<date month="May" year="2019"/>
</front>
<seriesInfo name="RFC" value="8615"/>
<seriesInfo name="DOI" value="10.17487/RFC8615"/>
</reference>
<reference anchor="draft-hallambaker-dare"><front>
<title>Data At Rest Envelope (DARE)</title>
<author fullname="Phillip Hallam-Baker"><address>
</address>
</author>
<date day="6" month="October" year="2025"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-hallambaker-dare-00"/>
</reference>
</references>
<references title="Informative References"><reference anchor="RFC5785"><front>
<title>Defining Well-Known Uniform Resource Identifiers (URIs)</title>
<author fullname="M. Nottingham" initials="M." surname="Nottingham"><organization/>
<address>
</address>
</author>
<author fullname="E. Hammer-Lahav" initials="E." surname="Hammer-Lahav"><organization/>
<address>
</address>
</author>
<date month="April" year="2010"/>
</front>
<seriesInfo name="RFC" value="5785"/>
<seriesInfo name="DOI" value="10.17487/RFC5785"/>
</reference>
<reference anchor="RFC7595"><front>
<title>Guidelines and Registration Procedures for URI Schemes</title>
<author fullname="D. Thaler" initials="D." surname="Thaler"><address>
</address>
</author>
<author fullname="T. Hansen" initials="T." surname="Hansen"><address>
</address>
</author>
<author fullname="T. Hardie" initials="T." surname="Hardie"><address>
</address>
</author>
<date month="June" year="2015"/>
</front>
<seriesInfo name="BCP" value="35"/>
<seriesInfo name="RFC" value="7595"/>
<seriesInfo name="DOI" value="10.17487/RFC7595"/>
</reference>
<reference anchor="draft-hallambaker-mesh-udf"><front>
<title>Mathematical Mesh 3.0 Part II: Uniform Data Fingerprint.</title>
<author fullname="Phillip Hallam-Baker" initials="P." surname="Hallam-Baker"><organization>ThresholdSecrets.com</organization>
<address>
</address>
</author>
<date day="14" month="October" year="2024"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-hallambaker-mesh-udf-19"/>
</reference>
</references>
</back>
</rfc>
