From b664f6a0c292fb444dff256abacd73f53f11f5b6 Mon Sep 17 00:00:00 2001 From: Wind4Greg Date: Mon, 1 Jul 2024 10:47:15 -0700 Subject: [PATCH 1/5] Update proof configuration procedures to use a clone of the options input and update the procedures accordingly. --- index.html | 93 +++++++++++++++--------------------------------------- 1 file changed, 25 insertions(+), 68 deletions(-) diff --git a/index.html b/index.html index e33d083..752354a 100644 --- a/index.html +++ b/index.html @@ -480,7 +480,7 @@

eddsa-rdfc-2022

The `eddsa-rdfc-2022` cryptographic suite takes an input document, canonicalizes -the document using the RDF Dataset Canonicalization algorithm [[RDF-CANON]], and then +the document using the RDF Dataset Canonicalization algorithm [[RDF-CANON]], and then cryptographically hashes and signs the output resulting in the production of a data integrity proof. The algorithms in this section also include the verification of such a data integrity proof. @@ -710,50 +710,33 @@

Proof Configuration (eddsa-rdfc-2022)

identifier (cryptosuite). A proof configuration object is produced as output.

-
  1. -Let proofConfig be an empty object. -
  2. -
  3. -Set proofConfig.type to -options.type. +Let |proofConfig| be a clone of the |options| object.
  4. -If options.cryptosuite is set, set -proofConfig.cryptosuite to its value. -
  5. -
  6. -If options.type is not set to `DataIntegrityProof` and -proofConfig.cryptosuite is not set to `eddsa-rdfc-2022`, -an error MUST be raised and 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.
  7. -Set proofConfig.created to -options.created. If the value is not a valid -[[XMLSCHEMA11-2]] datetime, -an error MUST be raised and SHOULD convey an error type of +If |proofConfig|.|created| is set and if the value is not a +valid [[XMLSCHEMA11-2]] datetime, an error MUST be +raised and SHOULD convey an error type of PROOF_GENERATION_ERROR.
  8. -Set proofConfig.verificationMethod to -options.verificationMethod. +Set |proofConfig|.@context to +|unsecuredDocument|.@context.
  9. -Set proofConfig.proofPurpose to -options.proofPurpose. +Let |canonicalProofConfig| be the result of applying the +Universal RDF Dataset Canonicalization Algorithm +[[RDF-CANON]] to the |proofConfig|.
  10. -Set proofConfig.@context to -unsecuredDocument.@context -
  11. -
  12. -Let canonicalProofConfig be the result of applying the -RDF Dataset Canonicalization algorithm [[RDF-CANON]] to the proofConfig. -
  13. -
  14. -Return canonicalProofConfig. +Return |canonicalProofConfig|.
@@ -1090,27 +1073,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` and proofConfig.cryptosuite is not set to `eddsa-jcs-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 and SHOULD convey an error type of +If |proofConfig|.|created| is set and if the value 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.
  • @@ -1953,7 +1927,7 @@

    Ed25519Signature2020

    The `Ed25519Signature2020` cryptographic suite takes an input document, - canonicalizes the document using the RDF Dataset Canonicalization algorithm [[RDF-CANON]], + canonicalizes the document using the RDF Dataset Canonicalization algorithm [[RDF-CANON]], and then cryptographically hashes and signs the output resulting in the production of a data integrity proof. The algorithms in this section also include the verification of such a data integrity proof. @@ -2112,35 +2086,18 @@

    Proof Configuration (Ed25519Signature2020)

    1. - Let proofConfig be an empty object. +Let |proofConfig| be a clone of the |options| object.
    2. - Set proofConfig.type to - options.type. -
    3. -
    4. - If options.cryptosuite is set, set - proofConfig.cryptosuite to its value. -
    5. -
    6. -If options.type is not set to `Ed25519Signature2020`, +If proofConfig.type is not set to `Ed25519Signature2020`, an error MUST be raised and SHOULD convey an error type of PROOF_GENERATION_ERROR.
    7. - Set proofConfig.created to - options.created. If the value is not a valid - [[XMLSCHEMA11-2]] datetime, an error MUST be raised and SHOULD convey an - error type of - PROOF_GENERATION_ERROR. -
    8. -
    9. - Set proofConfig.verificationMethod to - options.verificationMethod. -
    10. -
    11. - Set proofConfig.proofPurpose to - options.proofPurpose. +If |proofConfig|.|created| is set and if the value is not a +valid [[XMLSCHEMA11-2]] datetime, an error MUST be +raised and SHOULD convey an error type of +PROOF_GENERATION_ERROR.
    12. Set proofConfig.@context to From eda1aa7768967fc564408253b1982a71eba7d410 Mon Sep 17 00:00:00 2001 From: Greg Bernstein Date: Mon, 1 Jul 2024 11:09:06 -0700 Subject: [PATCH 2/5] Incorporate additional custom proof options: wording and grammar improvements. Co-authored-by: Ted Thibodeau Jr --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 752354a..01ad60c 100644 --- a/index.html +++ b/index.html @@ -721,18 +721,18 @@

      Proof Configuration (eddsa-rdfc-2022)

      PROOF_GENERATION_ERROR.
    13. -If |proofConfig|.|created| is set and if the value is not a +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.
    14. Set |proofConfig|.@context to -|unsecuredDocument|.@context. +|unsecuredDocument|.@context.
    15. Let |canonicalProofConfig| be the result of applying the -Universal RDF Dataset Canonicalization Algorithm +RDF Dataset Canonicalization Algorithm [[RDF-CANON]] to the |proofConfig|.
    16. @@ -1073,13 +1073,13 @@

      Proof Configuration (eddsa-jcs-2022)

      Let proofConfig be a clone of the options object.
    17. -If proofConfig.type is not set to `DataIntegrityProof` and +If proofConfig.type is not set to `DataIntegrityProof` and/or proofConfig.cryptosuite is not set to `eddsa-jcs-2022`, an error MUST be raised and SHOULD convey an error type of PROOF_GENERATION_ERROR.
    18. -If |proofConfig|.|created| is set and if the value is not a +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. @@ -1928,7 +1928,7 @@

      Ed25519Signature2020

      The `Ed25519Signature2020` cryptographic suite takes an input document, canonicalizes the document using the RDF Dataset Canonicalization algorithm [[RDF-CANON]], - and then cryptographically hashes and signs the output + and then cryptographically hashes and signs the output, resulting in the production of a data integrity proof. The algorithms in this section also include the verification of such a data integrity proof.

      @@ -2094,7 +2094,7 @@

      Proof Configuration (Ed25519Signature2020)

      PROOF_GENERATION_ERROR.
    19. -If |proofConfig|.|created| is set and if the value is not a +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. From dcf0464300739f8d9066323e1e602044a5f62eb6 Mon Sep 17 00:00:00 2001 From: Greg Bernstein Date: Wed, 3 Jul 2024 11:19:12 -0700 Subject: [PATCH 3/5] Incoporate additional custom proof options: wording improvement. Co-authored-by: Dave Longley --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 01ad60c..cd62b54 100644 --- a/index.html +++ b/index.html @@ -721,7 +721,7 @@

      Proof Configuration (eddsa-rdfc-2022)

      PROOF_GENERATION_ERROR.
    20. -If |proofConfig|.|created| is set to a value that is not a +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. From 336d23fa5bfe5b06d241162ddbd757b764905fb3 Mon Sep 17 00:00:00 2001 From: Greg Bernstein Date: Wed, 3 Jul 2024 11:23:29 -0700 Subject: [PATCH 4/5] Incorporate additional custom proof options: wording improvement. Co-authored-by: Dave Longley --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index cd62b54..8b37def 100644 --- a/index.html +++ b/index.html @@ -2094,7 +2094,7 @@

      Proof Configuration (Ed25519Signature2020)

      PROOF_GENERATION_ERROR.
    21. -If |proofConfig|.|created| is set to a value that is not a +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. From 5581023f27085966cf33fc6a632f2b5b3fc3dd43 Mon Sep 17 00:00:00 2001 From: Greg Bernstein Date: Mon, 15 Jul 2024 08:56:54 -0700 Subject: [PATCH 5/5] Incoporate additional custom proof options: wording improvement. Co-authored-by: Dave Longley --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e10fa5b..55857c6 100644 --- a/index.html +++ b/index.html @@ -1062,7 +1062,7 @@

      Proof Configuration (eddsa-jcs-2022)

      Let proofConfig be a clone of the options object.
    22. -If proofConfig.type is not set to `DataIntegrityProof` and/or +If proofConfig.type is not set to `DataIntegrityProof` or proofConfig.cryptosuite is not set to `eddsa-jcs-2022`, an error MUST be raised and SHOULD convey an error type of PROOF_GENERATION_ERROR.