refresh

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

README

Share Refresh

Proactive share refresh protocol following “Proactive Secret Sharing”. arties derive a zero-sum sharing and add it to their existing Feldman shares, obtaining fresh shares of the same secret.

Protocol Overview

  1. Zero Sharing: Run the HjKY zero-sharing subprotocol to generate a shared random value that sums to zero.
  2. Apply Offset: Each party adds its zero share to its current share and adds the corresponding verification vector to the existing one.
  3. Output: Refreshed shares and verification material represent the same secret under fresh randomness.

Implementation Notes

  • Refreshing does not alter the underlying secret or access structure.
  • The transcript domain separator binds the refresh session to the caller’s context.
  • Participant exposes Round1 and Round2; use a network.Router to exchange messages.

Usage

  1. Create a refresher with NewParticipant(sessionID, shard, tape, prng).
  2. Run Round1 and exchange Round1Broadcast/Round1P2P messages.
  3. Run Round2 with collected inputs to obtain the refreshed share and verification vector.

Documentation

Overview

Package refresh provides proactive share refresh protocol following “Proactive Secret Sharing”. arties derive a zero-sum sharing and add it to their existing Feldman shares, obtaining fresh shares of the same secret.

See README.md for details.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidArgument indicates missing or inconsistent inputs.
	ErrInvalidArgument = errs.New("invalid argument")
)

Functions

This section is empty.

Types

type Participant

type Participant[G algebra.PrimeGroupElement[G, S], S algebra.PrimeFieldElement[S]] struct {
	// contains filtered or unexported fields
}

Participant orchestrates share refresh using a zero-sum offset.

func NewParticipant

func NewParticipant[G algebra.PrimeGroupElement[G, S], S algebra.PrimeFieldElement[S]](sid network.SID, shard *tsig.BaseShard[G, S], tape transcripts.Transcript, prng io.Reader) (*Participant[G, S], error)

NewParticipant constructs a shard refresher using the HjKy zero-sharing subprotocol.

func (*Participant[G, S]) Round1

func (p *Participant[G, S]) Round1() (broadcast *Round1Broadcast[G, S], unicasts network.OutgoingUnicasts[*Round1P2P[G, S]], err error)

Round1 runs the zero-sharing subprotocol to derive a refresh offset.

func (*Participant[G, S]) Round2

func (p *Participant[G, S]) Round2(r2b network.RoundMessages[*Round1Broadcast[G, S]], r2u network.RoundMessages[*Round1P2P[G, S]]) (share *feldman.Share[S], verification feldman.VerificationVector[G, S], err error)

Round2 finishes the refresh by adding the zero-share to the existing shard.

func (*Participant[G, S]) SharingID

func (p *Participant[G, S]) SharingID() sharing.ID

SharingID returns the identifier of the refreshed shard.

type Round1Broadcast

type Round1Broadcast[G algebra.PrimeGroupElement[G, S], S algebra.PrimeFieldElement[S]] = hjky.Round1Broadcast[G, S]

Round1Broadcast carries the public commitments for the zero-share offset.

type Round1P2P

type Round1P2P[G algebra.PrimeGroupElement[G, S], S algebra.PrimeFieldElement[S]] = hjky.Round1P2P[G, S]

Round1P2P delivers the private zero-share offsets to each participant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL