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

Non-members can generate member certificates and can be verified #1

Open
pandy1715 opened this issue Mar 21, 2022 · 1 comment
Open

Comments

@pandy1715
Copy link

start = clock();
wb_y = issueWitness(accumulator, yb, MEMBERSHIP);
end = clock();
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
printf("~~Issue Non-membership witness took %fs\n", cpu_time_used);

This can pass the test, but WB_ Y is not a member

@pandy1715
Copy link
Author

pandy1715 commented Mar 21, 2022

you can try this in issueWitness
if (isMembership == true) {
//Compute fV(-y)
bn_set_dig(w_y->d, 1);
//Computing fV(-y) everyime is better than keeping fV updated
for (int i = 0; i < accumulator->totAccEl; i++) {
bn_sub(tmp, accumulator->Y[i], y);
bn_mul(w_y->d, w_y->d, tmp);
bn_mod(w_y->d, w_y->d, accumulator->n);
}
assert(bn_cmp_dig(w_y->d, 0) == RLC_EQ);
g1_mul(w_y->C, accumulator->V, yplusainv);
bn_set_dig(w_y->d, 0);
}

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

No branches or pull requests

1 participant