Skip to content

Commit

Permalink
SECURITY Include eq_input in signed message
Browse files Browse the repository at this point in the history
sigh
  • Loading branch information
real-or-random committed Oct 23, 2024
1 parent 8e052d9 commit 1a2dd1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/chilldkg_ref/chilldkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class InvalidRecoveryDataError(Exception):


def certeq_message(x: bytes, idx: int) -> bytes:
return idx.to_bytes(4, "big")
return idx.to_bytes(4, "big") + x


def certeq_participant_step(hostseckey: bytes, idx: int, x: bytes) -> bytes:
Expand Down Expand Up @@ -634,7 +634,8 @@ def recover(
params_validate(params)

# Verify cert
certeq_verify(hostpubkeys, recovery_data[: 64 * n], cert)
eq_input = recovery_data[: -len(cert)]
certeq_verify(hostpubkeys, eq_input, cert)

# Compute threshold pubkey and individual pubshares
threshold_pubkey = sum_coms.commitment_to_secret()
Expand Down

0 comments on commit 1a2dd1b

Please sign in to comment.