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

verifying valid A/B values #1

Open
rodspade opened this issue Mar 15, 2018 · 0 comments
Open

verifying valid A/B values #1

rodspade opened this issue Mar 15, 2018 · 0 comments

Comments

@rodspade
Copy link

The bnGreaterOrEqual function is broken. It should use >= instead of >

Also, I think that client_getS and server_getS do not validate their inputs correctly:
if((zero.compareTo(B_num) > 0) && (N.compareTo(B_num) < 0))
throw new Error("invalid server-supplied 'B', must be 1..N-1");

This will error only if B is both less than 0 AND greater than N! That will never happen. I believe it should be:
zero.compareTo(B_num) >= 0 || N.compareTo(B_num) <= 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