Skip to content

Commit

Permalink
chilldkg: Use proper random aux_bytes when signing
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed May 23, 2024
1 parent ffbca88 commit 60265a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reference/chilldkg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Reference implementation of BIP DKG.
from secrets import token_bytes as random_bytes
from typing import Tuple, List, NamedTuple, NewType, Optional

from secp256k1ref.secp256k1 import Scalar
Expand Down Expand Up @@ -26,8 +27,7 @@


def certifying_eq_participant_step(hostseckey: bytes, x: bytes) -> bytes:
# TODO: fix aux_rand
return schnorr_sign(x, hostseckey, b"0" * 32)
return schnorr_sign(x, hostseckey, random_bytes(32))


def certifying_eq_verify(hostpubkeys: List[bytes], x: bytes, cert: bytes) -> bool:
Expand Down

0 comments on commit 60265a3

Please sign in to comment.