Skip to content

Commit

Permalink
Edit algorithms to permit more general proof configuration options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind4Greg committed Jan 4, 2024
1 parent 17742b3 commit 4197d6c
Showing 1 changed file with 15 additions and 63 deletions.
78 changes: 15 additions & 63 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -691,33 +691,17 @@ <h4>Proof Configuration (ecdsa-rdfc-2019)</h4>

<ol class="algorithm">
<li>
Let <var>proofConfig</var> be an empty object.
Let <var>proofConfig</var> be a clone of the <var>options</var> 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.
</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` and
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `ecdsa-rdfc-2019`, an
`INVALID_PROOF_CONFIGURATION` error MUST be raised.
</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 `INVALID_PROOF_DATETIME` error MUST be raised.
</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>.
If <var>proofConfig</var>.<var>created</var> is set and if the value is not a
valid [[XMLSCHEMA11-2]] datetime, an `INVALID_PROOF_DATETIME` error MUST be
raised.
</li>
<li>
Set <var>proofConfig</var>.<var>@context</var> to
Expand Down Expand Up @@ -979,33 +963,17 @@ <h4>Proof Configuration (ecdsa-jcs-2019)</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 <var>proofConfig</var> be a clone of the <var>options</var> 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 `DataIntegrityProof` and
If <var>proofConfig</var>.<var>type</var> is not set to `DataIntegrityProof` and
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `ecdsa-jcs-2019`, an
`INVALID_PROOF_CONFIGURATION` error MUST be raised.
</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 `INVALID_PROOF_DATETIME` error MUST be raised.
</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>.
If <var>proofConfig</var>.<var>created</var> is set and if the value is not a
valid [[XMLSCHEMA11-2]] datetime, an `INVALID_PROOF_DATETIME` error MUST be
raised.
</li>
<li>
Let <var>canonicalProofConfig</var> be the result of applying the
Expand Down Expand Up @@ -2590,33 +2558,17 @@ <h4>Base Proof Configuration (ecdsa-sd-2023)</h4>

<ol class="algorithm">
<li>
Let <var>proofConfig</var> be an empty object.
Let <var>proofConfig</var> be a clone of the <var>options</var> 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.
</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` and
<var>proofConfig</var>.<var>cryptosuite</var> is not set to `ecdsa-sd-2023`, an
`INVALID_PROOF_CONFIGURATION` error MUST be raised.
</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 `INVALID_PROOF_DATETIME` error MUST be raised.
</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>.
If <var>proofConfig</var>.<var>created</var> is set and if the value is not a
valid [[XMLSCHEMA11-2]] datetime, an `INVALID_PROOF_DATETIME` error MUST be
raised.
</li>
<li>
Set <var>proofConfig</var>.<var>@context</var> to
Expand Down

0 comments on commit 4197d6c

Please sign in to comment.