Skip to content

Optimization opportunity? #2

@henrycg

Description

@henrycg

https://github.com/edauterman/hsm-impl/blob/66e816ca1900977520e4d34886c488f2c793af29/agent/shamir.cc#L215

It looks like Shamir_ValidateShares and Shamir_ReconstructShares are both doing the expensive polynomial interpolation. Instead, you could interpolate the polynomial once (in Shamir_ReconstructShares) and then pass the coefficients of that polynomial to Shamir_ValidateShares, which could check that all of the shares are point on that polynomial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions