<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-03-13T14:53:49+00:00</updated><id>/feed.xml</id><title type="html">Christian’s Corner</title><subtitle>Sharing some information about my work at Microsoft Research on cryptography, identity, and security.</subtitle><entry><title type="html">Privacy for C2PA signers</title><link href="/2026-03-13-privacy-for-c2pa-signers.html" rel="alternate" type="text/html" title="Privacy for C2PA signers" /><published>2026-03-13T00:00:00+00:00</published><updated>2026-03-13T00:00:00+00:00</updated><id>/privacy-for-c2pa-signers</id><content type="html" xml:base="/2026-03-13-privacy-for-c2pa-signers.html"><![CDATA[<p>We can’t trust the images and videos we see online anymore. Recent generative AI improvements support the creation and modification of convincing digital media in quasi real time. We live in an era where these fakes are routinely shared online, sometimes for harmless fun, but increasingly to influence public opinion.</p>

<p>Fortunately, technologies exist to embed cryptographic signatures and watermarks in these digital assets, proving their origin. The <a href="https://c2pa.org/">Coalition for Content Provenance and Authenticity (C2PA)</a> specification has become the leading mechanism to add cryptographic authenticity to digital media, and has been <a href="https://c2pa.org/membership/">adopted</a> by many technology providers, camera manufacturers, and news media organizations.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> Major deployments have started in 2025 and will accelerate in 2026. We can soon imagine a world where assets with a verified origin can be positively flagged or prioritized by online platforms, versus those without, similarly to the shift of trust that happened in the web transition from HTTP to HTTPS.</p>

<p>In many contexts however (e.g., conflict zones, protests, corruption reporting) asset creators might be reluctant to share certified images and videos that identify them for fear of retribution. Thankfully, there are ways to reconcile the need for authenticated assets and the privacy of their creators. This post explores strategies to achieve various levels of privacy for C2PA signers, ranging from pseudonymity to full anonymity.</p>

<p>Note that I only consider the signer’s (a person or organization) privacy here, not the ability to redact or modify the asset itself. This is possible using the <a href="https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_redaction_of_assertions">C2PA assertion redaction mechanism</a>, or more advanced cryptographic mechanisms.<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>

<h2 id="example-scenarios">Example scenarios</h2>

<p>Many scenarios require privacy for the signer, for example:</p>

<ol>
  <li>
    <p>A photographer documenting human rights abuses wants to remain anonymous to avoid retribution from a hostile government but would like to disclose their affiliation (e.g., AFP, Reuters, or AP). The news organization publishing the images and videos doesn’t want the ability to identify the specific photographer to avoid the risk of being compelled to disclose their identity; they just want to know it came from one member of their trusted network.</p>
  </li>
  <li>
    <p>A news organization receives a signed video from a confidential source for a story, and wants to share it without disclosing the source’s identity (or leaking identifiable attributes, such as a device identifier) while preserving the authenticity guarantees of the video.</p>
  </li>
  <li>
    <p>A whistleblower records some incriminating conversations using their phone and releases the audio files signed by their corporate identity. They want to remain anonymous without anyone (including the employer who issued the identity credential) being able to trace their identity.</p>
  </li>
  <li>
    <p>A Banksy-style artist creates authenticated pictures and posts them at various online locations. They want to remain pseudonymous reusing the same signing credential, but without linking it to their real life identity.</p>
  </li>
</ol>

<h2 id="linkability">Linkability</h2>

<p>In this <a href="https://christianpaquin.github.io/2023-06-16-where's-waldo-been.html">blog post</a>, I explain the subtle ways an identity credential can be tracked and traced by its issuer and various verifiers. The current <a href="https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html">C2PA specification</a> only supports X.509 certificates to generate (claim) signatures, which is an inescapably linkable credential type: an issuer (i.e., Certificate Authority) can always recognize the certificate it issued to a specific device or user. Other privacy-friendly credential types could be added to a C2PA manifest using, e.g., an <a href="https://cawg.io/identity/1.3-draft+vc-vp+new-introduction/">identity assertion</a>, but the claim signer’s X.509-based signature remains an unavoidably linkable element.</p>

<p>The following strategies will address this linkability, resulting in various levels of privacy. The strategies achieving the highest levels of privacy would require either updates to the specification, or post-processing on a C2PA asset.</p>

<h2 id="privacy-strategies">Privacy strategies</h2>

<p>Let’s now explore some techniques to provide privacy to a C2PA claim signer.</p>

<h3 id="pseudonymous-certificates">Pseudonymous certificates</h3>

<p>The simplest strategy compatible with the current specification is to generate a self-signed X.509 certificate and use it to sign digital assets (i.e., use it as the claim generator certificate). The certificate would then need to be obtained out-of-band by verifiers. This technique doesn’t allow signers to prove attributes certified by a 3rd party (e.g., memberships, entitlements, etc.), it only demonstrates ownership of a public key; it is only useful for scenario #4. Retrieving the certificate from the signer’s well-known website would be a good way to convince verifiers that, e.g., “this image was signed by the owner of https://example.com”.</p>

<h3 id="one-use-certificates">One-use certificates</h3>

<p>Re-using an X.509 certificate creates linkable signatures: even if a certificate doesn’t identify its owner, all the resulting signatures can be associated to the same entity.</p>

<p>To achieve unlinkability between multiple signed assets, a signer could obtain a new certificate for each signature. Some deployers might opt to deploy this strategy, even given the extra burden on the infrastructure, like Google did for their <a href="https://security.googleblog.com/2025/09/pixel-android-trusted-images-c2pa-content-credentials.html">Pixel 10 C2PA signing</a>. This prevents a verifier from linking two images to the same signer; it does not, however, prevent the issuer from recognizing and tracing each individual certificate.</p>

<h3 id="unlinkable-signatures">Unlinkable signatures</h3>

<p>Cryptographic unlinkable signatures allow creating privacy-supporting certified assets without disclosing the holder’s full identity to verifiers. One of the leading algorithm candidates is <a href="https://identity.foundation/bbs-signature/draft-irtf-cfrg-bbs-signatures.html">BBS</a>, undergoing standardization in the <a href="https://datatracker.ietf.org/doc/draft-irtf-cfrg-bbs-signatures/">IETF</a>. In a BBS credential flow, an issuer signs a credential containing holder attributes, and the holder later derives a selective-disclosure proof for a verifier. Augmenting the C2PA specification to support BBS-enabled presentations<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup> would allow a manifest to reveal only selected attributes, while binding the presentation to the asset being certified.</p>

<h3 id="zero-knowledge-proofs-over-x509-certificates">Zero-knowledge proofs over X.509 certificates</h3>

<p>A Zero-Knowledge Proof (ZKP) is a cryptographic mechanism allowing someone to prove properties about some data without disclosing the data itself. Given some data signed by a X.509 certificate, a user could prove that the signature and certificate are valid without disclosing the identifiable parts of the certificate (e.g., serial number, public key, issuer signature, validity period). A C2PA manifest could be redacted using a ZKP allowing anyone to verify that:</p>
<ol>
  <li>the digital asset hasn’t been modified</li>
  <li>the signer’s cert was valid when the asset was processed/anonymized</li>
  <li>the signer cert’s CA is trusted (either by disclosing the CA, or proving it is part of a trusted group)</li>
</ol>

<p>This technique is very promising as it is compatible with the current C2PA specification and doesn’t require changes to the key management infrastructure (to introduce new signing algorithms).</p>

<h3 id="comparison">Comparison</h3>

<p>The following table compares at a high-level the strategies I covered:</p>

<table>
  <thead>
    <tr>
      <th>Strategy</th>
      <th style="text-align: center">Unlinkable wrt verifiers</th>
      <th style="text-align: center">Unlinkable wrt the issuer</th>
      <th style="text-align: center">Supported by current spec</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Pseudonymous certificates</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">N/A (self-signed)</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>One-use certificates</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
      <td style="text-align: center">✅</td>
    </tr>
    <tr>
      <td>Unlinkable signatures (BBS)</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">❌</td>
    </tr>
    <tr>
      <td>ZKP over X.509</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">✅</td>
      <td style="text-align: center">⚠️<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup></td>
    </tr>
  </tbody>
</table>

<h2 id="a-prototype">A prototype</h2>

<p>I’ve built a prototype for the two most privacy-preserving options explored here:</p>

<ul>
  <li>
    <p>The BBS prototype models a simple issuer/holder/verifier flow: a demo issuer signs a toy credential, the holder presents that credential bound to a C2PA asset hash, and the verifier checks both the disclosed attributes and the content binding.</p>
  </li>
  <li>
    <p>The zero-knowledge prototype keeps conventional X.509/ECDSA signing, then post-processes the asset into an anonymized variant whose proof is bound to the C2PA asset bytes and to the signer’s CA.</p>
  </li>
</ul>

<p>The code is available in this GitHub <a href="https://github.com/christianpaquin/c2pa-signer-privacy">c2pa-signer-privacy</a> project.</p>

<h2 id="next-steps">Next steps</h2>

<p>The emergence of provenance technologies is a welcome tool to help fight disinformation and help establish trust in online content. It is however not too early to consider the negative privacy impact this might have, which could slow down adoption.</p>

<p>My hope is that the community will use simple prototypes like these to discuss concrete scenarios, compare privacy goals, and experiment with alternative trust models before the ecosystem hardens around only one approach. Which scenarios really need pseudonymity versus unlinkability? Which attributes should remain visible to verifiers? How much can be achieved within the current specification, and where are specification changes justified? These are design questions worth debating now, while experimentation is still cheap.</p>

<p>I’d like to thank my colleague <a href="https://www.microsoft.com/en-us/research/people/gregz">Greg Zaverucha</a> for his insights and feedback on this project.</p>

<h1 id="footnotes">Footnotes</h1>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Notably, the International Press Telecommunications Council (IPTC) has created a list of <a href="https://iptc.org/verified-news-publishers-list/">Verified News Publishers</a> to help the verifier ecosystem recognize known news media organizations. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>One such approach, the <a href="https://eprint.iacr.org/2024/1066.pdf">VerITAS system</a>, has been prototyped by Stanford researchers Trisha Datta, Binyi Chen, and Dan Boneh. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>This could be achieved by either specifying a X.509 profile supporting BBS signatures, or allowing other credential types supporting BBS (e.g., Verifiable Credentials) to natively sign a C2PA manifest. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>The initial signing step is fully spec-compliant (standard X.509/ECDSA), but the anonymized manifest uses a non-standard COSE algorithm and a custom assertion, which current verifiers cannot process without modifications. <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><summary type="html"><![CDATA[We can’t trust the images and videos we see online anymore. Recent generative AI improvements support the creation and modification of convincing digital media in quasi real time. We live in an era where these fakes are routinely shared online, sometimes for harmless fun, but increasingly to influence public opinion.]]></summary></entry><entry><title type="html">Where are you from?</title><link href="/2025-06-26-where-are-you-from.html" rel="alternate" type="text/html" title="Where are you from?" /><published>2025-06-26T00:00:00+00:00</published><updated>2025-06-26T00:00:00+00:00</updated><id>/where-are-you-from</id><content type="html" xml:base="/2025-06-26-where-are-you-from.html"><![CDATA[<p>“Where are you from?” is a common introductory question we ask when meeting someone. Unfortunately, we can’t ask the same of a picture, video, or audio clip found online. In this era of generative AI, it has become practically impossible to distinguish digital assets captured from “real life” from those artificially created by generative systems. In the <a href="https://www.youtube.com/watch?v=TWpg1RmzAbc">latest <em>Last Week Tonight</em> episode</a>, John Oliver highlights the rise of “AI slop.” You know an issue has gone mainstream when it makes it onto his show.</p>

<p>Of course, “AI or not” isn’t <em>the</em> most important question. We’re long past the days when media and music weren’t modified by computer-assisted tools, many of which now incorporate AI by default. The more meaningful questions are: “Where is this asset from?”, “How was it generated?”, “By whom?”, and “How was it transformed?”</p>

<p>Fortunately, technologies exist to help answer these questions. Content Credentials, developed by the <a href="https://c2pa.org/">Coalition for Content Provenance and Authenticity (C2PA)</a>, can be attached to digital assets to describe how and by whom they were created, much like a clothing label tells us about a garment’s origin. For example, when a photographer takes a picture with a C2PA-compliant camera, cryptographically signed provenance data (including optional metadata like a secure timestamp or geolocation) can be embedded in the image.</p>

<div align="center"><img src="img/c2pa_photographer.png" alt="AI generated photographer" width="75%" /><br /></div>
<p><br /></p>

<p>Incidentally, the image above wasn’t taken by a camera, it was generated using <a href="https://copilot.microsoft.com/">Copilot</a>. We know this because Copilot, like many generative AI systems, attaches Content Credentials to everything it creates. By inspecting the image in a <a href="https://contentcredentials.org/verify">validation portal</a> or using our <a href="https://christianpaquin.github.io/2024-04-17-c2pa-browser-extension-validator.html">browser extension</a>, the provenance is revealed.</p>

<p>We’re at the beginning of a major deployment phase for C2PA. Today, AI-generated content floods our digital spaces. But as C2PA adoption grows, platforms will be better equipped to determine the origin of the content they serve, allowing them to surface trusted content more prominently.</p>

<h3 id="recent-highlights">Recent highlights</h3>

<p>I joined the C2PA Technical Working Group nearly two years ago, and we’ve been working hard to bring this technology forward. The past few months have been especially active:</p>

<ul>
  <li>We released <a href="https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html">version 2.2</a> of the core specification last month, incorporating feedback from implementers.</li>
  <li>The <a href="https://github.com/c2pa-org/conformance-public">Conformance Program v0.1</a> launched two weeks ago, enabling the creation of a trusted ecosystem of hardware and software implementations.</li>
  <li>The IPTC continues to expand its <a href="https://iptc.org/verified-news-publishers-list/">Verified News Publisher list</a>, increasing trust in the news media ecosystem, just one of many verticals to come.</li>
  <li>Earlier this month, many of us gathered at the 3rd <a href="https://contentauthenticity.org/blog/content-authenticity-summit-2025">Content Authenticity Summit</a>, where numerous updates were shared and implementations demonstrated. You can watch the keynote presentations <a href="https://www.youtube.com/watch?v=9rCj8y-TseE">here</a>.</li>
</ul>

<p>This momentum is encouraging, and I’m excited to see what the second half of the year brings for content provenance.</p>

<h3 id="a-layered-approach">A layered approach</h3>

<p>Of course, C2PA is not a silver bullet. Just like a clothing label, Content Credentials can be removed, omitted (for non-compliant creators), or even faked. For instance:</p>
<ul>
  <li>Credentials might be stripped from an asset, either deliberately or due to format incompatibilities.</li>
  <li>Malicious systems generating deceptive content may omit credentials altogether.</li>
  <li>Attackers might attempt to forge Content Credentials. While they can’t successfully impersonate another party cryptographically, their fakes could still mislead users, similar to how cybersquatting (or typosquatting) domains can trick visitors. (The C2PA UX Working Group is actively developing guidance to address these issues.)</li>
</ul>

<p>Other provenance tools, such as digital watermarks and fingerprints, can complement C2PA. They can be used to recover missing manifests or determine an asset’s origin independently. (The C2PA Watermarking Working Group is focused on defining these capabilities.)</p>

<p>And in cases where provenance metadata isn’t embedded at all, AI detectors can serve as a last line of defense to flag potentially AI-generated content. Hany Farid gave a compelling <a href="https://www.youtube.com/watch?v=9rCj8y-TseE&amp;t=7794s">keynote</a> on this topic at the CA Summit.</p>

<h3 id="tag-everything">Tag everything?</h3>

<p>Longtime readers of this blog know that privacy is a major concern of mine. Adding digital signatures to all images and videos has significant privacy implications, not only for individuals, but also for organizations like newsrooms seeking to protect the identity of their journalists or sources. The <a href="https://c2pa.org/specifications/specifications/2.0/security/Security_Considerations.html">C2PA Threat Model</a> addresses many of these concerns, but today’s specification still has limits.</p>

<p>Fortunately, privacy-preserving cryptography, like zero-knowledge proofs (as we are developing in <a href="https://christianpaquin.github.io/2024-12-19-crescent-creds.html">Crescent</a>), can help meet stringent threat models, even enabling <em>certified anonymity</em>. Be assured that this is on our research radar…</p>]]></content><author><name></name></author><summary type="html"><![CDATA[“Where are you from?” is a common introductory question we ask when meeting someone. Unfortunately, we can’t ask the same of a picture, video, or audio clip found online. In this era of generative AI, it has become practically impossible to distinguish digital assets captured from “real life” from those artificially created by generative systems. In the latest Last Week Tonight episode, John Oliver highlights the rise of “AI slop.” You know an issue has gone mainstream when it makes it onto his show.]]></summary></entry><entry><title type="html">Crescent Credentials</title><link href="/2024-12-19-crescent-creds.html" rel="alternate" type="text/html" title="Crescent Credentials" /><published>2024-12-19T00:00:00+00:00</published><updated>2024-12-19T00:00:00+00:00</updated><id>/crescent-creds</id><content type="html" xml:base="/2024-12-19-crescent-creds.html"><![CDATA[<p>Providing strong privacy for identity credentials is becoming an important goal. Recent frameworks such as the
<a href="https://datatracker.ietf.org/doc/html/draft-ietf-oauth-selective-disclosure-jwt-13">Selective Disclosure for JSON Web Tokens (SD-JWT)</a> and
<a href="https://www.aamva.org/topics/mobile-driver-license">mobile Driver’s License (mDL)</a> support selective disclosure of attributes to
prevent data over-sharing. This is an important capability, but a critical one that is hard to achieve is missing from both: unlinkability.</p>

<p>An unlinkable (a.k.a. untraceable or untrackable) credential is one that can be issued to a user and presented to a verifier without any data correlations
between these two actions.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup>
In particular, nothing in the credential’s construct (e.g., serial numbers, cryptographic values such as public keys and signatures, etc.) could be (mis-)used
as a correlation handle (other than the attributes themselves, which of course could identify a user if disclosed). To achieve this feature, you not only need
to sanitize the always-disclosed data to avoid linkable values (e.g., serial numbers, GUIDs, validity periods, etc.), but you also need to use special
cryptography to avoid creating inescapably linkabable values (e.g., the issuer signature which acts as a unique fingerprint). I’ve
described this in details in the <a href="https://christianpaquin.github.io/2023-06-16-where's-waldo-been.html">Where’s Waldo Been post</a>.</p>

<div align="center"><img src="img/crescent_unlinkability.png" alt="Unlinkability" width="60%" /><br /></div>
<p><br /></p>

<p>There are two general strategies to achieve unlinkability in an identity system. The first one is to use a cryptographic signature scheme that supports unlinkability,
such as blind signatures (e.g., <a href="https://microsoft.com/uprove">U-Prove</a>) or proofs-of-knowledge
(e.g., <a href="https://identity.foundation/bbs-signature/draft-irtf-cfrg-bbs-signatures.html">BBS</a>).<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup> One challenge with this approach is that it requires major changes
to current identity issuance systems: new algorithms need to be standardized, implemented, and integrated into various platforms. BBS is currently being standardized
by the IETF, but even when that concludes, there will be a lot of integration work required to match the ubiquity of a RSA or an ECDSA, and it will be difficult to 
ask for an identity ecosystem overhaul when the industry is already preparing for the <a href="https://christianpaquin.github.io/2024-04-12-recent-highlights-on-the-quantum-safe-journey.html">post-quantum cryptographic</a> transition.</p>

<p>The second strategy is to present conventional, existing credentials in an unlinkable way using zero-knowledge proofs. We recently released
<a href="https://github.com/microsoft/crescent-credentials">Crescent</a>, a cryptographic library that achieves exactly that. Zero-knowledge proofs are
cryptographic building blocks with seemingly magical properties, allowing a prover to convince a verifier of the veracity of certain facts about some data
without disclosing the data and without the verifier learning anything more than the statements being proven (the verifier gains “zero” extra knowledge). These primitives were introduced close
to 40 years ago, and have only recently become efficient enough for use in practice. Crescent introduces two important properties, the ability to:</p>
<ol>
  <li>share the large zero-knowledge parameters among all issuers using the same credential schema and signing algorithm (e.g., you would only need one set for the <a href="https://www.aamva.org/">AAMVA</a> mDL ecosystem); and</li>
  <li>offload the expensive zero-knowledge user calculations to a “prepare” stage that only needs to run once asynchronously
per credential; subsequent presentations and verifications are then very efficient.</li>
</ol>

<p>Crescent currently supports two types of credentials: JSON Web Tokens (JWT) and mobile Driver’s Licenses (mDL); more are on our roadmap (such as X.509).
To learn more about Crescent, consult our <a href="https://eprint.iacr.org/2024/2013">technical paper</a>.</p>

<p>We’ve created a sample to illustrate the capabilities and practicality of the system.</p>

<p>For simplicity, the sample defines its own issuance and presentation protocol, but it is easy to imagine how this could be integrated
into higher level identify framework (e.g., OpenID/OAuth, Verifiable Credentials, mDL ecosystem); some of our future work will
focus on these integrations.</p>

<p>You can find details about the sample <a href="https://github.com/microsoft/crescent-credentials/blob/main/sample/README.md">here</a>,
but in summary:</p>

<div align="center"><img src="img/crescent_sample_arch.png" alt="Crescent sample application" width="75%" /><br /></div>
<p><br /></p>

<ol>
  <li>A Crescent Service has pre-generated the zero-knowledge parameters to create and verify zero-knowledge proofs
from JWTs and mDLs.</li>
  <li>The user has a pre-imported (mock up) mDL.</li>
  <li>The user obtains a proof-of-employment JWT from her employer Contoso.</li>
  <li>These credentials are stored in the browser extension Crescent wallet that communicates with a local Client Helper whose role is to handle the heavy computation and storage.</li>
  <li>The user presents an employment proof using her JWT to a mental health clinic Fabrikam.</li>
  <li>The user presents an over-18 proof using her mDL to a social network.</li>
</ol>

<p>You can see these components in action in this <a href="https://www.youtube.com/watch?v=3KJeUhiL_cU">demo video</a>.</p>

<div align="center"><a href="https://www.youtube.com/watch?v=3KJeUhiL_cU">
<img src="img/crescent_youtube.png" alt="Crescent demo on YouTube" width="40%" /><br />
</a></div>
<p><br /></p>

<p>It’s exciting to see the rapid development in zero-knowledge proof research, which brings the technology closer to deployment in
real-life systems. We continue working on each part of the system, from the low-level cryptographic building blocks
to the integration in the identity layer. Stay tuned…</p>

<h1 id="footnotes">Footnotes</h1>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Technically, an observer (which could even be the issuer, the verifier(s), or both in collusion!) looking at the issuance and presentation messages should not be able to tell which user presented which credential. Some timing (e.g., close issuance and presentation time) or network (e.g, IP address) metadata, or presented attributes could, of course, leak some information; these can be addressed using various privacy-maximizing strategies. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>I’ve compared both approaches in <a href="https://christianpaquin.github.io/2023-07-13-of-u-prove-and-bbs.html">this blog post</a>. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><summary type="html"><![CDATA[Providing strong privacy for identity credentials is becoming an important goal. Recent frameworks such as the Selective Disclosure for JSON Web Tokens (SD-JWT) and mobile Driver’s License (mDL) support selective disclosure of attributes to prevent data over-sharing. This is an important capability, but a critical one that is hard to achieve is missing from both: unlinkability.]]></summary></entry><entry><title type="html">C2PA Browser Extension Validator</title><link href="/2024-04-17-c2pa-browser-extension-validator.html" rel="alternate" type="text/html" title="C2PA Browser Extension Validator" /><published>2024-04-17T00:00:00+00:00</published><updated>2024-04-17T00:00:00+00:00</updated><id>/c2pa-browser-extension-validator</id><content type="html" xml:base="/2024-04-17-c2pa-browser-extension-validator.html"><![CDATA[<p>In this era of disinformation exacerbated by ever-evolving AI tools, the creation of seemingly authentic fake content can be quite dangerous, with risks ranging from harming one’s reputation to damaging society as a whole.</p>

<p>Fortunately, provenance technologies are emerging to fight this problem. The <a href="https://c2pa.org/">Coalition for Content Provenance and Authenticity</a> (C2PA) is the leading effort that allows creators to cryptographically sign their digital assets and editors to record subsequent transformations, helping consumers confirm their origin and authenticity while keeping an auditable history of the data. It has been adopted by leading technology providers (Microsoft, Google, Meta, Intel), camera manufacturers (Sony, Canon, Nikon), image/video editors (Adobe), generative AI systems (Copilot, OpenAI, Midjourney), and news organizations (BBC, CBC/Radio-Canada, New York Times). The C2PA is also at the forefront of the fight against election disinformation and was one of two technologies mentioned in the recent <a href="https://www.aielectionsaccord.com/">AI Elections accord</a> signed at the Munich security conference.</p>

<p>I’m happy to announce the release of a new open-source <a href="https://github.com/microsoft/c2pa-extension-validator">browser extension validation tool</a> to verify C2PA assets on a web page. The extension, currently a developer preview prototype, scans a web page for C2PA images and videos, validates them, and overlays a content credential logo to display their status. Our goals are to 1) allow people to experiment with C2PA technologies, and 2) be able to rapidly prototype new C2PA features (and ones from its sister <a href="https://creator-assertions.github.io/">Creative Assertions Working Group</a>). This is very much work-in-progress and we’d love feedback and suggestions from the community, so please visit the GitHub project and try it out!</p>

<div align="center">
  <figure>
    <img src="img/c2pa_bing_creator_image.png" alt="C2PA-signed Bing Creator image" width="80%" /><br />
    <figcaption>A validated C2PA-signed image from the <a href="https://www.bing.com/create">Bing Creator</a>.</figcaption>
  </figure>
</div>
<p><br /></p>

<h2 id="project-origin-verified-publisher-trust-list">Project Origin Verified Publisher Trust List</h2>

<p><a href="https://www.originproject.info/">Project Origin</a>, one of the two initiatives that merged to become the C2PA, <a href="https://www.iptc.org/news/iptc-c2pa-verified-news-publishers">recently announced</a> the creation of a trust list of verified publishers to help fight disinformation in the digital news ecosystem.</p>

<p>Our browser extension can use the <a href="https://www.iptc.org/origin-trust-list/">Verified Publisher Trust List</a> hosted by the IPTC to verify content from trusted signers. You can <a href="https://www.youtube.com/watch?v=pFw9QHoew6U">watch a demonstration</a> of our extension verifying a video from the BBC that recently <a href="https://www.bbc.com/rd/blog/2024-03-c2pa-verification-news-journalism-credentials">started to use</a> the provenance technology.</p>

<div align="center">
  <figure>
    <img src="img/origin-demo.jpeg" alt="C2PA validator using Origin Trust List demo" width="80%" /><br />
    <figcaption><a href="https://www.youtube.com/watch?v=pFw9QHoew6U">Demo</a> of our browser extension validator using the <a href="https://www.iptc.org/origin-trust-list/">Origin Verified Publisher Trust List</a> to verify a video from the BBC.</figcaption>
  </figure>
</div>
<p><br /></p>

<h2 id="road-ahead">Road ahead</h2>

<p>It’s exciting to see the growing momentum behind the C2PA and all the organizations it brought together. I believe that down the line, C2PA-protected assets will be like HTTPS-protected websites: content without certified provenance information will look very suspicious! The road to get us there will however be challenging, but I hope that these initial steps will allow us to explore and prototype the capabilities that will make this technology ubiquitous.</p>

<p>Onward!</p>]]></content><author><name></name></author><summary type="html"><![CDATA[In this era of disinformation exacerbated by ever-evolving AI tools, the creation of seemingly authentic fake content can be quite dangerous, with risks ranging from harming one’s reputation to damaging society as a whole.]]></summary></entry><entry><title type="html">Recent highlights on the quantum safe journey</title><link href="/2024-04-12-recent-highlights-on-the-quantum-safe-journey.html" rel="alternate" type="text/html" title="Recent highlights on the quantum safe journey" /><published>2024-04-12T00:00:00+00:00</published><updated>2024-04-12T00:00:00+00:00</updated><id>/recent-highlights-on-the-quantum-safe-journey</id><content type="html" xml:base="/2024-04-12-recent-highlights-on-the-quantum-safe-journey.html"><![CDATA[<p>NIST’s <a href="https://csrc.nist.gov/Events/2024/fifth-pqc-standardization-conference">5th PQC Standardization Conference</a> just concluded. It was a great event and always is a great opportunity to (re-)connect with my academic and industry colleagues. A lot has happened since the first iteration of the conference. In fact, things have accelerated greatly since the release of the <a href="https://csrc.nist.gov/pubs/fips/203/ipd">first PQC FIPS drafts</a> last August.</p>

<p>Here are a few personal highlights:</p>

<ul>
  <li>Microsoft established its <a href="https://www.microsoft.com/en-us/security/blog/2023/11/01/starting-your-journey-to-become-quantum-safe/">Quantum Safe Program</a>, helping customers on their quantum safe journey.</li>
  <li>The <a href="https://openquantumsafe.org/">Open Quantum Safe</a> project has joined the Linux Foundation’s <a href="https://pqca.org/">PQC Alliance</a>; this will allow the project to extend its activities and provide components that are better-suited for real-life deployments. It’s been humbling to see the impact of OQS, a project I joined since its early days; it has been used by almost everyone test PQC algorithms and prototype their integration into protocols and various systems. In fact, if a vendor is offering a PQC solution today; it likely uses OQS.</li>
  <li>NIST released the first draft reports of the <a href="https://www.nccoe.nist.gov/crypto-agility-considerations-migrating-post-quantum-cryptographic-algorithms">NCCoE PQC Migration</a> project. I have the pleasure of leading the project’s Interoperability and Performance workstream, and our <a href="https://www.nccoe.nist.gov/sites/default/files/2023-12/pqc-migration-nist-sp-1800-38c-preliminary-draft.pdf">report</a> describes results of testing quantum-safe algorithms in TLS, SSH, QUIC, X.509, and HSMs, using various software and hardware components from my esteemed collaborators.</li>
  <li>In January, the White House held a <a href="https://www.whitehouse.gov/omb/briefing-room/2024/02/12/readout-of-white-house-roundtable-on-protecting-our-nations-data-and-networks-from-future-cybersecurity-threats/">PQC roundtable meeting</a> I had the honor of attending. It’s good to see PQC leadership at the highest level to help move the transition forward.</li>
  <li>Just last week, my colleagues announced an <a href="https://cloudblogs.microsoft.com/quantum/2024/04/03/how-microsoft-and-quantinuum-achieved-reliable-quantum-computing/">important milestone</a> in building a reliable quantum topological qubit, bringing us one step closer to realizing the quantum vision, and reminding us that the transition work is very important.</li>
</ul>

<h2 id="once-upon-a-time">Once upon a time</h2>

<p>I’ve been on a quantum journey for a long time. Back when my fellow Canadian Bryan Adams’s “Have You Ever Really Loved a Woman?” was topping the charts, I started to study with Gilles Brassard (the co-inventor of <a href="https://en.wikipedia.org/wiki/BB84">Quantum Key Distribution (QKD)</a> and <a href="https://en.wikipedia.org/wiki/Quantum_teleportation">Quantum Teleportation</a>) at the University of Montreal. The whole lab was then focussed on this crazy new idea of using quantum mechanics to build computing models. I too caught the quantum bug and ended up specializing in quantum cryptography, designing ways to use quantum error correcting codes to extend QKD distances. During that time, Peter Shor and Lov Grover published their famous algorithms. I left the academic world right before Y2K and started a career working on a more “practical” side of cryptography engineering.</p>

<p>Decades later, Quantumania is in full force. I’m excited by the possibilities of the quantum revolution, a dream that is becoming reality, and I’m proud of the hard preparatory work our industry is doing to keep our systems safe.</p>

<p>What a journey. Onward!</p>]]></content><author><name></name></author><summary type="html"><![CDATA[NIST’s 5th PQC Standardization Conference just concluded. It was a great event and always is a great opportunity to (re-)connect with my academic and industry colleagues. A lot has happened since the first iteration of the conference. In fact, things have accelerated greatly since the release of the first PQC FIPS drafts last August.]]></summary></entry><entry><title type="html">Introducing the Cross-Platform Origin of Content (XPOC) framework</title><link href="/2023-09-08-xpoc-framework.html" rel="alternate" type="text/html" title="Introducing the Cross-Platform Origin of Content (XPOC) framework" /><published>2023-09-08T00:00:00+00:00</published><updated>2023-09-08T00:00:00+00:00</updated><id>/xpoc-framework</id><content type="html" xml:base="/2023-09-08-xpoc-framework.html"><![CDATA[<p>It is quite challenging today to verify the origin of online content. Content creators (individuals or organizations) with well-known websites typically provide a way to discover their various associated accounts on (social) media platforms (e.g., YouTube, X/Twitter, Facebook, Instagram, etc.), most commonly using the well-known logo icons.</p>

<div align="center">
  <img src="img/social_logos.png" alt="social account logos" width="20%" /><br />
</div>
<p><br /></p>

<p>Manual validation of such information can be complicated and assumes that you know the creator’s website. Moreover, a lot of content can also be created as a collaboration of multiple collaborators (e.g., a podcast, a video interview, a conference panel, etc.) and the resulting media could be posted under the account of one of the creators or a host.</p>

<p>In this era of disinformation, made worse by ever-evolving AI tools, the creation of seemingly-authentic fake accounts and content can be quite dangerous, with risks ranging from damaging one’s reputation to having society-wide impact. AI detection tools are playing (and losing!) a cat and mouse game against rapid technological developments. Many media hosting platforms have account and content validation processes with various levels of quality, but these systems are disconnected and can’t rely on a standardized verification mechanism that could be shared among them.</p>

<p>To address this issue, we’ve created the <a href="https://github.com/microsoft/xpoc-framework">Cross-Platform Origin of Content (XPOC) framework</a>, allowing content creators 1) to publish an authoritative manifest of their accounts and approved content across various platforms, and 2) to tag said accounts and contents with special XPOC URI linking back to their manifest. This allows validation tools to automatically determine the origin of the protected content.</p>

<div align="center">
  <img src="img/xpoc_manifest.PNG" alt="XPOC manifest example" width="80%" /><br />
  <figcaption>XPOC manifest for christianpaquin.github.io</figcaption>
</div>
<p><br /></p>

<p>This framework would be useful to politicians, celebrities, companies, government entities and many other stakeholders to provide a signal of authenticity for the accounts they control and the content they created or approved.</p>

<p>The XPOC framework was designed to be simple to implement and deploy, allowing content creators to publish manifests and tag protected content without the explicit collaboration of the media platforms; in turn, platforms implementing the framework would improve their user’s experience and content origin validation.</p>

<p>The <a href="https://github.com/microsoft/xpoc-framework">GitHub project</a> contains the framework specification, a TypeScript reference library, and some sample implementations for XPOC manifest editing tools and XPOC URI validation tools.</p>

<h2 id="system-overview">System Overview</h2>

<p>I’ll illustrate the XPOC framework using myself as an example. My main website is <a href="https://christianpaquin.github.io">christianpaquin.github.io</a>; it hosts this very blog. This is the central point of my professional persona, where you can find links to some of the accounts I control on other platforms (e.g., my X/Twitter handle and my GitHub account). I created a XPOC manifest to list all of them in a standardized and discoverable manner. Moreover, I added links to content I created or participated in that has been posted by accounts I don’t control (e.g., this <a href="https://www.youtube.com/watch?v=pzi76VdmD9g">panel on societal resilience</a> posted on the MSR YouTube channel or this <a href="https://www.youtube.com/watch?v=IqCw19bKE6c">post-quantum crypto presentation</a> I gave a DEF CON 27). You can take a look at the <a href="https://christianpaquin.github.io/xpoc-manifest.json">xpoc-manifest.json</a> file hosted on this web site.</p>

<div align="center">
  <img src="img/christianpaquin.github.io_xpoc-manifest.jpg" alt="XPOC manifest for christianpaquin.github.io" width="80%" /><br />
  <figcaption>XPOC manifest for christianpaquin.github.io</figcaption>
</div>
<p><br /></p>

<p>It is important to note that this manifest only contains accounts and content I associate with my MSR persona; I have other personal accounts and content I didn’t list here (but could be present in a personal webpage’s manifest).</p>

<p>If someone or some system would like to find all the accounts and content associated with me, they could retrieve and inspect this file. Humans would prefer more user-friendly discovery tools, such as the sample XPOC <a href="https://github.com/microsoft/xpoc-framework/tree/main/samples/client-side-html">viewer portal</a> from our GitHub repository.</p>

<div align="center">
  <img src="img/xpoc-viewer.jpg" alt="XPOC viewer" width="80%" /><br />
  <figcaption>Sample XPOC manifest viewer</figcaption>
</div>
<p><br /></p>

<p>An important feature of the framework is the ability to link these accounts and content back to my main website, to let visitors know who is behind my social handles and account names. I did this by adding the <code class="language-plaintext highlighter-rouge">xpoc://christianpaquin.github.io!</code> XPOC URI to my account pages and content. The <code class="language-plaintext highlighter-rouge">xpoc://</code> prefix and terminating character <code class="language-plaintext highlighter-rouge">!</code> help parsing tools to find the URI in the page’s HTML; they would then extract the base URL <code class="language-plaintext highlighter-rouge">christianpaquin.github.io</code> and fetch the corresponding manifest at <code class="language-plaintext highlighter-rouge">https://christianpaquin.github.io/xpoc-manifest.json</code>.</p>

<p>For example, I’ve put my XPOC URI in my <a href="https://twitter.com/chpaquin">X/Twitter bio</a>, and in this (test) <a href="https://www.youtube.com/watch?v=hDd3t7y1asU">YouTube video description</a>, allowing validation tools to find my manifest.</p>

<p>Our GitHub repository contains a sample <a href="https://github.com/microsoft/xpoc-framework/tree/main/samples/browser-extension">browser extension</a> that can be used to verify these URIs, allowing people to verify that these accounts and content are actual from me and not someone pretending to be.</p>

<div align="center">
  <img src="img/xpoc-browser-extension-twitter.jpg" alt="Validation of X/Twitter XPOC URI" width="80%" /><br />
  <figcaption>Validation of X/Twitter XPOC URI</figcaption>
</div>
<p><br /></p>

<div align="center">
  <img src="img/xpoc-browser-extension-youtube.jpg" alt="Validation of YouTube XPOC URI" width="80%" /><br />
  <figcaption>Validation of X/Twitter XPOC URI</figcaption>
</div>
<p><br /></p>

<h1 id="the-road-ahead">The road ahead</h1>

<p>Fighting disinformation and fake content is a challenging task, and we are only at the beginning of the battle.</p>

<p>The XPOC framework won’t magically solve the issue, but it can help address a slice of the problem. If content creators (especially those targeted by fake content) start publishing manifests of their content, then verifiers (fact checkers, journalists, hosting platforms) would be better equipped to confirm their origin, and this would reduce the window of damage opportunity of the malicious content.</p>

<p>Early XPOC adopters falling victim to some attacks could help educate verifiers, letting them know that they should have detected the fake since they weren’t listed in their manifest. These early incidents would help turn the adoption wheel.</p>

<p>As adoption grows, it will become more difficult to target creators who are using the XPOC framework, and attackers would likely focus on those who don’t. Similarly to what happened during the HTTP-to-HTTPS transition, early adopters benefited from stronger security, and those late to the party had their unprotected site flagged as insecure or even blocked. I can imagine the same situation happening if creators start using XPOC: the last minority of unprotected accounts would look suspicious, and might go through stronger account and content review processes on the hosting platform.</p>

<p>Let us know what you think about the XPOC framework, how it could be used and improved.</p>

<p>Onward!</p>

<h2 id="links">Links</h2>
<ul>
  <li>GitHub repository: <a href="https://github.com/microsoft/xpoc-framework">https://github.com/microsoft/xpoc-framework</a></li>
  <li>Technical overview video: <a href="https://www.youtube.com/watch?v=G9OGrOpNif8">https://www.youtube.com/watch?v=G9OGrOpNif8</a></li>
  <li>Demonstration video: <a href="https://www.youtube.com/watch?v=PNn_ex_J-YA">https://www.youtube.com/watch?v=PNn_ex_J-YA</a></li>
</ul>]]></content><author><name></name></author><summary type="html"><![CDATA[It is quite challenging today to verify the origin of online content. Content creators (individuals or organizations) with well-known websites typically provide a way to discover their various associated accounts on (social) media platforms (e.g., YouTube, X/Twitter, Facebook, Instagram, etc.), most commonly using the well-known logo icons.]]></summary></entry><entry><title type="html">Of U-Prove and BBS</title><link href="/2023-07-13-of-u-prove-and-bbs.html" rel="alternate" type="text/html" title="Of U-Prove and BBS" /><published>2023-07-13T00:00:00+00:00</published><updated>2023-07-13T00:00:00+00:00</updated><id>/of-u-prove-and-bbs</id><content type="html" xml:base="/2023-07-13-of-u-prove-and-bbs.html"><![CDATA[<p>We, members of the <a href="https://github.com/decentralized-identity/bbs-signature">W3C DIF BBS working group</a>, have recently published the <a href="https://datatracker.ietf.org/doc/draft-irtf-cfrg-bbs-signatures">3rd IETF draft</a> of the BBS specification that integrates the <a href="https://eprint.iacr.org/2023/275.pdf">optimizations</a> of Stefano Tessaro and Chenzhi Zhu, reducing the signature and proof size (and proving the security of the scheme). I updated <a href="https://github.com/microsoft/bbs-node-reference">our implementation</a> accordingly.</p>

<p>Given that I’m also developing <a href="https://microsoft.com/uprove">U-Prove</a> – a technology with similar characteristics – I’m often asked about the difference between the two schemes. This post sheds some light on this topic.</p>

<h1 id="a-bit-of-history">A bit of history</h1>

<p>Cryptographers have long imagined how digital identity credentials should be built to provide both security <em>and</em> privacy: a user should be able to present a credential containing multiple attributes to various verifiers in a way that minimizes data disclosure, presenting only the required information; nothing more, nothing less. One important feature to support is the selective disclosure of the attributes, presenting only those needed for a particular transaction.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> Another important one is to prevent inescapable linkability between the issuance and presentation of the credential due to unique identifiers (see <a href="2023-06-16-where's-waldo-been.html">my previous post</a> on the subject). We say that a system supports <em>minimal disclosure</em> if both principles are met.<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>

<p>There are different mechanisms to achieve selective disclosure; for example the OAuth working group is currently working on a <a href="https://github.com/oauth-wg/oauth-selective-disclosure-jwt">specification</a> for JSON Web Tokens (you can experiment with <a href="https://github.com/christianpaquin/sd-jwt">my implementation</a>). Achieving unlinkability, on the other hand, is more complicated.</p>

<p>David Chaum invented the concept of unlinkable signatures. His original technique, called <a href="https://en.wikipedia.org/wiki/Blind_signature">blind signatures</a>, allows an issuer to sign a message without learning its value. This scheme is useful when creating tokens with no attributes (as used in the <a href="https://datatracker.ietf.org/wg/privacypass/about/">privacy pass</a> specification).<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup></p>

<p>Stefan Brands <a href="http://www.credentica.com/the_mit_pressbook.html">generalized the concept</a> by creating restrictive blind signatures, which allows an issuer to unlinkably sign credentials containing multiple attributes, which can in turn be selectively disclosed to a verifier. This is the scheme at the core of the U-Prove technology.</p>

<div align="center">
  <figure>
    <img src="img/blindsig.png" alt="Blind sig, e.g. U-Prove" width="75%" /><br /><br />
    <figcaption>U-Prove flow. 1) Issuer signs a credential encoding multiple attributes. 2) User randomizes the signature (during issuance). 3) User presents transformed credential as-is, selectively disclosing the attributes.</figcaption>
  </figure>
</div>

<p>Jan Camenisch and Anna Lysyanskaya later created the CL signature scheme, which allows an issuer to sign a multi-message credential, which can also be selectively disclosed to a verifier, proving that it was signed by the issuer without disclosing the signature itself. One benefit of using CL signatures is that a user could present their credential multiple times in an unlinkable manner (a.k.a., multi-show unlinkability). In contrast, multiple one-show U-Prove credentials must be obtained to achieve this feature. One issue with CL signatures, however, is their efficiency, as they are an order of magnitude slower and bigger than Brands’. CL signatures are the core of the <a href="https://github.com/IBM/idemix">Idemix system</a> developed by IBM.</p>

<p>Finally, Dan Boneh, Xavier Boyen, and Hovav Shacham created the more efficient pairing-based BBS signature scheme, which after a few updates (including ideas from Camenisch and Lysyanskaya) became the basis for the current BBS specification.<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup></p>

<div align="center">
  <figure>
    <img src="img/zksig.png" alt="ZK sig, e.g., BBS" width="75%" /><br /><br />
    <figcaption>BBS flow. 1) Issuer signs a credential encoding multiple attributes. 2) User stores the credential as-is. 3) User presents the credential selectively disclosing the attributes and proving it was properly signed (without disclosing the signature).</figcaption>
  </figure>
</div>

<h1 id="so-which-one-should-i-choose">So, which one should I choose?</h1>

<p>At a first glance, it seems that BBS’s multi-show unlinkability makes it more versatile, so it should be the obvious choice, but there are a few points to consider. It is important to understand where U-Prove and BBS fit in the protocol stack.</p>

<p>Brands’ signature scheme has been standardized in <a href="https://www.iso.org/standard/62544.html">ISO/IEC 18370-2:2016</a>. U-Prove builds on Brands’ signatures to create a credential system, specifying how issuers create their public parameters, and how users can obtain and present tokens. U-Prove must, however, be further profiled to be integrated into a framework or application. Over the years, we created X.509, SAML, and WS-Trust profiles to create privacy-preserving versions of these credentials. More recently, we created a <a href="2023-04-03-uprove-json-framework-overview.html">JSON Framework</a> to create privacy-preserving JSON Web Tokens and Signatures (and here is a <a href="https://github.com/christianpaquin/uprove-jwp">proposal</a> to integrate it into <a href="https://github.com/json-web-proofs/json-web-proofs">JSON Web Proofs</a>).</p>

<p>BBS, similarly to Brands, is a low-level signature scheme, detailing how to sign and present messages. Some useful features are still in development, such as <a href="https://github.com/decentralized-identity/bbs-signature/blob/main/draft-blind-bbs-signatures.md">blind issuance of attributes</a> and <a href="https://github.com/decentralized-identity/bbs-signature/issues/262">user-bound signatures</a>. It would also need to be profiled in order to be integrated into higher-level components. There are efforts to integrate it into JSON Web Proofs, <a href="https://www.w3.org/TR/vc-data-model/">Verifiable Credential</a>, and in version 2 of the Hyperledger <a href="https://wiki.hyperledger.org/display/anoncreds">anoncreds project</a> (which evolved from the Idemix system).</p>

<p>U-Prove and BBS use different types of mathematical constructions. U-Prove can be implemented over any prime-order group, and currently uses standard elliptic curves making it easy to implement on any platform.<sup id="fnref:5" role="doc-noteref"><a href="#fn:5" class="footnote" rel="footnote">5</a></sup> BBS, on the other hand, uses pairing curves, which makes its implementation less efficient and more complicated. Fortunately, since the BBS specification uses the popular <a href="https://en.wikipedia.org/wiki/BLS_digital_signature">BLS curve</a> used in many projects (e.g., ethereum and zcash), more libraries are becoming available simplifying its development.</p>

<h1 id="time-is-of-the-essence">Time is of the essence</h1>

<p>Long-lived credentials should be revocable. We’ve learned from the PKI world that revocation is a difficult feature to deploy at scale. Indeed, deployers have a choice to use hard-to-maintain and bulky revocation lists (e.g., CRLs), privacy-reducing call-to-the-issuer (e.g., OCSP), or other in-between strategies (e.g., <a href="https://w3c.github.io/vc-status-list-2021/">status list</a>). The problem is exacerbated when dealing with minimal disclosure credentials, where we want to hide identifiable revocation identifiers from verifiers. Various revocation schemes have been designed to achieve this, the most promising ones using cryptographic accumulators to keep the revocation artifacts small.<sup id="fnref:6" role="doc-noteref"><a href="#fn:6" class="footnote" rel="footnote">6</a></sup> Like their conventional counterparts, these systems are also complicated and hard to deploy. Deployers of minimal disclosure credentials might therefore prefer to limit the validity period of the credentials and only issue short-lived ones, avoiding the need for a revocation system altogether. In this case, the multi-show unlinkability feature becomes less important, since the credentials need to be re-issued on a frequent basis.</p>

<h1 id="parting-words">Parting words</h1>

<p>At the end of the day, the system requirements (including standards, performance, complexity) determine which cryptographic building block should be used in a given system (same as for any other cryptographic primitives we use). One-show unlinkability is often sufficient in systems where users want to establish a pseudonymous relationship with a verifier (e.g., when presenting the same identifier or claims in repeat visits). For users, it makes no difference which technology is used to present their application-level identity credential. If fact, we demonstrated this in the EU-funded <a href="https://abc4trust.eu/">ABC4Trust project</a> where users were issued both U-Prove and Idemix credentials which could be used interchangebly and transparently to access various resources (under the hood, multiple U-Prove tokens are retrieved efficiently in-batch to maintain unlinkability across presentations).</p>

<p>The bottom line is that BBS signatures do not replace the need of simpler blind-signature schemes such as U-Prove, but rather complement the cryptographic toolbox with which we can create powerful privacy-preserving frameworks and the user-centric identity systems of tomorrow. I’m very excited by the progress we continue making in the BBS working group, and by the integration path into identity frameworks such as JSON Web Proofs and Verifiable Credentials, bringing the technology closer to deployment maturity.</p>

<p>Onward!</p>

<h1 id="footnotes">Footnotes</h1>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>Selective disclosure of attributes can be generalized to present <em>properties</em> of attributes, without disclosing their values directly. For example, a user could prove that their name is not contained in a blocklist or that their credential expiration date is later than today, without disclosing either of the attributes. These <em>predicate proofs</em>, however, are more complicated, and we stick with the simpler notion of selective disclosure in this post, as supported by the core U-Prove and BBS specifications. You can learn more about some of these U-Prove extensions in <a href="https://www.microsoft.com/en-us/research/publication/u-prove-extensions/">this paper</a>. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>These types of credentials are often referred to as anonymous credentials, but I prefer the term minimal disclosure credentials, as we rarely need full anonymity in identity scenarios. Minimal disclosure covers the full identity spectrum, from anonymity, to pseudonymity, to full identification, as required by the application. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>One could encode different attributes with few possible values using different issuer keys, but this is not scalable for general attribute schemas. This technique was used in early e-cash systems encoding different e-coin denominations. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>BBS was originally proposed by Boneh, Boyen, and Shacham in their <a href="https://crypto.stanford.edu/~xb/crypto04a/groupsigs.pdf">Short Group Signature</a> paper at Crypto 2004. The scheme was modified by Man Ho Au, Willy Susilo, and Yi Mu in their <a href="https://www.researchgate.net/publication/220337024_Constant-size_dynamic_k-TAA">Constant-Size Dynamic k-TAA</a> SNC 2006 paper, following an idea of Jan Camenisch and Anna Lysyanskaya from their Crypto 2004 <a href="https://cs.brown.edu/people/alysyans/papers/cl04.pdf">Signature Schemes and Anonymous Credentials from Bilinear Maps</a> paper. Finally, a few tweaks from Jan Camenisch, Manu Drijvers, and Anja Lehmann presented in section 4 of their TRUST 2016 <a href="https://eprint.iacr.org/2016/663.pdf">Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited</a> paper, and the optimizations by Stefano Tessaro and Chenzhi Zhu in their recent <a href="https://eprint.iacr.org/2023/275.pdf">Revisiting BBS</a> EuroCrypt 2023 paper lead to IETF BBS specification. <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:5" role="doc-endnote">
      <p>The specifications recommends the prime curves from NIST, but any prime-order group curve could be used, such as <a href="https://www.microsoft.com/en-us/research/project/fourqlib/">FourQ</a> or <a href="https://ristretto.group/">ristretto255</a>. <a href="#fnref:5" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:6" role="doc-endnote">
      <p>Most schemes originate from a design by Lan Nguyen, including <a href="https://www.microsoft.com/en-us/research/publication/u-prove-designated-verifier-accumulator-revocation-extension-2/">this one</a> we built for U-Prove, and the pairing-based <a href="https://eprint.iacr.org/2022/1362.pdf">ALLOSAUR</a> and <a href="https://hackmd.io/vTyqrJc9QoKgThqQpVtP3g">zk-SAM</a> which could be used with BBS. <a href="#fnref:6" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><summary type="html"><![CDATA[We, members of the W3C DIF BBS working group, have recently published the 3rd IETF draft of the BBS specification that integrates the optimizations of Stefano Tessaro and Chenzhi Zhu, reducing the signature and proof size (and proving the security of the scheme). I updated our implementation accordingly.]]></summary></entry><entry><title type="html">Where’s Waldo been?</title><link href="/2023-06-16-where's-waldo-been.html" rel="alternate" type="text/html" title="Where’s Waldo been?" /><published>2023-06-16T00:00:00+00:00</published><updated>2023-06-16T00:00:00+00:00</updated><id>/where&apos;s-waldo-been</id><content type="html" xml:base="/2023-06-16-where&apos;s-waldo-been.html"><![CDATA[<div style="float: left; margin-right: 20px; margin-bottom: 20px;">
  <img src="img/waldo.jpg" alt="Waldo" title="Waldo" />
</div>

<p>Let’s imagine an identity-themed game of <a href="https://waldo.candlewick.com/">Where’s Waldo</a>. The goal is to figure out where Waldo used an identity document, say his driver’s license.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> The credential, issued by the DMV (which I’ll also call the issuer), contains his name, his date of birth, and his address. Now let’s say that Waldo presents his credential at a casino to prove he is over 18.<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>

<p>Now, can the player – let’s call him Odlaw, Waldo’s infamous nemesis – figure out that Waldo visited this location after the fact? We assume Odlaw is very powerful, and has access to the DMV’s and the casino’s internal systems (e.g., logs, employees, etc.) Can he track the usage of Waldo’s identity document?</p>

<div style="float: right; margin-left: 20px; margin-bottom: 20px;">
  <img src="img/odlaw.jpg" alt="Odlaw" title="Odlaw, Waldo's nemesis" />
</div>

<p>In real life<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup> it would be hard for Odlaw to learn where Waldo presented his driver’s license. Given that the casino clerk is not “plugged-in the Matrix” and likely doesn’t have photographic memory, the simple enter-or-not decision they make after glancing at the driver’s license protects Waldo’s privacy fairly well. (I deliberately ignore here other information sources such as surveillance cameras, ATM usage, etc.)</p>

<p>Now, let’s transpose this game online. Waldo now obtains an electronic version of his driver’s license and presents it at an online casino.</p>

<p>If the credential (a.k.a. the identity token) is obtained using a federated protocol such as OpenID Connect or OAuth, then it is retrieved on-demand from the issuer who then learns where the user is coming from,<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup> therefore allowing Odlaw to trivially win the game.</p>

<p>To make the game more difficult, Waldo should therefore obtain a credential that can be presented to any web site without disclosing the destination to the issuer. Let’s say this happens, then Waldo can present his e-license to enter the online casino; Odlaw must now work a bit harder to figure out where Waldo has been. Since the online casino’s system has a long and perfect memory (vs. the human checking the physical ID), it will remember (in its logs) not only Waldo’s date of birth, but also his name and address. To find Waldo, Odlaw simply needs to get access to the casino’s audit log.</p>

<p>Ok, ok, wait, why would Odlaw do that? Well, we’re playing a game here, so it’s Odlaw’s goal to find Waldo. It may feel like a weird game for now, but keep reading…</p>

<p>What if Waldo could only show his date of birth without also disclosing his name and address; would that solve the issue? Well, it would certainly help. There are different strategies to achieve this, the most practical would be to use a mechanism to disclose only the attributes (a.k.a. claims) requested by the web site. The <a href="https://www.iso.org/standard/69084.html">ISO mobile Driver License (mDL)</a> standard allows just that, by using a hash-based selective disclosure mechanism.<sup id="fnref:5" role="doc-noteref"><a href="#fn:5" class="footnote" rel="footnote">5</a></sup> Using such a credential, Waldo would only disclose his date of birth, therefore reducing the disclosed information and making it harder to find him. A birth date is however more information than strictly needed by the casino; they only care that their visitors are over 18. Inspecting the casino’s logs and learning the disclosed birth dates would give Odlaw an unfair statistical advantage in the game.</p>

<p>It’s easy to fix this by having the issuer include an over-18 binary attribute in the credential, allowing users to only disclose its true/false value.<sup id="fnref:6" role="doc-noteref"><a href="#fn:6" class="footnote" rel="footnote">6</a></sup> Ok, if Waldo uses this new credential, the only thing Odlaw would learn by studying the logs is that the visitor is over-18, without knowing which credential owner presented it.</p>

<div style="float: left; margin-right: 20px; margin-bottom: 20px;">
  <img src="img/spyglass-fingerprints.png" alt="fingerprints" />
</div>

<p>This is not the end of the game, however; although the disclosed attribute value is close to anonymous, its cryptographic container is not! Indeed, the credential is signed by the issuer, and the digital signature is a unique number that acts as a digital fingerprint that can identify Waldo. To figure out where’s Waldo, Odlaw simply needs to correlate the signature between the issuer’s logs and the casino’s.</p>

<p>Ok, let’s take some time to justify the game. Who is Odlaw, and why would he want to track and trace Waldo across the web? Well, perhaps Odlaw is a data broker or ad platform, amassing large quantities of user data, analyzing leaked logs, having web signals on many sites, or having access to insiders at the DMV or the casino (data which can later be sold to various governments, as <a href="https://www.wsj.com/articles/u-s-spy-agencies-buy-vast-quantities-of-americans-personal-data-report-says-f47ec3ad">was confirmed in the US</a> this week). Perhaps he is an oppressive government trying to track a specific (set of) dissident user(s), to block (censor) their access or retaliate against them. Maybe Odlaw is a private investigator or a paparazzo, trying to dig dirt on politicians or celebrities. The web as we know it was built on a business model relying on tracking user activities through all sorts of mechanisms, some of which are now being addressed through technical means (e.g., elimination of 3rd party cookies) and legislation (e.g., GDPR). As more digital identity and authentication systems are being built (some of which in response to the <a href="./2023-03-22-auth-all-the-things.md">threat of AI</a>), using inescapably traceable cryptography would result in a dangerous privacy decrease.</p>

<p>How can Waldo prevent this unfair searching capability? The issue is that a unique value (the signature) is applied on the credential by the issuer and is shown as-is by Waldo to the casino. Fortunately, cryptography isn’t necessarily a source of woe for Waldo; it also gives us the tools to break the linkage between the issuance and presentation of the credential. There are two main techniques to do so: Waldo can either randomize the issuer’s signature before presenting it to the casino or convince the casino that his credential is correctly signed without disclosing the signature itself.<sup id="fnref:7" role="doc-noteref"><a href="#fn:7" class="footnote" rel="footnote">7</a></sup> The former technique involves so-called blind signatures (as used in <a href="https://microsoft.com/uprove">U-Prove</a>), and the latter involves zero-knowledge proofs (as in <a href="https://github.com/decentralized-identity/bbs-signature">BBS</a>).<sup id="fnref:8" role="doc-noteref"><a href="#fn:8" class="footnote" rel="footnote">8</a></sup> Using these privacy-preserving signature mechanisms, Waldo can receive a credential with various attributes, and minimally disclose<sup id="fnref:9" role="doc-noteref"><a href="#fn:9" class="footnote" rel="footnote">9</a></sup> an anonymous over-18 claim without fear of being tracked. Indeed, by inspecting the logs of the issuer and the casino, Odlaw can’t figure out if Waldo has been here.</p>

<p>Are we done? Is the “Where’s Waldo been” game impossible to win now? Perhaps in theory, but not in practice. There are many signals that could still be used to track Waldo, e.g., timing correlations between issuance and presentation, or transport layer leakage (e.g., IP address tracing). These must be addressed separately, and we concentrate here on data privacy. There are many subtleties that we must consider to clean up all correlatable information in the credential. For example, long-lived identity credentials have an expiration date, which if precise enough could be used as a unique fingerprint to identity its owner. Credentials should therefore encode validity periods using statistically hiding ranges or buckets, to obfuscate to whom they belong. Privacy-minded deployers must therefore check all the credential’s metadata for information that could (help) identify the user (revocation information, validity periods, usage restrictions, etc.)</p>

<p>Ok, surely now, we must be done. If Waldo has a privacy-protecting credential, supporting minimal disclosure allowing him to only prove he’s over 18 in an unlinkable manner, and makes sure to leave time between credential issuance and presentation, and obfuscate his IP address and other fingerprintable signals by using TOR, surely Odlaw can’t win the “Where’s Waldo been” game.</p>

<p>Weeeeell… the game isn’t called where’s Wilma or where’s Wenda, it’s called where’s Waldo. If Odlaw (again, this could be the issuer, an insider, a hacker, a 3rd party, the destination website, or any combination of these) is reeeally motivated to figure out where <em>Waldo</em> is going, they could try to tag him in some fashion.<sup id="fnref:10" role="doc-noteref"><a href="#fn:10" class="footnote" rel="footnote">10</a></sup></p>

<p>What if the issuer orders the attributes differently in Waldo’s credential, e.g., everybody has a <code class="language-plaintext highlighter-rouge">[name,address,DoB,over-18]</code> credential but Waldo receives a <code class="language-plaintext highlighter-rouge">[name,address,over-18,DoB]</code> one? Easy then to spot the needle in the log stack. What if Waldo contains a capitalized “True” value for is over-18 attribute, while all other adults have a “true” value? To minimize the risk of leaking such information, the attribute schema should be made public by the issuer as part of its parameters, and Waldo’s client should check the proper formatting of his credential and values before presenting it.</p>

<div align="center">
  <img src="img/waldo-haystack.png" alt="Waldo in a logstack" title="Waldo in a logstack" width="25%" />
</div>

<p>What if the issuer uses a different set of parameters (and signing key) for Waldo than for other users? As if it would sign everyone’s credential using its “blue” pen but would use its “red” one for Waldo’s. It would again be trivial to spot Waldo in the web logs. This is a difficult problem to tackle, and key (and parameter) transparency techniques (<a href="https://en.wikipedia.org/wiki/Certificate_Transparency">like in PKI</a>) can help Waldo protect his privacy.</p>

<p>I hope you have come to appreciate that deploying privacy-protecting identity credentials is a challenging effort. Even when using proper cryptography, the identity framework must offer sufficient protections to minimize data leakage. This is what we aimed to do when designing the <a href="2023-04-03-uprove-json-framework-overview.md">U-Prove JSON Framework (UPJF)</a>, where the token’s public key and signature are randomized, attribute schemas are specified in the public issuer parameters, and expiration dates are specified in privacy protecting “buckets.” The <a href="./2023-05-30-user-centric-web-attestations.md">User-centric Web Attestation</a> framework further constrains the UPJF by forcing issuers to publish the attribute schema (indexed set of valid claim values) as part of their public parameters.</p>

<p>In an identity ecosystem where privacy-protecting cryptography is used, and where audit mechanisms are in place to make sure issuers are well-behaved, the “Where’s Waldo been” game becomes very difficult to win for Odlaw, which in turn is a win for Waldo and all internet users.</p>

<div align="right">
  <img src="img/woof.png" alt="Woof the dog" title="Woof the dog" width="20%" />
</div>
<h1 id="footnotes">Footnotes</h1>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>This post has a north American bias, using the name Waldo (vs. the original Wally) and a driver’s license as an example identity document; I’ll leave it as an exercise to the reader to mentally localize the examples (I’m for example replacing Waldo with Charlie, from my cherished childhood “Où est Charlie?” books). <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>Let’s say the casino is in Washington state where the gambling age is 18, which matches many non-US jurisdictions. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>Not to say that online activities aren’t an integral part of life, but you know what I mean… <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>Very often, the destination is encoded in the token to prevent an attacker from stealing and reusing it. Even if not explicitly stated in the token itself, the web issuer must redirect the user’s browser/app to the destination, therefore learning which site is visited. <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:5" role="doc-endnote">
      <p>Instead of encoding the attributes directly, the issuer encodes a salted hash digest allowing the user to disclose the attributes of their choice by attaching their pre-image values. The OAuth <a href="https://github.com/oauth-wg/oauth-selective-disclosure-jwt">SD-JWT</a> specification provides a similar mechanism for general JSON Web Tokens. <a href="#fnref:5" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:6" role="doc-endnote">
      <p>Some advance cryptographic techniques, e.g., zero-knowledge proofs allow users to prove that their birth date is such that they are over-18 without disclosing it, but these are quite complex and it’s unclear if we’ll see them deployed at scale anytime soon. Even if it were practical to do so, it is way simpler for this use case to encode a couple of useful Boolean values (e.g., over-13, over-18, over-21, over-65) rather then using the more complicated approach. In security, simplicity is your friend… <a href="#fnref:6" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:7" role="doc-endnote">
      <p>Identity credentials often encode a public key which is also a unique number that must be dealt with using these same techniques. I omit it for simplicity here. <a href="#fnref:7" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:8" role="doc-endnote">
      <p>These two classes of schemes have different pros and cons; I’ll write more about them in a follow-up post. Other simpler mechanisms exist to issue unlinkable “membership” credentials without attributes, such as <a href="https://datatracker.ietf.org/wg/privacypass/about/">privacy pass</a>, or this <a href="https://eprint.iacr.org/2022/1622">recent proposal</a> by my esteemed MSR colleagues. <a href="#fnref:8" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:9" role="doc-endnote">
      <p>I use the term minimal disclosure to describe the ability to only present the required information, nothing less, nothing more. Sometimes, the minimum required is your full identity (e.g., if you board a plane), sometimes, it could simply be an over-18 proof (like in our example). The term selective disclosure is often used in systems where only a subset of the attributes are revealed. Selective disclosure is however not always minimal: if for example the signature is linkable, or if you are disclosing an attribute that reveals more information than required (reusing again our birth date vs. a simple over-18 claim example). More advanced zero-knowledge cryptographic techniques allow us to prove <em>properties</em> of undisclosed attributes, e.g., that my undisclosed date of birth is such that I’m over 18, that my name doesn’t appear on a block list, or that my state of residence is one of those allowing online gambling. <a href="#fnref:9" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:10" role="doc-endnote">
      <p>Of course, the reader can imagine that the attacker could target a group of “Waldos”. <a href="#fnref:10" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">User-centric Web Attestations</title><link href="/2023-05-30-user-centric-web-attestations.html" rel="alternate" type="text/html" title="User-centric Web Attestations" /><published>2023-05-30T00:00:00+00:00</published><updated>2023-05-30T00:00:00+00:00</updated><id>/user-centric-web-attestations</id><content type="html" xml:base="/2023-05-30-user-centric-web-attestations.html"><![CDATA[<p>Over the course of our life, we receive many attestations that we carry and display proudly. I framed my university diploma in my study; professionals (doctors, psychologists, etc.) display theirs in their offices. I also carry many attestations in my wallet (membership cards, employment badge, etc.) that I can easily show to anyone.</p>

<p>Online attestations also exist, but unlike the physical ones, they are mostly tied to one environment, making it difficult to present across system boundaries. For example, some social media sites display badges for verified users, gamers can display achievements in their profiles, NFT (especially the <a href="https://www.microsoft.com/en-us/research/publication/decentralized-society-finding-web3s-soul/">soul-bound ones</a>) can represent memberships or entitlements.</p>

<blockquote>
What if you could display attestations on the web from whomever, wherever you wanted? What if we could build a portable blue check mark?
</blockquote>

<p>To explore this idea, we released a proof-of-concept <a href="https://github.com/microsoft/web-attestation-sample/">User-centric Web Attestations (UWA)</a> framework, with which users can obtain certified, cryptographic attestations from various issuers, and attach them to any web property they control (e.g., a personal blog, a social media profile, etc.). The project contains a sample issuer Express server and an Edge/Chrome browser extension that can create and verify web attestations.</p>

<h1 id="strong-privacy">Strong privacy</h1>

<p>There is a <a href="./2023-03-22-auth-all-the-things.html">strong push</a> for verified user information in this era of generative AI, but to avoid further eroding the already fragile online privacy and autonomy of users, we designed the UWA framework to support the strongest privacy threat model.</p>

<p>It is often desirable to attach attestations to your “real life identity”: e.g., attach your academic achievements to your resumé, your employment history to your LinkedIn profile, etc. Other times, you might prefer to link them to a pseudonymous identity not linkable to your real-life one. Using the UWA framework, anyone trusting the issuer can verify the attestations, but no one (including the issuer itself) can link their issuance to their presence on a web page. In other words: I can get attestations that state “I’m a member of Community XYZ,”  “I’m over-18,” or simply “I’m a human,” and that’s the only information one could infer from them without being able to link it back to the actual person to whom it was issued (even if a malicious insider actively tries to track usage of UWA it issues).</p>

<p>We achieve this strong privacy property by encoding attestations using <a href="https://microsoft.com/uprove">U-Prove tokens</a>.</p>

<h1 id="system-overview">System overview</h1>

<p>The following diagram gives an overview of a web attestation life cycle:</p>

<div align="center">
  <img src="img/UWA_arch.svg" alt="UWA architecture" title="UWA architecture diagram" /><br />
</div>

<ol>
  <li>An Issuer sets up its public parameters and publishes them in a well-known location. These specify the contents of the U-Prove tokens, which can contain an application-specific label to make the attestations more informative. Users and Verifiers must obtain the Issuer parameters before creating or verifying web attestations.</li>
  <li>The User obtains U-Prove tokens from an Issuer. Authentication to the Issuer is application-specific (e.g., an Issuer might issue attestations to its members, or provide a notary validation service for paying customers). U-Prove tokens are stored in the web browser extension.</li>
  <li>When visiting a website, the User can create a web attestation from an issued token using the web browser extension (encoded either as a string or a QR code), and attach it to the site. The U-Prove token is then deleted from the browser extension to prevent linkability with newly created attestations (new tokens will be automatically obtained from the Issuer if they expire or if they are running out.)</li>
  <li>Other users visiting the same website can verify attached web attestations from trusted Issuers using the web browser extension. Unknown Issuers can be added to the trusted list by the User. Invalid attestations (for example: forged, or copied from a different site) are marked as such; malformed ones are simply ignored.</li>
</ol>

<h1 id="an-example">An example</h1>

<p>I created a web attestation to attach to this blog post issued by the project’s <a href="https://github.com/microsoft/web-attestation-sample/tree/main/sample-issuer">sample issuer</a>.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>uwa://eyJhbGciOiJVUDI1NiJ9.eyJzY29wZSI6Imh0dHBzOi8vY2hyaXN0aWFucGFxdWluLmdpdGh1Yi5pby8yMDIzLTA1LTMwLXVzZXItY2VudHJpYy13ZWItYXR0ZXN0YXRpb25zLmh0bWwiLCJ0aW1lc3RhbXAiOjE2ODUxMzQzMzg3Mjl9.eyJ1cHQiOnsiVUlEUCI6IlVXemxCU3VyRkl3ZnVxVy0xaFdYa2VPcGNaQzlvYjNITlRKOUdvM2hUN1EiLCJoIjoiQlBhZVI2VFB2dV9YU2tLMHNoZnR0dVdXV3Z5MVBfQVRkV0txalNGZTJqSVJPM3JQSm1pSnkxZXJWMll6VFNwZEVuLWYtN1BoR0ZSMzNvd29LWmtBelVjIiwiVEkiOiJleUpwYzNNaU9pSm9kSFJ3Y3pvdkwzSmhkeTVuYVhSb2RXSjFjMlZ5WTI5dWRHVnVkQzVqYjIwdmJXbGpjbTl6YjJaMEwzZGxZaTFoZEhSbGMzUmhkR2x2YmkxellXMXdiR1V2YldGcGJpOXpZVzF3YkdVdGFYTnpkV1Z5TDNOaGJYQnNaU0lzSW1WNGNDSTZNakF3TURRc0lteGliQ0k2TVgwIiwiUEkiOiIiLCJzWnAiOiJCTm5IUHg2QllJZ1BrTlE0VVBrV0VndW5veWxIck5XR2hkM2R2TW93bkk0MlZ3QXRlS1FsSzdXMFpBREtSRHhsanV0aElYRy10Z2REcWxWTlFKenpTbHMiLCJzQ3AiOiJMUXhadGNxTVZiYnk1dEZwYVU1WlBabFFqMUhDOWpYSnJjSlNCZzl6bEF3Iiwic1JwIjoiU2t6Qng3dEdnYmdOOUtpbFJTNlJYWHNRb3RNN3FpR0tQT1l4SjFDbXBsSSJ9LCJwcCI6eyJhIjoiZGV0NDVpU3gwTUtLZ3czdU94Q2pYdV9VOGFkV2tzQ2kwUjdpckJZbUpKWSIsInIiOlsia3lRbmVJcnBGZGZHTTJIQ2VnVTloQnlKeVFDWHRMWXNPSHBxLXdoaGpkYyJdfX0
</code></pre></div></div>

<p>This just looks like an opaque URI<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup>, but if you installed the <a href="https://github.com/microsoft/web-attestation-sample/tree/main/browser-extension">browser extension</a>, it recognizes the UWA string, verifies the web attestation (valid issuer and scope), and displays a verified badge: <img src="img/uwa_blue_checkmark.svg" alt="UWA blue checkmark" style="height: 2ex;" />.</p>

<p>The browser extension can also generate and verify a UWA encoded as QR code, which are useful for environment limiting the number of characters a user can provide (e.g., in social media bio or posts).</p>

<div align="center">
  <img src="img/uwa_qr.png" alt="UWA QR code" width="20%" /><br />
</div>

<p>This web attestation doesn’t attest to much; it just shows that I was able to set up the sample issuer, obtain demo tokens, and create a UWA for my blog post. This, however, demonstrates the mechanics of issuing and presenting such attestations. The project’s README page walks through a <a href="https://github.com/microsoft/web-attestation-sample#deployment-example">deployment example</a> describing how Alice can obtain U-Prove tokens from the <code class="language-plaintext highlighter-rouge">https://commun.ity</code> website and attach a corresponding membership attestation to her <code class="language-plaintext highlighter-rouge">https://soc.ial/@pr1v4cy</code> social profile, and how another user attach a humanity attestation to their page; see it in action in <a href="https://www.youtube.com/watch?v=3jSd7qwCix4">this youtube video</a>.</p>

<h1 id="concluding-thoughts">Concluding thoughts</h1>

<p>The UWA framework provides a simple, yet powerful mechanism, allowing users to openly share attestations of any type across boundaries, while preserving any degree of privacy they desire.  There are many subteleties and pitfalls when designing privacy-preserving systems; the project’s <a href="https://github.com/microsoft/web-attestation-sample/blob/main/README.md">README</a> and the <a href="https://github.com/microsoft/web-attestation-sample/blob/main/doc/uwa-spec.md">UWA specification</a> contain important details to consider for a real deployment and discuss further extensions that would improve the system.</p>

<p>I’m curious to see what you think, so go try the project, and give us feedback.</p>

<h1 id="footnotes">Footnotes</h1>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>The UWA string is is composed of a <code class="language-plaintext highlighter-rouge">uwa://</code> prefix followed by a JSON Web Siganture (JWS) encoding a <a href="https://christianpaquin.github.io/2023-04-03-uprove-json-framework-overview.html">U-Prove token presentation</a>. You can try <a href="https://www.base64decode.org/">base64url-decoding</a> the three dot-separated part of the JWS to peak inside. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><summary type="html"><![CDATA[Over the course of our life, we receive many attestations that we carry and display proudly. I framed my university diploma in my study; professionals (doctors, psychologists, etc.) display theirs in their offices. I also carry many attestations in my wallet (membership cards, employment badge, etc.) that I can easily show to anyone.]]></summary></entry><entry><title type="html">U-Prove JSON Framework Overview</title><link href="/2023-04-03-uprove-json-framework-overview.html" rel="alternate" type="text/html" title="U-Prove JSON Framework Overview" /><published>2023-04-03T00:00:00+00:00</published><updated>2023-04-03T00:00:00+00:00</updated><id>/uprove-json-framework-overview</id><content type="html" xml:base="/2023-04-03-uprove-json-framework-overview.html"><![CDATA[<p>In this post, I’ll give an overview of the recently released <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove_JSON_Framework.md">U-Prove JSON Framework (UPJF)</a>, which defines how to use JSON to encode U-Prove artifacts, allowing developers to easily integrate the privacy-protecting cryptographic technology into web applications.</p>

<h1 id="u-prove-technology-overview">U-Prove Technology Overview</h1>

<p>First things first, let’s quickly review U-Prove: the cryptographic system that allows the issuance of signed tokens containing <em>selectively-disclosable</em> attributes bound to a user key pair that can be presented in an <em>unlinkable</em> manner. Let’s break down what that means:</p>
<ol>
  <li>Attributes can be of any types; think of them as claims in the JSON Web Token (JWT) world. Only the attribute values are encoded in a U-Prove token, the types (and ordering) are specified in the issuer parameters.</li>
  <li>Nothing in the token other than the encoded attributes can identify the user. In particular, the token’s public key and signatures are randomized in the issuance protocol and are never seen by the issuer.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> The issuer can still recognize tokens it issued (as would any verifier), but can’t determine in which issuance session they were created. As an analogy, imagine the issuer is a bank issuing dollar bills. All bills of the same denomination may look the same, but a withdrawal and spending can be linked on the basis of the bill’s unique serial number; coins on the other hand all look alike and can’t be distinguished.</li>
  <li>The user can decide, at presentation time, which attributes to disclose to a verifier. Hidden attributes are perfectly hidden, they cannot be brute-forced.</li>
</ol>

<p>The issuer creates its key pair and publishes its public parameters (including its public key and details about the to-be-issued tokens). The <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove_JSON_Framework.md">UPJF</a> only supports the pre-generated <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove%20Recommended%20Parameters%20Profile%20V1.1%20Revision%203.pdf">recommended parameters</a> which use the NIST prime-order curves (P256, P384, P521) and the issuance of tokens with a maximum of 50 attributes.</p>

<p>Multiple tokens encoding the same attributes can be issued in parallel in a single issuance session; each will have a unique key pair and signature. Tokens can be presented to verifiers by signing a message (which could be a unique challenge for access scenarios, or some application-specific data for digital signature scenarios). Token can be presented once for anonymous interactions, or reused for pseudonymous ones.</p>

<p>These core features are supported in the JSON profiles and implemented in the <a href="https://github.com/microsoft/uprove-node-reference">Typescript node library</a>, and are suitable for many web scenarios.<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">2</a></sup></p>

<p>For more information, check out the <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove%20Technology%20Overview%20V1.1%20Revision%203.pdf">technology overview</a> or if you feel adventurous, the <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove%20Cryptographic%20Specification%20V1.1%20Revision%205.pdf">crypto specification</a> contains all the gory details. Note that the sample values used in the post were generated using the <a href="https://github.com/microsoft/uprove-node-reference/blob/main/samples/samples.ts">JSONFrameworkSample</a> in the library.</p>

<h1 id="issuer-setup">Issuer setup</h1>

<p>The issuer first generates its parameters containing its public key, a description of which curve and generators to use, a unique identifier for the parameters, and an application-specific description of the tokens content. Here is an example of a JSON Web Key (JWK) object containing a set of issuer parameters:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
    </span><span class="nl">"kty"</span><span class="p">:</span><span class="w"> </span><span class="s2">"UP"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"alg"</span><span class="p">:</span><span class="w"> </span><span class="s2">"UP256"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"kid"</span><span class="p">:</span><span class="w"> </span><span class="s2">"a0A3quUdeEoIJT9R_-Ysy_kr7CTmJ2w9GSSZSHBvP3I"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"g0"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BLaj8knVriRtGjLfGVg9MX1HvaPZDbhq0PmNcpxrA4oGZYoBPV-Nkcf0yfyI0mLMA10ykCj4DHKfol4T2D3HvsQ"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"spec"</span><span class="p">:</span><span class="w"> </span><span class="s2">"eyJuIjozLCJleHBUeXBlIjoiZGF5IiwiYXR0clR5cGVzIjpbIm5hbWUiLCJlbWFpbCIsIm92ZXItMjEiXX0"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<ul>
  <li>The key type <code class="language-plaintext highlighter-rouge">kty</code> is always set to “UP” for U-Prove.</li>
  <li>The curve and generators are identified by the <code class="language-plaintext highlighter-rouge">alg</code> identifier, which could be either “UP256”, “UP384”, or “UP521” (corresponding to the NIST P-256, P-384, and P-521, respectively, and the matching <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove%20Recommended%20Parameters%20Profile%20V1.1%20Revision%203.pdf">pre-calculated generators</a>).</li>
  <li>The key identifier <code class="language-plaintext highlighter-rouge">kid</code> corresponds to the issuer parameters UID which needs to be unique for the application realm. Developers can simply let the library generate these as the hash digest of the other fields.</li>
  <li><code class="language-plaintext highlighter-rouge">g0</code> is the issuer public key.</li>
  <li>The specification <code class="language-plaintext highlighter-rouge">spec</code> is a base64 encoding of a JSON object describing the content of to-be-issued tokens. Here, the value is:</li>
</ul>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
    </span><span class="nl">"n"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="w">
    </span><span class="nl">"expType"</span><span class="p">:</span><span class="s2">"day"</span><span class="p">,</span><span class="w">
    </span><span class="nl">"attrTypes"</span><span class="p">:[</span><span class="s2">"name"</span><span class="p">,</span><span class="s2">"email"</span><span class="p">,</span><span class="s2">"over-21"</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>specifying that tokens will have 3 (<code class="language-plaintext highlighter-rouge">n</code>) attributes of type (<code class="language-plaintext highlighter-rouge">attrTypes</code>) “name”, “email”, and “over-21” respectively (these should be normal JWT claim types), and that the token expiration values will be measured in days (<code class="language-plaintext highlighter-rouge">expType</code>).</p>

<p>The <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove_JSON_Framework.md">UPJF</a> recommends expressing expiration dates in privacy-friendly buckets (hours, days, weeks, and years), to avoid introducing precise expiration dates that could be used to track and trace users; in this example, all expiration dates of tokens will be set to midnight after the specified number of days. We are taking great care to avoid introducing undesired correlatable values in U-Prove tokens that could break their unlinkability; this is why the issuer is committing to their structure in its parameters.<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote" rel="footnote">3</a></sup></p>

<h1 id="anatomy-of-a-u-prove-token">Anatomy of a U-Prove token</h1>

<p>U-Prove tokens have the following structure:</p>

<div align="center">
  <img src="img/uprovetoken.png" alt="U-Prove token" width="50%" /><br /><br />
</div>

<ul>
  <li>The values for the attributes 1 to <code class="language-plaintext highlighter-rouge">n</code> (given in the issuer parameters). The user will be able to decide which of these attributes to disclose to verifiers and which ones to hide. U-Prove tokens could have no attributes (when <code class="language-plaintext highlighter-rouge">n</code> = 0).</li>
  <li>The token information field contains a base64url encoding of a JSON object with claims that are always disclosed during presentation. This is useful to encode token metadata, such as an expiration date, and an issuer identifier (for example, a URL describing where to retrieve the issuer parameters; the <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove_JSON_Framework.md">UPJF</a> recommends publishing them at <code class="language-plaintext highlighter-rouge">[ISSUER_URL]/.well-known/jwks.json</code>).</li>
  <li>The prover information field contains a base64url encoding of a JSON object with claims that are always disclosed during presentation, but are unknown to the issuer. This is useful to encode a fresh challenge from a verifier while issuing on-demand tokens, or to tie a token to an external artifact that the user specifies at issuance (e.g., an encryption key).</li>
  <li>The token public key corresponds to the private key that remains secret to the user. It is generated by the user but never seen by the issuer.</li>
  <li>The issuer signature provides authenticity and integrity guarantees on the token. It is generated by the issuer but randomized by the user at issuance.</li>
</ul>

<h1 id="issuance-protocol">Issuance protocol</h1>

<p>The U-Prove issuance protocol is a 4-leg request-commitment-challenge-response exchange, initiated by the user. How the issuer authenticates the user and validates the attributes to issue is application specific. Multiple tokens encoding the same attributes can be obtained in batch.</p>

<div align="center">
  <img src="img/uprove-issuance.svg" alt="U-Prove issuance protocol" width="50%" /><br /><br />
</div>

<p>The initial token issuance request might contain user-suggested parameters, for example, the desired number of tokens and attribute values; ultimately, the issuer decides on these values.</p>

<p>The following examples show the messages for issuing 5 tokens, encoding the attribute values “Joe Example” (name), “joe@example.com” (email), and “true” (over-21), corresponding to the types specified in the issuer parameters, and a token information field encoding the following JSON object containing the URL of the issuer, and an expiration date specifying 100 days from the issuance date (counting the total number of days since the Unix epoch):</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"iss"</span><span class="p">:</span><span class="s2">"https://issuer"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"exp"</span><span class="p">:</span><span class="mi">19548</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The first issuance message sent by the issuer (containing one shared value, and two arrays of per-token values) would look like this:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"sZ"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BMH5uVuMC9Tc+4rOKMC27UwiTc0z9n8kX93MTw1reg1dG8EB1T8zOH/OFRnyS7Q90+mOx6YuEHhXLT4mZXLaqfI="</span><span class="p">,</span><span class="w">
  </span><span class="nl">"sA"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
    </span><span class="s2">"BMAuA4uPOURdO+S5nnw1G8m34uCfSI2XdD0fPeP/f4Vx8+FyniY4/9R9lWH06GZS6j14nfDyM0XH8tJY3cOyy40="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BILCZFHxq/C+daMwRdUltW51fTw8d2a6p05tkie3SCeAylRxpDm3yNKwKPsUTY3NSfHw4XpC6M6Cr9yxivcflmk="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BHlk5nsWKNAbuF33+FzyCtxYQE1FRP1jUUxYyHNH1fT0nqupI3PRmk3ZtW1Qjy5RLeHPji1pqgLjEZL0PpLXZrQ="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BAEVNZiaxozc8uOTw7TbyZLOZdle2/l/GCJAiLsoxZXm7k/j+ulrjUX0zZus7S1GLAjFAXg91hu+p956Hu/Vt60="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BEokpCt90Xcc126fs3gaudDdhGaKJfQffIjHFoVpcgZNkyIFrcO4nuxFVMn8AO9vaoQzsj+DhfbpRLrEELN1cdU="</span><span class="w">
  </span><span class="p">],</span><span class="w">
  </span><span class="nl">"sB"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
    </span><span class="s2">"BBx9PkdtDgydZnVbiY4kwm9NevdUE+wyiPuR9RlCZXSBaYSvnXJGBNYO1aNpm+16QzHvYhBOYBXN9m/zHy1QcOU="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BImKvZECOGf0PM9aBQLa3mRiOmJZ/p69t4MPjerevDl0F8c/8XwcznCqgxRYXYYSv8LXKk8LvLN/YsIvdm0vVrU="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BNeSJoeb2/hRtEQlfLY9UqE12+onQIyYGELl7uXu76+S5kYdNjhiTwRrsta7B4VYMq+2akYWBvVMFvVfrim3XLI="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BEzfVQw8mfxZERCUBwLLQ2Qz2S1nyFl2Q/Q8kqG3FrAmiiADBfaGkNopgaXjLbsUuEAdkvqYwEmKPKrFInG/Ths="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"BKF+fQ+KopnQTv+O+/yB3D3BSJYycaEScGd01wrIdisZjLWinSdK809adTUCm50V20feJ+C1DtdRWACSf5JiE4Q="</span><span class="w">
  </span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The second issuance message, sent by the user, would look like this:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
    </span><span class="nl">"sC"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
        </span><span class="s2">"5hhj/QG76zXXPe1zks/H5Fsvq32jL81OBTsANhIFoRE="</span><span class="p">,</span><span class="w">
        </span><span class="s2">"SUOh117WBGAWVHZ7eOBIGUNxe9/eT6SjS1gQwBV6Lsw="</span><span class="p">,</span><span class="w">
        </span><span class="s2">"pweN4QIp72gVT53mMOrTI0RQd6HmFxLT9727qj/ZPNw="</span><span class="p">,</span><span class="w">
        </span><span class="s2">"v0RQ75GEwps/trPdzvG6NETPmf4oNlVuLRew2pFVgz8="</span><span class="p">,</span><span class="w">
        </span><span class="s2">"A8dUvtq6aXNyyqgUNM7NILoVnyRaYO1Ej1FhGhJy4mM="</span><span class="w">
  </span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>Finally, the third issuance message, sent by the issuer, looks like this:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"sR"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
    </span><span class="s2">"hcru+mdXDgGPnfovKr7pQtpTkLmhj11N1DkfVfRuuGQ="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"8bkl56JadyLGfwa9KYoCNUoDdUTMYQEvbv1PJbPA0a4="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"1J8sxxAyGSbn3WxV3enTH1e90YOQJ3lr8hw2QedDpgg="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"4/Pb/94JGCGJGpNa22GjYDQMgShI1wRdXYJk0p0RQZQ="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"8jT5vOUytgk1pI5/ekZtdtOk2glS1LA9ioe1s64Naos="</span><span class="w">
  </span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The user would then generate 5 U-Prove tokens and corresponding private keys. Here is a sample token:</p>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"UIDP"</span><span class="p">:</span><span class="w"> </span><span class="s2">"a0A3quUdeEoIJT9R/+Ysy/kr7CTmJ2w9GSSZSHBvP3I="</span><span class="p">,</span><span class="w">
  </span><span class="nl">"h"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BPh3qOzYuhnUTaK6bJ74wRYDSbyPiFVDuB+T4tcqFvm03ayALw4u4zPUBMZmKpSvcWw00n2g5WvcKUQYUMfdyQM="</span><span class="p">,</span><span class="w">
  </span><span class="nl">"TI"</span><span class="p">:</span><span class="w"> </span><span class="s2">"eyJpc3MiOiJodHRwczovL2lzc3VlciIsImV4cCI6MTk1NDh9"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"PI"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span><span class="w">
  </span><span class="nl">"sZp"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BLwfHuKESMPexDOVuAwwPeHPSe3S9tNnRGSaD8t4ZzIUbq9Efq8Z1l0k7tNzENHU0ouQppr2RUVyjNo1c9r2R7Q="</span><span class="p">,</span><span class="w">
  </span><span class="nl">"sCp"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ZX0kIbTi78a7NhInOMQVwzGFgWdWaaJr+UkdLsaefeY="</span><span class="p">,</span><span class="w">
  </span><span class="nl">"sRp"</span><span class="p">:</span><span class="w"> </span><span class="s2">"BuhVEPOJK0g+5fQLx/eAngMp4M3OuI6eeGMNy8aAOz4="</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>where <code class="language-plaintext highlighter-rouge">UIDP</code> is the unique cryptographic identifier of the issuer parameters; <code class="language-plaintext highlighter-rouge">h</code> is the token’s public key; <code class="language-plaintext highlighter-rouge">TI</code> and <code class="language-plaintext highlighter-rouge">PI</code> are the base64url encoding of the token and prover information fields, respectively (see above for the <code class="language-plaintext highlighter-rouge">TI</code> value; <code class="language-plaintext highlighter-rouge">PI</code> is unused in this sample); and <code class="language-plaintext highlighter-rouge">sZp</code>, <code class="language-plaintext highlighter-rouge">sCp</code>, and <code class="language-plaintext highlighter-rouge">sRp</code> form the issuer signature.</p>

<h1 id="presentation-protocol">Presentation protocol</h1>

<p>The user can later present a U-Prove token to a verifier by using the corresponding private key to sign a presentation message; the user selects which attributes to disclose in the process. The presentation proof acts as a digital signature on the presentation message, which can contain application-specific data. To prevent replay attacks (to the same verifier, or to a different one), the message should contain an unpredictable challenge; this could for example be a verifier-specified random number, or composed of a verifier identifier, a timestamp and a nonce for non-interactive presentations.<sup id="fnref:4" role="doc-noteref"><a href="#fn:4" class="footnote" rel="footnote">4</a></sup>. Here is an example of a presentation proof, disclosing the third attribute (the “over-21” boolean), generated on a random verifier-provided challenge.</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"a"</span><span class="p">:</span><span class="w"> </span><span class="s2">"SAcAOx7nmwulPc1xxdXfBjZPW5KfEycBNA0jPvkRYMc="</span><span class="p">,</span><span class="w">
  </span><span class="nl">"r"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
    </span><span class="s2">"0WZkALFePshcl2fxKOL0+Tr8rpN+J58gZNdYFnStymU="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"/ta9XKkI4hRWvT+bWaanveKhijRJVJQup8qVIJWifA0="</span><span class="p">,</span><span class="w">
    </span><span class="s2">"FFp3WBMUzUYdP2lVNhdPHtT7XZAlEjI5KT8ClZxVUbY="</span><span class="w">
  </span><span class="p">],</span><span class="w">
  </span><span class="nl">"A"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> 
    </span><span class="nl">"3"</span><span class="p">:</span><span class="w"> </span><span class="s2">"dHJ1ZQ=="</span><span class="w">
    </span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The <code class="language-plaintext highlighter-rouge">r</code> array contains one value per hidden attributes plus an extra one, and the <code class="language-plaintext highlighter-rouge">A</code> object contains the disclosed attributes (in this example, the base64 encoding of the “3”<sup>rd</sup> value: “true”). <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove_JSON_Framework.md">UPJF</a> describes how token presentations can be encoded into a JSON Web Signature (JWS), where the header encodes the U-Prove algorithm (same as in the issuer parameters), the payload encodes the presentation message, and the signature encodes the presented U-Prove tokens and the presentation proof. Here is a sample JWS:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>eyJhbGciOiJVUDI1NiJ9.-678Cjbk8hHW8l55QgtCXw.eyJ1cHQiOnsiVUlEUCI6IjVYV3NkbGMwclhQdk94ZVRRNkF4RjY2UVJmSGxkU0N4U2VCbitreWNRdkE9IiwiaCI6IkJQY0IzSm02MXVSa3BZektjT3h4d0wvckFGVmU3L1JucjZTbmw4b01rYU1PSW42eU9zSGNIc3VjQy8xb3ZBRVEzQkdlV2lmOGpDejFXNm5pOWJUUk9yOD0iLCJUSSI6ImV5SnBjM01pT2lKb2RIUndjem92TDJsemMzVmxjaUlzSW1WNGNDSTZNVGsxTlRGOSIsIlBJIjoiIiwic1pwIjoiQkNSdWdKUzhwQnNGbG8ydzZOUXZhRkxIYzR2K1ZKSm82OGEyVGRJaDIzdVRsY3QwbHhOU3JUQnI3QlFOQ0x2S3hrMnZTV293NTlleWo5SUpBWTd2VjhrPSIsInNDcCI6ImY3eCt5VlJ5OTVJcCtvcEpJNVlUQ2drZ3BBYktYZWhIZHRFL3lBajlNbnc9Iiwic1JwIjoiVC9kdExrZ3pQZEdxYlVEdUxXMnBoQUVLcFoyWjRlakhCME1adzlXTnc2VT0ifSwicHAiOnsiYSI6ImlGblR4ZGJ0UFg2bll4UndiV0VtbGhpRXNYU25kVEVuZTEvN2ZodFkxUUE9IiwiciI6WyJqNTY0Y081d1B3R1VLcE1jZDhTS1VoYmpKVmwyaVg3a055ODF6ODIySUh3PSIsIjRRM1Y0WWFhZ1EzcENzakFTaG1wNm1lbGZ2d1dpQUllT3NuNmFzMjFsenc9IiwiWHoyTUtISklvNTdyeWlMV3RjR2Y0eTFicVcxU1NiUWswNzQ4RDQ0bzVhZz0iXSwiQSI6eyIzIjoiZEhKMVpRPT0ifX19
</code></pre></div></div>

<p>The verifier can then validate the presented U-Prove token and presentation proof, given it has access to an authentic copy of the issuer parameters. These could be retrieved directly from the issuer using the URL encoded in the token information field.</p>

<h1 id="try-it-out">Try it out!</h1>

<p>The U-Prove technology provides unique security and privacy benefits useful in many access, authentication, and attestation scenarios. The U-Prove JSON framework and its implementation in the typescript library make it easy to experiment with the technology in web environments. I’m excited to hear what use you’ll make of it; don’t be shy a engage with us on the project’s <a href="https://github.com/microsoft/uprove-node-reference/">github page</a>.</p>

<h1 id="footnotes">Footnotes</h1>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1" role="doc-endnote">
      <p>The issuance protocol uses a technique called <a href="http://www.credentica.com/mit/Chapter4.pdf">restrictive blinding</a>, which is a generalization of blind signatures allowing them to be applied on messages known to the issuer. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:2" role="doc-endnote">
      <p>The <a href="https://github.com/microsoft/uprove-node-reference/blob/main/doc/U-Prove%20Cryptographic%20Specification%20V1.1%20Revision%205.pdf">cryptographic specification</a> (and the <a href="https://github.com/microsoft/uprove-csharp-sdk">C# SDK</a>) support more features (including device-binding, domain/scope pseudonym generation, attribute commitments), and the <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/U-Prove20extensions20paper.pdf">extensions</a> support an even broader set of features to build more advanced credential systems (for example, proving attribute equality and non-equality, range proofs, revocation). <a href="#fnref:2" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:3" role="doc-endnote">
      <p>A malicious issuer could try to “tag” a target user by using different issuer parameters, or by encoding attributes differently or in a different order. Auditing/transparency systems can help with the former, and specifying the token’s content in the issuer parameters helps with the latter. <a href="#fnref:3" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:4" role="doc-endnote">
      <p>The verifier identifier prevents the proof from being replayed to a different verifier, the nonce prevents replays in general, and the timestamp limits how long nonces should be remembered by the verifier. <a href="#fnref:4" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name></name></author><summary type="html"><![CDATA[In this post, I’ll give an overview of the recently released U-Prove JSON Framework (UPJF), which defines how to use JSON to encode U-Prove artifacts, allowing developers to easily integrate the privacy-protecting cryptographic technology into web applications.]]></summary></entry></feed>