Skip to content

Bug: deriving private key will fail if index is larger than that of decryptedShares.length #146

Description

@metalurgical

Maximum index of decrypted shares should be used here instead of decryptedShares.length in order to get the correct kCombinations in all instances:

https://github.com/torusresearch/torus.js/blob/0160ae8fb4c622ba44c1e80872da2d17cb0e8650/src/helpers/nodeUtils.ts#L503

This is reproducible in the following scenario:

threshold = 3
decryptedShares.count = 3
indexes: [2,3,4]

kCombinations will not include a combination for [2,3,4]

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions