Skip to content

Commit

Permalink
Update createDisclosureData to use passed in values of bbsHeader and …
Browse files Browse the repository at this point in the history
…publicKey.
  • Loading branch information
Wind4Greg committed Jan 16, 2024
1 parent 8fb650a commit b8c036f
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ <h4>createDisclosureData</h4>

<ol class="algorithm">
<li>
Initialize `bbsSignature`, `hmacKey`, and
Initialize `bbsSignature`, `bbsHeader`, `publicKey`, `hmacKey`, and
`mandatoryPointers` to the values of the associated properties in the object
returned when calling the algorithm in Section
<a href="#parsebaseproofvalue"></a>, passing the `proofValue` from `proof`.
Expand Down Expand Up @@ -716,37 +716,11 @@ <h4>createDisclosureData</h4>
Initialize `bbsMessages` to an array of byte arrays obtained from the
UTF-8 encoding of the the values in the `nonMandatory` array.
</li>
<li>
Recompute the `bbsHeader` using the following steps:

<ol class="algorithm">
<li>
Initialize `proofHash` to the result of calling the RDF Dataset Canonicalization
algorithm [[RDF-CANON]] on `proof` with the `proofValue` removed and then
cryptographically
hashing the result using the same hash that is used by the signature algorithm,
i.e., SHAKE-256. Note: This step can be performed in parallel;
it only needs to be completed before this algorithm terminates, as the result is
part of the return value.
</li>
<li>
Initialize `mandatoryHash` to the result of calling the algorithm in
<a href="https://www.w3.org/TR/vc-di-ecdsa/#hashmandatorynquads">Section 3.3.17
hashMandatoryNQuads</a> of the [[DI-ECDSA]] specification, passing the values
from the map
<var>groups.mandatory.matching</var> and utilizing the SHAKE-256 algorithm.
</li>
<li>
Set `bbsHeader` to the concatenation of `proofHash` and `mandatoryHash` in that
order.
</li>
</ol>
</li>

<li>
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 issuers public key, `signature` is the
where `PK` is the original issuers public key `publicKey`, `signature` is the
`bbsSignature`, `header` is the `bbsHeader`, `ph` is an empty byte array,
`messages` is `bbsMessages`, and `disclosed_indexes` is `selectiveIndexes`.
</li>
Expand Down

0 comments on commit b8c036f

Please sign in to comment.