Skip to content

feat: Implement CGGMP24 key share refresh protocol (#162)#178

Open
gyanranjanpanda wants to merge 1 commit intoLFDT-Lockness:cggmp24/mfrom
gyanranjanpanda:feat/key-share-refresh
Open

feat: Implement CGGMP24 key share refresh protocol (#162)#178
gyanranjanpanda wants to merge 1 commit intoLFDT-Lockness:cggmp24/mfrom
gyanranjanpanda:feat/key-share-refresh

Conversation

@gyanranjanpanda
Copy link
Copy Markdown

Implement Key Refresh protocol (Fixes #162)

Description

This PR implements the Key Share Refresh protocol as requested in #162, ensuring the long-term security of the secret key by updating individual key shares without changing the underlying secret key.

The implementation covers:

  1. Non-Threshold (n-out-of-n): Compliant with Figure 7 of the CGGMP24 paper. Uses a zero-sum vector trick where each party distributes randomly sampled scalars summing to zero. Includes P2P unicast exchange and exact Feldman VSS verification over the $G$ curve, completing with a valid Schnorr proof of knowledge of the new secret share.
  2. Threshold (t-out-of-n): Compliant with Appendix F.1.1. Employs zero-sharing polynomials leveraging identical messaging rounds and evaluations but correctly isolating degree-$t-1$ bounds across public VSS polynomials.

Key Changes

  • Extracts the refresh logic out to cggmp24-keygen/src/key_refresh_non_threshold.rs and cggmp24-keygen/src/key_refresh_threshold.rs.
  • Decouples refresh errors from Bug/KeygenError via separate RefreshBug and RefreshAborted enums to keep upstream Keygen cleaner.
  • Ensures all new algorithms use the correct generic-ec 0.5 primitives (e.g., using *secret_scalar.as_ref() for Scalar bounds and .value(&Scalar::zero()) without trait ambiguity).
  • Both entry points and builders are re-exported into the main cggmp24 crate alongside Keygen variants.
  • Comprehensive integration tests at tests/tests/it/key_share_refresh.rs checking validity mapping across multiple rounds, unaltered secrets with altered shares, threshold min-signer limits, and cross-epoch share incompatibility.

This provides the core cggmp24::keygen::key_refresh functionality as requested, without the legacy aux info elements intermingled into these modules.

- Implements Figure 7 for non-threshold refresh (n-of-n) using zero-share vectors
- Implements Appendix F.1.1 for threshold refresh (t-of-n) using zero-sharing polynomials
- Introduces RefreshBug and RefreshAborted enums to isolate refresh failures and prevent pollution of keygen error definitions
- Re-exports key_refresh entry point from cggmp24 crate
- Includes full integration tests verifying secret preservation and cross-epoch shard independence

Signed-off-by: Gyan Ranjan Panda <gyanranjanpanda@gmail.com>
@gyanranjanpanda gyanranjanpanda force-pushed the feat/key-share-refresh branch from 1c96b60 to 6219524 Compare April 12, 2026 17:50
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

Successfully merging this pull request may close these issues.

Implement Key Refresh protocol

1 participant