Skip to content

feat(pkc): expose BLS secret-share recovery #113

Closed

Description

@lklimek

Summary

Expose BLS secret-share recovery in dash-pkc, reusing the threshold ID validation and interpolation machinery already owned by the crypto crate.

Caller

Platform PR #5323 removes dashpay/bls-signatures. Its mock quorum builder needs to recover a secret key from participant secret shares. BlsPublicKey::recover_shares and signature recovery are available, but the pinned base-sdk revision addedfa16a56c77f435b41804cd2c0668b776e97 has no equivalent secret-key recovery API. The same API is absent on develop at 02ba9c27e51826d0d8a4d6353b9f7c9422389f5b.

Platform currently carries a mock-only scalar implementation through dash_pkc::__deps::ff. Moving this responsibility into dash-pkc lets Platform delegate through its BLS adapter and remove the local interpolation implementation.

Required behavior

  • Recover a BLS secret key from paired participant IDs and secret shares, interpolating at zero.
  • Reuse the existing reduced-ID validation: interpret 32-byte IDs as big endian modulo the scalar order, reject zero-reducing IDs and IDs equal modulo that order.
  • Reject fewer than two shares and a zero recovered secret with typed errors.
  • Match existing Core-compatible secret/public key bytes and Basic signatures. Platform has independent frozen vectors for 2, 3 and 5 members in core_quorums.json.

Implementation belongs in pkgs/pkc/src/bls/share_ops.rs / scheme_ops.rs, beside public-key and signature recovery. After publishing the API, update rust-dashcore/Platform adapters and replace Platform's mock helper.

🤖 Co-authored by Claudius the Magnificent AI Agent

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions