diff --git a/index.html b/index.html index 4edd385..b53bc5a 100644 --- a/index.html +++ b/index.html @@ -634,10 +634,13 @@

createDisclosureData

The following algorithm creates data to be used to generate a derived proof. The inputs include a JSON-LD document (document), a BBS base proof (proof), an array of JSON pointers to use to selectively disclose -statements (selectivePointers), and any custom JSON-LD API options +statements (selectivePointers), an OPTIONAL BBS +presentationHeader (byte array that defaults to an empty byte array if +not present), and any custom JSON-LD API options (such as a document loader). A single object, disclosure data, is -produced as output, which contains the "bbsProof", "labelMap", -"mandatoryIndexes", "selectiveIndexes", and "revealDocument" fields. +produced as output, which contains the `bbsProof`, `labelMap`, +`mandatoryIndexes`, `selectiveIndexes`, `presentationHeader`, and +`revealDocument` fields.

    @@ -720,9 +723,10 @@

    createDisclosureData

  1. Set `bbsProof` to the value computed by the `ProofGen` procedure from -[[CFRG-BBS-SIGNATURE]], i.e. `ProofGen(PK, signature, header, ph, messages, disclosed_indexes)`, -where `PK` is the original issuer's public key `publicKey`, `signature` is the -`bbsSignature`, `header` is the `bbsHeader`, `ph` is an empty byte array, +[[CFRG-BBS-SIGNATURE]], i.e., +`ProofGen(PK, signature, header, ph, messages, disclosed_indexes)`, +where `PK` is the original issuers public key, `signature` is the +`bbsSignature`, `header` is the `bbsHeader`, `ph` is the `presentationHeader` `messages` is `bbsMessages`, and `disclosed_indexes` is `selectiveIndexes`.
  2. @@ -823,9 +827,10 @@

    serializeDerivedProofValue

    The following algorithm serializes a derived proof value. The required inputs -are a BBS proof (bbsProof), a label map (labelMap), an -array of mandatory indexes (mandatoryIndexes), and an array of -selective indexes (selectiveIndexes). A single derived proof +are a BBS proof (bbsProof), a label map (labelMap), an +array of mandatory indexes (mandatoryIndexes), an array of +selective indexes (selectiveIndexes), and a BBS presentation header +(presentationHeader). A single derived proof value, serialized as a byte string, is produced as output.

    @@ -839,8 +844,9 @@

    serializeDerivedProofValue

    proof header bytes `0xd9`, `0x5d`, and `0x03`.
  3. -Initialize `components` to an array with four elements containing the values of -`bbsProof`, `compressedLabelMap`, `mandatoryIndexes`, and `selectiveIndexes`. +Initialize `components` to an array with five elements containing the values of +`bbsProof`, `compressedLabelMap`, `mandatoryIndexes`, `selectiveIndexes`, and +`presentationHeader`.
  4. CBOR-encode `components` and append it to `proofValue`. @@ -861,9 +867,9 @@

    parseDerivedProofValue

    The following algorithm parses the components of the derived proof value. The required input is a derived proof value (proofValue). A -A single derived proof value value object is produced as output, which -contains a set of four elements, using the names "`bbsProof`", "`labelMap`", -"`mandatoryIndexes`", and "`selectiveIndexes`". +single derived proof value object is produced as output, which +contains a set of five elements, using the names `bbsProof`, `labelMap`, +`mandatoryIndexes`, `selectiveIndexes`, and `presentationHeader`.

      @@ -884,13 +890,13 @@

      parseDerivedProofValue

      Ensure that the `decodedProofValue` starts with the BBS disclosure proof header bytes `0xd9`, `0x5d`, and `0x03`, and throw an error if it does not. -
    1. Initialize `components` to an array that is the result of CBOR-decoding the bytes that follow the three-byte BBS disclosure proof header. Ensure the result -is an array of four elements — +is an array of five elements — a byte array, a map of integers to integers, an -array of integers, and another array of integers; otherwise, throw an error. +array of integers, another array of integers, and a byte array; otherwise, throw +an error.
    2. Replace the second element in `components` using the result of calling the @@ -898,9 +904,9 @@

      parseDerivedProofValue

      second element of `components` as `compressedLabelMap`.
    3. -Return derived proof value as an object with properties set to the four -elements, using the names "`bbsProof`", "`labelMap`", "`mandatoryIndexes`", and -"`selectiveIndexes`" respectively. +Return derived proof value as an object with properties set to the five +elements, using the names `bbsProof`, `labelMap`, `mandatoryIndexes`, +`selectiveIndexes`, and `presentationHeader`, respectively.
    @@ -915,8 +921,8 @@

    createVerifyData

    document (document), a BBS disclosure proof (proof), and any custom JSON-LD API options (such as a document loader). A single verify data object value is produced as output containing the following -fields: "`bbsProof`", "`proofHash`", "`mandatoryHash`", "`selectedIndexes`", and -"`nonMandatory`". +fields: `bbsProof`, `proofHash`, `mandatoryHash`, `selectedIndexes`, +`presentationHeader`, and `nonMandatory`.

      @@ -929,9 +935,9 @@

      createVerifyData

      to use the `proofHash` value.
    1. -Initialize `bbsProof`, `labelMap`, `mandatoryIndexes`, and `selectiveIndexes` to -the values associated with their property names in the object returned when -calling the algorithm in Section +Initialize `bbsProof`, `labelMap`, `mandatoryIndexes`, `selectiveIndexes`, and +`presentationHeader` to the values associated with their property names in the +object returned when calling the algorithm in Section , passing `proofValue` from `proof`.
    2. @@ -1249,7 +1255,8 @@

      Add Derived Proof (bbs-2023)

      The derived proof is to be given to the verifier. The inputs include a JSON-LD document (document), a BBS base proof (proof), an array of JSON pointers to use to selectively disclose -statements (selectivePointers), and any custom JSON-LD API options, +statements (selectivePointers), an OPTIONAL BBS +presentationHeader (a byte array), and any custom JSON-LD API options, such as a document loader. A single selectively revealed document value, represented as an object, is produced as output.

      @@ -1260,8 +1267,8 @@

      Add Derived Proof (bbs-2023)

      `revealDocument` to the values associated with their property names in the object returned when calling the algorithm in Section , passing the `document`, `proof`, -`selectivePointers`, and any custom JSON-LD API options, such as a document -loader. +`selectivePointers`, `presentationHeader`, and any custom JSON-LD API options, +such as a document loader.
    3. Initialize `newProof` to a shallow copy of `proof`. @@ -1297,9 +1304,9 @@

      Verify Derived Proof (bbs-2023)

      1. -Initialize `bbsProof`, `proofHash`, `mandatoryHash`, `selectedIndexes`, and -`nonMandatory` to the values associated with their property -names in the object returned when calling the algorithm in Section +Initialize `bbsProof`, `proofHash`, `mandatoryHash`, `selectedIndexes`, +`presentationHeader` and `nonMandatory` to the values associated with their +property names in the object returned when calling the algorithm in Section , passing the `document`, `proof`, and any custom JSON-LD API options (such as a document loader).
      2. @@ -1311,10 +1318,12 @@

        Verify Derived Proof (bbs-2023)

      3. Initialize `verificationResult` to the result of applying the verification -algorithm `ProofVerify` of [[CFRG-BBS-SIGNATURE]] +algorithm +`ProofVerify(PK, proof, header, ph, disclosed_messages, disclosed_indexes)` of +[[CFRG-BBS-SIGNATURE]] with `PK` set as the public key of the original issuer, `proof` set as `bbsProof`, `header` set as `bbsHeader`, `disclosed_messages` set as `disclosedMessages`, -`ph` set as an empty byte array, and `disclosed_indexes` set as +`ph` set as `presentationHeader`, and `disclosed_indexes` set as `selectiveIndexes`. Return `verificationResult` as verification result.