Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Procedures related to Optional Features #182

Merged
merged 11 commits into from
Aug 28, 2024

Conversation

Wind4Greg
Copy link
Collaborator

@Wind4Greg Wind4Greg commented Jul 16, 2024

This PR addresses issue #180. In particular it takes into account the updated APIs/procedures in the drafts:

  1. BBS Blind Signatures
  2. BBS per Verifier Lin

Sections 3.4.5 Base Proof Serialization (bbs-2023), 3.4.6 Add Derived Proof (bbs-2023), 3.4.7 Verify Derived Proof (bbs-2023) and some of their sub-procedures have been updated to use the the new APIs from these drafts. Importantly the two different flavors of pseudonyms now have a unified proof verification procedure which has resulted in simplified processing.


Preview | Diff

Copy link
Contributor

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, but see comments. Thanks!

@@ -878,7 +878,7 @@ <h4>createDisclosureData</h4>
</li>
<li>
If |featureOption| equals `"anonymous_holder_binding"`,
set `bbsProof` to the value computed by the `ProofGen` procedure from
set `bbsProof` to the value computed by the `BlindProofGen` procedure from
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an inconsistency here between referring to the function name from the appropriate BBS spec or referring to the title of the procedure section in that spec. Here we use the function name (BlindProofGen) and below we use the section title Calculate Pseudonym and Hidden PID Proof Generation with Pseudonym. We should pick one of these and me consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlongley yes, when the draft IETF specs didn't have a function name (pseudonym signing) I used section names. Then I dropped the parenthesis after function names, i.e., BlindProofGen() is actually a function that is defined. Ideas/preferences for consistency?

Copy link
Contributor

@dlongley dlongley Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer the function name (and the parenthesis can be omitted) because it's shorter and more specific for implementers. I can live with full titles as well if people want that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumping on this -- it can be handled in another PR if necessary, but we should get consistency at some point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency is good. Clarity is better.

Is BlindProofGen a function or a procedure?
Is Calculate Pseudonym a procedure or a function?

I believe I've seen both procedures and functions (elsewhere) named with Pascal case. I think I've only seen multi-word names on procedures, not functions.

I think including the () helps clarify that the thing being discussed is a function, as I don't think I've ever seen a () suffix on a procedure name.

All of which to say — I would prefer to keep the () and use Pascal- or camel-case to name functions, and to use multi-word names for procedures, and to always be explicit about function calls vs procedure runs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Wind4Greg have @TallTed's issues been addressed? I'd like to merge this PR, but not until we've addressed @TallTed's concerns.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @msporny not quite sure what to do about @TallTed's concerns some of the inconsistent naming comes from the IETF drafts. I'm not sure we differentiate between functions and procedures as terms. If there is something concrete that needs to be changed happy to update.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to be consistent with what we call these things. As someone not familiar with some of this new text, I'd question what the difference is between a "function" and a "procedure". I'd be worried that I am missing something important when seeing those words if they're used interchangeably. IOW, we should pick one and be consistent in its usage. I suggest we use the word "algorithm" throughout all of the specifications as I believe that's what we do throughout the other specifications.

I try to avoid the use of the word "function" because some developers believe it to be referring to a software library call.

I avoid the word "procedure" because readers believe it's a loosely defined set of tasks where the implementation details are unimportant.

I use the word algorithm because it doesn't have the same connotations as "function" nor "procedure" -- it is more abstract than a function but less abstract than a procedure.

Can we update ALL of the references to refer to "algorithms" and NOT use the () notation because that implies a concrete function (which the IETF specifications are not).

index.html Outdated
@@ -953,7 +958,7 @@ <h4>createDisclosureData</h4>
</li>
<li>
Return an object with properties matching |bbsProof|, "verifierLabelMap" for |labelMap|,
|mandatoryIndexes|, |selectiveIndexes|, |revealDocument|, and |pseudonym|, if
|mandatoryIndexes|, |selectiveIndexes|, |revealDocument|, |pseudonym|, and |L| if
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a better semantic name than L even if we want to say that it maps to L in a low-level BBS spec. The letter L itself can be confused with other symbols -- but at least this is less likely with an upper-case L.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dlongley, L is the number of issuer signed BBS messages. Or in W3C VC-DI-BBS speak the number of non-mandatory n-quads. When working with Blind BBS and Pseudonym BBS proofs (W3C derived proofs) this is a new parameter that is needed during verification since we separated out the "group generators" for the blinded (holder) messages from the issuer messages to simplify indexing and to unify pseudonym proof verification. I'll take any suggestions for naming!

index.html Outdated
|bbsProof|, |compressedLabelMap|, |mandatoryIndexes|, |selectiveIndexes|,
|presentationHeader|, and |pseudonym|.
|presentationHeader| and |L|.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this changed from pseudonym to L ... I'm not checking this closely right now, but will do so during implementation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlongley both anonymous holder binding and pseudonyms features need the L parameter now. Pseudonyms still need pseudonyms ;-).

Copy link
Member

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@Wind4Greg
Copy link
Collaborator Author

@TallTed (and @dlongley ) I updated to replace the L variable name with lengthBBSMessages and cleaned up its usage in the procedures related to verification. Note that the Anonymous Holder Binding feature needs the lengthBBSMessages (L) parameter, while both pseudonym features need the pseudonym and lengthBBSMessages (L) parameters. Hopefully I've gotten the conjunctions right for this.

@Wind4Greg Wind4Greg requested a review from TallTed July 17, 2024 16:20
Copy link
Member

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some fixes to the changes, and some new changes. Grammar, punctuation, etc.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@Wind4Greg Wind4Greg requested a review from TallTed July 18, 2024 16:41
@Wind4Greg
Copy link
Collaborator Author

@TallTed and @dlongley I discovered an off by one error while updating on the optional feature test vectors. I put in a fix here. So asking for a re-review to be formal about things. Cheers @Wind4Greg

@Wind4Greg Wind4Greg requested review from dlongley and TallTed July 18, 2024 18:16
index.html Outdated Show resolved Hide resolved
@Wind4Greg
Copy link
Collaborator Author

Hi @dlongley and @TallTed, I added the updates test vectors to the optional features to this PR since it hasn't been merged yet and it would have been confusing to attach them elsewhere. Hence to keep our procedures sound I'm asking for a re-review. No text has been changed only the JSON test vector files that are imported via ReSpec.

@Wind4Greg Wind4Greg requested review from TallTed and dlongley August 7, 2024 16:04
Copy link
Contributor

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the additions with the same caveat that I haven't fully updated DB's implementation yet to run against them; I will do so in the near future and hopefully confirm interoperability. I bumped another comment around consistency in how we reference core BBS primitives that we will want to address at some point.

@@ -878,7 +878,7 @@ <h4>createDisclosureData</h4>
</li>
<li>
If |featureOption| equals `"anonymous_holder_binding"`,
set `bbsProof` to the value computed by the `ProofGen` procedure from
set `bbsProof` to the value computed by the `BlindProofGen` procedure from
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumping on this -- it can be handled in another PR if necessary, but we should get consistency at some point.

@@ -878,7 +878,7 @@ <h4>createDisclosureData</h4>
</li>
<li>
If |featureOption| equals `"anonymous_holder_binding"`,
set `bbsProof` to the value computed by the `ProofGen` procedure from
set `bbsProof` to the value computed by the `BlindProofGen` procedure from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to be consistent with what we call these things. As someone not familiar with some of this new text, I'd question what the difference is between a "function" and a "procedure". I'd be worried that I am missing something important when seeing those words if they're used interchangeably. IOW, we should pick one and be consistent in its usage. I suggest we use the word "algorithm" throughout all of the specifications as I believe that's what we do throughout the other specifications.

I try to avoid the use of the word "function" because some developers believe it to be referring to a software library call.

I avoid the word "procedure" because readers believe it's a loosely defined set of tasks where the implementation details are unimportant.

I use the word algorithm because it doesn't have the same connotations as "function" nor "procedure" -- it is more abstract than a function but less abstract than a procedure.

Can we update ALL of the references to refer to "algorithms" and NOT use the () notation because that implies a concrete function (which the IETF specifications are not).

@msporny
Copy link
Member

msporny commented Aug 28, 2024

Normative, multiple reviews, changes requested and made, no objections, merging.

@msporny msporny merged commit 79e1b0e into w3c:main Aug 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants