Skip to content

Commit

Permalink
Align ecdsa-sd-2023 create proof algorithm to new interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Feb 25, 2024
1 parent 94afd7c commit 7fe6ff9
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2552,12 +2552,47 @@ <h3>ecdsa-sd-2023</h3>
<section>
<h4>Create Base Proof (ecdsa-sd-2023)</h4>


<p>
To generate a base proof, the algorithm in
<a href="https://www.w3.org/TR/vc-data-integrity/#add-proof">
Section 4.1: Add Proof</a> in the Data Integrity
[[VC-DATA-INTEGRITY]] specification MUST be executed.
The following algorithm specifies how to create a [=data integrity proof=] given
an <a>unsecured data document</a>. Required inputs are an
<a>unsecured data document</a> ([=map=] |unsecuredDocument|), and a set of proof
options ([=map=] |options|). A [=data integrity proof=] ([=map=]), or an error,
is produced as output.
</p>

<ol class="algorithm">
<li>
Let |proof| be a clone of the proof options, |options|.
</li>
<li>
Let |proofConfig| be the result of running the algorithm in
Section <a href="#base-proof-configuration-ecdsa-sd-2023"></a> with
|options| passed as a parameter.
</li>
<li>
Let |transformedData| be the result of running the algorithm in Section <a
href="#base-proof-transformation-ecdsa-sd-2023"></a> with |unsecuredDocument|,
|proofConfig|, and |options| passed as parameters.
</li>
<li>
Let |hashData| be the result of running the algorithm in Section
<a href="#base-proof-hashing-ecdsa-sd-2023"></a> with |transformedData| and |proofConfig|
passed as a parameters.
</li>
<li>
Let |proofBytes| be the result of running the algorithm in Section
<a href="#base-proof-serialization-ecdsa-sd-2023"></a> with |hashData| and
|options| passed as parameters.
</li>
<li>
Let |proof|.|proofValue| be a <a data-cite="VC-DATA-INTEGRITY#multibase-0">
base64-url-encoded Multibase value</a> of the |proofBytes|.
</li>
<li>
Return |proof| as the [=data integrity proof=].
</li>
</ol>
</section>

<section>
Expand Down

0 comments on commit 7fe6ff9

Please sign in to comment.