Skip to content

Conversation

@mark-moir
Copy link
Contributor

This PR adds several tests. Each test:

  • creates two issuers/signers
  • creates a signature for each signer, each including one attribute that is blinded (by the holder)
  • unblinds the signatures
  • creates a proof of knowledge of both signatures and equality of the blinded values.

We test that

  • when the blinded values are equal, proof creation and verification succeeds.
  • when the blinded values are unequal, either proof creation fails, or verification of the created proof fails

This test was motivated by the fact that the existing blinding tests in proof_system/tests/bbs_plus_and_accumulators.rs:

  • requesting_partially_blind_bbs_plus_sig
  • requesting_partially_blind_bbs_plus_sig
  • requesting_partially_blind_bbs_sig

do not use unblinded/blind signatures in proofs.

This PR also adds a NOTICE.md file saying that Oracle contributed. We are required to include such notice for our approval to contribute to the repo. By putting a notice in one place, we avoid putting it in individual files that we contribute to, which in future may include existing files. Hope this is OK.

Signed-off-by: Harold Carr <harold.carr@oracle.com>
// This test was motivated by the fact that the existing blinding tests
// proof_system/tests/bbs_plus_and_accumulators.rs
// requesting_partially_blind_bbs_plus_sig
// requesting_partially_blind_bbs_plus_sig
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is duplicate of the above line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, removed.

// requesting_partially_blind_bbs_plus_sig
// requesting_partially_blind_bbs_plus_sig
// requesting_partially_blind_bbs_sig
// do not use the unblinded/blind signature in proofs. Hence, this test.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't use the "unblinded" sig in proof (of knowledge of sig) as other tests do that and an "unblinded" sig is same as a regular sig

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The requesting_partially_blind_bbs_sig test doesn't unblind the blinded signature.

The requesting_partially_blind_bbs_plus_sig test does, and then verifies the unblinded signature, but does not create any proofs with it. One might argue that verifying the unblinded signature is sufficient to ensure it's "just the same as a regular sig", and therefore can be used to create all the same proofs. However, I think that it's worthwhile explicitly testing that we can use the unblinded signature to create and verify at least one proof.

Copy link
Collaborator

Choose a reason for hiding this comment

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

requesting_partially_blind_bbs_sig doesn't have the blinding term (s) and thus no unblind function for BBS sigs. The user might separately add blinding to achieve the same effect as BBS+

// do not use the unblinded/blind signature in proofs. Hence, this test.

blind_bbs_plus_sig_and_message_equality_aux(true).unwrap();
if blind_bbs_plus_sig_and_message_equality_aux(false).is_ok() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason you wouldn't want assert!(blind_bbs_plus_sig_and_message_equality_aux(false).is_err()) to replace this if block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason 😄. Fixed, thanks.

@lovesh
Copy link
Collaborator

lovesh commented May 2, 2025

Thanks for the PR @mark-moir .

mark-moir added 2 commits May 5, 2025 13:41
Signed-off-by: Mark Moir <mark.moir@oracle.com>
Signed-off-by: Mark Moir <mark.moir@oracle.com>
@lovesh
Copy link
Collaborator

lovesh commented May 5, 2025

Thanks for the updates.

@lovesh lovesh merged commit 68f72a9 into docknetwork:main May 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants