Skip to content

Commit

Permalink
Incorporate additional custom proof options.
Browse files Browse the repository at this point in the history
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Co-authored-by: Dave Longley <[email protected]>
  • Loading branch information
3 people authored Jul 30, 2024
1 parent 91016be commit 4e3bb98
Showing 1 changed file with 23 additions and 66 deletions.
89 changes: 23 additions & 66 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -700,50 +700,33 @@ <h4>Proof Configuration (eddsa-rdfc-2022)</h4>
identifier (<var>cryptosuite</var>). A <em>proof configuration</em>
object is produced as output.
</p>

<ol class="algorithm">
<li>
Let <var>proofConfig</var> be an empty object.
</li>
<li>
Set <var>proofConfig</var>.<var>type</var> to
<var>options</var>.<var>type</var>.
</li>
<li>
If <var>options</var>.<var>cryptosuite</var> is set,
set <var>proofConfig</var>.<var>cryptosuite</var> to its value.
Let |proofConfig| be a clone of the |options| object.
</li>
<li>
If <var>options</var>.<var>type</var> is not set to `DataIntegrityProof` and/or
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `eddsa-rdfc-2022`,
an error MUST be raised that SHOULD convey an error type of
If |proofConfig|.|type| is not set to `DataIntegrityProof` and/or
|proofConfig|.|cryptosuite| is not set to `eddsa-rdfc-2022`, an
error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>created</var> to
<var>options</var>.<var>created</var>. If the value is not a valid
[[XMLSCHEMA11-2]] datetime,
an error MUST be raised that SHOULD convey an error type of
If |proofConfig|.|created| is present and set to a value that is not a
valid [[XMLSCHEMA11-2]] datetime, an error MUST be
raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>verificationMethod</var> to
<var>options</var>.<var>verificationMethod</var>.
</li>
<li>
Set <var>proofConfig</var>.<var>proofPurpose</var> to
<var>options</var>.<var>proofPurpose</var>.
</li>
<li>
Set <var>proofConfig</var>.<var>@context</var> to
<var>unsecuredDocument</var>.<var>@context</var>
Set |proofConfig|.<var>@context </var>to
|unsecuredDocument|.<var>@context</var>.
</li>
<li>
Let <var>canonicalProofConfig</var> be the result of applying the
RDF Dataset Canonicalization algorithm [[RDF-CANON]] to the <var>proofConfig</var>.
Let |canonicalProofConfig| be the result of applying the
RDF Dataset Canonicalization Algorithm
[[RDF-CANON]] to the |proofConfig|.
</li>
<li>
Return <var>canonicalProofConfig</var>.
Return |canonicalProofConfig|.
</li>
</ol>

Expand Down Expand Up @@ -1080,27 +1063,18 @@ <h4>Proof Configuration (eddsa-jcs-2022)</h4>
Let <var>proofConfig</var> be a clone of the <var>options</var> object.
</li>
<li>
If <var>options</var>.<var>type</var> is not set to `DataIntegrityProof` and
If <var>proofConfig</var>.<var>type</var> is not set to `DataIntegrityProof` or
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `eddsa-jcs-2022`,
an error MUST be raised that SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>created</var> to
<var>options</var>.<var>created</var>. If the value is not a valid
[[XMLSCHEMA11-2]] datetime,
an error MUST be raised that SHOULD convey an error type of
If |proofConfig|.|created| is set to a value that is not a
valid [[XMLSCHEMA11-2]] datetime, an error MUST be
raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>verificationMethod</var> to
<var>options</var>.<var>verificationMethod</var>.
</li>
<li>
Set <var>proofConfig</var>.<var>proofPurpose</var> to
<var>options</var>.<var>proofPurpose</var>.
</li>
<li>
Let <var>canonicalProofConfig</var> be the result of applying the
JSON Canonicalization Scheme [[RFC8785]] to the <var>proofConfig</var>.
</li>
Expand Down Expand Up @@ -2113,37 +2087,20 @@ <h4>Proof Configuration (Ed25519Signature2020)</h4>

<ol class="algorithm">
<li>
Let <var>proofConfig</var> be an empty object.
</li>
<li>
Set <var>proofConfig</var>.<var>type</var> to
<var>options</var>.<var>type</var>.
Let |proofConfig| be a clone of the |options| object.
</li>
<li>
If <var>options</var>.<var>cryptosuite</var> is set,
set <var>proofConfig</var>.<var>cryptosuite</var> to its value.
</li>
<li>
If <var>options</var>.<var>type</var> is not set to `Ed25519Signature2020`,
an error MUST be raised that SHOULD convey an error type of
If <var>proofConfig</var>.<var>type</var> is not set to `Ed25519Signature2020`,
an error MUST be raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>created</var> to
<var>options</var>.<var>created</var>. If the value is not a valid
[[XMLSCHEMA11-2]] datetime,
an error MUST be raised that SHOULD convey an error type of
If |proofConfig|.|created| is present and set to a value that is not a
valid [[XMLSCHEMA11-2]] datetime, an error MUST be
raised and SHOULD convey an error type of
<a data-cite="VC-DATA-INTEGRITY#PROOF_GENERATION_ERROR">PROOF_GENERATION_ERROR</a>.
</li>
<li>
Set <var>proofConfig</var>.<var>verificationMethod</var> to
<var>options</var>.<var>verificationMethod</var>.
</li>
<li>
Set <var>proofConfig</var>.<var>proofPurpose</var> to
<var>options</var>.<var>proofPurpose</var>.
</li>
<li>
Set <var>proofConfig</var>.<var>@context</var> to
<var>unsecuredDocument</var>.<var>@context</var>
</li>
Expand Down

0 comments on commit 4e3bb98

Please sign in to comment.