From 4e3bb98d50563752073c3e3c624b5c3fca18b0b2 Mon Sep 17 00:00:00 2001
From: Greg Bernstein
Date: Tue, 30 Jul 2024 08:52:14 -0700
Subject: [PATCH] Incorporate additional custom proof options.
Co-authored-by: Ted Thibodeau Jr
Co-authored-by: Dave Longley
---
index.html | 89 ++++++++++++++----------------------------------------
1 file changed, 23 insertions(+), 66 deletions(-)
diff --git a/index.html b/index.html
index 300966e..edac366 100644
--- a/index.html
+++ b/index.html
@@ -700,50 +700,33 @@ Proof Configuration (eddsa-rdfc-2022)
identifier (cryptosuite). A proof configuration
object is produced as output.
-
-
-Let proofConfig be an empty object.
-
- -
-Set proofConfig.type to
-options.type.
-
- -
-If options.cryptosuite is set,
-set proofConfig.cryptosuite to its value.
+Let |proofConfig| be a clone of the |options| object.
-
-If options.type is not set to `DataIntegrityProof` and/or
-proofConfig.cryptosuite 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
PROOF_GENERATION_ERROR.
-
-Set proofConfig.created to
-options.created. 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
PROOF_GENERATION_ERROR.
-
-Set proofConfig.verificationMethod to
-options.verificationMethod.
-
- -
-Set proofConfig.proofPurpose to
-options.proofPurpose.
-
- -
-Set proofConfig.@context to
-unsecuredDocument.@context
+Set |proofConfig|.@context to
+|unsecuredDocument|.@context.
-
-Let canonicalProofConfig be the result of applying the
-RDF Dataset Canonicalization algorithm [[RDF-CANON]] to the proofConfig.
+Let |canonicalProofConfig| be the result of applying the
+RDF Dataset Canonicalization Algorithm
+[[RDF-CANON]] to the |proofConfig|.
-
-Return canonicalProofConfig.
+Return |canonicalProofConfig|.
@@ -1080,27 +1063,18 @@ Proof Configuration (eddsa-jcs-2022)
Let proofConfig be a clone of the options object.
-If options.type is not set to `DataIntegrityProof` and
+If proofConfig.type is not set to `DataIntegrityProof` or
proofConfig.cryptosuite is not set to `eddsa-jcs-2022`,
an error MUST be raised that SHOULD convey an error type of
PROOF_GENERATION_ERROR.
-Set proofConfig.created to
-options.created. 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
PROOF_GENERATION_ERROR.
-Set proofConfig.verificationMethod to
-options.verificationMethod.
-
-
-Set proofConfig.proofPurpose to
-options.proofPurpose.
-
-
Let canonicalProofConfig be the result of applying the
JSON Canonicalization Scheme [[RFC8785]] to the proofConfig.
@@ -2113,37 +2087,20 @@ Proof Configuration (Ed25519Signature2020)
-
-Let proofConfig be an empty object.
-
- -
-Set proofConfig.type to
-options.type.
+Let |proofConfig| be a clone of the |options| object.
-
-If options.cryptosuite is set,
-set proofConfig.cryptosuite to its value.
-
- -
-If options.type is not set to `Ed25519Signature2020`,
-an error MUST be raised that SHOULD convey an error type of
+If proofConfig.type is not set to `Ed25519Signature2020`,
+an error MUST be raised and SHOULD convey an error type of
PROOF_GENERATION_ERROR.
-
-Set proofConfig.created to
-options.created. 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
PROOF_GENERATION_ERROR.
-
-Set proofConfig.verificationMethod to
-options.verificationMethod.
-
- -
-Set proofConfig.proofPurpose to
-options.proofPurpose.
-
- -
Set proofConfig.@context to
unsecuredDocument.@context