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

Submitting request for VerifyProof with non-sequental reveal indexes #6

Closed
tmarkovski opened this issue Aug 22, 2020 · 1 comment
Closed

Comments

@tmarkovski
Copy link
Contributor

Suppose an input message array

[ "message_0", "message_1", "message_2" ]

I can generate a proof by revealing "message_0" or index 0. To verify this proof I can submit index 0 and message message_0 to the verify_proof method. All good.

Issue 1 - supplied message count must be equal to reveal + hidden count

If I wanted to reveal indexes 0 and 2, I should be able to submit the following to the verify_proof, specifically bbs_verify_proof_context_add_message_string and bbs_verify_proof_context_add_revealed_index

(0, "message_0")
(2, "message_2")

However I'm unable to do so. The API wants me to submit an index for 1.

BbsSignatures.BbsException : index out of bounds: the len is 2 but the index is 2

To fix this, I can add any message with arbitrary value, with index 1

(0, "message_0")
(1, "any_message_will_do")
(2, "message_2")

Issue 2 - messages must be added in the indexed order

I should be able to call the API and add verify proof messages in the following order

(2, "message_2")
(0, "message_0")

This wouldn't work, as it'll produce BadRevealedMessage result.

mikelodder7 added a commit that referenced this issue Aug 22, 2020
Signed-off-by: Michael Lodder <redmike7@gmail.com>
@tmarkovski
Copy link
Contributor Author

Verified that it works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant