Skip to content

Commit

Permalink
Add unfinalized session warning to participant_step2
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasnick committed Dec 16, 2024
1 parent 7507a5e commit 73c01fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,16 @@ def participant_step2(hostseckey: bytes, state1: ParticipantState1, cmsg1: Coord

Perform a participant's second step of a ChillDKG session.

*Warning:*
After sending the returned message to the coordinator, you **must not**
erase the hostseckey, even if you don't receive the coordinator reply needed
for the `participant_finalize` call. The underlying reason is that some
other participant may receive the coordinator reply, deem the DKG session
successful and use the resulting threshold public key (e.g., by sending
funds to it). If the coordinator reply remains missing, that other
participant can, at any point in the future, convince us of the success of
the DKG session by presenting recovery data to us.

*Arguments*:

- `hostseckey` - Participant's long-term host secret key (32 bytes).
Expand Down
10 changes: 10 additions & 0 deletions python/chilldkg_ref/chilldkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,16 @@ def participant_step2(
) -> Tuple[ParticipantState2, ParticipantMsg2]:
"""Perform a participant's second step of a ChillDKG session.
**Warning:**
After sending the returned message to the coordinator, you **must not**
erase the hostseckey, even if you don't receive the coordinator reply needed
for the `participant_finalize` call. The underlying reason is that some
other participant may receive the coordinator reply, deem the DKG session
successful and use the resulting threshold public key (e.g., by sending
funds to it). If the coordinator reply remains missing, that other
participant can, at any point in the future, convince us of the success of
the DKG session by presenting recovery data to us.
Arguments:
hostseckey: Participant's long-term host secret key (32 bytes).
state1: The participant's session state as output by
Expand Down

0 comments on commit 73c01fd

Please sign in to comment.