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

Purpose of EnsureRank #242

Open
terenceyak opened this issue Feb 28, 2023 · 1 comment
Open

Purpose of EnsureRank #242

terenceyak opened this issue Feb 28, 2023 · 1 comment

Comments

@terenceyak
Copy link

terenceyak commented Feb 28, 2023

Currently, if you try and to run alice on an example in the docs, it will already fail when calling NewDKG with error large rank.

The example states:

Let threshold = 3, and participants = 4. Assume that the corresponding rank of each shareholder are 0, 1, 1, 2. Then authorised sets in this setting are:

- 0, 1, 1
- 0, 1, 2
- 0, 1, 1, 2

The other combinations of shares can not recover the secret (e.g. 1, 1, 2).

This is due to ErrLargeRank of EnsureRank in crypto/utils/utils.go, . The related code is linked here.

If you think about it for the participant with rank of 2, then rank + 1 will be 3 which is equal the threshold in the example, and will fail.

There can either be 1 of the 2 possibilities:

  1. the restriction rank+1 >= threshold is too strict
  2. the example in the docs is invalid

Should EnsureRank be less strict or should the example in the docs be changed?

Thanks.

@cychuang0924
Copy link
Contributor

Hi terenceyak,

Yes, your comment is correct. We maybe offer two options to users:

  1. Current version.
  2. You can set any condition as long as we check that there is any way to recover the private key. Then we will accept it.

As for document, we will add some comments.

Thanks for your suggestion!

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

2 participants